CN113407669B - Semantic track query method based on activity influence - Google Patents

Semantic track query method based on activity influence Download PDF

Info

Publication number
CN113407669B
CN113407669B CN202110674824.7A CN202110674824A CN113407669B CN 113407669 B CN113407669 B CN 113407669B CN 202110674824 A CN202110674824 A CN 202110674824A CN 113407669 B CN113407669 B CN 113407669B
Authority
CN
China
Prior art keywords
track
node
semantic
activity
query
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110674824.7A
Other languages
Chinese (zh)
Other versions
CN113407669A (en
Inventor
袁野
李翀
马德龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN202110674824.7A priority Critical patent/CN113407669B/en
Publication of CN113407669A publication Critical patent/CN113407669A/en
Application granted granted Critical
Publication of CN113407669B publication Critical patent/CN113407669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3343Query execution using phonetics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/319Inverted lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/322Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Acoustics & Sound (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a semantic track query method based on activity influence, which deeply researches an index structure, a query processing algorithm and a query optimization technology of semantic track data; specifically, the invention provides a concept of activity influence in semantic track data, and defines a semantic track query based on the activity influence according to the concept; meanwhile, in order to realize the efficient processing of the query, the invention designs a Hybrid Grid Index (HGI) structure which integrates multiple information of semantic track spatial positions, activity keywords and activity influence at the same time, and designs and realizes an efficient heuristic search framework based on the Index, wherein the framework can find the track which accords with the user query keywords in the semantic track data set and preferentially matches the activity influence top-k within a threshold value specified by a user.

Description

Semantic track query method based on activity influence
Technical Field
The invention belongs to the technical field of spatial data processing, and particularly relates to a semantic track query method based on activity influence.
Background
With the continuous development of mobile social networks and location-based service applications, a great deal of semantic track data is formed. The semantic track not only contains longitude and latitude and timestamp information in the traditional spatiotemporal track, but also is accompanied by text information describing user behavior activities. Query studies on semantic track data have generated many application values, for example: recommending friends with the same interest or similar habits in a social network, providing suitable advertising targets or selecting suitable advertising topics for merchants in advertising marketing, providing personalized travel route recommendations for tourists on a travel application, and the like.
Efficient querying of trajectories relies on an efficient indexing mechanism, and IR-trees are often used to index semantic trajectory data. The essence of the IR-Tree is to extend the inverted index on the basis of the R-Tree, and at each node of the IR-Tree, there is a pointer to the inverted file describing all the keywords contained within the minimum bounding rectangle represented by the node. Each inverted file associated with the intermediate node records all sub-nodes with the keywords; the inverted list in the inverted file associated with the leaf node records the specific track point. There are also several variants of IR trees, such as DIR trees, CIR trees, etc. In the construction process of the DIR tree, the spatial information and the semantic information of the spatial text object are considered at the same time, so that the objects in the same node are similar as much as possible in semantic attributes. The CIR tree divides the objects into different clusters according to the spatial proximity of all the objects in the nodes, and records the distribution condition of the keywords in each cluster.
In the existing patent 'reverse nearest neighbor query method and device based on semantic track big data', the patent designs a query method aiming at reverse nearest neighbors in semantic track data, and the method is not suitable for the query problem solved by the invention.
In order to realize fast query processing of semantic tracks, a number of difficulties still exist at present: (1) With the continuous development of location-based service applications, users can put forward more personalized and diversified query requirements, and the traditional query technology cannot meet increasingly complex query requests. (2) When the index structures such as IR-Tree and the like face massive customized query, the efficiency is not high enough because various information in the semantic track is not fully utilized for pruning. (3) At present, a query processing framework and an optimization mechanism aiming at the traditional track are not suitable for semantic track query, and the existing algorithm framework and the existing optimization mechanism for processing the semantic track query are not completely suitable for the query problem provided by the invention.
Disclosure of Invention
In order to solve the problems, the invention provides a semantic track query method based on activity influence, which can search tracks with greater activity influence preferentially.
A semantic track query method based on activity influence comprises the following steps:
s1: acquiring basic information of a semantic track data set D, wherein the basic information comprises track numbers of all semantic tracks T in the semantic track data set D and activity influence of keywords corresponding to all track points p on all the semantic tracks T, each track point corresponds to at least one keyword, the keywords corresponding to all the track points are not identical, and the activity influence of the same keyword on different track points is not identical; meanwhile, the activity influence of the keyword on any track point is the occurrence frequency of the keyword on the track point;
s2: constructing a mixed grid index HGI based on basic information of a semantic track data set D, wherein the mixed grid index HGI consists of a mixed quadtree index HQ-tree and a mixed inverted index HIF;
s3: for a user-specified query requirement Q = (loc, acts, d) max ) Finding out k semantic tracks which are most matched with the query requirement Q in a semantic track data set D based on a hybrid grid index HGI, wherein loc is a query position set by a user, acts is a keyword set by the user, and D max K is at least 3 for the user set maximum value for the expected journey.
Further, the method for constructing the mixed quadtree index HQ-tree in step S2 is as follows:
s21: dividing a real geographic area in which a semantic track data set D is positioned into grids of D levels, wherein each level comprises 2 d-1 ×2 d-1 Each grid is at least 3, and each grid corresponds to a grid number;
s22: respectively judging whether each grid of each hierarchy has a track point, eliminating grids which do not contain the track point, and constructing a quadtree by the rest grids according to the hierarchy inclusion relation of the grids, wherein nodes without child nodes are leaf nodes, and the rest nodes are non-leaf nodes;
s23: the index entries and bitmap information are respectively associated with each node of the quadtree, and the specific steps are as follows:
for any one non-leaf node g 0 Its associated index entry is a triple (Gid) 0 { g' ∈ g. Substrids }, ifile), where Gid 0 Representing non-leaf nodes g 0 The number of the corresponding grid, { g' ∈ g. Subgrids } denotes a list of pointers to all child nodes not leaf node g, ifile denotes not leafLeaf node g 0 The first inverted index of the keywords corresponding to all the track points existing in the corresponding grids comprises the following information: each keyword is at a non-leaf node g 0 Influence of activity in the corresponding grid, non-leaf nodes g where keywords appear 0 The grid number corresponding to the child node;
node g for any one leaf 1 Its associated index entry is a tuple (Gid) 1 Ilist), wherein Gid 1 Represents the leaf node g 1 Number of the corresponding grid, ilist, denotes the leaf node g 1 And the second inverted indexes of the keywords corresponding to all the track points in the corresponding grids comprise the following information: each keyword is at leaf node g 1 The activity influence in the corresponding grid and the number of semantic tracks of each keyword;
for any node of the quadtree, the bitmap information is a data sequence consisting of 0 and 1, and each data bit on the data sequence corresponds to a semantic track, wherein 0 indicates that the semantic track corresponding to the data bit does not pass through the grid corresponding to the current node, and 1 indicates that the semantic track corresponding to the data bit passes through the grid corresponding to the current node.
Further, the method for calculating the activity influence of the keyword in the grid corresponding to any node comprises the following steps:
and acquiring the activity influence of the keyword at all track points in the grid corresponding to the current node, and taking the maximum value as the activity influence of the keyword in the grid corresponding to the current node.
Further, the hybrid inverted index HIF in step S2 is composed of an activity list, an activity inverted arrangement list and a sub-track length list, where the activity list is used to store keywords corresponding to all track points on the semantic track, the activity inverted arrangement list is used to store association relations between the keywords and the track points where the keywords appear, and the sub-track length list is used to store lengths from each track point to the initial track point on the semantic track.
Further, the step S3 of finding k semantic tracks that are most matched with the query requirement Q in the semantic track data set D based on the hybrid grid index HGI specifically includes:
s31: setting a heap set, traversing a mixed quadtree index HQ-tree from top to bottom, firstly putting a root node into the heap set, acquiring child nodes of the root node, then removing the root node from the heap set, and adding the child nodes of the root node which accord with a set pruning rule into the heap set;
s32: finding out the node with the maximum activity influence in the current heap set, then removing the heap set from the node, adding child nodes of the node which accord with the set pruning rule into the heap set, and repeating the step until the leaf nodes are traversed;
s33: according to the index entries related to the leaf nodes obtained through traversal, obtaining semantic tracks of key words acts set by a user in the leaf nodes, and taking the obtained semantic tracks as tracks to be verified; acquiring the activity influence of each track to be verified, and taking the front k tracks with the maximum activity influence as alternative tracks;
s34: removing the leaf nodes in the step S33 to form a heap set, repeating the steps S32 to S33 on the current heap set until the early termination condition is met or all the nodes are traversed, and finally obtaining k candidate tracks which are the query requirements Q = (loc, acts, d) given by the user max ) The most matched semantic track.
Further, in step S31, the pruning rule is set as: the distance between at least one track point in the grid corresponding to the child node and the query position loc set by the user is not more than d max (ii) a The influence of the activity of the child node is not 0; at least one of all semantic tracks passing through the grid corresponding to the child node is not accessed.
Further, the method for calculating the activity influence of any node in step S32 includes:
finding out keywords belonging to keywords acts set by a user from all keywords corresponding to the node; and summing the maximum value of the activity influence of the found keywords in the node, and dividing the sum value by the total number of the keywords in the word set acts to obtain the activity influence of the node.
Further, the method for calculating the activity influence of each to-be-verified track in step S33 is as follows:
s331: initializing window endpoints s and e, and recording the sub-tracks extracted by the window each time as T [ s, e ];
s332: the left end point s is fixed as the first track point and is unchanged, the right end point e increases from the first track point along the direction of the track to be verified, and a section of sub-track T [ s, e ] is intercepted every time the right end point is increased]Judging the currently intercepted sub-track T [ s, e ]]Whether the distance between the query position loc and the query position loc set by the user is larger than d max If yes, keeping the current position of the right end point e unchanged, and increasing the left end point s until the sub-track T [ s, e ] is obtained again]The distance between the query position loc set by the user is not more than d max Then, the sub-track T [ s, e ] is calculated according to the following formula]Activity influence of (c); if not, directly calculating the sub-track T [ s, e ] according to the following formula]Activity influence of (a);
Figure BDA0003120576200000061
wherein Inf (T [ s, e ]]Q) denotes the sub-track T [ s, e ]]Act | represents the total number of keywords in the word set acts, inf p.poi (w) is represented in the sub-track T [ s, e ]]Activity influence of keywords appearing in and belonging to the word set acts, inf max (w) represents the maximum value of the activity influence of the keywords belonging to the word set acts at all locus points, Q.acts is a keyword set by the user, w is the keyword belonging to Q.acts, and p is the sub-locus T [ s, e ]]The track points appearing in the picture;
s333: keeping the current position of the left end point s unchanged, continuously increasing the right end point e along the direction of the track to be verified, continuously carrying out condition judgment on the intercepted sub-track, obtaining the activity influence of the sub-track meeting the condition, and repeating the steps until the right end point e reaches the last track point;
s334: taking the maximum value of the obtained activity influence of all sub-tracks as the activity influence of the current track to be verified;
further, in step S332, the calculation formula of the distance between the sub-trajectory T [ S, e ] and the query location loc set by the user is:
Figure BDA0003120576200000062
wherein d (T [ s, e ]]Q) is a sub-track T [ s, e ]]Distance, dist (q.loc, p) from the query location loc set by the user s ) Euclidean distance, dist (p), between query location loc set for the user and left endpoint s i ,p i+1 ) Is a sub-track T [ s, e ]]Any two adjacent track points p except the right end point e i And p i+1 The euclidean distance between.
Further, the early termination condition in step S34 is: the first sum is smaller than the minimum value of the track activity influence in the k candidate tracks obtained by current calculation, wherein the calculation method of the first sum is as follows:
respectively taking each keyword acts set by the user as a current keyword to execute the following operations: finding out the maximum value of the influence of the current keyword on the activities at all the track points corresponding to all the nodes of the current heap set, and taking the maximum value of the influence of the activities as the maximum influence corresponding to the current keyword;
and summing the maximum influence corresponding to all the keywords acts set by the user, and dividing the sum by the total number of the keywords in the word set acts to obtain a first sum.
Has the advantages that:
1. the invention provides a semantic track query method based on activity influence, which deeply researches an index structure, a query processing algorithm and a query optimization technology of semantic track data; specifically, the invention provides a concept of activity influence in semantic track data, and defines a semantic track query requirement based on the activity influence according to the concept; meanwhile, in order to realize the efficient processing of semantic track query, the invention designs a mixed grid index structure which integrates multiple information of semantic track spatial position, keywords and activity influence at the same time, has stronger pruning capability compared with the prior index technology, and can preferentially search tracks with larger activity influence based on the index structure.
2. The invention provides a semantic track query method based on activity influence, which realizes an efficient heuristic search method based on mixed grid index structure design, traverses the mixed grid index structure in a heap aggregation mode, quickly finds k semantic tracks which are most matched with a query requirement Q, and can find key words which meet the query requirement of a user in a semantic track data set, namely, the invention preferentially matches the first k tracks with the maximum activity influence within a user specified threshold, thereby greatly improving the processing efficiency of track query.
3. The invention provides a semantic track query method based on activity influence, which introduces an early termination condition in a heuristic search process and can accelerate a query processing process.
Drawings
FIG. 1 is a flowchart of a semantic track query method based on activity influence according to the present invention;
FIG. 2 is a schematic diagram of a semantic track data set based on activity influence according to the present invention;
FIG. 3 is a schematic diagram of two-dimensional geospatial meshing provided by the present invention;
FIG. 4 (a) is a schematic diagram of a quad-tree provided by the present invention;
FIG. 4 (b) is a diagram illustrating an index entry of a non-leaf node according to the present invention;
FIG. 4 (c) is a diagram illustrating index entries of a leaf node according to the present invention;
FIG. 5 is a schematic diagram of a hybrid inverted file provided by the present invention;
FIG. 6 is a heuristic search framework provided by the present invention;
fig. 7 is a schematic structural diagram of a main stack and an auxiliary stack provided by the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The invention provides and solves a novel semantic track query in large-scale semantic track data, and deeply researches an index structure, a query processing algorithm and a query optimization technology of the semantic track data. Specifically, the invention provides a concept of Activity Influence in semantic track data, and defines a semantic track Query model (AITQ) based on the Activity Influence according to the concept. In order to realize the efficient processing of the query, the invention designs a mixed grid index structure which simultaneously integrates multiple information of semantic track space positions, activity keywords and activity influence, and designs and realizes a heuristic search framework based on the index, wherein the framework can preferentially search tracks with larger activity influence. In the heuristic search process, the invention introduces an early termination condition to accelerate the query processing process.
First, the symbols and meanings adopted in the present invention as shown in table 1 are given.
TABLE 1 symbols and meanings of the invention
Figure BDA0003120576200000091
Some basic definitions are given below:
definition 1: a semantic track T containing n POI (Point Of Interest) positions is defined as T = { p = 1 ,p 2 ,…,p n In which p is i = (poi, act, t), poi representing any two-dimensional spatial location that can be semantically labeled, act representing a text record that is composed of some keywords describing the user's behavioral activity, t representing a timestamp.
Definition 2: giving a semantic track T = (p) consisting of n track points 1 ,p 2 ,…,p n ) Will consist of successive points of track (p) s ,p s+1 ,…,p e ) The sequence of points formed is called a sub-track of the track T, where s is greater than or equal to 1 and less than or equal to e and less than or equal to n, denoted as T [ s, e%]. With W [ s, e]Representing sub-tracks T [ s, e ]]All active keywords contained therein, i.e.
Figure BDA0003120576200000092
Definition 3: given a user-specified query Q = (loc, acts, d) max ) Where loc represents the query location represented by latitude and longitude coordinates; acts is a set of activity keywords that describe a series of activities that the user intends to perform; d max Is the expected maximum travel distance of the user for all activities from the query location.
Definition 4: given the distance between the query and the sub-track, Q = (loc, acts, d) max ) A sub-track T [ s, e ] of the semantic track T]Query Q is compared to sub-track T [ s, e ]]Is denoted as d (T [ s, e ]]Q), and
Figure BDA0003120576200000101
where dist denotes the euclidean distance of the two positions.
Definition 5: given a semantic track T, given a query Q = (loc, acts, d) max ) If one of the sub-tracks T s, e in track T]Satisfies the following conditions: (1)
Figure BDA0003120576200000102
(2)d(T[s,e],Q)≤d max Then, the trajectory T [ s, e ] is called]Matching query Q.
Definition 6: given a query Q, if there is at least one sub-track T [ s, e ] in a track T in the semantic track data set D that matches the query Q, the track T is referred to as a candidate track for the query Q.
In FIG. 2, the query activity currently submitted by the user is { w } 1 ,w 2 ,w 4 And d is the maximum journey of the journey. Track T 1 In does not contain activity w 4 Thus T 1 In the absence ofSub-track matching query, so 1 Are not candidate trajectories for the query. At T 2 In which only sub-track T exists 2 [1,5]The activity requirement of the query is met, and the distance d (T) between the sub-track and Q can be seen from the graph 2 [1,5]Q) is large, assuming d (T) 2 [1,5],Q)>d, then T 2 Nor are candidate trajectories. At the track T 3 In (1), consider sub-track T 3 [3,4]Match Q because of T 3 [3,4]Active set W [ s, e ] of]={w 1 ,w 2 ,w 3 ,w 4 Contains the query active set w 1 ,w 2 ,w 4 And consider T 3 [3,4]The distance to Q is small, satisfying the journey limit (i.e. d (T) 3 [3,4]Q) < d), thus T 3 Are candidate trajectories for Q.
Definition 7: given a semantic track dataset D, set
Figure BDA0003120576200000103
Representing all POIs, sets in D
Figure BDA0003120576200000104
All active keywords in D are represented. Suppose that a certain activity consists of keywords
Figure BDA0003120576200000105
Represents, defines the activity w in
Figure BDA0003120576200000106
The influence of (c) is the number of semantic tracks at this poi that contain the active keyword w, i.e.:
Figure BDA0003120576200000107
definition 8: given query Q = (loc, acts, d) max ) And a candidate trajectory T, if sub-trajectory T s, e]Matching with the query Q, defining the sub-track activity influence under the query Q as:
Figure BDA0003120576200000111
wherein, inf max (w) represents the maximum impact of activity w at all pois, i.e.
Figure BDA0003120576200000112
Figure BDA0003120576200000113
Since there may be large differences in the influence of activities in query Q, causing the influence of sub-track activities to be highly dependent on certain activities, using Inf max (w) obtaining relative activity impacts, aggregating the impacts of all query activities indifferently, and normalizing the activity impacts of the sub-tracks to [0,1]. There may be multiple sub-trajectories in T that match query Q, and the activity impact of candidate trajectory T under query Q is defined as:
Inf(T,Q)=max s is more than or equal to 1 and less than or equal to e and less than or equal to n and T [ s, e%]Is matched with Q (Inf(T[s,e],Q)) (4)
Referring to FIG. 2, only one candidate trajectory T for a given query Q exists in FIG. 2 3 At T 3 Only the sub-track T exists in all the sub-tracks of 3 [3,4]Matching Q. In the data set consisting of these three tracks, the keyword w 1 、w 2 、w 4 The maximum activity impact is: inf max (w 1 )=1,Inf max (w 2 )=2,Inf max (w 4 )=1。
Inf (T) is calculated according to definition 7 3 ,Q)=Inf(T 3 [3,4]Q) = (1/2 + 1/1)/3 =0.833, i.e. candidate track T 3 The activity impact size under query Q is 0.833.
Definition 9: given query Q = (loc, acts, d) max ) And inputting a positive integer k into the semantic track data set D. Hypothesis set C
Figure BDA0003120576200000114
Containing all candidate tracks for Query Q in data set D, an Activity-based semantic track Query (AITQ) returns a result set RS from candidate set C that satisfies: (1)
Figure BDA0003120576200000115
And | RS | = k; (2) For is to
Figure BDA0003120576200000116
Inf (Q, T) is more than or equal to Inf (Q, T').
Specifically, as shown in fig. 1, a semantic track query method based on activity influence includes the following steps:
s1: obtaining basic information of a semantic track data set D, wherein the basic information comprises track numbers of all semantic tracks T in the semantic track data set D and the activity influence of keywords corresponding to all track points p on all the semantic tracks T, each track point corresponds to at least one keyword, the keywords corresponding to all the track points are not identical, and the activity influence of the same keyword on different track points is not identical.
It should be noted that the activity influence of the keyword on any track point is the number of occurrences of the keyword on the current track point.
S2: and constructing a Hybrid grid index HGI based on the basic information of the semantic track data set D, wherein the Hybrid grid index HGI consists of a Hybrid Quad-tree index HQ-tree (HQ-tree) and a Hybrid Inverted index HIF (HIF).
It should be noted that the HGI index takes the track as an index object, and integrates the space, the activity keyword and the activity influence into the index structure. The hybrid quadtree index HQ-tree resides in memory, and the hybrid inverted index HIF is stored on disk.
S3: for a user-specified query requirement Q = (loc, acts, d) max ) Finding k semantic tracks which are most matched with the query requirement Q in a semantic track data set D based on the hybrid grid index HGI, wherein loc is usedThe query location set by the user, acts is the set of keywords set by the user, d max K is at least 3 for the maximum value of the expected journey set by the user.
The construction method of the hybrid lattice index HGI is set forth in detail below.
On the first hand, the method for constructing the mixed quadtree index HQ-tree is as follows:
s21: dividing a real geographic area in which a semantic track data set D is positioned into grids of D levels respectively, wherein each level comprises 2 d-1 ×2 d-1 Each grid is corresponding to a grid number, and d is at least 3.
That is, the HQ-tree organizes semantic track information by way of space Grid division, recursively divides the whole two-dimensional space into four equal subspaces, sequentially forms a hierarchy of 1-Grid,2-Grid, \8230 \, (d-1) -Grid, d-Grid, until the last layer forms 2 d-1 ×2 d-1 And indexing all grids by using a Quad-tree, and embedding track information, activity keywords and activity influence into the Quad-tree index to form an HQ-tree index. Meanwhile, each node in the HQ-tree index represents an MBR corresponding to a grid area, and each node is associated with an active keyword inverted index.
Referring to FIG. 2, it is a schematic diagram of a real geographic region where a semantic track data set D is located, and there are 3 semantic tracks T in the region 1 ~T 3
Figure BDA0003120576200000131
Representing a track T 1 The upper 4 track points are arranged on the surface of the film,
Figure BDA0003120576200000132
representing a track T 2 The upper 4 track points are arranged on the surface of the film,
Figure BDA0003120576200000133
representing a track T 1 Last 5 track points, w 1 ~w 6 Then the semantic track T is represented 1 ~T 3 The corresponding keywords of the upper trace points.
Referring to fig. 3, a schematic diagram of meshing is shown. The whole two-dimensional space is divided into 3-Grid, all grids have a Grid number Gid,1-Grid is represented by Grid 0, grid 0 is divided into four grids (grids 1-4) to form 2-Grid, and grids 5-20 form 3-Grid.
S22: respectively judging whether each grid of each hierarchy has a track point, eliminating grids which do not contain the track point, and constructing a quadtree by the rest grids according to the hierarchy inclusion relation of the grids, wherein nodes without child nodes are leaf nodes, and the rest nodes are non-leaf nodes;
s23: the index entries and bitmap information are respectively associated with each node of the quadtree, and the specific steps are as follows:
for any one non-leaf node g 0 Its associated index entry is a triple (Gid) 0 { g' ∈ g. Substrids }, ifile), where Gid 0 Representing non-leaf nodes g 0 The number of the corresponding grid, { g' ∈ g.subgrids } represents a list of pointers to all child nodes of the non-leaf node g, ifile represents the non-leaf node g 0 The first inverted index of the keywords corresponding to all the track points existing in the corresponding grids comprises the following information: each keyword is at a non-leaf node g 0 Influence of activity in the corresponding grid, non-leaf nodes g where keywords appear 0 The grid number corresponding to the child node of (1).
It should be noted that the first inverted index is implemented by two hash tables, and the key is a key in the hash table. The value of the first hash table records the maximum influence of the current key (assumed to be w) in g
Figure BDA0003120576200000141
Namely, it is
Figure BDA0003120576200000142
Wherein Inf max (w) represents the maximum influence of w in all pois; the value of the second hash table is a list of pointers that record the child nodes that contain the activity.
Meanwhile, the method for calculating the activity influence of the keyword in the grid corresponding to any node comprises the following steps: and acquiring the activity influence of the keyword on all track points in the grid corresponding to the current node, and taking the maximum value as the activity influence of the keyword in the grid corresponding to the current node.
For any leaf node g 1 Its associated index entry is a tuple (Gid) 1 Ilist), wherein Gid 1 Represents the leaf node g 1 Number of the corresponding grid, ilist, denotes the leaf node g 1 And the second inverted indexes of the keywords corresponding to all the track points in the corresponding grids comprise the following information: each keyword is at leaf node g 1 The activity influence in the corresponding grid, and the number of semantic tracks where each keyword appears.
It should be noted that the difference between the ifile of the non-leaf node and the ifile of the non-leaf node is that the value of the second hash table of the inverted list pointed by the ilist stores a track id containing a keyword key in the range of the current node MBR, and the track can be quickly obtained from the disk through the track id. Both ifile and ilist are implemented using hash tables, and the inverted index of each node can be accessed at O (1) time.
For any node of the quadtree, the bitmap information is a data sequence consisting of 0 and 1, and each data bit in the data sequence corresponds to a semantic track, wherein 0 indicates that the semantic track corresponding to the data bit does not pass through the grid corresponding to the current node, and 1 indicates that the semantic track corresponding to the data bit passes through the grid corresponding to the current node.
That is, each node of the present invention maintains a bitmap SIG that marks all traces that pass through the node. Specifically, the id of each track is mapped to one bit in SIG by using a hash function, and if there is a track point in the track T in the grid represented by the node, the id of T is mapped to i by using the hash function, that is, hash (T) = i, then the ith bit of SIG in the node is set to 1 (initially 0).
For example, FIG. 4 (a) is an index structure obtained after indexing the trellis of FIG. 3 using an HQ-tree. The grid 7 does not contain any trajectoriesThe node is set to null in the index structure, and all null nodes are not shown in fig. 4 (a). FIG. 4 (b) shows the structure of a non-leaf node 2, with two children, node 9 and node 11, and also shows the activity w for indexing into node 2 1 And w 2 The inverted list of (1). Fig. 4 (c) shows a specific structure of the leaf node 11, which is one of the child nodes of the node 2. There are three tracks in total in the whole grid, the length of bitmap is set to 3 if hash (T) 1 ) =1 and hash (T) 2 ) =2, the trajectory through nodes 2 and 11 is only T 1 、T 2 Therefore, the bit maps SIG of node 2 and node 11 are both 110.
In general, the off-line construction method of the HQ-tree index trace data set can be summarized as the following steps 2-1-1 to 2-1-3:
step 2-1-1: and carrying out grid division on a two-dimensional space formed by the data set, and organizing grids of all layers by using a Quad-tree after the division is finished.
Step 2-1-2: and sequentially processing each track point of each track in the data set through insertion operation, continuously updating the ifile and SIG of the middle node from top to bottom until the track point reaches the leaf node, and returning after updating the ilist and SIG of the leaf node.
Step 2-1-3: after all tracks are processed, all nodes are updated, leaf nodes which do not contain any track point are set to null, and then the same processing is carried out on middle nodes of which all child nodes are null in a bottom-up mode until a root node is returned. Finally, the inverted file of the root node contains all the active keywords and the maximum activity influence corresponding to the active keywords, and each bit in the root node bitmap SIG is set to be 1.
In a second aspect, the hybrid inverted index HIF is composed of an activity list, an activity inverted arrangement list and a sub-track length list, wherein the activity list is used for storing keywords corresponding to all track points on a semantic track, the activity inverted arrangement list is used for storing association relations between the keywords and track points where the keywords appear, and the sub-track length list is used for storing the lengths from the track points on the semantic track to an initial track point.
It should be noted that the first list in the HIF index contains all the activities in T and is arranged in ascending order for quickly filtering out traces that do not meet the query activity requirements; the second list stores the movable inverted index of each track point in the T, and track points which do not need to be processed can be filtered by using the list; the third list stores p in track T 1 The length of all sub-tracks as starting points, i.e. len (T [1, e ]]) The length of the target sub-track can be quickly obtained from the lengths of the sub-tracks in the list.
Referring to fig. 5, fig. 5 is a schematic diagram of a mixed inverted file of two tracks on a disk. If the currently matched sub-track is T [3,5], len (T [3,5 ]) = len (T [1,5 ]) -len (T [1,3 ]). When the track data set is small, the active list can be loaded into the memory in advance for rapid filtering, and other lists are loaded from the disk when tracks needing further verification are obtained.
The following details how heuristic searching is performed based on the hybrid lattice index HGI when a user submits the AITQ query Q online. When processing AITQ query, the invention designs a heuristic query framework based on HGI index, the framework heuristically traverses HQ-tree, preferentially obtains the track to be verified with larger activity influence, quickly calculates the actual activity influence value of the track by using HIF index in the track verification stage, and can terminate the processing process in advance according to the termination strategy in the traversal process.
Specifically, referring to fig. 6, fig. 6 is a schematic diagram of a heuristic search framework. Given a trajectory data set D, the query Q = (loc, acts, D) max ) The positive integers k, HQ-tree and HIF. Firstly, initializing a result set RS and a to-be-verified set VS, and initializing a bitmap BM to record a searched track; in the process of traversing the HQ-tree nodes, a large top Heap Heap is used for sorting each node needing further access according to the F (node, Q) value of the node, the F (node, Q) value of the top Heap node is the largest, and the root node of the HQ-tree is piled.
Further, the step S3 of finding k semantic tracks that are most matched with the query requirement Q in the semantic track data set D based on the hybrid grid index HGI specifically includes the following steps:
s31: setting a heap set, traversing the mixed quadtree index HQ-tree from top to bottom, firstly putting a root node into the heap set, acquiring child nodes of the root node, then removing the heap set from the root node, and adding the child nodes of the root node, which accord with the set pruning rule, into the heap set.
The set pruning rule is as follows: the distance between at least one track point in the grid corresponding to the child node and the query position loc set by the user is not more than d max (ii) a The influence of the activity of the child node is not 0; at least one of all semantic tracks passing through the grid corresponding to the child node is not accessed.
Note that, for pruning rule 1, if d (Q, node)>d max If the node does not have the track points, the distance constraint is satisfied, and all the tracks in the node can be safely pruned; for the pruning rule 2, if Inf (node, Q) calculated by the formula (1) is 0, it indicates that there are no active keywords in q.acts in the node, then the node is pruned; for pruning rule 3, a node is pruned if all tracks that pass through the node have been visited before. Check whether there is an unaccessed track in the node by SigCheck (BM) function. SIG, in particular, if a bitwise operation of the node is performed&SIG result has 1 bit, which shows that there is no access track in node, sigCheck returns false; otherwise, sigCheck returns true, the node may be pruned. Sig = [1, 0,1, 0)]、BM=[1,0,1,0,1]When the trace is not accessed, namely the trace mapped to the 2 nd and 4 th positions of SIG, the SIG is in the process&BM^SIG=[0,1,0,1,0]Obviously, node nodes need to be accessed.
It should be noted that the semantic track of the grid corresponding to the child node is quickly judged through the bitmap information in the HQ-tree index.
S32: finding out the node with the largest activity influence in the current heap set, then removing the heap set from the node, adding the child nodes of the node which accord with the set pruning rule into the heap set, and repeating the step until the leaf nodes are traversed.
That is to say, when the Heap set Heap is not empty, pop up the Heap top node, if the node is a leaf node, obtain some tracks to be verified, if the node is a non-leaf node, obtain its child node, and put the child nodes passing through 3 pruning rules into the Heap.
Further, the method for calculating the activity influence of any node comprises the following steps: finding out keywords belonging to keywords acts set by a user from all keywords corresponding to the node; and summing the maximum value of the activity influence of the found keywords in the node, and dividing the sum by the total number of the keywords in the word set acts to obtain the activity influence of the node.
It should be noted that each keyword may appear on multiple track points in the grid corresponding to the node, however, the activity influence (i.e., the number of occurrences) of each keyword on different track points is not necessarily the same, and therefore, the activity influence on which track point the keyword has the largest activity influence is taken as the maximum activity influence of the keyword in the current node.
Further, the calculation formula of the activity influence of any node is as follows:
Figure BDA0003120576200000181
maximum influence of active keyword w in node
Figure BDA0003120576200000182
Can be obtained from the inverted index of the node. Then, the maximum influence of each active keyword w in q.acts in the node is obtained in turn, and Inf (node, Q) can be calculated by formula (1). In order to consider the spatial proximity of the node and the query Q and the activity influence between the node and the query Q during heuristic traversal, a constant c is used for integrating the spatial distance between the node and the Q and the activity influence to obtain the following functionNumber F (node, Q):
Figure BDA0003120576200000191
where d (Q, node) represents the minimum distance between MBR and q.loc of the node (q.loc is within the node, the distance is considered to be 0), and d is used max And (6) carrying out normalization. c is an element of [0,1 ]]For controlling the impact of spatial proximity, default c =0.2. In the process of traversing HQ-tree nodes, nodes with larger F function values are accessed in a heuristic mode preferentially.
S33: according to the index entries related to the leaf nodes obtained through traversal, obtaining semantic tracks of key words acts set by a user in the leaf nodes, and taking the obtained semantic tracks as tracks to be verified; and acquiring the activity influence of each track to be verified, and taking the front k tracks with the maximum activity influence as alternative tracks.
It should be noted that, for all currently obtained tracks to be verified, the searched tracks are marked in the bitmap BM, all the tracks that have not been verified are screened out by using the HIF index, and then verification in S331 to S334 is performed, that is, the activity influence of each track to be verified is calculated, and the top k tracks are selected. If the activity list of a certain track to be verified does not contain all the activity keywords in Q.acts, the track to be verified is directly skipped over, and the activity influence is not calculated.
Further, the method for calculating the activity influence of each track to be verified is as follows:
s331: initializing window endpoints s and e, and recording the sub-tracks extracted by the window each time as T [ s, e ];
s332: the left end point s is fixed as the first track point and is unchanged, the right end point e is increased from the first track point along the direction of the track to be verified, and each time the right end point is increased, a section of sub-track T [ s, e ] is intercepted]Judging the currently intercepted sub-track T [ s, e ]]Whether the distance between the query position loc and the query position loc set by the user is larger than d max If the current position of the right end point e is larger than the current position of the right end point e, the current position of the right end point e is kept unchanged, and the left end point s is increased until the sub-track T [ s, e ] is obtained again]And user settingsIs not greater than d max Then, the sub-track T [ s, e ] is calculated according to the formula (7)]Activity influence of (c); if not, directly calculating the sub-track T [ s, e ] according to the formula (7)]Activity influence of (a);
Figure BDA0003120576200000201
wherein Inf (T [ s, e ]]Q) denotes the sub-track T [ s, e ]]Act | represents the total number of keywords in the word set acts, inf p.poi (w) in sub-track T [ s, e ]]Activity influence of keywords appearing in and belonging to the word set acts, inf max (w) represents the maximum value of the activity influence of the keywords belonging to the word set acts at all locus points, Q.acts is a keyword set by the user, w is the keyword belonging to Q.acts, and p is the sub-locus T [ s, e ]]The track points appearing in the picture;
meanwhile, in step S332, the calculation formula of the distance between the sub-trajectory T [ S, e ] and the query position loc set by the user is:
Figure BDA0003120576200000202
wherein d (T [ s, e ]]Q) is a sub-track T [ s, e ]]Distance, dist (q.loc, p) from the query location loc set by the user s ) Euclidean distance, dist (p), between query location loc set for the user and left endpoint s i ,p i+1 ) Is a sub-track T [ s, e ]]Any two adjacent track points p except the right end point e i And p i+1 The euclidean distance between.
S333: keeping the current position of the left end point s unchanged, continuously increasing the right end point e along the direction of the track to be verified, continuously carrying out condition judgment on the intercepted sub-track, obtaining the activity influence of the sub-track meeting the conditions, and repeating the steps until the right end point e reaches the last track point;
s334: taking the maximum value of the obtained activity influence of all sub-tracks as the activity influence of the current track to be verified;
s34: removing the leaf nodes in the step S33 to form a heap set, repeating the steps S32 to S33 on the current heap set until the early termination condition is met or all the nodes are traversed, and finally obtaining k candidate tracks which are the query requirements Q = (loc, acts, d) given by the user max ) The most matched semantic track.
It should be noted that, each time steps S32 to S33 are executed, k candidate tracks are obtained. And after the heuristic search process is finished, returning the top-k track with the maximum activity influence under the query Q, and finishing the query processing method.
Further, the early termination condition is: the first sum is smaller than the minimum value of the track activity influence in the k candidate tracks obtained by current calculation, wherein the calculation method of the first sum is as follows:
respectively taking each keyword acts set by the user as a current keyword to execute the following operations: finding out the maximum value of the influence of the current keyword on the activity at all track points corresponding to all nodes of the current heap set, and taking the maximum value of the influence of the activity as the maximum influence corresponding to the current keyword;
and summing the maximum influence corresponding to all the keywords acts set by the user, and dividing the sum by the total number of the keywords in the word set acts to obtain a first sum.
That is, the present invention attempts to find the upper bound Inf of the activity impact of all traces in the nodes within the Heap in order to end the traversal of the nodes as early as possible before the Heap Heap is empty ub (Heap, Q), the search process maintains the kth large activity impact Inf in the result set RS k If Inf is found k ≥Inf ub (Heap, Q), the search process can be ended early.
Definition 10: given query Q = (loc, acts, d) max ) And a node in the HQ-tree, defining the activity impact of Heap under query Q as:
Figure BDA0003120576200000211
wherein the content of the first and second substances,
Figure BDA0003120576200000212
represents the maximum influence of activity w in the Heap.
Figure BDA0003120576200000221
The maximum influence of activity w within a node can be obtained from the inverted index of the node.
Theorem 1: inf (Heap, Q) is the upper bound of the activity impact of all the not yet verified tracks, i.e. for any one not yet verified track T: inf (T, Q) is less than or equal to Inf (Heap, Q).
And (3) proving that: assuming that the track T is an unverified track, T can pass through at least one node in the Heap certainly, and for any w ∈ Q.acts, the track point possibly matching w in T is certain in a certain node in the Heap, so Inf T (w)≤Inf w (Heap, Q) according to definition 7 and definition 10, inf (T, Q). Ltoreq.Inf (Heap, Q). Theorem 1 proves that the process is finished.
To efficiently update Inf (Heap, Q) in traversing HQ-tree nodes, a maximum Heap Heap is maintained for each w ∈ Q w Nodes in each heap are arranged according to
Figure BDA0003120576200000222
And (6) sorting the values. The nodes within the Heap of these heaps are all identical to the nodes in the main Heap, but in a different order. To be able to immediately find a node in the Heap from these heaps, the nodes in these heaps are linked to the same node in the Heap. Whenever a node pops out of a Heap, nodes linked with the node are simultaneously popped out of all Heaps w Popping up; when adding a child node to a Heap, it is also necessary to add the child node to each Heap w . For any w epsilon Q.acts, heap w Of pile top nodes
Figure BDA0003120576200000223
I.e. the maximum influence Inf of the activity w in the main stack Heap w (Heap, Q). At any stage of traversing the nodesCan pass through each Heap w The stack top node obtains the corresponding Inf w (Heap, Q), calculating the action influence force Inf (Heap, Q) of the stack Heap by the formula (9), and when the k-th large action influence force Inf is found k When the value is more than or equal to Inf (Heap, Q), the searching process can be ended.
Referring to FIG. 7, FIG. 7 is a schematic diagram of the structure of a main stack and a sub-stack, two stacks being present in addition to the stack Heap
Figure BDA0003120576200000224
And
Figure BDA0003120576200000225
all three stacks have the same node N 1 -N 5 The order of the nodes in each heap differs, and the nodes in both subsidiary heaps are linked to the same node in the main heap. In that
Figure BDA0003120576200000226
Middle heap top node N 4 Is
Figure BDA0003120576200000231
I.e. activity w in the Heap 1 Is most influential, so by
Figure BDA0003120576200000232
And
Figure BDA0003120576200000233
and obtaining the upper bound Inf (Heap, Q) of the influence of the unverified track activities.
That is, the middle main Heap is ordered from large to small according to the total activity influence of the nodes, and the left Heap
Figure BDA0003120576200000234
According to the keyword w 1 The activity influence of (2) ranks the nodes from large to small, right heap
Figure BDA0003120576200000235
For according to the keyword w 2 Of (2)The dynamic influence orders the nodes from large to small, assuming w 1 And w 2 If the key word is the key word given by the user, the node N is set 4 Middle key word w 1 Activity influence of (2) and node N 3 Middle key word w 2 The maximum activity influence of all nodes which are not searched for is obtained by adding the activity influences; if the maximum activity impact is less than the minimum of the activity impacts of the first k candidate tracks calculated currently, the iteration is ended early.
In conclusion, the invention designs a novel index structure aiming at semantic track query based on activity influence, the structure integrates geographic position information, activity keyword information and activity influence information, and the indexing technology has stronger pruning capability compared with the existing indexing technology. In addition, the query processing framework and the optimization mechanism designed by the index structure can efficiently process semantic track query based on activity influence, and the prior art cannot achieve the processing efficiency.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it will be understood by those skilled in the art that various changes and modifications may be made herein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A semantic track query method based on activity influence is characterized by comprising the following steps:
s1: acquiring basic information of a semantic track data set D, wherein the basic information comprises track numbers of all semantic tracks T in the semantic track data set D and activity influence of keywords corresponding to all track points p on all the semantic tracks T, each track point corresponds to at least one keyword, the keywords corresponding to all the track points are not identical, and the activity influence of the same keyword on different track points is not identical; meanwhile, the activity influence of the keyword on any track point is the occurrence frequency of the keyword on the track point;
s2: constructing a mixed grid index HGI based on basic information of a semantic track data set D, wherein the mixed grid index HGI consists of a mixed quadtree index HQ-tree and a mixed inverted index HIF; the construction method of the mixed quadtree index HQ-tree comprises the following steps:
s21: dividing a real geographic area in which a semantic track data set D is positioned into grids of D levels respectively, wherein each level comprises 2 d-1 ×2 d-1 Each grid is at least 3, and each grid corresponds to a grid number;
s22: respectively judging whether each grid of each hierarchy has a track point, eliminating grids which do not contain the track point, and constructing a quadtree by the rest grids according to the hierarchy containing relation of the grids, wherein nodes without child nodes are leaf nodes, and the rest nodes are non-leaf nodes;
s23: the index entries and bitmap information are respectively associated with each node of the quadtree, and the specific steps are as follows:
for any one non-leaf node g 0 Its associated index entry is a triple (Gid) 0 { g' ∈ g. Substrids }, ifile), where Gid 0 Representing non-leaf nodes g 0 The number of the corresponding grid, { g' ∈ g.subgrids } represents a list of pointers to all child nodes of the non-leaf node g, ifile represents the non-leaf node g 0 The first inverted index of the keywords corresponding to all the track points existing in the corresponding grids comprises the following information: each keyword is at a non-leaf node g 0 Activity influence in the corresponding grid, non-leaf nodes g where keywords appear 0 The grid number corresponding to the child node;
node g for any one leaf 1 Its associated index entry is a tuple (Gid) 1 Ilist), wherein Gid 1 Represents the leaf node g 1 Number of the corresponding grid, ilist, denotes the leaf node g 1 And the second inverted indexes of the keywords corresponding to all the track points in the corresponding grids comprise the following information: each keyword is at leaf node g 1 The influence of the activity in the corresponding grid,The number of the semantic track of each keyword appears;
for any node of the quadtree, the bitmap information is a data sequence consisting of 0 and 1, and each data bit in the data sequence corresponds to a semantic track, wherein 0 represents that the semantic track corresponding to the data bit does not pass through the grid corresponding to the current node, and 1 represents that the semantic track corresponding to the data bit passes through the grid corresponding to the current node;
the mixed inverted index HIF is composed of an activity list, an activity inverted arrangement list and a sub-track length list, wherein the activity list is corresponding to each semantic track in the semantic track data set D, the activity list is used for storing keywords corresponding to all track points on the semantic track, the activity inverted arrangement list is used for storing incidence relations between the keywords and the track points where the keywords appear, and the sub-track length list is used for storing the length from each track point to an initial track point on the semantic track;
s3: for a user-specified query requirement Q = (loc, acts, d) max ) Finding out k semantic tracks which are most matched with the query requirement Q in a semantic track data set D based on a hybrid grid index HGI, wherein loc is a query position set by a user, acts is a keyword set by the user, and D max K is at least 3 for the maximum value of the expected journey set by the user.
2. The semantic track query method based on activity influence according to claim 1, wherein the activity influence of the keyword in the grid corresponding to any node is calculated by:
and acquiring the activity influence of the keyword on all track points in the grid corresponding to the current node, and taking the maximum value as the activity influence of the keyword in the grid corresponding to the current node.
3. The activity influence-based semantic track query method according to claim 1, wherein the step S3 of finding k semantic tracks that best match the query requirement Q in the semantic track dataset D based on the hybrid mesh index HGI specifically comprises:
s31: setting a heap set, traversing the mixed quadtree index HQ-tree from top to bottom, firstly putting a root node into the heap set, acquiring child nodes of the root node, then removing the heap set from the root node, and adding the child nodes of the root node, which accord with a set pruning rule, into the heap set;
s32: finding out the node with the maximum activity influence in the current heap set, then removing the heap set from the node, adding child nodes of the node which accord with the set pruning rule into the heap set, and repeating the step until the leaf nodes are traversed;
s33: according to the index entries related to the leaf nodes obtained through traversal, obtaining semantic tracks of key words acts set by a user in the leaf nodes, and taking the obtained semantic tracks as tracks to be verified; acquiring the activity influence of each track to be verified, and taking the front k tracks with the maximum activity influence as alternative tracks;
s34: removing the leaf nodes in the step S33 to form a heap set, repeating the steps S32 to S33 on the current heap set until the early termination condition is met or all the nodes are traversed, and finally obtaining k candidate tracks which are the query requirements Q = (loc, acts, d) given by the user max ) The most matched semantic track.
4. The activity influence-based semantic track query method according to claim 3, wherein the pruning rule set in step S31 is: the distance between at least one track point in the grid corresponding to the child node and the query position loc set by the user is not more than d max (ii) a The influence of the activity of the child node is not 0; at least one of all semantic tracks passing through the mesh corresponding to the child node is not accessed.
5. The semantic track query method based on activity influence according to claim 3, wherein the activity influence of any node in step S32 is calculated by a method comprising:
finding out keywords belonging to keywords acts set by a user from all keywords corresponding to the node; and summing the maximum value of the activity influence of the found keywords in the node, and dividing the sum value by the total number of the keywords in the word set acts to obtain the activity influence of the node.
6. The semantic track query method based on activity influence according to claim 3, wherein the activity influence of each track to be verified in step S33 is calculated as follows:
s331: initializing window endpoints s and e, and recording the sub-tracks extracted by the window each time as T [ s, e ];
s332: the left end point s is fixed as the first track point and is unchanged, the right end point e increases from the first track point along the direction of the track to be verified, and a section of sub-track T [ s, e ] is intercepted every time the right end point is increased]Judging the currently intercepted sub-track T [ s, e ]]Whether the distance between the inquiry position loc set by the user is larger than d max If the current position of the right end point e is larger than the current position of the right end point e, the current position of the right end point e is kept unchanged, and the left end point s is increased until the sub-track T [ s, e ] is obtained again]The distance between the query position loc set by the user is not more than d max Then, the sub-track T [ s, e ] is calculated according to the following formula]Activity influence of (a); if not, directly calculating the sub-track T [ s, e ] according to the following formula]Activity influence of (c);
Figure FDA0003831317920000041
wherein Inf (T [ s, e ]]Q) denotes the sub-track T [ s, e ]]Act | represents the total number of keywords in the word set acts, inf p.poi (w) in sub-track T [ s, e ]]Activity influence of keywords occurring in and belonging to the word set acts, inf max (w) represents the maximum value of the activity influence of the keywords belonging to the word set acts at all locus points, Q.acts is a keyword set by the user, w is the keyword belonging to Q.acts, and p is the sub-locus T [ s, e ]]The trace points appearing in (1);
s333: keeping the current position of the left end point s unchanged, continuously increasing the right end point e along the direction of the track to be verified, continuously carrying out condition judgment on the intercepted sub-track, obtaining the activity influence of the sub-track meeting the condition, and repeating the steps until the right end point e reaches the last track point;
s334: and taking the obtained maximum value of the activity influence of all the sub-tracks as the activity influence of the current track to be verified.
7. The activity influence-based semantic track query method according to claim 6, wherein the calculation formula of the distance between the sub-track T [ S, e ] and the query position loc set by the user in step S332 is:
Figure FDA0003831317920000051
wherein d (T [ s, e ]]Q) is a sub-track T [ s, e ]]Distance, dist (q.loc, p) from the query location loc set by the user s ) Euclidean distance, dist (p), between query location loc set for the user and left endpoint s i ,p i+1 ) Is a sub-track T [ s, e ]]Any two adjacent track points p except the right end point e i And p i+1 The euclidean distance between.
8. The activity impact-based semantic track query method according to claim 3, wherein the early termination condition in step S34 is: the first sum is smaller than the minimum value of the track activity influence in the k candidate tracks obtained by current calculation, wherein the calculation method of the first sum is as follows:
respectively taking each keyword acts set by the user as a current keyword to execute the following operations: finding out the maximum value of the influence of the current keyword on the activity at all track points corresponding to all nodes of the current heap set, and taking the maximum value of the influence of the activity as the maximum influence corresponding to the current keyword;
and summing the maximum influence corresponding to all the keywords acts set by the user, and dividing the sum by the total number of the keywords in the word set acts to obtain a first sum.
CN202110674824.7A 2021-06-18 2021-06-18 Semantic track query method based on activity influence Active CN113407669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110674824.7A CN113407669B (en) 2021-06-18 2021-06-18 Semantic track query method based on activity influence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110674824.7A CN113407669B (en) 2021-06-18 2021-06-18 Semantic track query method based on activity influence

