Point neighbor trajectory query method, device, electronic device and readable storage medium
Through regional pruning and lower bound pruning processing, combined with spatial range indexing and distributed storage, the problem of low efficiency of point nearest neighbor trajectory query in the existing technology is solved, and efficient trajectory query and data management are realized.
Patent Information
- Application Number
- CN202011583513.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-12-28
AI Technical Summary
The existing point nearest neighbor trajectory query algorithm is inefficient and cannot effectively process massive trajectory data, resulting in large amounts of computation and insufficient memory resources.
By determining the Frecher distance between the to-be-queried point and the to-be-queried area, the query range of the candidate trajectory is streamlined, and the calculation amount and query time are reduced through the construction of lower bound pruning and spatial range indexes, and the distributed method is used. The server stores indexes to improve query efficiency.
It improves the efficiency and accuracy of point nearest neighbor trajectory query, reduces unnecessary query trajectory number and time, reduces the maintenance pressure of trajectory data, and improves the reliability of queries.
Smart Images

Figure CN112597190B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a point neighbor trajectory query method, device, electronic device and readable storage medium. Background Art
[0002] Point k-neighboring trajectory query refers to finding the k trajectories closest to a given point in space.
[0003] Many applications rely on this technology, such as: 1) traffic flow modeling, real-time query of trajectories around a given location, and calculation of the time and speed to pass through the point; 2) trajectory data mining, query of neighboring trajectories of multiple points, and intersection of them to obtain the common trajectory passing through these points, which can be used for route recommendation.
[0004] The main idea of the current query algorithm is as follows: based on a relational database, all trajectory data is read into memory, and then the surrounding space range is continuously expanded with the query point as the center, while all trajectories in the space are traversed and sorted by the distance to the query point until the nearest k trajectories are found.
[0005] However, due to the huge number of trajectory points on the trajectory, the amount of calculation of spatial distance is large, which leads to serious efficiency problems in the existing trajectory neighbor query.
[0006] In addition, with the popularization of in-vehicle navigation systems, massive amounts of trajectory data are being generated continuously, and traditional relational databases can no longer support the storage and analysis of such a large amount of data. Therefore, existing technologies based on traditional relational databases have also encountered bottlenecks, that is, limited memory resources cannot accommodate and analyze massive amounts of data.
[0007] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0008] The purpose of the present disclosure is to provide a point neighbor trajectory query method, device, electronic device and readable storage medium, which at least to some extent overcome the problem of low efficiency of point neighbor trajectory query in related technologies.
[0009] Other features and advantages of the present disclosure will become apparent from the subsequent detailed description, or may be learned in part by the practice of the present disclosure.
[0010] According to one aspect of the present disclosure, a point neighbor trajectory query method is provided, including: determining a first Fréchet distance between a point to be queried and an area to be queried, and performing area pruning on the area to be queried; determining a candidate trajectory of the area to be queried after area pruning; performing lower bound pruning on the candidate trajectory of the area to be queried according to a lower bound position of the point to be queried and a lower bound position of the candidate trajectory; and determining the candidate trajectory after the lower bound pruning as a query trajectory result.
[0011] In one embodiment of the present disclosure, determining a first Fleche distance between a point to be queried and an area to be queried, and performing a region pruning process on the area to be queried includes: determining a first Fleche distance between a point to be queried and an area to be queried; determining whether the first Fleche distance is greater than or equal to a maximum distance threshold; and if it is determined that the first Fleche distance is greater than or equal to the maximum distance threshold, performing a region pruning process on the area to be queried.
[0012] In one embodiment of the present disclosure, the lower bound position includes at least one of a start point lower bound position, an end point lower bound position, and a trajectory signature lower bound position.
[0013] In one embodiment of the present disclosure, according to the lower bound position of the point to be queried and the lower bound position of the candidate trajectory, the lower bound pruning processing of the candidate trajectory includes: determining the starting point Fleche distance between the lower bound position of the starting point of the point to be queried and the lower bound position of the starting point of the candidate trajectory; according to the relationship between the starting point Fleche distance and the first preset distance, performing a first lower bound pruning processing on the query area.
[0014] In one embodiment of the present disclosure, performing lower bound pruning on candidate trajectories according to the lower bound position of the point to be queried and the lower bound position of the candidate trajectories further includes: determining an endpoint Fleche distance between the endpoint lower bound position of the point to be queried and the endpoint lower bound position of the candidate trajectories; and performing a second lower bound pruning on the candidate trajectories according to a size relationship between the endpoint Fleche distance and a second preset distance.
[0015] In one embodiment of the present disclosure, before determining the first Fréchet distance between the point to be queried and the area to be queried, it also includes: acquiring the point to be queried and determining the spatial position information of the point to be queried; generating a trajectory signature based on the positional relationship between the spatial position information of the point to be queried and the area to be queried; determining the spatial position index code of the point to be queried through XZ-Ordering; and constructing a spatial range index of the point to be queried based on the trajectory signature and the spatial position index code.
[0016] In one embodiment of the present disclosure, generating a trajectory signature based on the positional relationship between the spatial position information of the point to be queried and the area to be queried also includes: orderly encoding the four sub-node to-be-queried areas of any area to be queried; recording the sub-node to-be-queried area to which the point to be queried belongs as a first code, and recording the sub-node to-be-queried area to which the point to be queried does not belong as a second code; determining the trajectory signature of the point to be queried based on the ordered code, the first code and the second code.
[0017] In one embodiment of the present disclosure, performing lower bound pruning on candidate trajectories of a query area according to the lower bound position of a point to be queried and the lower bound position of a candidate trajectory also includes: generating a trajectory signature of the candidate trajectory according to the positional relationship between the spatial position information of the candidate trajectory and the query area; determining a trajectory signature Flechet distance between a lower bound of the trajectory signature of the point to be queried and a lower bound of the trajectory signature of the candidate trajectory; and performing a third lower bound pruning on the candidate trajectory according to a size relationship between the trajectory signature Flechet distance and a third preset distance.
[0018] In one embodiment of the present disclosure, performing lower bound pruning on candidate trajectories of a query area according to the lower bound position of the query point and the lower bound position of the candidate trajectories further includes: determining a minimum distance between the query point and any query area after the area pruning; performing lower bound pruning on candidate trajectories of the query area in order of the minimum distance from small to large; and updating a maximum distance threshold according to the result of each lower bound pruning.
[0019] In one embodiment of the present disclosure, the method further includes: determining an identifier of the point to be queried; and adding the identifier of the point to be queried to the suffix of the spatial range index.
[0020] In one embodiment of the present disclosure, the method further includes: obtaining a random number of a point to be queried; adding the random number to a prefix of a spatial range index; and randomly storing the spatial range index to a distributed server according to the prefix.
[0021] In one embodiment of the present disclosure, it also includes: taking out a to-be-queried area from a first priority queue storing the to-be-queried areas; determining the encoding length of the spatial range index of the to-be-queried area; and expanding the to-be-queried area or stopping splitting the to-be-queried area according to the size relationship between the encoding length and a preset length.
[0022] In one embodiment of the present disclosure, based on the size relationship between the coding length and the preset length, expanding the area to be queried or stopping splitting the area to be queried includes: determining whether the coding length of the spatial range index is greater than the preset length; if it is determined that the coding length is greater than the preset length, not splitting the area to be queried; and performing spatial range query processing in the area to be queried.
[0023] In one embodiment of the present disclosure, expanding the area to be queried or stopping splitting the area to be queried according to the size relationship between the coding length and the preset length also includes: determining whether the coding length of the spatial range index of the spatial range index is greater than the preset length; if it is determined that the coding length is less than or equal to the preset length, recursively splitting the area to be queried by a quadtree to generate a child node area to be queried of the area to be queried, until the coding length of the spatial range index of the child node area to be queried is greater than or equal to the preset length.
[0024] In one embodiment of the present disclosure, the method further includes: after stopping the recursive quadtree splitting of the area to be queried, determining candidate trajectories within the area to be queried, and storing the candidate trajectories in a second priority queue.
[0025] According to another aspect of the present disclosure, a point neighbor trajectory query device is provided, including: a pruning module, used to determine the first Fréchet distance between the to-be-queried point and the to-be-queried area, and perform area pruning processing on the to-be-queried area; a determination module, used to determine the candidate trajectory of the to-be-queried area after area pruning; the pruning module is also used to perform lower bound pruning processing on the candidate trajectory of the to-be-queried area according to the lower bound position of the to-be-queried point and the lower bound position of the candidate trajectory; the determination module is also used to determine the candidate trajectory after the lower bound pruning processing as the query trajectory result.
[0026] According to another aspect of the present disclosure, an electronic device is provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above point neighbor trajectory query methods by executing the executable instructions.
[0027] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above point neighbor trajectory query methods is implemented.
[0028] The point neighbor trajectory query solution provided by the embodiment of the present disclosure prunes the query area through region pruning, thereby streamlining the query range of candidate trajectories, improving the efficiency of spatial range query, and accelerating the query process.
[0029] Furthermore, by performing lower bound pruning on candidate trajectories, the amount of calculation of the Fréchet distance is reduced, and the number of unnecessary query trajectories and query time are reduced.
[0030] Furthermore, by constructing the spatial range index of the first trajectory, the efficiency of indexing and querying the area to be queried is improved, thereby improving the efficiency and accuracy of determining trajectories adjacent to the trajectory to be queried in the area to be queried.
[0031] Finally, by randomly storing the spatial range index in distributed servers, the maintenance pressure of trajectory data is reduced and the reliability of point neighbor trajectory query is improved.
[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0034] Figure 1A A schematic diagram showing a coding scheme for a point neighbor trajectory query solution in an embodiment of the present disclosure is shown;
[0035] Figure 1B A schematic diagram showing a coding scheme for a point neighbor trajectory query solution in an embodiment of the present disclosure is shown;
[0036] Figure 1C A schematic diagram showing a coding scheme for a point neighbor trajectory query solution in an embodiment of the present disclosure is shown;
[0037] Figure 1D A schematic diagram showing a coding scheme for a point neighbor trajectory query solution in an embodiment of the present disclosure is shown;
[0038] Figure 2 A flow chart of a point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0039] Figure 3 A flowchart showing another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0040] Figure 4 A flowchart showing another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0041] Figure 5 A flowchart showing another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0042] Figure 6 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0043] Figure 7 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0044] Figure 8A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0045] Fig. 9 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0046] Fig.10 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0047] Fig.11 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0048] Fig.12 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0049] Fig.13 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0050] Fig.14 A flowchart of another point neighbor trajectory query method in an embodiment of the present disclosure is shown;
[0051] Fig.15 A schematic diagram showing another point neighbor trajectory query solution in an embodiment of the present disclosure;
[0052] Fig.16 A schematic diagram showing a point neighbor trajectory query device in an embodiment of the present disclosure;
[0053] Fig.17 A schematic diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0054] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0055] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0056] The solution provided by the present disclosure prunes the query area through region pruning, simplifies the query range of candidate trajectories, improves the efficiency of spatial range query, and speeds up the query process. Furthermore, by performing lower bound pruning on the candidate trajectories, the amount of calculation of the Frechet distance is reduced, and the number of unnecessary query trajectories and query time are reduced. Furthermore, by constructing a spatial range index of the first trajectory, the efficiency of indexing and querying the query area is improved, thereby improving the efficiency and accuracy of determining trajectories adjacent to the query trajectory in the query area. Finally, by randomly storing the spatial range index to a distributed server, the maintenance pressure of the trajectory data is reduced, and the reliability of point neighbor trajectory query is improved.
[0057] Combination Figure 1A , Figure 1B , Figure 1C and Figure 1D As shown, in the point neighbor trajectory query solution disclosed in the present invention, the following key concepts are involved:
[0058] (1) GPS point (GPSPoint): GPS point p = (lat; lng; t) contains a latitude lat, a longitude lng, and a timestamp t.
[0059] like Figure 1A As shown, it indicates that the mobile object is located at the geographic coordinate position (lat; lng) in the query area 102 at time t.
[0060] (2) Trajectory 104: a trajectory tr = <p1→p2→…→p n > is a sequence of GPS points generated by the same mobile object sorted in chronological order, that is: p i ×t<p i+1 ×t.
[0061] (3) Path: Path P = <e1→e2→…→e n > is a set of continuous road segments, where the order of the road segments is the order in which the object moves. A natural number is usually used to represent the road segment identifier.
[0062] (4) Matched trajectory (MapMatchTrajectory): The trajectory can be mapped to the road segment after the map matching algorithm, forming a matched trajectory tr = <(e1, t1) → (e2, t2) → ... → (e n , t n )>. Among them, e i Refers to the identification of road sections on the road network, t iRefers to the time when the moving object enters the road section. In the following, unless otherwise specified, the trajectories mentioned are all matched trajectories.
[0063] (5) PathTemporalRangeQuery: Given a path P and a time range [t s , t e ] and a set of matching trajectories T, point neighbor trajectory query finds all matching trajectories tr in T i , there exists a sub-trajectory tr′ i =<(e1, t1)→(e2, t2)→…→(e k , t k )> just passes through path P within a given time period, that is: t1 ≥ t s , t k ≤t e .
[0064] (6) NoSQL: A general term for non-relational databases that do not require a fixed table schema for data storage. NoSQL was created to address the challenges posed by multiple data types in big data sets, especially the challenges of big data applications.
[0065] (7) HBase: A highly reliable, high-performance, column-oriented, and scalable distributed storage system that can build large-scale structured storage clusters on cheap machines. It is a type of NoSQL.
[0066] (8) Fréchet distance: a path space similarity description, often used to measure the similarity between trajectories.
[0067] (9) XZ-Ordering: An encoding method for space-filling curves that combines temporal information.
[0068] (10) Priority queue: A common data structure in which elements are assigned priorities. The element with the highest priority is deleted first. Therefore, compared with the first-in-first-out feature of an ordinary queue, the priority queue has the feature of the highest priority first-out.
[0069] The solution provided by the embodiments of the present disclosure involves technologies such as suffix tree, path decomposition and distributed architecture, which are specifically explained through the following embodiments.
[0070] The above point neighbor trajectory query solution can be implemented through the interaction of multiple terminals and server clusters.
[0071] The terminal may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an e-book reader, smart glasses, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a smart home device, an AR (Augmented Reality) device, a VR (Virtual Reality) device, or the terminal may be a personal computer (PC), such as a laptop computer and a desktop computer.
[0072] The terminal may be installed with an application for providing point neighbor trajectory query.
[0073] The terminal and the server cluster are connected via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0074] A server cluster is a server, or a combination of several servers, or a virtualization platform, or a cloud computing service center. The server cluster is used to provide background services for applications that provide point neighbor trajectory queries. Optionally, the server cluster undertakes the main computing work and the terminal undertakes the secondary computing work; or, the server cluster undertakes the secondary computing work and the terminal undertakes the main computing work; or, a distributed computing architecture is used between the terminal and the server cluster for collaborative computing.
[0075] In some optional embodiments, the suffix tree index is initially used to index strings, which can improve the performance of string suffix search. In trajectory data management, the matched trajectory can be regarded as a string, and the identifier of each road segment is equivalent to a character of the string. The path query (without considering the time filter condition) can be mapped into a string suffix search problem, that is, searching using the road segment identifier sequence can be regarded as searching using the character sequence.
[0076] Optionally, the client of the application installed in different terminals is the same, or the client of the application installed on the two terminals is the client of the same type of application on different control system platforms. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client or a global wide area network client, etc.
[0077] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiments of the present disclosure do not limit the number of terminals and device types.
[0078] Optionally, the system may further include a management device, wherein the management device is connected to the server cluster via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0079] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0080] In the following, each step of the point neighbor trajectory query method in this example implementation will be described in more detail with reference to the accompanying drawings and embodiments.
[0081] Figure 2 A flowchart of a point neighbor trajectory query method in an embodiment of the present disclosure is shown. The method provided in the embodiment of the present disclosure can be executed by any electronic device with computing and processing capabilities, and is illustrated by taking a server cluster as the execution subject.
[0082] like Figure 2 As shown, the server cluster executes the point neighbor trajectory query method, including the following steps:
[0083] Step S202: determine the first Fréchet distance between the query point and the query area, and perform region pruning on the query area.
[0084] Step S204, determining candidate trajectories of the area to be queried after area pruning.
[0085] Step S206: performing lower bound pruning on the candidate trajectories in the query area according to the lower bound position of the query point and the lower bound position of the candidate trajectories.
[0086] Step S208: determine the candidate trajectory after the lower bound pruning process as the query trajectory result.
[0087] In the above embodiment, pruning is performed by using the Fréchet distance between the lower bound position of the query point and the lower bound position of the candidate trajectory, thereby avoiding the amount of computation required for distance calculation between all trajectory points of the first trajectory and the candidate trajectory, and reducing the time complexity.
[0088] based on Figure 2 The steps shown are as follows Figure 3 As shown, determining the first Fréchet distance between the query point and the query area, and performing region pruning on the query area includes:
[0089] Step S3022, determining the first Fréchet distance between the query point and the query area.
[0090] Step S3024, determining whether the first Fréchet distance is greater than or equal to the maximum distance threshold, if so, executing step S3026, if not, executing step S204.
[0091] Step S3026: If it is determined that the first Fréchet distance is greater than or equal to the maximum distance threshold, region pruning is performed on the query region.
[0092] In one embodiment of the present disclosure, the lower bound position includes at least one of a start point lower bound position, an end point lower bound position, and a trajectory signature lower bound position.
[0093] based on Figure 2 The steps shown are as follows Figure 4 As shown in FIG, according to the lower bound position of the query point and the lower bound position of the candidate trajectory, the lower bound pruning process of the candidate trajectory includes:
[0094] Step S4062, determining the starting point Fréchet distance between the starting point lower limit position of the query point and the starting point lower limit position of the candidate trajectory.
[0095] Step S4064: performing a first lower bound pruning process on the query area according to the relationship between the starting point Fréchet distance and the first preset distance.
[0096] based on Figure 2 The steps shown are as follows Figure 5 As shown, according to the lower bound position of the query point and the lower bound position of the candidate trajectory, the lower bound pruning process of the candidate trajectory also includes:
[0097] Step S5062, determining the endpoint Fréchet distance between the endpoint lower bound position of the query point and the endpoint lower bound position of the candidate trajectory.
[0098] Step S064: performing a second lower bound pruning process on the candidate trajectory according to the magnitude relationship between the end point Fréchet distance and the second preset distance.
[0099] In the above embodiment, based on the start and end points of the trajectory, the present disclosure proposes a lower bound (Lower Bound, the return value of lower_bound() is an iterator, which returns the position pointing to the first value greater than or equal to key) of the distance between the start and end points of similar trajectories. If the lower bound of the distance is greater than the given similarity threshold ε, then the query point and the candidate trajectory must not be close, based on which, the candidate trajectory of the query area is quickly pruned.
[0100] based on Figure 2 The steps shown are as follows Figure 6 As shown, before determining the first Fréchet distance between the query point and the query area, it also includes:
[0101] Step S602: Acquire the point to be queried and determine the spatial position information of the point to be queried.
[0102] Step S604: Generate a trajectory signature according to the spatial position information of the point to be queried and the positional relationship between the area to be queried.
[0103] Step S606: determine the spatial position index code of the point to be queried through XZ-Ordering.
[0104] Step S608: construct a spatial range index of the point to be queried according to the trajectory signature and the spatial position index code.
[0105] Combination Figure 1A , Figure 1B , Figure 1C and Figure 1D As shown, an embodiment of constructing a spatial range index is specifically described.
[0106] like Figure 1A As shown, the codes of the areas to be queried are "00", "01", "02", "03", "30", "31", "32", "33", "1" and "2".
[0107] Among them, the query of point k-neighboring trajectories needs to use spatial range query (that is, given a spatial range, find all trajectories that pass through the spatial range) to find the trajectories around the given point. For this purpose, the present disclosure establishes a spatial range index table, which is created on the non-relational database NoSQL based on key-value storage (HBase database used here), so the design of the primary key index is very important.
[0108] Traditional indexing cannot accurately represent the spatial information of a trajectory. For example, the traditional XZ2 index is designed for non-point data and is based on the XZ-ordering curve. For a trajectory, the XZ2 index first extracts its MBR (Minimum Bounding Rectangle) and then recursively divides the spatial plane into quadtrees.
[0109] The lower left corner of this MBR, that is, point (lng min ;lat min ), decide which subspace r to use to represent the data, and the height and width of the MBR determine a suitable recursive level. A suitable recursive level means that the expansion space of the subspace r (i.e., fixing the lower left corner of r and expanding the height and width of r to twice the original) can just completely cover the MBR.
[0110] like Figure 1A As shown, the track tr is encoded as "03" because the expanded space of subspace "03" (i.e., the part marked in orange) can just cover the MBR of track tr. However, the extended element of subspace "03" is still too large for track tr because track tr only passes through a small part of the orange area.
[0111] like Figure 1B , Figure 1C and Figure 1D As shown in the figure, the spatial range index includes three parts: spatial position index code, trajectory signature and trajectory identification, as follows:
[0112] like Figure 1B As shown, XZ2 encoding: This is an encoding generated based on XZ-Ordering, which can obtain a quaternary sequence of a trajectory (for example Figure 1A 03 in ), and then convert this quaternary sequence into a decimal long integer number.
[0113] like Figure 1C As shown, position code PosCode: The present disclosure divides the corresponding extended element into β×β regions of the same size, and encodes each region starting from 0. The spatial position information of the track tr can be represented by a β×β binary sequence, and β=2 in this implementation.
[0114] Note that a larger β value indicates a more accurate spatial representation of the trajectory, but it requires more storage space and also affects the query efficiency.
[0115] If at least one GPS point in the trajectory tr falls within a certain area, its corresponding binary position is set to 1, otherwise it is set to 0.
[0116] Figure 1C Given Figure 1A The PosCode of the trajectory tr in the present disclosure is also referred to as the trajectory signature.
[0117] like Figure 1D As shown in the figure, the key composition of the spatial range index (table), where shard is a random number that can effectively distribute data to different data servers, thereby achieving load balancing and preventing hot spots. tid is the trajectory id, which is the unique identifier of the trajectory.
[0118] With the spatial range index table, the present disclosure can efficiently support spatial range query, that is, given a query space, all trajectory records in the space can be queried.
[0119] based on Figure 2 and Figure 6 The steps shown are as follows Figure 7 As shown, according to the spatial position information of the point to be queried and the positional relationship between the area to be queried, generating the trajectory signature also includes:
[0120] Step S7042: sequentially encode the four sub-node query areas of any query area.
[0121] In step S7044, the sub-node to-be-queried region to which the to-be-queried point belongs is recorded as a first code, and the sub-node to-be-queried region to which the to-be-queried point does not belong is recorded as a second code.
[0122] Step S7046, determining the trajectory signature of the point to be queried according to the ordered code, the first code and the second code.
[0123] In the above embodiment, the first code may be a binary "1", and the second code may be a binary "0", and a unique trajectory signature is generated according to the sequence of the ordered codes.
[0124] based on Figure 2 The steps shown are as follows Figure 8 As shown, according to the lower bound position of the query point and the lower bound position of the candidate trajectory, the lower bound pruning process of the candidate trajectory of the query area further includes:
[0125] Step S8062: Generate a trajectory signature of the candidate trajectory according to the positional relationship between the spatial position information of the candidate trajectory and the area to be queried.
[0126] Step S8064, determining the trajectory signature Fréchet distance between the trajectory signature lower bound of the query point and the trajectory signature lower bound of the candidate trajectory.
[0127] Step S8066: Perform a third lower bound pruning process on the candidate trajectory according to the relationship between the trajectory signature Fréchet distance and the third preset distance.
[0128] based on Figure 2 The steps shown are as follows Fig. 9 As shown, according to the lower bound position of the query point and the lower bound position of the candidate trajectory, the lower bound pruning process of the candidate trajectory of the query area further includes:
[0129] Step S9062, determining the minimum distance between the point to be checked and any area to be queried after the area pruning process is performed.
[0130] Step S9064, lower bound pruning is performed on the candidate trajectories in the query area in order from small to large minimum distances.
[0131] In the above embodiment, the candidate trajectories in the query area are sequentially subjected to lower bound pruning in the order of the minimum distance from small to large, so that the k nearest trajectories that meet the quantity requirement can be determined more quickly.
[0132] Step S9064: Update the maximum distance threshold according to the result of each lower bound pruning process.
[0133] based on Figure 2 The steps shown are as follows Fig.10 As shown, it also includes:
[0134] Step S1002, determining the identifier of the point to be queried.
[0135] Step S1004: adding the identifier of the point to be queried to the suffix of the spatial range index.
[0136] In the above embodiment, by adding the identifier of the point to be queried to the suffix of the spatial range index, spatial range query is supported, that is, given a query space, all trajectory records in the space can be queried.
[0137] based on Figure 2 The steps shown are as follows Fig.11 As shown, it also includes:
[0138] Step S1102, obtaining a random number of the point to be queried.
[0139] Step S1104, adding a random number to the prefix of the spatial range index.
[0140] Step S1106: randomly store the spatial range index to the distributed server according to the prefix.
[0141] In the above embodiment, the spatial range index is randomly stored in the distributed server according to the prefix, which can effectively distribute the data to different data servers, thereby achieving the purpose of load balancing and preventing hot spot problems.
[0142] based on Figure 2 The steps shown are as follows Fig.12 As shown, it also includes:
[0143] Step S1202: taking out a region to be queried from the first priority queue storing the regions to be queried.
[0144] Step S1204: determine the encoding length of the spatial range index of the area to be queried.
[0145] Step S1206: according to the size relationship between the coding length and the preset length, the region to be queried is expanded or the region to be queried is split.
[0146] In the above embodiment, since the larger the encoding length of the spatial position index encoding of the area to be queried is, the more accurate the spatial representation of the trajectory is, the accuracy of the area to be queried is controlled by presetting the length.
[0147] based on Figure 2 The steps shown are as follows Fig.13 As shown, according to the size relationship between the encoding length and the preset length, expanding the area to be queried or splitting the area to be queried includes:
[0148] Step S1302, determine whether the encoding length of the spatial range index is greater than a preset length, if so, execute step S1304.
[0149] Step S1304: if it is determined that the encoding length is greater than the preset length, the query area is not split.
[0150] Step S1306: perform spatial range query processing in the area to be queried.
[0151] In the above embodiment, if it is determined that the encoding length is greater than the preset length, the area to be queried is not split, and a spatial range query process is performed in the area to be queried, thereby effectively reducing the query range of the candidate trajectory while ensuring the query accuracy.
[0152] based on Figure 2 The steps shown are as follows Fig.13As shown, according to the size relationship between the encoding length and the preset length, expanding the area to be queried or splitting the area to be queried further includes:
[0153] Step S1302, determining whether the encoding length of the spatial range index of the spatial range index is greater than a preset length, if not, executing step S1308.
[0154] Step S1308, if it is determined that the coding length is less than or equal to the preset length, the query area is recursively split into quadtrees to generate sub-node query areas of the query area, until the coding length of the spatial range index of the sub-node query area is greater than or equal to the preset length.
[0155] In the above embodiment, if it is determined that the coding length is less than or equal to the preset length, the region to be queried is recursively split by quadtree until the coding length of the sub-node region to be queried is greater than or equal to the preset length, so as to accurately control the splitting process of the region to be queried.
[0156] Specifically, if the length of the coding sequence of the area to be queried is less than a constant g given by the system, the four quadtree child nodes of the area to be queried are added to the first priority queue, and then the next area in the first priority queue is checked. If the length of the coding sequence of the area to be queried reaches the given constant g, the area to be queried is no longer split, and the spatial range query is directly performed using the area to be queried to obtain the trajectory result set T SR .
[0157] based on Figure 2 The steps shown are as follows Fig.14 As shown, it also includes:
[0158] Step S1402 , after stopping the recursive quadtree splitting of the query area, determining candidate trajectories in the query area, and storing the candidate trajectories in the second priority queue.
[0159] In the above embodiment, after stopping the recursive quadtree splitting of the area to be queried, candidate trajectories in the area to be queried are determined and stored in the second priority queue, and the number of candidate trajectories in the second priority queue meets the query number requirement.
[0160] In addition, the second trajectory in the second priority queue also has priority, and the element with the highest priority is deleted first, that is, in the subsequent lower bound pruning process, it is pruned first to obtain the second trajectory that meets the query distance requirement more quickly.
[0161] Fig.15An embodiment of a point neighbor trajectory query solution is shown. In the trajectory k-neighbor query, the present disclosure regards the spatial range query as a sub-operation.
[0162] Combination Fig.15 As shown, the inventors proposed lower bound pruning and trajectory signature pruning for the similarity between the query point q and the candidate trajectory tr, and proposed and verified the following theorem to improve the reliability and efficiency of point neighbor trajectory query.
[0163] Theorem 1. Similar trajectory query completeness theorem: For the Fréchet distance f F For , all trajectories similar to a given query trajectory are in the set T ′.
[0164] Theorem 2. Region Pruning Theorem: If Then f F (q, tr)>d max , where trajectory tr is the trajectory retrieved for the first time by performing spatial range query on r.
[0165] Theorem 3. MBR Pruning Theorem: If the trajectory tr is not completely contained in the region S, that is, there is at least one GPS point p in tr that falls outside the region S, then for the Fréchet distance, tr must not be similar to q.
[0166] Theorem 4. Start and end point lower bound pruning theorem: If Then f F (tr,q)>ε. If Then f F (tr,q)>ε.
[0167] Theorem 5. Signature lower bound pruning theorem: If Then f F (tr,q)>ε.
[0168] According to an embodiment of the present disclosure, by inputting a query point q, a Fréchet distance function f F , the number of trajectories to be returned is k, and the output is the k-nearest neighbor point query trajectory result set T knn , which can be divided into the following three stages:
[0169] The first stage of query: mainly initialize some variables, among which cdq is the second priority queue for storing candidate trajectories, req identifies the first priority queue, and records the range of the spatial area to be checked, d max It is the maximum distance threshold between the current query point q and all trajectories in cdq.
[0170] Query the second stage: Take a spatial region r from req. If there are already k trajectories in the candidate set cdq, and the distance between the spatial region r and the query point q is greater than d max , which means that those unretrieved trajectories will definitely not be in the result set (see Theorem 2, which is called region pruning in this disclosure), and the query process can end.
[0171] If the encoding sequence length of r is less than a constant g given by the system, the present disclosure adds the four quadtree child nodes of r to req, and then checks the next area in req.
[0172] If the length of the encoding sequence of r reaches a given constant g, the present disclosure will no longer split r, and directly use r to perform a spatial range query to obtain the result set T SR .
[0173] For each trajectory tr∈T SR ,Since the time overhead of the similarity between trajectories is too large, this disclosure proposes two lower bound pruning strategies.
[0174] If tr satisfies all the above lower bounds, the disclosure adds it to the candidate result set cdq and then updates d max .
[0175] Query Phase 3: When all candidate regions of req are checked, the present disclosure returns the trajectory in the candidate result cdq as the final result.
[0176] like Fig.15 In the 3-nearby point query area shown, there are four candidate trajectories, namely the first candidate trajectory tr1, the second candidate trajectory tr2, the third candidate trajectory tr3 and the fourth candidate trajectory tr4, and the distances between them and the query point q are d1, d2, d3 and d4 respectively. Specifically, the query steps include the following:
[0177] (1) Before querying, req = <02,2,03,00,01,1,3>, cdq = <>, d max =0.
[0178] (2) Query 02, req = <20, 03, 21, 00, 01, 22, 23, 1, 3>, cdq = <tr1>, d max =d1.
[0179] (3) Query 20, req = <03, 21, 00, 01, 22, 23, 1, 3>, cdq =<tr1,tr2> , d max =d2.
[0180] (4) Query 03, req = <21, 00, 01, 22, 23, 1, 3>, cdq =<tr1,tr3,tr2> , d max =d2.
[0181] (5) Query 21, req = <00, 01, 22, 23, 1, 3>, cdq =<tr1,tr3,tr2> , d max =d2.
[0182] (6) Query 00, req = <01, 22, 23, 1, 3>, cdq =<tr1,tr4,tr3> , d max =d3.
[0183] (7) Since d(01,q)>d max And k=3, the query area cdq in (6) is the result, and the process ends.
[0184] Refer to the following Fig.16 The point neighbor trajectory query device 1600 according to this embodiment of the present disclosure is described. Fig.16 The point neighbor trajectory query device 1600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0185] The point neighbor trajectory query device 1600 is implemented in the form of a hardware module. The components of the point neighbor trajectory query device 1600 may include but are not limited to: a pruning module 1602 and a determination module 1604 .
[0186] The pruning module 1602 is used to determine the first Fréchet distance between the to-be-queried point and the to-be-queried area, and perform area pruning on the to-be-queried area.
[0187] The determination module 1604 is used to determine the candidate tracks of the area to be queried after the area pruning.
[0188] The pruning module 1602 is further configured to perform lower bound pruning processing on the candidate trajectories in the area to be queried according to the lower bound position of the point to be queried and the lower bound position of the candidate trajectories.
[0189] The determining module 1604 is further configured to determine the candidate trajectory after the lower bound pruning process as a query trajectory result.
[0190] The present invention proposes a point neighbor trajectory query method based on non-relational data NoSQL, which improves the efficiency of spatial range indexing through carefully designed key values, and proposes two pruning strategies, which can terminate the expansion process as early as possible and reduce the time of point k neighbor trajectory query.
[0191] Compared with traditional solutions to the problem of point k-neighborhood trajectory query, the present invention effectively reduces query time and improves query efficiency by designing efficient algorithms and combining the processing capabilities of non-relational database NoSQL while ensuring correctness.
[0192] Refer to the following Fig.17 1700 according to this embodiment of the present disclosure is described. Fig.17 The electronic device 1700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0193] like Fig.17 As shown, the electronic device 1700 is in the form of a general computing device. The components of the electronic device 1700 may include but are not limited to: at least one processing unit 1710, at least one storage unit 1720, and a bus 1730 connecting different system components (including the storage unit 1720 and the processing unit 1710).
[0194] The storage unit stores program codes, which can be executed by the processing unit 1710, so that the processing unit 1710 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1710 can execute the following steps: Figures 2 to 13 The steps of the point neighbor trajectory query method shown in , and other steps defined in the point neighbor trajectory query method of other embodiments of the present disclosure.
[0195] The storage unit 1720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 17201 and / or a cache storage unit 17202 , and may further include a read-only storage unit (ROM) 17203 .
[0196] The storage unit 1720 may also include a program / utility 17204 having a set (at least one) of program modules 17205, such program modules 17205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0197] Bus 1730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0198] The electronic device 1700 may also communicate with one or more external devices 1740 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device, and / or communicate with any device that enables the electronic device 1700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1750. Furthermore, the electronic device 1700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1760. As shown, the network adapter 1760 communicates with other modules of the electronic device 1700 via a bus 1730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RA identification systems, tape drives, and data backup storage systems.
[0199] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0200] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0201] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0202] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0203] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0204] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0205] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0206] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0207] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0208] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A point neighbor trajectory query method, characterized in that: include: Determine a first Fréchet distance between a point to be queried and a region to be queried, and perform region pruning on the region to be queried; Determine the candidate trajectories of the query area after region pruning; According to the lower bound position of the to-be-queried point and the lower bound position of the candidate trajectory, a lower bound pruning process is performed on the candidate trajectory of the to-be-queried area, including: Determine a starting point Fréchet distance between a starting point lower limit position of the query point and a starting point lower limit position of the candidate trajectory; According to the magnitude relationship between the starting point Fréchet distance and the first preset distance, performing a first lower bound pruning process on the area to be queried; The candidate trajectory after the lower bound pruning process is determined as the query trajectory result.
2. A point neighbor trajectory query method, characterized in that: include: Determine a first Fréchet distance between a point to be queried and a region to be queried, and perform region pruning on the region to be queried; Determine the candidate trajectories of the query area after region pruning; According to the lower bound position of the to-be-queried point and the lower bound position of the candidate trajectory, a lower bound pruning process is performed on the candidate trajectory of the to-be-queried area, including: Determine the endpoint Fréchet distance between the endpoint lower bound position of the query point and the endpoint lower bound position of the candidate trajectory; According to the magnitude relationship between the endpoint Fréchet distance and the second preset distance, performing a second lower bound pruning process on the candidate trajectory; The candidate trajectory after the lower bound pruning process is determined as the query trajectory result.
3. A point neighbor trajectory query method, characterized in that: include: Determine a first Fréchet distance between a point to be queried and a region to be queried, and perform region pruning on the region to be queried; Determine the candidate trajectories of the query area after region pruning; According to the lower bound position of the to-be-queried point and the lower bound position of the candidate trajectory, a lower bound pruning process is performed on the candidate trajectory of the to-be-queried area, including: Generate a trajectory signature of the candidate trajectory according to the positional relationship between the spatial position information of the candidate trajectory and the area to be queried; Determine a trajectory signature Fréchet distance between a trajectory signature lower bound of the query point and a trajectory signature lower bound of the candidate trajectory; According to the relationship between the trajectory signature Fréchet distance and the third preset distance, performing a third lower bound pruning process on the candidate trajectory; The candidate trajectory after the lower bound pruning process is determined as the query trajectory result.
4. The point neighbor trajectory query method according to any one of claims 1 to 3, characterized in that: Determining a first Fréchet distance between the to-be-queried point and the to-be-queried area, and performing area pruning processing on the to-be-queried area includes: Determine a first Fréchet distance between the query point and the query area; Determining whether the first Fréchet distance is greater than or equal to a maximum distance threshold; If it is determined that the first Fréchet distance is greater than or equal to the maximum distance threshold, a region pruning process is performed on the region to be queried.
5. The point neighbor trajectory query method according to any one of claims 1 to 3, characterized in that: The lower bound position includes at least one of a starting point lower bound position, an end point lower bound position, and a trajectory signature lower bound position.
6. The point neighbor trajectory query method according to any one of claims 1 to 3, characterized in that: Before determining the first Fréchet distance between the to-be-queried point and the to-be-queried area, the method further includes: Acquire the point to be queried, and determine the spatial position information of the point to be queried; Generate a trajectory signature according to the positional relationship between the spatial position information of the to-be-queried point and the to-be-queried area; Determine the spatial position index code of the point to be queried by XZ-Ordering; A spatial range index of the point to be queried is constructed according to the trajectory signature and the spatial position index code.
7. The point neighbor trajectory query method according to claim 6, characterized in that: Generating the trajectory signature according to the spatial position information of the to-be-queried point and the positional relationship between the to-be-queried area further comprises: Orderly encoding the four sub-node query areas of any of the query areas; Recording the sub-node to-be-queried region to which the to-be-queried point belongs as a first code, and recording the sub-node to-be-queried region to which the to-be-queried point does not belong as a second code; The trajectory signature of the point to be queried is determined according to the ordered code, the first code and the second code.
8. The point neighbor trajectory query method according to claim 4, characterized in that: According to the lower bound position of the to-be-queried point and the lower bound position of the candidate trajectory, performing lower bound pruning processing on the candidate trajectory of the to-be-queried area further includes: Determine the minimum distance between the to-be-queried point and any to-be-queried region after region pruning; According to the order of the minimum distance from small to large, the candidate trajectories of the query area are sequentially subjected to lower bound pruning processing; The maximum distance threshold is updated according to the result of each lower bound pruning process.
9. The point neighbor trajectory query method according to claim 6, characterized in that: Also includes: Determine the identifier of the point to be queried; The identifier of the point to be queried is added to the suffix of the spatial range index.
10. The point neighbor trajectory query method according to claim 6, characterized in that: Also includes: Obtaining a random number of the point to be queried; Adding the random number to a prefix of the spatial range index; The spatial range index is randomly stored in a distributed server according to the prefix.
11. The point neighbor trajectory query method according to any one of claims 1 to 3, characterized in that: Also includes: Taking out a region to be queried from the first priority queue storing the regions to be queried; Determining the encoding length of the spatial range index of the area to be queried; According to the size relationship between the encoding length and the preset length, the area to be queried is expanded or the splitting of the area to be queried is stopped.
12. The point neighbor trajectory query method according to claim 11, characterized in that: According to the size relationship between the encoding length and the preset length, expanding the area to be queried or stopping splitting the area to be queried includes: Determining whether the encoding length of the spatial range index is greater than the preset length; If it is determined that the encoding length is greater than the preset length, the area to be queried is not split; Perform spatial range query processing within the area to be queried.
13. The point neighbor trajectory query method according to claim 11, characterized in that: According to the size relationship between the encoding length and the preset length, expanding the area to be queried or stopping splitting the area to be queried further comprises: Determine whether the encoding length of the spatial range index of the spatial range index is greater than the preset length; If it is determined that the coding length is less than or equal to the preset length, the area to be queried is recursively split into quadtrees to generate child node areas to be queried of the area to be queried, until the coding length of the spatial range index of the child node area to be queried is greater than or equal to the preset length.
14. The point neighbor trajectory query method according to any one of claims 1 to 3, characterized in that: Also includes: After stopping the recursive quadtree splitting of the area to be queried, candidate trajectories within the area to be queried are determined, and the candidate trajectories are stored in a second priority queue.
15. A point neighbor trajectory query device, characterized in that: include: A pruning module, used to determine the first Fréchet distance between the query point and the query area, and perform a region pruning process on the query area; A determination module, used to determine candidate trajectories of the area to be queried after area pruning; The pruning module is further used to perform lower bound pruning processing on the candidate trajectories of the area to be queried according to the lower bound position of the point to be queried and the lower bound position of the candidate trajectories, including: Determine a starting point Fréchet distance between a starting point lower limit position of the query point and a starting point lower limit position of the candidate trajectory; According to the magnitude relationship between the starting point Fréchet distance and the first preset distance, performing a first lower bound pruning process on the area to be queried; The determination module is further configured to determine the candidate trajectory after the lower bound pruning process as a query trajectory result.
16. A point neighbor trajectory query device, characterized in that: include: A pruning module, used to determine the first Fréchet distance between the query point and the query area, and perform a region pruning process on the query area; A determination module, used to determine candidate trajectories of the area to be queried after area pruning; The pruning module is further used to perform lower bound pruning processing on the candidate trajectories of the area to be queried according to the lower bound position of the point to be queried and the lower bound position of the candidate trajectories, including: Determine the endpoint Fréchet distance between the endpoint lower bound position of the query point and the endpoint lower bound position of the candidate trajectory; According to the magnitude relationship between the endpoint Fréchet distance and the second preset distance, performing a second lower bound pruning process on the candidate trajectory; The determination module is further configured to determine the candidate trajectory after the lower bound pruning process as a query trajectory result.
17. A point neighbor trajectory query device, characterized in that: include: A pruning module, used to determine the first Fréchet distance between the query point and the query area, and perform a region pruning process on the query area; A determination module, used to determine candidate trajectories of the area to be queried after area pruning; The pruning module is further used to perform lower bound pruning processing on the candidate trajectories of the area to be queried according to the lower bound position of the point to be queried and the lower bound position of the candidate trajectories, including: Generate a trajectory signature of the candidate trajectory according to the positional relationship between the spatial position information of the candidate trajectory and the area to be queried; Determine a trajectory signature Fréchet distance between a trajectory signature lower bound of the query point and a trajectory signature lower bound of the candidate trajectory; According to the relationship between the trajectory signature Fréchet distance and the third preset distance, performing a third lower bound pruning process on the candidate trajectory; The determination module is further configured to determine the candidate trajectory after the lower bound pruning process as a query trajectory result.
18. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the point neighbor trajectory query method according to any one of claims 1 to 14 by executing the executable instructions.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the point neighbor trajectory query method according to any one of claims 1 to 14 is implemented.
