A reachability query method and device based on Top-k space keywords

By introducing accessibility query methods in spatial keyword query and using space-time index and space-text object index for pruning, the accessibility problem of users reaching points of interest within a specific time period is solved, achieving more accurate and Efficient query results.

CN114357320BActive Publication Date: 2025-02-21SOUTH CENTRAL UNIVERSITY FOR NATIONALITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111627905.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-02-21
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

When conducting spatial keyword query, the prior art fails to effectively consider the accessibility problem of the user reaching the point of interest within a specific time period from the query point, resulting in the inaccurate query results.

Method used

Using the accessibility query method based on Top-k space keywords, through designing space-time index (SRTR tree) and space-text object index (STOI structure), accessibility pruning and spatial proximity pruning are performed during the query process. Prune with text similarity to speed up querying and improve the accuracy of results.

Benefits of technology

It realizes that on the basis of taking into account accessibility, spatial proximity and text similarity, the query speed and the accuracy of the results can be improved, which can better meet the computing needs of users for different path accessibility over different time periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357320B_ABST
    Figure CN114357320B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for reachability query based on Top-k spatial keywords, relating to the field of spatiotemporal databases. The method includes: designating points v on road e, where v includes intersections and endpoints; designating roads between two adjacent v as road segments r; establishing a road network G; obtaining a trajectory set by recording historical trajectories according to road network G; and mapping the location o initiating a spatial text object query in road network G to road segment r0 on road e, thus establishing a spatial location of the spatial text object and the target road segment r0. i Corresponding; the search trajectory set contains data from road segment r0 to the target road segment r within the query time period. i The reachability of a trajectory is assessed. This invention provides a query algorithm that balances reachability, spatial proximity, and text similarity, implemented through the design of spatiotemporal indexes and spatial-text object indexes (such as the STOI structure). During the query process, reachability pruning, spatial proximity pruning, and text similarity pruning are performed respectively to accelerate the query speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of spatiotemporal databases, and in particular to a reachability query method and device based on Top-k spatial keywords. Background Art

[0002] With the rapid development of mobile networks and geolocation technology, location-based services are widely used in daily life, and the amount of network data objects with spatial-text information has also exploded. Traditional spatial keyword query (SKQ) takes a geographic location and several keywords as parameters, and returns several results that meet spatial and text constraints. These results are often arranged according to a specified formula. SKQ extends the consideration of spatial dimensions from Euclidean space to road networks, but existing literature only considers the static distance between the query point and the point of interest (spatial-text object) to determine the spatial proximity, without considering the possibility of users in real life starting from a certain starting time and reaching the point of interest from the query point within a specific time period, that is, the reachability problem.

[0003] like Figure 1 As shown in the figure, there are three points of interest o1, o2 and o3, and one query point Q. Assume that points of interest o1 and o2 meet the keyword constraints of query q, and the distance between query point Q and o1 is less than the distance between Q and o2. However, at certain times of the day, due to traffic and other reasons, the possibility of reaching o1 from Q is less than the possibility of reaching o2 from Q within a given time interval. In this case, o1 is not necessarily a better choice than o2. Therefore, it is necessary to take accessibility as a factor in Top-k space keyword query. Summary of the invention

[0004] In view of the defects existing in the prior art, the purpose of the present invention is to provide a reachability query method and device based on Top-k spatial keywords, which can take into account the query algorithm of reachability, spatial proximity and text similarity, and is implemented by designing a spatiotemporal index (SRTR tree) and a spatial-text object index (STOI structure). During the query process, reachability pruning, spatial proximity pruning and text similarity pruning are performed respectively to speed up the query speed.

[0005] To achieve the above objectives, in a first aspect, an embodiment of the present invention provides a reachability query method based on Top-k space keywords, which includes:

[0006] Count the points of road e as v, where v includes the intersection and endpoints, count the road between two adjacent v as road section r, and establish the road network G;

[0007] Recording historical trajectories according to the road network G to obtain a trajectory set, wherein the historical trajectory includes a spatiotemporal point located in the road network G and a road section r passed by the spatiotemporal point, and the spatiotemporal point includes a trajectory ID, spatial location information, and a timestamp;

[0008] In the road network G, the location o of the spatial text object query is corresponded to the road segment r0 in the road e. The spatial text object o includes spatial location information and text description. The spatial location of the spatial text object corresponds to the target road segment r0. i correspond;

[0009] Retrieve the trajectory set from segment r0 to target segment r during the query time period i The accessibility of the trajectory.

[0010] As an optional implementation, the retrieval trajectory set includes the retrieval trajectory from the road segment r0 to the target road segment r in the query time period. i The accessibility of the trajectory, including:

[0011] According to the query time period, retrieve the historical trajectories of the same time period in the trajectory collection, and determine whether the target section r is reached within the preset time period. i Does the historical trajectory exist?

[0012] As an optional implementation scheme, if there are historical trajectories that reach the target segment r within a preset time period, then the number of historical trajectories that successfully reach the target segment r from segment r0 within the preset time period is calculated. i The probability of being reached.