Publications (2)

Publication Number Publication Date
CN113407669A CN113407669A (en) 2021-09-17
CN113407669B true CN113407669B (en) 2022-11-11

Family

ID=77685043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110674824.7A Active CN113407669B (en) 2021-06-18 2021-06-18 Semantic track query method based on activity influence

Country Status (1)

Country Link
CN (1) CN113407669B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115408095B (en) * 2022-11-02 2022-12-23 北京滴普科技有限公司 Method and system for displaying tree data with large data volume based on dynamic paging technology

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834679B (en) * 2015-04-14 2018-01-19 苏州大学 A kind of expression of action trail, querying method and device
US10853357B2 (en) * 2016-09-09 2020-12-01 University Of Southern California Extensible automatic query language generator for semantic data
CN107633068B (en) * 2017-09-22 2020-04-07 深圳大学 Rapid indexing method and system based on position top-k keyword query under sliding window
CN107506490B (en) * 2017-09-22 2020-08-11 深圳大学 Priority query algorithm and system based on position top-k keyword query under sliding window
CN107451302B (en) * 2017-09-22 2020-08-28 深圳大学 Modeling method and system based on position top-k keyword query under sliding window
CN109492150B (en) * 2018-10-30 2021-07-27 石家庄铁道大学 Reverse nearest neighbor query method and device based on semantic track big data
CN110059264B (en) * 2019-04-24 2023-07-07 东南大学 Site retrieval method, equipment and computer storage medium based on knowledge graph

