Multi-target continuous search method and system in road network environment
Through the dynamic m-ary tree index structure and incremental query algorithm, the efficiency and accuracy problems of continuous k-nearest neighbor query of moving objects in the road network environment are solved, and fast and accurate k-nearest neighbor query and real-time update in the road network environment are realized. ability.
Patent Information
- Application Number
- CN202411237754.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When dealing with continuous k-nearest neighbor queries of moving objects in a road network environment, the existing technology is difficult to solve the distance calculation problem based on the road network distance. The calculation amount is large, the query efficiency is low, the index structure is complex, and the query point position cannot be updated in real time. query results.
The adaptive multi-layer moving object index structure DML-Index based on dynamic m-ary tree is used to update the index structure in real time through subgraph folding and unfolding operations, and build a road network-oriented mobile object k-nearest neighbor incremental query algorithm DML-Search. Reduce query scope and index maintenance costs.
It improves query efficiency and accuracy, can quickly and accurately calculate k-nearest neighbors when the positions of query points and moving objects change frequently, and reduces index construction and maintenance costs.
Smart Images

Figure CN118760696A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a multi-target continuous search method and system in a road network environment. Background Art
[0002] The problem of continuous search for the nearest moving multi-target in a road network environment can be formally described as a continuous k-nearest neighbor query problem for mobile objects on a road network. This problem refers to a road network, a set of mobile objects (such as people, cars, etc.) distributed on the road network, and a query point. , real-time search distance query point The nearest k moving objects are called k nearest neighbors of q; if the query point Or if the position of the moving object changes, the distance is updated in real time The k nearest neighbors.
[0003] In recent years, with the rapid development of mobile Internet, it is very easy to perceive and obtain the location of mobile objects such as people and cars, which has led to the rapid development of location-based services. In the field of location-based services, many applications involve the problem of continuous k-nearest neighbor queries for mobile objects. For example, in the application of taxi-hailing software to find the nearest multiple taxis for passengers, passengers with known locations can be regarded as query points, and taxis are regarded as mobile objects. The purpose is to query the k taxis closest to the query point, where k is set according to user needs. Similarly, when the food delivery platform finds the nearest k delivery personnel for merchants, merchants can be abstracted as query points and delivery personnel are abstracted as mobile objects. The essence of the demand is also the k-nearest neighbor query problem for mobile objects. At present, the scale of mobile objects in the field of location-based services has increased dramatically. How to quickly, efficiently and accurately handle the k-nearest neighbor query problem for mobile objects facing the road network has become a research hotspot in related fields at home and abroad.
[0004] The problem of continuous k-nearest neighbor query for mobile objects in road networks has been widely studied by scholars at home and abroad, but the existing work still has the following problems in solving this problem: (1) Many existing methods mostly use Euclidean distance, which is difficult to solve the k-nearest neighbor query problem of mobile objects based on road networks. The reason is that in practice, the distance between mobile objects is often determined by the road network distance.
[0005] (2) Although some methods can support k-nearest neighbor queries for mobile objects based on road networks, when the road network is huge, the amount of computation involved in querying the k-nearest neighbors of mobile objects increases significantly, resulting in low query efficiency, poor real-time query results, and insufficient practicality.
[0006] (3) The mobile object index structure of most existing methods is complex, which leads to low update efficiency of the mobile object index structure when the positions of large-scale mobile objects are updated, resulting in a decrease in the accuracy of the query results.
[0007] (4) Existing methods usually assume that the query point is fixed and only the position of the moving object changes. Based on this assumption, a continuous k-nearest neighbor incremental query algorithm for moving objects is designed. Once the position of the query point changes, the query result needs to be recalculated, and the incremental query algorithm becomes invalid.
[0008] In summary, the existing technology has a lot of problems in how to quickly and accurately solve the problem of continuous movement of moving objects based on road networks. The problem of nearest neighbor query, especially when the positions of query points and mobile objects change frequently, still lacks an effective solution. Summary of the invention
[0009] In order to solve the above-mentioned problems, the present invention provides a multi-target continuous search method and system in a road network environment.
[0010] In a first aspect, the present invention provides a multi-target continuous search method in a road network environment, which adopts the following technical solution: A multi-target continuous search method in a road network environment, comprising: Get the road network; According to the acquired road network, an adaptive multi-layer mobile object index structure based on dynamic m-tree, namely DML-Index, is constructed; Calculate the update strategy of DML-Index when the position of mobile objects in the road network changes; Based on the update strategy of DML-Index, an incremental k-nearest neighbor query algorithm for mobile objects in road networks, namely DML-Search, is constructed.
[0011] Furthermore, the construction of the adaptive multi-layer mobile object index structure based on the dynamic m-tree includes abstracting the road network into an undirected graph G, wherein each road is regarded as an edge of G, and the road endpoints are vertices of the edges in the graph G; dividing the graph G into Layer, each layer is recorded as ( ); The top layer is the top layer, which divides the global road network into m roughly equal subgraphs. The layer is further divided into m subgraphs, and the subgraphs are recursively divided until The global road network is divided into subgraphs; each subgraph is regarded as a node of the m-ary tree; A subgraph of the layer is denoted as ( );exist In the layer, if the two vertices of an edge in graph G and Located in two different subgraphs, these two vertices are called boundary points; calculate and save The shortest path between any two vertices in each subgraph of the layer; Each subgraph of a layer maintains information about the moving objects in that subgraph.
[0012] Furthermore, the update strategy of the DML-Index when the position of the mobile object in the road network changes includes: from Towards Move, then update arrive distance; if you move the object exist arrive , the object will be moved from A collection of moving objects Delete; move object from go through Towards When moving, the object will be moved Add to A collection of moving objects ; As the position of the moving object changes, the activation status of each layer of subgraph in DML-Index is updated through subgraph folding and subgraph expanding operations.
[0013] Furthermore, the subgraph folding operation includes: Subgraph of layer The number of moving objects in is less than the specified threshold ,but All sibling subgraphs with the same parent node are set to inactive state; if The parent node subgraph of The number of moving objects within is not less than , then the subgraph Set to active state; the subgraph set to active state The original subgraph information is no longer retained, but the subgraph is inherited and all the boundary points, interest points and the shortest paths from each boundary point to all other vertices in its sibling subgraphs constitute a simplified subgraph; if The parent node of The number of moving objects is less than , then recursively move upward layer by layer until the subgraph Ancestor node of ( ) of the moving object is not less than or .
[0014] Furthermore, the subgraph expansion operation includes: ( ) layer subgraph The number of moving objects is greater than , then the subgraph Set to inactive state and delete the subgraph The points of interest and boundary points saved in the subgraph and the shortest paths between them; Sets the child node to active state.
[0015] Furthermore, the construction of the k-nearest neighbor incremental query algorithm for mobile objects in road networks includes: , ) , respectively find the distance and The nearest k moving objects, and then from the obtained 2 Select distance among moving objects The nearest k objects are The k nearest neighbors.
[0016] Furthermore, the construction of the k-nearest neighbor incremental query algorithm for mobile objects on the road network also includes querying the distance The steps for the nearest k moving objects are: (1) Add to Virtual Road Network middle; (2) Setting the priority queue storage Reachable mobile objects, The moving objects in The distances are sorted from near to far. Initialized to empty; (3) Setting the priority queue storage Points of interest accessible, The vertices in The distances are sorted from near to far. Initialized to empty; (4) Setting the priority queue storage Points of interest accessible, The vertices in The distances are sorted from near to far. Initialized to empty; (5) Adjacent points of interest and border points are added to and ; (6) Take Pending Points of Interest ,Will The associated mobile object collection Add all moving objects in ; (7) If The number of moving objects is greater than or equal to k, calculate the kth moving object to Distance , arrive The distance to the next point of interest to be processed as well as arrive The distance to the next point of interest to be processed ; (8) If and ,but The first k moving objects of k nearest neighbors; (9) If and , then return to step (6); (10) If and ,Pick The next boundary point to be processed ,Will The associated boundary points are added to ,renew arrive The shortest distance between all boundary points; Related POIs are added to ,renew arrive The shortest distance to all points of interest, return to step (6).
[0017] Furthermore, the construction of the mobile object k-nearest neighbor incremental query algorithm for road networks also includes real-time calculation of the k-nearest neighbors of the queried mobile object when the query point position remains unchanged while the mobile object position changes and when the query point position changes while the mobile object position remains unchanged.
[0018] In a second aspect, a multi-target continuous search system in a road network environment includes: The data acquisition module is configured to acquire a road network; The DML-Index index building module is configured to build an adaptive multi-layer mobile object index structure based on a dynamic m-tree according to the acquired road network, namely, DML-Index; The DML-Index index maintenance module is configured to calculate an update strategy for the DML-Index when the position of a mobile object in the road network changes; The DML-Search module is configured to build a k-nearest neighbor incremental query algorithm for mobile objects in road networks, namely DML-Search, based on the update strategy of DML-Index.
[0019] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, for example, in a multi-target continuous search method in a road network environment.
[0020] In a fourth aspect, the present invention provides a terminal device comprising a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the multi-target continuous search method in a road network environment.
[0021] In summary, the present invention has the following beneficial technical effects: (1) The adaptive multi-layer mobile object index structure DML-Index based on the dynamic m-tree designed by the present invention can construct mobile object index structures of different granularities at multiple levels according to the different distribution densities of mobile objects in the entire road network, and provide robust pruning capabilities in the global area, which is conducive to reducing the query area and improving query efficiency.
[0022] (2) The mobile object index structure DML-Index designed by the present invention can activate subgraphs of different granularities on demand according to the density of mobile objects, and only maintain the activated subgraphs and their child nodes, which greatly saves the cost of index construction and maintenance.
[0023] (3) The DML-Search query module proposed in this invention only searches for the virtual graph consisting of the points of interest and boundary points in the activated state subgraph. After processing, the query scope is greatly reduced compared with graph G. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a schematic diagram of a DML-Index adaptive multi-layer mobile object index structure according to Embodiment 1 of the present invention; Figure 2 It is a schematic diagram of the subgraph index folding and the virtual road network after folding according to the first embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0026] Example 1 Reference Figure 1 In this embodiment, a continuous method for moving objects on a road network based on a dynamic multi-layer grid index is provided. Neighbor query methods include: Step (1) construct a multi-layer mobile object index structure DML-Index based on a dynamic m-tree; Step (2) updating the DML-Index in real time according to the position change of the moving object; Step (3) Based on DML-Index, design the DML-Search algorithm to find the k nearest neighbors of query q; Step (4) When the position of query q remains unchanged and the position of the moving object changes, the k nearest neighbors of query q are continuously calculated; Step (5) The query q changes its position. When the position of the mobile object changes, the k nearest neighbors of the query q are continuously calculated.
[0027] The step (1) constructs a multi-layer mobile object index structure DML-Index based on a dynamic m-tree, and the steps are as follows: Step (1.1) abstracts the global road network into an undirected graph G, where each road is regarded as an edge of G and the road endpoints are the vertices of the corresponding edge in graph G; Step (1.2) According to the m-tree structure, the graph G corresponding to the global road network is divided into Layer, each layer is recorded as ( ). The top layer divides the global area into m subgraphs of roughly the same size, each subgraph in The layer is divided into m grids of roughly the same size. In this way, the division is recursively performed until The global road network is divided into Sub-pictures. A subgraph of the layer is denoted as ( ). Layer each subgraph Record all the edges and vertices of graph G in this area. If two vertices of an edge in graph G and If the two vertices are located in two different subgraphs at the same layer, then these two vertices are boundary points.
[0028] Step (1.3) uses the Floyd algorithm to calculate and save The shortest path between any two vertices in each subgraph of the layer within the grid.
[0029] Step (1.4) adds the moving object to If you move the object By Vertex Towards the vertex Move, then the vertex For points of interest, is with The associated moving object. Point of interest Save and maintain a collection of all mobile objects associated with it, denoted as .
[0030] Step (1.5) will All sub-images of the layer are set to activated state, and the sub-images of other layers are set to inactive state.
[0031] The step (2) updates the DML-Index in real time according to the position change of the moving object, and the steps are as follows: Step (2.1) is for Towards Moving objects , when its position changes, the update operation is as follows.
[0032] Step (2.1.1) When moving the object Continue from Towards Move, Update arrive distance.
[0033] Step (2.1.2) When moving the object exist arrive 's edge disappears, from A collection of moving objects Delete it.
[0034] Step (2.1.3) When moving the object from through Towards Move from A collection of moving objects Delete and add to A collection of moving objects middle; Step (2.2) Calculation The number of moving objects in each subgraph of the layer. Subgraph of layer The number of moving objects in is less than the specified threshold ,but The three sibling subgraphs belonging to the same parent node are all set to inactive state. The parent node of The number of moving objects within is not less than , then the grid Set to active state. Save and maintain subgraphs and all the boundary points and interest points in its sibling subgraphs, and calculate the shortest path between any two vertices; if Father and son picture The number of moving objects is less than , then recursively move upward layer by layer until the subgraph Ancestor node of ( ) of the moving object is not less than or ; Step (2.3) Calculation ( ) layer. If Subgraph of layer The number of moving objects is greater than And subgraph The number of moving objects in the m child nodes of , then the subgraph Set to inactive state and delete the subgraph The points of interest and boundary points stored in the subgraph and the shortest paths between them. The m child nodes of are set to active state. The number of moving objects of a child node is greater than , then recursively go down layer by layer until layer.
[0035] In step (3), based on DML-Index, a DML-Search algorithm is designed to find the k nearest neighbors of the query q. The steps are as follows: Step (3.1) Build a virtual network , Includes all points of interest and boundary points within the active state grid, The weight of the edge between two adjacent vertices is the shortest path length between these two points in the grid; Step (3.2) determines the edge where the query q is located ( , ), calculate the adjacent vertices of query q The k nearest neighbors.
[0036] Step (3.2.1) Add To Virtual Network .
[0037] Step (3.2.2) Set up the priority queue storage Reachable mobile objects, The moving objects in The distances are sorted from near to far. Initialized to empty; Step (3.2.3) Set up the priority queue storage The accessible boundary points, The vertices in The distances are sorted from near to far. Initialized to empty; Step (3.2.4) Set up the priority queue storage Points of interest accessible, The vertices in The distances are sorted from near to far. Initialized to empty; Step (3.2.5) will Adjacent points of interest and border points are added to and ; Step (3.2.6) Next point of interest to be processed , and All associated moving objects are added to ; Step (3.2.7) The number of moving objects is greater than or equal to k, calculate the kth moving object to Distance ,calculate arrive The distance to the next boundary point to be processed ,calculate arrive The distance to the next point of interest to be processed .
[0038] Step (3.2.8) If and ,but The first k moving objects of k nearest neighbors; Step (3.2.9) If and , return to step (3.2.6).
[0039] Step (3.2.10) If ,Pick The next boundary point to be processed ,Will The associated boundary points are added to ,renew arrive The shortest distance between all boundary points. Related POIs are added to ,renew arrive The shortest distance to all points of interest, return to step (3.2.6).
[0040] Step (3.3) Based on step (3.2), calculate another adjacent vertex of query q The k nearest neighbors.
[0041] Step (3.4) from and Among the k nearest neighbors of , determine the k nearest neighbors of query q.
[0042] The step (4) queries q in The k nearest neighbors at time q have been determined, and the query q is The position of the moving object does not change, and the incremental query method is used to calculate the query q in The k nearest neighbors at the moment, the steps are as follows: Step (4.1) Calculation Query an adjacent vertex of q at any time The k nearest neighbors.
[0043] Step (4.1.1) is to adjust the position of the moving object according to the change of the moving object. Update the mobile objects associated with the points of interest in the . If the mobile object set of a point of interest is empty, remove the point from Delete it.
[0044] Step (4.1.2) If An adjacent point of is an interest point, and does not belong to , add the point of interest to .
[0045] Step (4.1.3) Take The next boundary point to be processed in .if The adjacent points of are points of interest and do not belong to , add the point of interest to .if The adjacent points of are boundary points and do not belong to , add the point of interest to .
[0046] Step (4.1.4) Next point of interest to be processed in , determine and Related to and not part of , add it to .
[0047] Step (4.1.5) The number of moving objects is greater than or equal to k, calculate the kth moving object to Distance ,calculate arrive The distance to the next boundary point to be processed ,calculate arrive The distance to the next point of interest to be processed .
[0048] Step (4.1.6) If and ,but The first k moving objects of k nearest neighbors; Step (4.1.7) If and , return to step (4.1.4).
[0049] Step (4.1.8) If , return to step (4.1.3).
[0050] The step (5) queries the position change of q. When the position of the mobile object changes, the k nearest neighbors of the query q are continuously calculated. The steps are as follows: Step (5.1) When the query q is on the edge ( , ) Towards When moving, calculate and maintain according to step (4) and According to the query q to Update the k nearest neighbors of query q based on the distance.
[0051] Step (5.2) When the query q is go through Towards When moving, calculate according to step (4) The k nearest neighbors of and Determine the k nearest neighbors of query q from the k nearest neighbors of The distance between q and q is updated.
[0052] Example 2 This embodiment constructs an adaptive multi-layer mobile object index structure based on a dynamic m-tree, and designs a k-nearest neighbor incremental query algorithm for mobile objects on a road network based on the index structure, including: Construct an adaptive multi-layer moving object index structure (DML-Index) based on dynamic m-tree; Design a real-time update strategy for DML-Index when the position of the mobile object changes; Based on DML-Index, we design a k-nearest neighbor incremental query algorithm for mobile objects in road networks (DML-Search). The DML-Index construction method is: The road network is abstracted as an undirected graph G, each road is regarded as an edge of G, and the road endpoints are the vertices of the edges in graph G; According to the m-tree structure, the graph G is divided into Layer, each layer is recorded as ( ). The top layer is the top layer, which divides the global road network into m roughly equal subgraphs. The layer is further divided into m sub-graphs. In this way, the sub-graphs are recursively divided until The global road network is divided into subgraphs. Each subgraph is considered as a node of the m-ary tree. A subgraph of the layer is denoted as ( ).exist In the layer, if the two vertices of an edge in graph G and Located in two different subgraphs, these two vertices are called boundary points.
[0053] Calculate and save The shortest path between any two vertices in each subgraph of the layer (i.e., leaf layer) in the subgraph; Each subgraph of the layer maintains information about the moving objects in the subgraph. Specifically, if the edge of the subgraph ( , ) with moving objects By Vertex Towards the vertex Move, then Points of interest, is with Each point of interest saves and maintains a set of all mobile objects associated with it. The set of moving objects is denoted as ; In the initial state, only Each subgraph of the layer is in an activated state, and the subgraphs of other layers are in an inactive state. The inactive subgraphs only exist formally and are not physically stored.
[0054] The update strategy of DML-Index when the position of the mobile object changes is: For from Towards Moving objects , when its position changes, the processing steps are as follows: if Continue from Towards Move, then update arrive distance; If you move the object exist arrive , the object will be moved from A collection of moving objects Delete from; When moving an object from go through Towards When moving, the object will be moved Add to A collection of moving objects ; As the position of the moving object changes, the activation status of each layer of the DML-Index subgraph is updated through the "subgraph folding" and "subgraph expanding" operations.
[0055] "Subgraph folding operation" means that if Subgraph of layer The number of moving objects in is less than the specified threshold ,but All sibling subgraphs with the same parent node are set to inactive. The parent node subgraph of The number of moving objects within is not less than , then the subgraph Set to active state. The subgraph that is set to active state The original subgraph information is no longer retained, but the subgraph is inherited and all the boundary points, interest points and the shortest paths from each boundary point to all other vertices in its sibling subgraphs constitute a simplified subgraph; if The parent node of The number of moving objects is less than , then recursively move upward layer by layer until the subgraph Ancestor node of ( ) of the moving object is not less than or ; "Subgraph expansion operation" means that if ( ) layer subgraph The number of moving objects is greater than , then the subgraph Set to inactive state and delete the subgraph The points of interest and boundary points stored in the subgraph and the shortest paths between them. Sets the child node to active state. If the child nodes of still need to be expanded, then recursively follow this step downward layer by layer until layer.
[0056] After constructing the DML-Index, the shortest distance between any two boundary points in each activated subgraph and the shortest distance from each interest point to any boundary point are calculated and saved, and the boundary points and interest points in all activated grids are abstracted into a virtual road network (denoted as ), subsequent k nearest neighbor queries are all in the virtual road network On.
[0057] The DML-Search algorithm for mobile object k-nearest neighbor query on road network has the following specific steps: Given an edge in graph G ( , ) , respectively find the distance and The nearest k moving objects, and then from the obtained 2 Select distance among moving objects The nearest k objects are The k nearest neighbors.
[0058] Query distance The steps for the most recent k moving objects are: (1) Add to Virtual Road Network middle; (2) Setting the priority queue storage Reachable mobile objects, The moving objects in The distances are sorted from near to far. Initialized to empty; (3) Setting the priority queue storage Points of interest accessible, The vertices in The distances are sorted from near to far. Initialized to empty; (4) Setting the priority queue storage Points of interest accessible, The vertices in The distances are sorted from near to far. Initialized to empty; (5) Adjacent points of interest and border points are added to and ; (6) Take Pending Points of Interest ,Will The associated mobile object collection Add all moving objects in ; (7) If The number of moving objects is greater than or equal to k, calculate the kth moving object to Distance , arrive The distance to the next point of interest to be processed as well as arrive The distance to the next point of interest to be processed ; (8) If and ,but The first k moving objects of k nearest neighbors; (9) If and , then return to step (6).
[0059] (10) If and ,Pick The next boundary point to be processed ,Will The associated boundary points are added to ,renew arrive The shortest distance between all boundary points. Related POIs are added to ,renew arrive The shortest distance to all points of interest, return to step (6).
[0060] Query the distance according to the above steps The k nearest moving objects.
[0061] When the query point position remains unchanged and the position of the moving object changes, the steps of the incremental query algorithm for real-time calculation of the k nearest neighbors of the moving object are: renew k nearest neighbors; renew k nearest neighbors; Update the k nearest neighbors of query q; renew k nearest neighbors and update The steps of k nearest neighbors are the same as above, update The k nearest neighbors are as follows: delete The apex of Central Africa’s points of interest; Will and Each boundary point is adjacent to but not part of Points of interest added to ; right The points of interest in are processed in sequence until they are found The latest k nearest neighbors; The steps of the incremental query algorithm for real-time calculation of the k nearest neighbors of a moving object when the query point and the position of the moving object change are: When the two neighboring points of the query point remain unchanged, the k nearest neighbors are updated according to the distance from the query point to the neighboring point; When a query point passes through one of the adjacent points and reaches a new edge, the k-nearest neighbors of the new adjacent points of the query point are calculated and the k-nearest neighbors of the query point are updated.
[0062] Figure 1 Adaptive multi-layer moving object index structure for DML-Index. Figure 1 In the figure, the blue boxes represent the boundary vertices of the subgraph, and the red circles represent the interest points, that is, the points towards which the moving objects are currently moving. Figure 1 The top layer is the entire road network graph, the second layer is to divide the road network layer into m (m=4) sub-graphs, and the bottom layer is to divide the road network graph into m 2 Sub-pictures.
[0063] Figure 2A schematic diagram of the subgraph index folding and a schematic diagram of the folded virtual road network are given. Figure 2 The meanings of the blue box vertices and red circle vertices are the same as Figure 1 Consistent. Among them, Figure 2 (a) is a schematic diagram of a single-layer subgraph index. In this diagram, each subgraph is required to contain at least one point of interest, otherwise the subgraph and its sibling subgraphs will be folded. There are subgraphs in the two groups of subgraphs marked by the red dotted circle that do not contain points of interest, so they are folded. The effect after folding is shown in the figure below. Figure 2 As shown in (b). At this time, Figure 2 All subgraphs in (b) contain at least one interest point and are in an activated state. Figure 2 In (c) we get Figure 2 The corresponding virtual road network graph in (b) is a graph in which each subgraph only retains boundary points and interest points.
[0064] Example 3. A multi-target continuous search system in a road network environment, comprising: The data acquisition module is configured to acquire a road network; The DML-Index index building module is configured to build an adaptive multi-layer mobile object index structure based on a dynamic m-tree according to the acquired road network, namely, DML-Index; The DML-Index index maintenance module is configured to calculate an update strategy for the DML-Index when the position of a mobile object in the road network changes; The DML-Search module is configured to build a k-nearest neighbor incremental query algorithm for mobile objects in road networks, namely DML-Search, based on the update strategy of DML-Index.
[0065] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the method described.
[0066] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; and the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the described method.
[0067] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A multi-target continuous search method in a road network environment, characterized in that: include: Get the road network; According to the acquired road network, a dynamic m Adaptive multi-layer moving object index structure of fork tree, namely DML-Index; Calculate the update strategy of DML-Index when the position of mobile objects in the road network changes; Building a mobile object for road networks based on DML-Index update strategy k Nearest neighbor incremental query algorithm, namely DML-Search.
2. The multi-target continuous search method in a road network environment according to claim 1, characterized in that: The construction is based on dynamic m Adaptive multi-layer mobile object index structure based on fork-tree, including abstracting the road network into an undirected graph G , each road is considered as G An edge of the road, the road endpoint is the graph G The vertex of the middle edge; according to m The fork tree structure will G Divide into Layer, each layer is recorded as ( ); The top layer divides the global road network into roughly the same m subgraphs, each subgraph in The layers are further divided into m subgraphs, through recursive partitioning until The global road network is divided into subgraphs; each subgraph is considered as m A node of a fork tree; A subgraph of the layer is denoted as ( );exist In the layer, if the graph G The two vertices of an edge and Located in two different subgraphs, these two vertices are called boundary points; calculate and save The shortest path between any two vertices in each subgraph of the layer; Each subgraph of a layer maintains information about the moving objects in that subgraph.
3. The multi-target continuous search method in a road network environment according to claim 2, characterized in that: The update strategy of DML-Index when calculating the position change of mobile objects in the road network includes: from Towards Move, then update arrive distance; if you move the object exist arrive , the object will be moved from A collection of moving objects Delete; move object from go through Towards When moving, the object will be moved Add to A collection of moving objects ; As the position of the moving object changes, the activation state of each layer of subgraph in the DML-Index is updated through subgraph folding and subgraph expanding operations.
4. The multi-target continuous search method in a road network environment according to claim 3, characterized in that: The subgraph folding operation includes: Subgraph of layer The number of moving objects in is less than the specified threshold ,but All sibling subgraphs with the same parent node are set to inactive state; if The parent node subgraph of The number of moving objects within is not less than , then the subgraph Set to active state; The subgraph that is set to the active state The original subgraph information is no longer retained, but the subgraph is inherited and all the boundary points, interest points and the shortest paths from each boundary point to all other vertices in its sibling subgraphs constitute a simplified subgraph; if The parent node of The number of moving objects is less than , then recursively move upward layer by layer until the subgraph Ancestor node of ( ) of the moving object is not less than or .
5. The multi-target continuous search method in a road network environment according to claim 4, characterized in that: The subgraph expansion operation includes: ( ) layer subgraph The number of moving objects is greater than , then the subgraph Set to inactive state and delete the subgraph The points of interest and boundary points saved in the subgraph and the shortest paths between them; Sets the child node to active state.
6. The multi-target continuous search method in a road network environment according to claim 5, characterized in that: The construction of mobile objects oriented to the road network k The nearest neighbor incremental query algorithm includes the given graph G An edge in , ) , respectively find the distance and Recent k moving objects, and then from the obtained 2 Select distance among moving objects Recent k objects, that is of k Neighbor.
7. The multi-target continuous search method in a road network environment according to claim 6, characterized in that: The construction of mobile objects oriented to the road network k Nearest neighbor incremental query algorithm, including query distance Recent k To move an object, the steps are: (1) Add to Virtual Road Network middle; (2) Setting the priority queue storage Reachable mobile objects, The moving objects in The distances are sorted from near to far. Initialized to empty; (3) Setting the priority queue storage Points of interest accessible, The vertices in The distances are sorted from near to far. Initialized to empty; (4) Setting the priority queue storage Points of interest accessible, The vertices in The distances are sorted from near to far. Initialized to empty; (5) Adjacent points of interest and border points are added to and ; (6) Take Pending Points of Interest ,Will The associated mobile object collection Add all moving objects in ; (7) If The number of moving objects is greater than or equal to k , calculate the k Move objects to Distance , arrive The distance to the next point of interest to be processed as well as arrive The distance to the next point of interest to be processed ; (8) If and ,but Before k The moving object is of k Near neighbors; (9) If and , then return to step (6); (10) If and ,Pick The next boundary point to be processed ,Will The associated boundary points are added to ,renew arrive The shortest distance between all boundary points; Related POIs are added to ,renew arrive The shortest distance to all points of interest, return to step (6).
8. A multi-target continuous search system in a road network environment, characterized in that: include: The data acquisition module is configured to acquire a road network; The DML-Index index building module is configured to build an adaptive multi-layer mobile object index structure based on a dynamic m-tree according to the acquired road network, namely, DML-Index; The DML-Index index maintenance module is configured to calculate an update strategy for the DML-Index when the position of a mobile object in the road network changes; The DML-Search module is configured to build a mobile object oriented road network based on the update strategy of DML-Index. k Nearest neighbor incremental query algorithm, namely DML-Search.
9. A computer-readable storage medium storing a plurality of instructions, characterized in that: The instructions are suitable for being loaded by a processor of a terminal device and executed by a multi-target continuous search method in a road network environment as described in claim 1.
10. A terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement each instruction; and the computer-readable storage medium is used to store multiple instructions, characterized in that: The instructions are suitable for being loaded by a processor and executed by a multi-target continuous search method in a road network environment as described in claim 1.
Citation Information
Patent Citations
Continuous k-nearest neighbor query method and system for road network moving objects
CN111353107A
Road network indexing method supporting multi-type query
CN118445318A
Method and apparatus for re-evaluating execution strategy for a database query
US20060074874A1