[0013] As an optional implementation scheme, the calculation of the number of times each historical trajectory successfully reaches the target segment r from segment r0 within the preset time period i The probability of:

[0014] Within the preset time length, count all the paths from segment r0 to target segment r i Historical trajectory, the percentage of successful arrivals within the preset time period is used as the reachability probability.

[0015] As an optional implementation scheme, the step of recording historical trajectories according to the road network G to obtain a trajectory set includes:

[0016] The road e and the road segments r it contains are first recorded in the form of an R-tree, and then the historical trajectory of the road segment r in different time periods is recorded.

[0017] As an optional implementation scheme, the intersection and endpoint of the road e are counted as v, and the road between v is counted as r, and the road network G is established, including:

[0018] Based on the preset spatial granularity, record the roads e and the intersections v between the roads;

[0019] The road e is divided into sections r based on the intersection v, and the GPS information is mapped to each section.

[0020] As an optional implementation scheme, the step of recording historical trajectories according to the road network G to obtain a trajectory set includes:

[0021] The movement trajectories of different objects in the road network G are recorded as history, wherein the movement trajectories include instantaneous speed, ID and timestamp, and the objects include vehicles.

[0022] As an optional implementation, the retrieval trajectory set includes the retrieval trajectory from the road segment r0 to the target road segment r in the query time period. i The accessibility of the trajectory also includes:

[0023] Create a queue of adjacent segments of segment r0, add segments adjacent to r0 to the queue based on the adjacent relationship, and confirm whether the segments in the queue are reachable from segment r0;

[0024] The queues that are confirmed to be reachable are used as the initial inspection results, and branches are reduced to obtain recommendation results. The branch reduction includes reachability pruning, text similarity pruning, and distance pruning.

[0025] Create a queue of adjacent links of link r0, add links adjacent to r0 to the queue based on the adjacent relationship, and confirm whether the links in the queue are reachable from link r0, including:

[0026] According to the historical trajectory dataset, within the given query time, calculate the distance from segment r0 to target segment r i Is it reachable?

[0027] In a second aspect, an embodiment of the present invention provides a reachability query system based on Top-k space keywords, which includes:

[0028] Modeling module, used to count the intersection and endpoint of road e as v, count the road between v as r, and establish the road network G;

[0029] A statistics module, used to obtain a trajectory set by recording historical trajectories according to the road network G, wherein the historical trajectories include time-space points, and the time-space points include trajectory IDs, spatial location information, and timestamps;

[0030] The positioning module is used to correspond the positioning position o of the spatial text object query initiated in the road network G to the road section r0 in the road e, wherein the spatial text object o includes spatial position information and text description, and the spatial position of the spatial text object corresponds to the target road section r0. i correspond;

[0031] The pathfinding module is used to retrieve the trajectory set from segment r0 to the target segment r in the query time period. iThe accessibility of the trajectory.

[0032] Compared with the prior art, the advantages of the present invention are:

[0033] The present invention provides a reachability query method and device based on Top-k spatial keywords to establish a road network system, and based on the road network system, track statistics and indexing are performed, and the time factor is added on the basis of text and space. It is no longer just a path search based on distance and path, but a comprehensive consideration of time-space factors to confirm whether the querying person is a reachable destination. For example, in a fixed time period or period, due to the periodic congestion or unblocking of a road section, the present invention can provide the calculation of the reachability of different paths in different time periods, thereby ensuring better path accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, a brief introduction is given below to the drawings corresponding to the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 for road networks and space-text objects;

[0036] Figure 2 A flow chart of the steps of a reachability query method based on Top-k space keywords of the present invention;

[0037] Figure 3 A partial road network structure diagram after the road is re-segmented in an embodiment of a reachability query method based on Top-k spatial keywords of the present invention;

[0038] Figure 4 A spatiotemporal index structure diagram of an embodiment of a reachability query method based on Top-k spatial keywords of the present invention (taking an R-tree index structure as an example);

[0039] Figure 5 A schematic diagram of a road section intersection and a space-text object in an embodiment of a reachability query method based on Top-k spatial keywords of the present invention;

[0040] Figure 6 This is a diagram of the space-text object index structure (taking the STOI structure as an example). DETAILED DESCRIPTION

[0041] The embodiments of the present invention are further described in detail below with reference to the accompanying drawings.

[0042] The embodiment of the present invention provides a reachability query method and device based on Top-k spatial keywords, which adds the influencing factor of time-based reachability to the traditional spatial keyword query, and can take into account the query algorithm of reachability, spatial proximity and text similarity, and is implemented by designing a spatiotemporal index (R-tree) and a spatial-text object index. During the query process, reachability pruning, spatial proximity pruning and text similarity pruning are performed respectively to speed up the query speed.

[0043] In order to achieve the above technical effects, the overall idea of ​​this application is as follows:

[0044] Count the points of road e as v, where v includes the intersection and endpoints, count the road between two adjacent v as road section r, and establish the road network G;