Also Published As

Publication number Publication date
CN113407669A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
Qi et al. Effectively learning spatial indices
Sadineni Comparative Study on Query Processing and Indexing Techniques in Big Data
Xia et al. Continuous reverse nearest neighbor monitoring
Ester et al. Spatial data mining: database primitives, algorithms and efficient DBMS support
Papadias et al. Aggregate nearest neighbor queries in spatial databases
Beckmann et al. A revised R*-tree in comparison with related index structures
Ferragina et al. Learned data structures
Zhang et al. Ranking uncertain sky: The probabilistic top-k skyline operator
Zeng et al. M-skyline: taking sunk cost and alternative recommendation in consideration for skyline query on uncertain data
Yuan et al. RSkNN: kNN search on road networks by incorporating social influence
Zhong et al. Location-aware instant search
Guohui et al. Continuous reverse k nearest neighbor monitoring on moving objects in road networks
Cheema et al. A safe zone based approach for monitoring moving skyline queries
Dalvi et al. Optimal hashing schemes for entity matching
Yoo et al. A framework for generating condensed co-location sets from spatial databases
Gao et al. On processing reverse k-skyband and ranked reverse skyline queries
Koide et al. Fast subtrajectory similarity search in road networks under weighted edit distance constraints
Zhu et al. Range-based obstructed nearest neighbor queries
CN113407669B (en) Semantic track query method based on activity influence
Keivani et al. Random projection-based auxiliary information can improve tree-based nearest neighbor search
Cao et al. Social space keyword query based on semantic trajectory
Sun et al. Riso-tree: An efficient and scalable index for spatial entities in graph database management systems
Ganti et al. MP-trie: Fast spatial queries on moving objects
Khettabi et al. QCCF-tree: A New Efficient IoT Big Data Indexing Method at the Fog-Cloud Computing Level
Liu et al. What happened then and there: Top-k spatio-temporal keyword query

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant