Indoor space keyword personalized query method
Through ISKIR-tree index and Hilbert coding technology, combined with Bloom filter and scoring function, it solves the problem of personalized needs in spatial keyword query in indoor environment, achieves efficient and accurate query results, and is suitable for complex indoor scenes.
Patent Information
- Application Number
- CN202410843807.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-08-30
AI Technical Summary
The existing technology is difficult to meet the personalized needs of users in spatial keyword queries in indoor environments, resulting in insufficient accuracy of query results and insufficient user satisfaction, and traditional methods cannot effectively handle query needs in complex indoor scenes.
It uses ISKIR-tree index construction, combines Hilbert coding and Bloom filters, and improves query efficiency and meets user personalized needs through pruning operations and comprehensive scoring functions.
It significantly improves the efficiency and accuracy of indoor space keyword query, can quickly return results that meet the user's personalized needs, is suitable for complex indoor environments, and enhances the user experience.
Smart Images

Figure CN118568249A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of spatial keyword query, in particular to a personalized query method for indoor spatial keywords. Background Art
[0002] At present, most of the research on spatial keywords focuses on European space and road network space in outdoor environments, while there are relatively few studies on spatial keyword queries for indoor environments (such as complex scenes such as large shopping malls, hospitals and libraries). With the development of indoor location-based services (LBS), more and more text-type data are generated in indoor environments, and traditional query methods can no longer meet people's growing needs. Therefore, how to efficiently retrieve spatial keyword-related information in indoor environments has become an urgent problem that needs to be solved.
[0003] Although some progress has been made in the study of indoor space keyword query methods, there are still gaps in research, especially in the analysis of user personalized query needs. Different users may have different expectations and needs for the same query request, and personalized query directly affects the accuracy of query results and user satisfaction. If a method can quickly and accurately return results that meet the personalized query needs of users in indoor environments, it will not only fill the gap in existing research, but also significantly improve the user's indoor query experience. Summary of the invention
[0004] In view of the above defects and improvement needs of the prior art, the present invention provides a personalized indoor space keyword query method, which aims to effectively improve the processing efficiency of indoor space keyword queries by constructing a new ISKIR-tree index, effectively refine the data set through a pruning operation based on the ISKIR-tree index, thereby reducing the time overhead and resource consumption of the query, and score and sort the data points in the priority queue obtained after pruning through a scoring function that comprehensively considers text similarity, spatial proximity and user preference, thereby returning a result that meets the user's personalized query needs.
[0005] In order to solve the above technical problems, the present invention is implemented by the following technical solutions: The present invention provides a spatial keyword query processing method in an indoor environment, comprising the following steps: Step 1: Build an ISKIR-tree index for the user's query based on the indoor partition distribution of the indoor space text object set and the keyword information it contains; Step 2: Start traversing from the root node of the ISKIR-tree index and calculate the query point based on the node distance matrix qThe indoor distance to the node. If the indoor distance is greater than the preferred distance given in the user's query, the node can be safely pruned, otherwise the traversal continues; the Bloom filter is used to judge the keywords in the non-node. If it is determined that the keyword queried by the user is not in the keyword set contained in the node, the node can be safely pruned, otherwise the traversal continues; after traversing all indexes, the traversal ends and the pruned data is stored in a priority queue; Step 3: Calculate the scores of the indoor space text objects in the priority queue based on a scoring function that comprehensively considers text similarity, spatial proximity, and user preference, and sort them in descending order according to their scores. The indoor space text set with a score higher than 0.85 is obtained and returned to the user as a result set.
[0006] Optional, a collection of interior space text objects as described in step 1 O= { o 1 , o 2 ,..., o n},in o i Represents an indoor space text object; each indoor space text object o i Each consists of a binary group ( location , T )constitute, o i .loc Represents the indoor location of the indoor space text object. o i .T Represents the set of all keywords contained in the indoor space text object.
[0007] Optionally, the user's query in step 1 is a personalized query of indoor space keywords. q =( location , T , press , d ),in, q.loc Represents the indoor location of the query point, q . T Represents a set of keywords contained in the query. q . press Represents the user's query preference set, q . d Represents the preference distance of the query.
[0008] Optionally, the indoor partition described in step 1 refers to independent spaces with clear functions and uses divided in the indoor scene by physical separation means (such as walls, doors, or door-like passages, etc.), and these spaces can usually only be reached through doors or door-like passages.
[0009] Preferably, the specific steps of step 1 are as follows: Step 1.1: The ISKIR-tree index follows the top-down construction idea. First, the indoor space is divided according to the floor structure to achieve the conversion from three-dimensional space to two-dimensional space. Step 1.2: Then, for each floor, the ISKIR-tree index is constructed according to the indoor distribution of indoor space text objects; the ISKIR-tree index maintains the inverted file of each node, including the text inverted table and the space inverted table; the text inverted table stores the keyword information of the indoor space text objects, and the space inverted table stores the Hilbert code values corresponding to the indoor space text objects; For non-leaf nodes, the ISKIR-tree index adds a distance matrix and a Bloom filter on the basis of the inverted file; the distance matrix is used to store the indoor distance required from the node to the access door where its child nodes are located, so as to quickly calculate the indoor distance from the query point to the node; the Bloom filter generates hash values through multi-hash functions and stores these values in a bit array, and uses the bit array to quickly determine whether a point is in a certain area, thereby reducing unnecessary query operations and improving query efficiency; For leaf nodes, the ISKIR-tree index also maintains a distance matrix for them based on the inverted file. Unlike the distance matrix of non-leaf nodes, this distance matrix is used to store the indoor distance from the indoor space text object it contains to the door where it is located, thereby efficiently calculating the indoor distance from the query point to the indoor space text object.
[0010] Optionally, the Hilbert coding is to use the Hilbert space filling curve to perform Hilbert curve coding on the indoor positions of the indoor space text objects in order of floors, and the coding value increases with the increase of the floors, so that the indoor space text objects of the entire building have unique corresponding Hilbert codes.
[0011] Optionally, the passage door refers to a door connecting adjacent indoor partitions or a passage similar to a door. The passage door may have directionality, such as a boarding gate of a terminal, an entrance and exit of a large supermarket, etc.
[0012] Optionally, the Bloom filter is a space-efficient, probabilistic data structure used to detect whether an element belongs to a set; the Bloom filter stores hash values generated by multiple hash functions, which is characterized by being absolutely accurate in determining whether an element does not belong to a set, but having a certain probability of misjudgment when determining whether an element belongs to a set; in the present invention, the Bloom filter is used to determine whether a certain keyword does not exist in the inverted file of a node. If it is determined that a certain keyword does not exist, a pruning operation is performed on the node, thereby reducing unnecessary query operations and improving overall query performance.
[0013] Preferably, the indoor distance calculation method described in step 2 is as follows: , in, v q express q The indoor partition where it is located, v o express o The indoor partition where it is located, d i,j and d i,j ' Respectively represent the current query point q Go to the interior space text object o The first and last access gates to be passed, | q , o |、| q , d i,j | and | d i,j ' , o | represents the straight-line distance from the former to the latter, dis ( d i,j , d i,j ' ) indicates that from d i,j arrive d i,j ' The minimum distance.
[0014] Preferably, the calculation methods of the text similarity, spatial proximity, user preference and the score function that comprehensively considers the text similarity, spatial proximity and user preference described in step 3 are as follows: (1) Query point q and interior space text objects o The calculation method of text similarity between: , in, oh represent qW The weight corresponding to the keywords in l represent oT The weight corresponding to the keyword in;∑( oh × l ) q.T∩o.T Express qT and oT The intersecting elements are oh × l The weighted sum of oh q.T∪o.T +λ q.T∪o.T + ( oh × l ) q.T∩o.T ) indicates qT and oT Each element in the union of is weighted and summed. qT , then only oh Weighted; if the element only belongs to oT , then only l Weighted; if the element belongs to qT Also belongs to oT , then proceed oh × l Weighted processing; (2) Query point q and interior space text objects o The calculation method of spatial proximity between : , in, o . h Represents an indoor space text object o The Hilbert code value of q . h Indicates the query point q The Hilbert code value of dis ( q , o ) represents the query point q Object with interior space text o The indoor distance between or is a weight parameter used to balance the impact of Hilbert coding value on spatial proximity; (3) Query point q and interior space text objects o The calculation method of user preference between: , in,p ( qt i ∩ oh i ) indicates a query q Keywords in t i and interior text objects o Keywords in t i The probability of appearing in the user's search history at the same time, p ( q . t i ) indicates a keyword t i The probability of appearing in the user's search history, p ( o . t i ) indicates a keyword t i The probability of appearing in the user's search history, e =0.001, constant e Used to avoid division by zero; usually, user preferences change over time. Although all historical access behaviors of users may affect the final preference, recent access has a greater impact on it; therefore, the time decay factor d Used to control the decay speed, while ∆ t represents the difference between the current query time and the query record generation time, ∆ t In days; (4) Calculation method of the score function that comprehensively considers text similarity, spatial proximity, and user preference: , in, sim ( q , o ) represents the query point q and interior space text objects o The text similarity between prox ( q , o ) represents the query point q and interior space text objects o The spatial proximity between before ( q , o ) represents the user’s preference for the query point, α , β ,γ∈(0,1) are three smoothing factors, which are used to balance text relevance, spatial proximity and user preference.
[0015] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art: (1) Different from the traditional query method based on Euclidean and road network space, the indoor space keyword personalized query method proposed in the present invention is more suitable for indoor environments with complex structures and can effectively meet the personalized query needs of users; (2) The ISKIR-tree index proposed in the present invention incorporates Hilbert coding technology, which can better determine the spatial proximity in indoor environments; in addition, the index also introduces Bloom filters and distance matrices, which can effectively process spatial keyword personalized queries in indoor environments; (3) Since the present invention performs pruning operations based on the ISKIR-tree index, data that does not meet the query requirements can be quickly deleted at the beginning of the query, thereby significantly improving the query efficiency; (4) Since the present invention proposes a scoring function that comprehensively considers text similarity, spatial proximity and user preference, this scoring function is used to score and sort the data points in the priority queue obtained after pruning to generate a result set, which can screen out results that meet the user's personalized query needs, thereby improving the accuracy of the query. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings of the embodiment are briefly introduced below.
[0017] Figure 1 The present invention is a flowchart of a personalized indoor space keyword query method.
[0018] Figure 2 It is an example diagram of an indoor scene in an embodiment of the present invention.
[0019] Figure 3 It is a distribution diagram of text objects in indoor space in an embodiment of the present invention.
[0020] Figure 4 It is a schematic diagram of the ISKIR-tree index in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0022] like Figure 1As shown, a personalized indoor space keyword query method of the present invention is mainly applied to indoor location-based service (LBS) system and indoor space interest point recommendation field, and its overall processing flow is as follows: (1) Get the collection of indoor space text objects O= { o 1 , o 2 ,..., o n}, and obtain the personalized indoor space keyword query initiated by the user q =( location , T , press , d );in o i Represents an indoor space text object. Each indoor space text object o i Each consists of a binary group ( location , T )constitute, o i .loc Represents the indoor location of the indoor space text object. o i .T Represents the set of all keywords contained in the indoor space text object; q.loc Represents the indoor location of the query point, q . T Represents a set of keywords contained in the query. q . press Represents the user's query preference set, q . d represents the preference distance of the query; (2) Construct an ISKIR-tree index based on the indoor spatial location distribution and keyword information; the indoor scene example is shown in the figure Figure 2 As shown, the indoor partition in the indoor scene is recorded as v i,j ,in i Represents the floor where the indoor partition is located. j Represents the number of the indoor partition on the current floor; the access door in the indoor scene is recorded as d i,j ,in i Represents the floor where the indoor partition is located. j Represents the number of the access door on the current floor, where d 1,14 、d 1,15 、d 1,16It represents the access door leading to the outside that only exists on the first floor, and the others are the access doors connecting the indoor partitions; according to Figure 3 The ISKIR-tree index generated by the indoor space text object distribution map is shown as follows Figure 4 As shown; (3) Initialize the priority queue Q , queue U and result set R If it is empty, the root node of the ISKIR-tree index is queued. U ; (4) When the queue U When not empty, the node of the queue index N , when the node N When it is a non-leaf node, calculate the query point q To Node N Indoor distance, if the indoor distance is less than q . d , then traverse q . T , and use Bloom filter to determine the node N Does the inverted file contain the keyword? t i , if the keyword is determined by the Bloom filter t i If the node is not in the inverted file of the node, delete the node and continue to traverse the priority queue. U , otherwise the node N The spatial text objects in are added to the priority queue Q ; If the indoor distance is greater than q . d , then delete the node and continue to traverse the priority queue U ; When the node N When it is a leaf node, traverse the spatial text objects in the leaf node and calculate the query points respectively q The indoor distance to each indoor space text object, and the indoor distance is less than q . d and o . T Included q . T The interior space text object is added to the priority queue Q ; (5) When the queue U When it is empty, traverse the priority queue Q The indoor space text object in the image is scored according to the scoring function. score , and score >0.85 of the interior space text object and the object score Stored in result set R ; (6) According to score Arrange the indoor space text objects in the result set in descending order and return the results that meet the user's personalized query needs.
[0023] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A personalized indoor space keyword query method, characterized in that: Given a set of indoor space text objects O= { o 1, o 2,..., o n } and a spatial keyword personalized query in an indoor environment q =( loc , T , pres , d ); each interior space text object o i Each consists of a binary group ( loc , T )constitute, o i .loc Represents the indoor location of the indoor space text object. o i .T Represents the set of all keywords contained in the indoor space text object; q.loc Represents the indoor location of the query point, q . T Represents a set of keywords contained in the query. q . pres Represents the user's query preference set, q . d Represents the preference distance of the query; including the following steps: Step 1: Build an ISKIR-tree index for the user's query based on the indoor location distribution of the indoor space text object set and the keyword information it contains. The specific steps are as follows: Step 1.1: The ISKIR-tree index follows the top-down construction idea. First, the indoor space is divided according to the floor structure to achieve the conversion from three-dimensional space to two-dimensional space. Step 1.2: Then, for each floor, the ISKIR-tree index is constructed according to the indoor distribution of indoor space text objects; the ISKIR-tree index maintains the inverted file of each node, including the text inverted table and the space inverted table; the text inverted table stores the keyword information of the indoor space text objects, and the space inverted table stores the Hilbert code values corresponding to the indoor space text objects; for non-leaf nodes, the ISKIR-tree index adds a distance matrix and a Bloom filter on the basis of the inverted file; the distance matrix is used to store the path gates from the node to its child nodes. The required indoor distance is calculated, so as to quickly calculate the indoor distance from the query point to the node; the Bloom filter generates hash values through multi-hash functions and stores these values in a bit array, and uses the bit array to quickly determine whether a point is in a certain area, thereby reducing unnecessary query operations and improving query efficiency; for leaf nodes, the ISKIR-tree index also maintains a distance matrix for them based on the inverted file. Unlike the distance matrix of non-leaf nodes, this distance matrix is used to store the indoor distance from the indoor space text object it contains to the passage door where it is located, so as to efficiently calculate the indoor distance from the query point to the indoor space text object; Step 2: Start traversing from the root node of the ISKIR-tree index and calculate the query point based on the node distance matrix q The indoor distance to the node. If the indoor distance is greater than the preferred distance given in the user's query, the node can be safely pruned, otherwise the traversal continues; the Bloom filter is used to judge the keywords in the non-node. If it is determined that the keyword queried by the user is not in the keyword set contained in the node, the node can be safely pruned, otherwise the traversal continues; after traversing all indexes, the traversal ends and the pruned data is stored in a priority queue; Step 3: Calculate the scores of the indoor space text objects in the priority queue based on a scoring function that comprehensively considers text similarity, spatial proximity, and user preference, and sort them in descending order according to their scores to obtain a set of indoor space text objects with a score higher than 0.85, which is returned to the user as a result set.
2. The method for personalized indoor space keyword query according to claim 1, characterized in that: The indoor distance described in step 2 is calculated as follows: , in, v q express q The indoor partition where it is located, v o express o The indoor partition where it is located, d i,j and d i,j ' Respectively represent the current query point q Go to the interior space text object o The first and last access gates to be passed, | q , o |、| q , d i,j | and | d i,j ' , o | represents the straight-line distance from the former to the latter, dis ( d i,j , d i,j ' ) indicates that from d i,j arrive d i,j ' The minimum distance; wherein the passage door refers to a door connecting adjacent indoor partitions or a passage similar to a door.
3. The indoor space keyword personalized query method according to claim 1, characterized in that: The calculation methods of the text similarity, spatial proximity, user preference and the score function that comprehensively considers the text similarity, spatial proximity and user preference described in step 3 are as follows: (1) Query point q and interior space text objects o The calculation method of text similarity between: , in, ω represent QW The weight corresponding to the keywords in λ represent oT The weight corresponding to the keyword in;∑( ω × λ ) q.T∩o.T Express Q and oT The intersecting elements are ω × λ The weighted sum of ω q.T∪o.T +λ q.T∪o.T + ( ω × λ ) q.T∩o.T ) indicates Q and oT Each element in the union of is weighted and summed. Q , then only ω Weighted; if the element only belongs to oT , then only λ Weighted; if the element belongs to Q Also belongs to oT , then proceed ω × λ Weighted processing; (2) Query point q and interior space text objects o The calculation method of spatial proximity between : , in, o . h Represents an indoor space text object o The Hilbert code value of q . h Indicates the query point q The Hilbert code value of dis ( q , o ) represents the query point q Object with interior space text o The indoor distance between η is a weight parameter used to balance the impact of Hilbert coding value on spatial proximity; (3) Query point q and interior space text objects o The calculation method of user preference between: , in, p ( qt i ∩ ot i ) indicates a query q Keywords in t i and interior space text objects o Keywords in t i The probability of appearing in the user's search history at the same time, p ( q . t i ) indicates a keyword t i The probability of appearing in the user's search history, p ( o . t i ) indicates a keyword t i The probability of appearing in the user's search history, ε =0.001, δ is the time decay factor, which is used to control the decay speed, and ∆ t represents the difference between the current query time and the query record generation time, ∆ t In days; (4) Calculation method of the score function that comprehensively considers text similarity, spatial proximity, and user preference: , in, sim ( q , o ) represents the query point q and interior space text objects o The text similarity between prox ( q , o ) represents the query point q and interior space text objects o The spatial proximity between pre ( q , o ) represents the user’s preference for the query point, α , β ,γ∈(0,1) are three smoothing factors, which are used to balance text relevance, spatial proximity and user preference.