[0045] Recording historical trajectories according to the road network G to obtain a trajectory set, wherein the historical trajectory includes a spatiotemporal point located in the road network G and a road section r passed by the spatiotemporal point, and the spatiotemporal point includes a trajectory ID, spatial location information, and a timestamp;

[0046] In the road network G, the location o of the spatial text object query is corresponded to the road segment r0 in the road e. The spatial text object o includes spatial location information and text description. The spatial location of the spatial text object corresponds to the target road segment r0. i correspond;

[0047] Retrieve the trajectory set from segment r0 to target segment r during the query time period i The accessibility of the trajectory.

[0048] In summary, the traditional spatial keyword query can only give objects that meet the text similarity and spatial proximity, but ignores the accessibility between the query point and the object: objects closer to the query point may have lower accessibility than objects farther away from the query point due to traffic congestion and other reasons within a certain period of time. At this time, the present invention can give results that are closer to reality.

[0049] In this case, after establishing the road network G according to the actual road conditions,

[0050] In order to better understand the above technical solution, a detailed description is given below in conjunction with specific implementation methods.

[0051] See also Figure 2 As shown, an embodiment of the present invention provides a reachability query method based on Top-k space keywords, which includes:

[0052] S1, count the points of road e as v, where v includes the intersection and endpoints, count the road between two adjacent v as section r, and establish the road network G;

[0053] First, the original road network and trajectory data are preprocessed. The roads are re-segmented. All roads and intersection information are combined based on a given spatial granularity (such as 500m). The roads are segmented into new sections and intersections are inserted to avoid overly long sections. Then map matching is performed. GPS points are mapped to corresponding sections.

[0054] For ease of calculation, mathematical symbols are used to express the road network mathematically:

[0055] The road network can be represented by a graph G = (V, E), where V is a set of vertices, a vertex v∈V represents a road intersection or an endpoint in the road network; and E is a set of edges. An edge (v, v′)∈E represents an entire road in the original road network.

[0056] It should also be noted that when different travel paths pass through different roads, it is not necessarily necessary to complete the entire road. It is possible to enter a road at a certain intersection and then turn out at another intersection. Therefore, it is necessary to further divide the road for more reasonable and effective calculation. The present invention regards the road between two adjacent v as a section, which is counted as r.

[0057] Specifically, in order to facilitate subsequent processing and calculation, road segmentation is performed on the basis of the original road network, and the original road E is divided into sections with the same granularity, denoted as r, and the endpoints of r are two v.

[0058] S2, obtaining a trajectory set by recording historical trajectories according to the road network G, wherein the historical trajectory includes a spatiotemporal point located in the road network G and a road section r through which the spatiotemporal point passes, and the spatiotemporal point includes a trajectory ID, spatial location information, and a timestamp;

[0059] When searching for a route, people often only seek the shortest route and choose the appropriate means of transportation based on the shortest route to determine the duration of the journey. However, they do not consider the convenience of other trajectories and the changes in the duration of the same trajectory at different time points due to changes in traffic conditions and departure frequency, which makes the chosen travel method wrong.

[0060] The embodiment of the present invention takes into account the distance and time cost from the user's current location to the activity location when people participate in collective social activities, and proposes a multi-user location recommendation based on the spatial characteristics of the urban road network and the user's time requirements. First, in terms of path confirmation, this case collects historical trajectories, so that the trajectory connection can be used to solve the data sparsity problem caused by the limitation of real-time trajectories. That is, when addressing, this embodiment can connect sub-trajectories passing through the same location, and proposes a set of indexing and query processing technologies to effectively find reachable areas with any number of trajectory connections.

[0061] In order to consider the performance of the trajectory from a time perspective, this embodiment further adds a time parameter to the trajectory.

[0062] For example, a trajectory is the route information of a vehicle traveling on a road network. The trajectory in this embodiment is composed of a series of spatiotemporal points, each of which contains information such as a trajectory ID, a spatial position (latitude and longitude), and a timestamp.

[0063] In this way, after further aggregating the trajectories with time elements in the road network G, a space-time network structure / model is formed, through which the whole system traffic accessibility from different sources to special activity locations can be maximized.

[0064] For example, based on massive vehicle trajectory data, this embodiment can confirm the temporal and spatial reachable area, calculate and merge the reachable nodes to reduce the computational complexity caused by massive traffic data, and adopt different boundary segment selection strategies for time-sensitive applications and distance-related applications, thereby improving the applicability in actual urban transportation services.

[0065] Furthermore, in this spatiotemporal network structure / model, due to the addition of the time factor, this example can combine the time-aware Boolean spatial keyword query (TABSKQ) and use the CIR+ tree-based algorithm for pruning, and then establish a TA tree index to use spatiotemporal and textual information to prune the search space, and finally propose a variant for jointly processing a set of TABSKQ.

[0066] The embodiment of the present invention further provides a construction method of a spatiotemporal index, which specifically includes:

[0067] T1, data preprocessing

[0068] like Figure 3 As shown, in order to facilitate subsequent calculations, the original road network and trajectory data are first preprocessed.

[0069] (1) Road re-segmentation: All roads and intersection information are combined based on a given spatial granularity (e.g., 500 m), and then the roads are segmented into new sections and intersections are inserted to avoid overly long sections.

[0070] (2) Map matching. Map the original trajectory data onto the newly segmented road network by first mapping the GPS points to the corresponding road segments and then connecting all road segments to form the mapped trajectory. At the same time, we add the instantaneous speed, vehicle ID (considered as the trajectory ID of the connection point entering the trajectory), and timestamp values ​​to the corresponding road segments as their attributes. A mobile object has only one trajectory per day, which consists of GPS points recorded at different timestamps.

[0071] T2, establish spatiotemporal index (R-tree as an example)

[0072] Figure 4 is based on Figure 3 The spatiotemporal index containing keyword information and trajectory information is constructed from the road network structure after the roads are re-segmented. The establishment of the spatiotemporal index structure adopts the order of "space first, time later". The spatial index is constructed in the form of an R-tree, whose leaf nodes are the segmented road segments, and each leaf node is connected to the time index. The time information has two dimensions - date and time of the day. The date information corresponds to the date of the historical trajectory dataset. At the same time, the time of the day is first divided into "morning peak period" (7:00-9:00), "evening peak period" (17:00-20:00) and "off-peak period" (other time periods except the first two periods) according to traffic flow; secondly, the two hours of the morning peak period and the three hours of the evening peak period are divided into 10-minute granularity, and the off-peak period is divided into 30-minute granularity; finally, in the order of "time first, date later", all trajectory IDs passing through a certain road segment on the corresponding date and time are stored. At the same time, a text information list is maintained for each node of the R-tree, which stores the union of the keywords of all space-text objects contained in the node and is constructed in a bottom-up manner.

[0073] T3, further processing of space-text object index (taking STOI structure to store space-text object as an example)

[0074] like Figure 5 , Figure 6 As shown, Figure 5 Shows road segments, intersections, and space-text objects in a road network. Figure 6 is based on Figure 5 The established spatial-text object index STOI (Spatio-Temporal Objects Index) is divided into three parts: the first part records the adjacent sections and their intersections of each road section, which is used to clarify which sections will be passed from the query point to the spatial-text object; the second part is the object information organized in sections, and an inverted list is established for the objects on each section according to the keywords to speed up the selection of objects; the third part stores the location of all objects in the road network and the road network distance between the object and the endpoint of the section, which is used to calculate the text similarity and spatial proximity between the query point and the object.

[0075] It should be noted that the SRTR tree in the implementation of the present invention is an R-tree containing the index structure of the space, time, text and accessibility information of the space-text object (such as STOI). The spatial information is organized by the R-tree, whose leaf nodes are the segmented road segments, and each leaf node connects the time information and the STOI structure. The SRTR tree is a general term for this structure.

[0076] S3, in the road network G, the input spatial text object o is matched with the road segment r0 in the road e corresponding to the spatial text object o, wherein the spatial text object o includes spatial position information and text description;

[0077] When a person needs to query a route, the first thing he or she must do is to exchange information. In this embodiment, he or she may input one or a group of characters, and then locate the object through these characters, that is, these characters are all indicating the spatial arrival text object, counted as o. Through o, a group of spatial text objects o∈O is queried on the edge E of the road network G, and each object has spatial location information ol (latitude and longitude) and text description od.

[0078] Specifically, an object that has both geographic location attributes and text attributes is called a spatio-textual object. Text constraints are divided into full match, partial match, fuzzy match and Boolean match. The calculation of text similarity varies depending on the text constraints. For the text information of an object, inverted files are often used to organize it. R-tree, grid index and their variants are often used to process the spatial factors of spatio-textual objects.

[0079] Optionally, when spatial text objects are mapped, the mapping can be performed by indexing, for example, using an IR tree, i.e., a query that processes both the text and spatial information of a document, to first retrieve the documents most relevant to the query keyword and location, respectively, for the geographic search engine, and then sort the retrieved documents according to their combined text and spatial relevance to the query.

[0080] Optionally, an embodiment of the present invention further provides a retrieval method, using a spatial inverted index S2I to improve the performance of Top-k spatial keyword queries, mapping each different term to a set of objects containing the term. Objects are stored in different ways according to the document frequency of the term, and objects are efficiently retrieved in descending order of keyword relevance and spatial proximity.

[0081] Preferably, in the input text object, a general location-aware rank query (GLRQ) on location-aware objects can be used, predicate requirements are added based on considering spatial proximity and text similarity, a summary tree is constructed for processing predicates and attribute-based scoring, and the summary tree is integrated with the spatial text index to improve efficiency.

[0082] It should be noted that positioning the spatial text object o on the road E is not limited to the above-mentioned method, and any method that can be used to position the spatial text object o in the road network G is included in the embodiments of the present invention.

[0083] S4, retrieve the trajectory set from segment r0 to target segment r in the query time period i The accessibility of the trajectory

[0084] After the target is located, route addressing can be performed. In step S2 of the embodiment of the present invention, a spatiotemporal index containing trajectories is actually constructed. Through the index, path finding and reachability judgment after path finding can be realized according to the mutual connection of trajectories. That is, on each spatially reachable route, within a selected time period, whether the route can reach the destination within the constraint time length.

[0085] That is, the embodiment of the present invention is a time-related spatiotemporal network to maximize the number of activity locations that road users can reach within the travel time budget and improve traffic accessibility. At the same time, since the trajectory is marked by points in the embodiment of the present invention, these points contain timestamps and locations. When querying, the calculation of the reachable area can be extended to the context of multiple starting points, that is, through the multi-location spatiotemporal reachability intersection query (I-Query), an index mode composed of spatiotemporal indexes and connection indexes is used to implement route derivation, range analysis, reachability analysis and other functions.

[0086] It should be noted that in the embodiment of the present invention, the proposed segment accessibility is a more general term than the reachable segment. Optionally, the reachability is added with the reachability probability. The reachability probability describes the probability that the historical trajectory data set can reach the target segment r from the starting segment r0 (the segment where qs is located) within a given duration. i The probability of (the road segment where object o is located) is between 0 and 1. For example, the high-resolution spatiotemporal bus network model based on GIS measures the accessibility of public transportation from the origin to the destination by considering the total travel time (the sum of the time to walk to the bus stop, the waiting time at the bus stop, the travel time on the bus network, and the transfer time between routes).

[0087] For example, the embodiment of the present invention re-segments and maps the road network based on real historical trajectory data, finds all road sections that meet the reachability probability through the maximum boundary area search algorithm and the backtracking algorithm, and thus finds the spatiotemporal reachable area. The reachability probability of a road section is defined as the percentage of days in which a given road section can be reached from the starting road section within a given duration in the historical trajectory data set.

[0088] As shown in Table 1, the symbols and terms that may be used in the query and calculation process of the embodiment of the present invention are defined:

[0089]

[0090]

[0091] Table 1

[0092] Taking accessibility as an example, in the embodiment of the present invention, the accessibility of the query trajectory is the possibility of reaching the destination within the constrained duration, which can be a numerical value, which can be expressed in the form of probability, such as given the query starting position qs, a section r in the road network i , query start time qt and duration ql, trajectory reachability reflects the fact whether the historical trajectory passes through a given road segment from the starting location within a given duration. If the road segment ri is reachable within ql, the trajectory reachability is 1, otherwise the trajectory reachability of these locations is 0.

[0093] For a query q and an object o, the scoring function rank(q,o) calculates and returns a score that takes into account the reachability, spatial proximity, and textual similarity of o relative to q, as follows:

[0094] Rank(q,o)=α·prob(q,o)+β·Sr(qs,ol)+(1-α-β)·Tr(qd,od)

[0095] Where prob(q,o) is the reachability probability from qs to ol within the time interval ql, starting from qt; Tr(qd,od) is the text similarity between q and o; Sr(qs,ol) is the spatial proximity between q and o, and α,β∈(0,1) represent the user's preference parameters, which are used to adjust the weights of reachability, text similarity, and spatial proximity in the scoring function. For information in the spatial dimension, when α=0 and β≠0, it means that the user only considers the spatial proximity from the query point to the spatial-text object; when α≠0 and β=0, the user only considers whether it can be reached within a given time, and does not care how far the query point is from the spatial-text object.

[0096] Similarly, in the query, we can give the query starting position qs, query start time qt and duration ql, from qs to road segment r i The trajectory reachability is 1, then r i is a reachable road section. According to the time granularity of the index structure, ql is divided into n time periods. If road section r i is reachable, then it is possible to reach it in any time period, starting from l = 0, that is, considering that it is possible to reach r from r0 in the time interval where qt is located i This situation.

[0097] Therefore, segment accessibility is a more general term than reachable segments, and the reachability probability is introduced here. The reachability probability describes the probability that the target segment r can be reached from the starting segment r0 (the segment where qs is located) within a given duration ql in the historical trajectory data set. i The probability of (the road section where object o is located) is between 0 and 1.

[0098] Furthermore, the reachability of query q to object o is described by the probability of reaching ol from qs with qt as the start time and ql as the query duration. Let the section where q is located be r0 and the section where o is located be r i , we can get:

[0099]

[0100] Where m is the total number of days of historical trajectory data, and the average of the reachability probabilities for each day is the reachability. j The calculation formula of (qo) is

[0101]

[0102] where tr s It passes through the starting section r0 at the start time qt and will pass through r later i The trajectory set, |tr s | is the number of trajectories in the set; tr e It passes through r0 at qt, and then passes through the candidate section r within [qt,q.t+ql] i The trajectory set, |tr e | is the number of trajectories in the set. tr e The calculation formula is:

[0103]

[0104] tr l for tr s The subset of trajectories that pass through segment r0 at qt and pass through segment r at the lth time interval ql i The time interval is divided according to the time granularity of the SRTR tree: if ql is larger than the time granularity Δt of the period where qt is located in the SRTR tree, then ql is divided into n small time intervals according to the time granularity, otherwise, the time intervals contained in tr s and passes through r in [qt,q.t+Δt] i The set of trajectories is approximately replaced by

[0105] Therefore, the reachability probability of a spatial-textual object is expressed by the reachability probability of the road segment where it is located.

[0106] Preferably, when performing a query, due to differences among people, the spatial texts they provide are different, and a single word may lead to a huge mistake. Therefore, the embodiment of the present invention also provides a method for calculating text similarity, which is used to confirm whether they are close or even in the same position. The text similarity between the query q and the object o can be calculated by a text similarity measurement function. The embodiment of the present invention uses cosine similarity to calculate

[0107]

[0108] The weight w of keyword t in the object keyword set od t,o.d =1+ln(f t,o,d ), where ft ,o.d is the number of times t appears in od. |O| is the number of objects in the spatial-text object set O, df t is the number of times keyword t appears in set O. And when the keyword set qd of query q and the keyword set od of object o do not have the same keyword t, that is, |qd∩od|=0, the text similarity T between the two r (qd,od)=0.

[0109] Preferably, spatial proximity can also be calculated:

[0110] The spatial proximity Sr(qs,ol) describes the proximity of the road network distance between the query q and the object o, which is defined as follows:

[0111]

[0112] where d R (qs,o,l) is the road network distance between qs and ol(o∈O), d max It is the maximum network distance between any two points in the network.

[0113] Preferably, when addressing, the optimization of the result can be achieved by pruning the branches, that is, the optimization of the result can be achieved by removing the unreachable results. Specifically, the embodiment of the present invention provides three pruning schemes, including reachability pruning, text pruning and road network distance pruning:

[0114] 1. Reachability-based pruning

[0115] If a top-k spatio-textual keyword query q = <q.s, q.d, q.t, q.l, q.r, k> considering reachability and a road segment r are known, if the probability prob(q, r) of reaching an object o from q.s at q.t within the given time interval q.l is less than q.r, then the road segment r can be safely pruned. In addition, the unexamined adjacent road segment r' of r can also be safely pruned.

[0116] Then, from the spatio-temporal index structure, for any object o on the road segment r, prob(q, o) = prob(q, r). If prob(q, r) < q.r, then prob(q, o) < q.r, and none of the objects on the road segment can meet the reachability requirement set by the user, so the road segment r can be safely pruned. The unexamined adjacent road segment r' of r is farther from the query q than r is from q and is on the same trajectory, so its reachability will not be higher than prob(q, r), that is, prob(q, r') ≤ prob(q, r). It can be known that for the object o' on r', prob(q, o') < q.r. Therefore, the unexamined adjacent road segment r' of r can also be safely pruned.

[0117] 2. Pruning Based on Text

[0118] If a top-k spatio-textual keyword query q = <q.s, q.d, q.t, q.l, q.r, k> considering reachability and a region E (or road segment r) are known, if the intersection of the union of the keywords of all spatio-textual objects on the region E (or road segment r) and q.d is empty, then the region (or the road segment) can be safely pruned.

[0119] Then, from the spatio-temporal index structure, for any object o in the region E (or road segment r), there is (or ). If (or ) then the comprehensive scoring function Rank(q, o) of the object o = -∞. At this time, Rank(q, E) = -∞ (or Rank(q, r) = -∞). Therefore, the region E (or road segment r) can be safely pruned.

[0120] 3. Pruning Based on Road Network Distance

[0121] If a top-k spatio-textual keyword query q = <q.s, q.d, q.t, q.l, q.r, k> considering reachability and a road segment r are known, if Rank max (q, r) < Rank(q, o k-th ), where Rank max(q,r) = 1 - β(d min (q.s,r) / d max (q,o)), is the maximum scoring function value of section r, Rank(q,o k-th ) is the scoring value of the result object o ranked kth currently k-th , and at this time r can be safely pruned. In addition, for any area r', if there exists d min (q.s,r') > d min (q.s,r), then this area can also be safely pruned.

[0122] Then for any object o on section r, there is d min (q.s,o) ≥ d min (q.s,r). If Rank max (q,r) < Rank(q,o k-th ), then Rank max (q,o) ≤ Rank max (q,r), thus obtaining Rank max (q,o) < Rank(q,o k-th ), so section r can be safely pruned. For any r', if d min (q.s,r') > d min (q.s,r), then there is Sr(q.s,r') < Sr(q.s,r), thus obtaining Rank(q,r') < Rank(q,r). For any object o' ∈ r', there is Rank(q,o') ≤ Rank(q,r') < Rank(q,r) < Rank(q,o k-th ), so section r' can also be safely pruned.

[0123] As shown in Table 2, the embodiment of the present invention also provides an accessibility calculation method:

[0124]

[0125]

[0126] Table 2

[0127] The specific calculation process is as follows: The calculation of the accessibility between the query point and the object is relatively complex, so before introducing the query processing algorithm, the reachability calculation method is explained first. Algorithm 1 gives the processing process of the reachability calculation. As shown in Table 2, PROB can accept object o or road section r as a parameter. The calculated result probability is the reachability probability from road section r0 to rb (also the reachability probability from q to o). First, the query q is located to the starting road section r0 (line 2). If the parameter of PROB is object o, it is located to the road section rb (line 3). Through the SRTR tree, find the trajectory set trs that passes through r0 at qt and will pass through rb later (line 5). If the query duration ql is greater than the time granularity Δt of the time period where qt is located in the SRTR tree, then ql is divided into several small time intervals Δt1, Δt2...Δtn, find the road sections in trs that pass through rb in each small time interval, and add them to the set tre, otherwise tre is the set of road sections in trs that pass through rb within [qt,q.t+Δt] (lines 6-11). Calculate the reachability for each day of the data set (lines 4-12) and take the average as the final result (line 13), and finally return the calculated result probability (line 14).

[0128] As shown in Table 3, the embodiment of the present invention also provides an RSKQ query algorithm based on SRTR

[0129]

[0130]

[0131] Table 3

[0132] The SRTR-based RSKQ query algorithm gives the processing process of Top-k spatial keyword query considering accessibility, as shown in Table 3. Among them, Rank(q,ok-th) is the comprehensive score of the k-ranked result in the current result set; R is the result set, which stores at most k objects; NR is a queue used to store road sections.

[0133] The specific process of query processing is as follows: First, locate the section where the query is located according to the location information qs of the query q, and record it as the starting section r0 (line 2). Lines 3-9 of Algorithm 1 process the spatial-text object o on r0, first checking whether qd∩od is If If not, the object will be ignored; if not, the comprehensive score Rank(q,o) of each object o with prob(q,o)>qr will be calculated, and only the top k objects will be stored, and the result set R will be updated in real time; if And for all spatio-textual objects on r0, prob(q, o) < q.r, which means that starting from the query q, the object o on the same road segment cannot be reached, and naturally other road segments cannot be reached either. Then the loop ends and the result count is 0. Lines 10 - 23 handle other road segments outside r0 and the objects on these road segments. First, the adjacent road segments of r0 are added to the queue NR one by one. For each road segment ra in NR, the following operations are performed: If then this road segment is not considered. After dequeuing it, its unexamined adjacent road segments are added to the queue (lines 12 - 13); otherwise, the reachability of ra is checked. If prob(q, ra) < q.r, then ra is dequeued (the reachability of the unexamined adjacent road segments of ra is not higher than that of ra, so they are not considered) (lines 15 - 17); when ra meets the text similarity requirement and the reachability requirement, spatial proximity pruning is performed. If Rankmax(q, ra) = 1 - β(dR(q.s, ra) / dmax) < Rank(q, ok - th), that is, the maximum scoring function value of the road segment ra is less than the score of the object ranked k-th in the current result set, ra can be pruned. The unexamined adjacent road segments of ra are farther from q and are also not considered. (lines 19 - 20). When calculating the road network distance from q to ra (or o), the road segments between r0 and ra (each road segment is 500m) and the distances between q and o and the two vertices of the road segment where they are located are obtained by querying the STOI structure, and then dR(q.s, ra) (or dR(q.s, o.l)) can be calculated. When the road segment ra meets the above three requirements, the comprehensive scores of the objects on ra that meet the text similarity are calculated, and the result set R is updated (lines 22 - 23). When the query ends (lines 24 - 25)..

[0134] Based on the same inventive concept, the present application provides an embodiment of a reachability query device based on Top - k spatial keywords, which includes:

[0135] A modeling module for taking the intersection points and end points of the road e as v and the roads between v as r to establish a road network G;

[0136] A statistics module for recording historical trajectories according to the road network G to obtain a trajectory set, where the historical trajectories include spatio - temporal points, and the spatio - temporal points include trajectory IDs, spatial location information, and timestamps;

[0137] A positioning module for corresponding the positioning location o where the spatial text object query is initiated to the road segment r0 in the road network G. The spatial text object o includes spatial location information and text description, and the spatial location of the spatial text object corresponds to the target road segment r i corresponds;

[0138] The pathfinding module is used to retrieve the trajectory set from segment r0 to the target segment r in the query time period. i The various variations and specific examples in the aforementioned method embodiments are also applicable to the system of this embodiment. Through the detailed description of the aforementioned method, those skilled in the art can clearly understand the implementation method of the system in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here.

[0139] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

[0140] In general, the reachability query method and device based on Top-k spatial keywords provided by the embodiment of the present invention can take into account the query algorithm of reachability, spatial proximity and text similarity by adding the influencing factor of time-based reachability to the traditional spatial keyword query, and realize it by designing spatiotemporal index (such as SRTR tree) and spatial-text object index (such as STOI structure). During the query process, reachability pruning, spatial proximity pruning and text similarity pruning are performed respectively to speed up the query speed.

[0141] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0142] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0145] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A reachability query method based on Top-k space keywords, characterized in that: It includes: Count the points of road e as v, where v includes the intersection and endpoints, count the road between two adjacent v as road section r, and establish the road network G; Recording historical trajectories according to the road network G to obtain a trajectory set, wherein the historical trajectory includes a spatiotemporal point located in the road network G and a road section r passed by the spatiotemporal point, and the spatiotemporal point includes a trajectory ID, spatial location information, and a timestamp; In the road network G, the location o of the spatial text object query is corresponded to the road segment r0 in the road e. The spatial text object o includes spatial location information and text description. The spatial location of the spatial text object is consistent with the target road segment r0. i correspond; Retrieve the trajectory set from segment r0 to target segment r during the query time period i The accessibility of the trajectory; The retrieval trajectory set is from the road section r0 to the target road section r in the query time period i The accessibility of the trajectory, including: According to the query time period, retrieve the historical trajectories of the same time period in the trajectory collection, and determine whether the target section r is reached within the preset time period. i Does the historical trajectory exist? If there are historical trajectories that reach the target section r within the preset time period, then calculate the number of historical trajectories that successfully reach the target section r from section r0 within the preset time period. i The reachability probability of The calculation of the preset time period, each historical trajectory successfully reaches the target section r from section r0 i The probability of: Within the preset time length, count all the paths from segment r0 to target segment r i Historical trajectory, the percentage of successful arrivals within the preset time period, as the reachability probability; The retrieval trajectory set is from the road section r0 to the target road section r in the query time period i The accessibility of the trajectory also includes: Create a queue of adjacent segments of segment r0, add segments adjacent to r0 to the queue based on the adjacent relationship, and confirm whether the segments in the queue are reachable from segment r0; The queues that are confirmed to be reachable are used as the initial inspection results, and branches are reduced to obtain recommendation results. The branch reduction includes reachability pruning, text similarity pruning, and distance pruning.

2. A reachability query method based on Top-k space keywords as claimed in claim 1, characterized in that: The step of recording the historical trajectories according to the road network G to obtain a trajectory set includes: The road e and the road segments r it contains are first recorded in the form of an R-tree, and then the historical trajectory of the road segment r in different time periods is recorded.

3. A reachability query method based on Top-k space keywords as claimed in claim 1, characterized in that: The intersection and endpoint of the road e are counted as v, and the road between v is counted as r, and a road network G is established, including: Based on the preset spatial granularity, record the roads e and the intersections v between the roads; The road e is divided into sections r based on the intersection v, and the GPS information is mapped to each section.

4. A reachability query method based on Top-k space keywords as claimed in claim 3, characterized in that: The step of recording the historical trajectories according to the road network G to obtain a trajectory set includes: The movement trajectories of different objects in the road network G are recorded as history, wherein the movement trajectories include instantaneous speed, ID and timestamp, and the objects include vehicles.

5. The reachability query method based on Top-k space keywords according to claim 1, characterized in that: Create a queue of adjacent segments of segment r0, add segments adjacent to r0 to the queue based on the adjacent relationship, and confirm whether the segments in the queue are reachable from segment r0; According to the historical trajectory dataset, within the given query time, calculate the distance from segment r0 to target segment r i Is it reachable? 6. A reachability query device based on Top-k space keywords, characterized in that: It includes: A modeling module is used to count the points of road e as v, where v includes the intersection and the endpoint, and count the road between two adjacent v as the road section r, and establish the road network G; A statistical module, used to obtain a trajectory set by recording historical trajectories according to the road network G, wherein the historical trajectory includes a spatiotemporal point located in the road network G and a road section r passed by the spatiotemporal point, and the spatiotemporal point includes a trajectory ID, spatial location information and a timestamp; The positioning module is used to correspond the positioning position o of the spatial text object query initiated in the road network G to the road section r0 in the road e, wherein the spatial text object o includes spatial position information and text description, and the spatial position of the spatial text object corresponds to the target road section r0. i correspond; The pathfinding module is used to retrieve the trajectory set from segment r0 to the target segment r in the query time period. i The accessibility of the trajectory; The path finding module is also used to retrieve the historical trajectories of the same time period in the trajectory set according to the query time period, and determine whether the target section r is reached within the preset time period. i Does the historical trajectory exist? The path finding module is further configured to calculate the number of historical trajectories that successfully reach the target road segment r from road segment r0 within the preset time period if there are any historical trajectories that reach the target road segment r within the preset time period. i The reachability probability of The path finding module is also used to count all the paths from the road section r0 to the target road section r within a preset time length. i Historical trajectory, the percentage of successful arrivals within the preset time period, as the reachability probability; The pathfinding module is also used to create a queue of adjacent sections of section r0, add sections adjacent to r0 to the queue based on the adjacent relationship, and confirm whether the sections in the queue are reachable from section r0; the queue that is confirmed to be reachable is used as the initial inspection result to perform branch pruning to obtain a recommendation result, and the branch pruning includes reachability pruning, text similarity pruning and distance pruning.