A reverse k-nearest neighbor query method for indoor space and its application

By using the pruning and verification algorithm of VIP tree structure in indoor space, the efficiency and accuracy of indoor reverse k nearest neighbor query are solved, and fast and accurate query results are achieved.

CN114860856BActive Publication Date: 2025-04-01EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110073249.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-20
Publication Date
2025-04-01
Estimated Expiration
2041-01-20

AI Technical Summary

Technical Problem

The prior art is difficult to effectively conduct reverse k nearest neighbor query in indoor spaces. Due to the complex topological structure and obstacles of indoor space, it is difficult to accurately measure indoor distances with traditional spatial network distances and European distances.

Method used

The pruning algorithm and verification algorithm based on VIP tree structure are adopted to simplify distance calculation using indoor space information, and the calculation space is reduced through pruning rules, and the user points with reverse k nearest neighbors corresponding to a given query device point are quickly obtained.

Benefits of technology

It realizes rapid and accurate reverse k neighbor query in indoor space, overcomes the problem of unsatisfactory results in indoor space, and improves query efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860856B_ABST
    Figure CN114860856B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for querying reverse k-nearest neighbors in indoor space. The method uses indoor space information and its corresponding VIP tree structure to simplify the calculation of indoor distance and traverse different rooms, and uses user point information and device point information to prune and verify the reverse k-nearest neighbors of the query point. The method specifically includes the following steps: using a pruning algorithm to filter out candidate nodes and mandatory nodes from the leaf nodes of the VIP tree; using a verification algorithm to verify the users in the candidate nodes to determine whether they are reverse k-nearest neighbors of the query point; and directly adding the user points contained in the mandatory nodes to the result set. The present invention uses the characteristics of indoor space, and by determining the distance range between the device point and different spaces, some very effective pruning rules are designed. According to these pruning rules, we use a pruning verification framework to reduce the calculation space and reduce unnecessary calculations, thereby achieving the purpose of quickly calculating the reverse k-nearest neighbors of the query point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of reverse k-nearest neighbor query in spatiotemporal data neighborhood, and relates to a reverse k-nearest neighbor query method for indoor space. Background Art

[0002] Studies have shown that people spend more than 85% of their time in indoor spaces, such as supermarkets, hospitals, apartments, offices, etc., and as the internal structures of buildings become more and more complex, more and more indoor query services are coming. However, due to the existence of various obstacles, satellite positioning systems such as GPS find it difficult to accurately obtain indoor location information, so it was difficult to provide reliable indoor query services in the past. However, in recent years, major breakthroughs in indoor positioning technologies such as WiFi, RFID and Bluetooth, as well as the popularity of smartphones with Bluetooth and WiFi functions, have made it possible to locate indoor objects. Therefore, location-based indoor services are expected to flourish rapidly in the next few years, and some studies even show that location-based indoor services will have a greater impact than outdoor services. Location-based indoor services have great value in many fields, such as indoor navigation, emergency services, equipment placement, location-based marketing, etc.

[0003] Reverse k-nearest neighbor query in indoor space has great value in many fields, such as equipment placement, location-based marketing, etc. Taking a shopping mall as an example, a marketing point in the shopping mall may issue a reverse k-nearest neighbor query to find out which users are the nearest k marketing points of the surrounding users. These users are potential users of this marketing point, and they are more likely to be affected by promotional activities. The marketing point can push advertisements to these users to gain benefits. The reverse k-nearest neighbor query in indoor space is to find all user points u that meet the conditions given a query point q, a user set U and a device set F, where the query point q belongs to the device set F, so that the query point q is included in the nearest k device points of these user points u.

[0004] Although there are many reverse k-nearest neighbor query methods suitable for outdoor use, there is no method for reverse k-nearest neighbor query in indoor space. Indoor space is quite different from outdoor space: first, indoor space is characterized by entities such as doors, rooms, corridors, etc. These entities will greatly restrict the movement of objects in indoor space, so traditional spatial network distance and Euclidean distance cannot be used to measure indoor distance; second, indoor space has a more complex topological structure than outdoor space. Due to these conditions, the reverse k-nearest neighbor query method for outdoor space is not very effective when used in indoor space. Summary of the invention

[0005] In order to solve the deficiencies of the prior art, the purpose of the present invention is to use the existing space partitioning tree structure (VIP tree: VividIndoor Partitioning Tree) to provide an indoor space reverse k-nearest neighbor query method to overcome the inapplicability of the prior art to indoor space.

[0006] Based on the location information of user points and device points in indoor space, the present invention uses pruning rules obtained according to spatial characteristics to reduce the calculation space and reduce unnecessary calculations, thereby quickly obtaining the reverse k-nearest neighbor user points corresponding to a given query device point. The specific steps include the following:

[0007] Step (1) uses a pruning algorithm to filter out candidate nodes and mandatory nodes from the leaf nodes of the VIP tree.

[0008] Step (2) uses a verification algorithm to verify the users in the candidate nodes to determine whether they are the reverse k-nearest neighbors of the query point; and directly adds the user points included in the required results to the result set.

[0009] In the present invention, indoor space information and its corresponding VIP tree structure are used to simplify the calculation of indoor distance and traverse different rooms, and user point information and device point information are used to prune and verify the reverse k-nearest neighbors of the query point; the indoor space information includes indoor space room information and indoor space door information; wherein the indoor space room information includes: room number, room type, room longitude and latitude, and a set of doors contained in the room; the indoor space door information includes: door number, door type, longitude and latitude of the door; the VIP tree structure includes VIP tree node information and VIP tree distance matrix; wherein the VIP tree node information includes: node number, node type, father node, child node set, room set in the node; wherein the VIP tree distance matrix includes: starting door, ending door, distance; the user point information includes: user number, room number, longitude and latitude; the device point information includes: device number, room number, longitude and latitude.

[0010] In the present invention, the specific steps of step (1) include:

[0011] In step (1.1), three sets, namely, the candidate node set, the required node set and the visited node set, are initialized to store the candidate nodes, the required nodes and the visited nodes in the pruning phase respectively.

[0012] In the step (1.1), the candidate node set includes all candidate nodes, which are initialized to all leaf nodes of the VIP tree; the required node set includes all required nodes, which is initialized to empty; and the access node set stores the nodes that need to be traversed, which is initialized to the root node of the VIP tree.

[0013] Step (1.2), continuously take out a leaf node N from the access set, and loop the operation for all device points f except the query point q until the access set is empty.

[0014] The loop operation is as follows: first determine whether the device point f, q is located in the leaf node N, then determine whether the leaf node N can be pruned by the device point f according to the distance relationship between the device point f, q and the access gate in the leaf node N, and according to other positional relationships; the pruning means that if all possible points in the node N are closer to the device point f than to the query point q, then the node N can be pruned by the device point f. The distance between the device point and all the access gates in the node is obtained using a distance calculation algorithm.

[0015] If node N can be pruned by at least k devices, then the user point in node N must not be the reverse k nearest neighbor of the query point and can be removed from the candidate node set; if at least (nk) devices must not prune node N (where n represents the total number of device points), then node N is removed from the candidate node set and added to the required node set; if node N is neither a candidate node nor a required node and has child nodes, then all child nodes of node N are inserted into the access node set to determine whether its child nodes are candidate nodes or required nodes; the calculation of this node is completed.

[0016] In the present invention, the specific steps of step (2) include:

[0017] Step (2.1) determines whether the user point contained in the node in the candidate node set is the reverse k-nearest neighbor of the query point; performs k-nearest neighbor calculation on the user point contained in the node in the candidate node set. If the query point is included in its k-nearest neighbor, the reverse k-nearest neighbor of the query point also includes the user point, and the user point is added to the result set; otherwise, the reverse k-nearest neighbor of the query point does not include the user point.

[0018] In step (2.2), the user points that meet the conditions in the candidate nodes are added to the result set; the required node set is processed, and the user points in the nodes in the required node set must be the reverse k-nearest neighbors of the query point, so all user points in the required nodes are directly added to the result set.

[0019] The present invention also provides an application of the above method in reverse k-nearest neighbor query in indoor space.

[0020] Compared with the prior art, the beneficial effects of the present invention include: utilizing the characteristics of indoor space, by determining the distance range between the equipment point and different spaces, some very effective pruning rules are designed. According to these pruning rules, we use a pruning verification framework to reduce the calculation space and reduce unnecessary calculations, thereby achieving the purpose of quickly calculating the reverse k-nearest neighbors of the query point. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 The figure is a flow chart of the indoor reverse k-nearest neighbor query method of the present invention.

[0022] Figure 2 This is a VIP tree structure corresponding to an indoor space including 17 rooms, 20 doors, 4 device points (f1, f2, f3, f4) and 5 user points (u1, u2, u3, u4, u5) according to an embodiment of the present invention.

[0023] Figure 3 For the embodiment of the present invention Figure 2 The specific distribution of the indoor space. DETAILED DESCRIPTION

[0024] The present invention is further described in detail in conjunction with the following specific embodiments and drawings. The process, conditions, experimental methods, etc. for implementing the present invention, except for the contents specifically mentioned below, are all common knowledge and common common sense in the art, and the present invention has no special restrictions. For ease of description, dist(p, q) is used in the embodiments to represent the minimum distance between points p and q in the indoor space. It should be particularly noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be ignored here.

[0025] The invention proposes an indoor space reverse k-nearest neighbor query method, which uses indoor space information and its corresponding VIP tree structure to simplify the calculation of indoor distance and traverse different rooms, and uses user point information and device point information to prune and verify the reverse k-nearest neighbors of the query point, including the following steps:

[0026] Step (1) uses a pruning algorithm to filter out candidate nodes and mandatory nodes from the leaf nodes of the VIP tree.

[0027] Step (2) uses a verification algorithm to verify the users in the candidate nodes to determine whether they are the reverse k-nearest neighbors of the query point; and directly adds the user points contained in the required nodes to the result set.

[0028] The present invention also provides an application of the above algorithm in reverse k-nearest neighbor query in indoor space.

[0029] In the present invention, indoor space information and its corresponding VIP tree structure are used to simplify the calculation of indoor distances and traverse different rooms, and user point information and device point information are used to prune and verify the reverse k-nearest neighbors of the query point; the indoor space is pruned according to the distance relationship between the query point, other device points and the node access door, the calculation space is reduced, nodes that may have result points are added to the candidate set, and nodes that must have result points are added to the required set. Finally, it is only necessary to perform k-nearest neighbor calculations on the user points contained in the nodes in the candidate set to determine whether they are the reverse k-nearest neighbors of the query point, without having to perform k-nearest neighbor calculations on all user points in the indoor space, thereby greatly improving the algorithm speed.

[0030] Example

[0031] 1. Overview of the process

[0032] like Figure 1 As shown, the method flow is divided into two parts: pruning stage and verification stage. The pruning stage is used to screen out candidate nodes and mandatory nodes; the verification stage performs a k-nearest neighbor query on the user point of the leaf node among the candidate nodes obtained in the pruning stage to verify whether the query point is the k-nearest neighbor of the user point and thus determine whether the reverse k-nearest neighbor of the query point includes the user point.

[0033] 1.1 Pruning phase

[0034] The VIP tree structure is used in the pruning stage. For the node N in the access set, the query point and all other device points are judged to determine whether they are all in node N, and then the distance range of the query point, device point and user point in node N is calculated. Their ranges are compared to determine whether the node can be pruned by the device point. When the node can be pruned by a certain number of device points, the node can be pruned and not added to the candidate nodes; otherwise, it is added to the candidate nodes. When the number of device points that cannot prune the node reaches a certain number, the user points in the node must be the reverse k-nearest neighbors of the query point, and the node is added to the required nodes.

[0035] 1.2 Verification Phase

[0036] After the pruning phase is completed, candidate nodes and mandatory nodes are obtained. It is also necessary to determine whether the user points contained in these nodes are the reverse k-nearest neighbors of the query point. Perform a k-nearest neighbor query on all user points in the candidate nodes obtained in the pruning phase. If the query point is included in the k-nearest neighbor query result, the reverse k-nearest neighbor of the query point includes the user point, otherwise it does not include the user point; the mandatory node is the node that has been determined in the pruning phase that the user point contained in it must be the reverse k-nearest neighbor of the query point, so the user points contained in the mandatory node can be directly added to the result set.

[0037] 2. Method Details

[0038] The detailed modular design of the method is introduced with the specific embodiments. Based on the indoor space information, VIP tree information, user point location information and device point location information, through the two steps of pruning phase and verification phase, the indoor reverse k nearest neighbor query result is obtained.

[0039] 2.1 Data Entity

[0040] The data involved in this method include indoor space room information, indoor space door information, VIP tree node information, VIP tree distance matrix information, user point location information, and device point location information. Tables 1 to 6 show the data structures of these six types of data in detail.

[0041] The indoor space room information refers to the space range of each room within a given query space range, including the room number, room type, longitude and latitude, and a number list of the doors contained therein.

[0042] Table 1 Indoor space room information

[0043]

[0044] The indoor space door information refers to the location information of each door within a given query space range, including door number, door type, longitude and latitude.

[0045] Table 2 Indoor space door information

[0046]

[0047] The VIP tree node information refers to the node information of the VIP tree corresponding to a given indoor space, including node number, node type, parent node, child node set, and room set within the node.

[0048] Table 3 VIP tree node information

[0049]

[0050] The VIP tree distance matrix information refers to the information about the distance between the access gates of the VIP tree nodes corresponding to a given indoor space, including the node number, the starting gate number, the ending gate number, and the distance.

[0051] Table 4 VIP tree distance matrix information

[0052]

[0053] The user point information is the location information of the user point in a given indoor space, including the user number, the room number, and the longitude and latitude.

[0054] Table 5 User point information

[0055]

[0056] The device point information is the location information of the device point in a given indoor space, including the device number, the room number, and the longitude and latitude.

[0057] Table 6 Equipment point information

[0058]

[0059] 2.2 Operation Module

[0060] 2.2.1 Distance Calculation Module

[0061] The distance calculation module is used to calculate the distance from a given device point to all access doors in a given node. As shown in Algorithm 1, first determine whether the device point f is in node N. If the device point f is in node N, then determine whether node N is a leaf node. If node N is a leaf node, because the path between the device point f and the access door in node N must pass through the door of any room where the device point s is located, the door of the room where the device point s is located can be used as a transfer door, Among them, d i represents any door of the room where the device point s is located, d j represents any access gate in node N, and AD(N) represents the access gate set of node N; because s and d i are all in one room, so dist(s,d i ) can be directly obtained from the Euclidean distance formula, and dist(d i ,d j ) is stored in the distance matrix of the leaf node N, so dist(s,d i ); If node N is not a leaf node, first calculate the device point s and N child The distances to all access doors in child N is the child node of N and the ancestor node of the leaf node where the device point s is located. child The access gate of is used as the transit gate to calculate the distance from the device point s to the access gate in N; if the device point is not in node N, find the least common ancestor node between the leaf node where the device point s is located and node N, use the access gate of the least common ancestor node as the transit gate, and calculate the distance between the device point and all access gates in node N.

[0062] like Figure 2 , 3 As shown, the distance from device point f1 to all access gates in node N5 is calculated. The access gates of node N5 include d1, d7 and d 10. Because the device point f1 is in the node N5, we first calculate the distance between f1 and the access gate of the leaf node N1 where it is located, and get dist(f1,d1)=2, dist(f1,d6)=7. And because the distance matrix of node N5 stores the distances between all the access gates of its child nodes (including its own access gate), we can get dist(d1,d7)=13 from the distance matrix, dist(d1,d 10 )=15, dist(d6,d1)=9, dist(d6,d7)=4, dist(d6,d 10 )=6. Therefore, we can get the distance from device point f1 to the access gate of N5 as dist(f1,d1)=2, dist(f1,d7)=dist(f1,d6)+dist(d6,d7)=11, dist(f1,d 10 )=dist(f1,d6)+dist(d6,d 10 )=13.

[0063] Algorithm 1 Distance calculation algorithm

[0064]

[0065]

[0066] 2.2.2 Pruning Module

[0067] The purpose of the pruning module is to remove nodes in the VIP tree that are unlikely to contain result points from the candidate node set, and add nodes that must contain result points to the required node set, thereby reducing the calculation space and thus shortening the time required for calculation. For node N in the access set, the query point and all other device points are judged to determine whether they are all in node N. Then the distance calculation algorithm is used to calculate the distance relationship between them and the access gate in node N, so as to determine whether the node can be pruned by the device point. When the node can be pruned by a certain number of device points, the node can be pruned and not added to the candidate nodes, otherwise it will be added to the candidate nodes; when the number of device points that must not be pruned reaches a certain number, the node is added to the required node set. Algorithm 2 introduces the algorithm flow in detail.

[0068] Algorithm 2 Pruning Algorithm

[0069]

[0070] exist Figure 2 , 3In the current space, there are device points f1, f2, f3, f4, and user points u1, u2, u3, u4, u5. Consider the case where the query point is f2 and k=2. In the pruning phase, the set H is initialized to contain only the root node N7 of the VIP tree, the candidate node set is all leaf nodes of the VIP tree, and the required node set is empty. The root node is taken out of the set H. Since all points are in the root node and the root node cannot be pruned, the child nodes N5 and N6 of the root node N7 are added to the set H. Then the node N6 is taken out of the set H. The query point f2 is outside the node N6. The distance calculation algorithm is used to calculate all access gates (d 10 , d 20 ), the distances from device points f1, f3, f4 to all access gates of node N6 can be calculated by using the distance calculation algorithm. The final distances are shown in Table 7:

[0071] Table 7 Distances from device points f1-f4 to all access gates of node N6

[0072] <![CDATA[d 10 ]]> <![CDATA[d 20 <!-- 8 -->]]> <![CDATA[f1]]> 13 23 <![CDATA[f2]]> 5 15 <![CDATA[f3]]> 6 16 <![CDATA[f4]]> 8 6

[0073] From the results shown in Table 7, we can see that dist(f1,d i )>dist(f2,d i ) and dist(f3,d i )>dist(f2,d i ), and because device points f2 and f3 are outside node N5, and device point f4 is inside node N5. Therefore, there are at least two device points (f1, f3) that can prune node N6. The number of device points that can prune node N6 is greater than or equal to k, so node N6 is not a candidate node. The leaf nodes contained in node N6 are deleted from the candidate node set, and the access to node N6 is ended. Then another node N5 is taken from the set H for access. Because device points f1, f3 and query point f2 are all in node N5, only device point f4 needs to be considered. The distance calculation algorithm can be used to calculate all access gates (d1, d7, d 10 ), we can get dist(f2, d1)<dist(f4, d1), dist(f2, d7)<dist(f4, d7), dist(f2, d 10 )>dist(f4,d 10 ), not satisfied dist(f4,d i )>dist(f2,d i), so the number of device points of all user points in node N5 that can be pruned is 0, and the number of device points of user points in node N5 that cannot be pruned is also 0, so add N5's child nodes N1 and N2 to set H, and iterate until set H is empty. Finally, leaf node N1 is a candidate node, and leaf node N2 is a required node.

[0074] 2.2.3 k nearest neighbor query module

[0075] The k nearest neighbor query module is used to calculate the k device points closest to a given query point. As shown in Algorithm 3, a small root heap H is first initialized as the root node of the VIP tree, and the value is the minimum distance from the query point to the root node (0). When H is not empty, the top element of the heap is taken from H. If the minimum distance from the query point q to the node is greater than d k , then return the result set. If the minimum distance from the query point q to the node is not greater than d k , and the node is a non-leaf node, then all the child nodes of the node are inserted into the small root heap, and the value is the minimum distance from the query point to the child node; if N is a leaf node, then calculate the distance from the user in N to the query point and update d k with the result set.

[0076] Algorithm 3k nearest neighbor query method

[0077]

[0078]

[0079] exist Figure 3 In the space shown, find the 2 nearest neighbors for user points u1 and u2. At the beginning, there is only the root node N7 in the access set. Through the distance calculation module, it can be found that the distance from u1 to N7 is zero, so the child nodes N5 and N6 of N7 are added to the access set. It can be calculated that N5 is closer to u1 and the distance is less than d k , N5's child nodes N1 and N2 can be added to the access set. N1 and N2 are closer to u1 than N6, so nodes N1 and N2 are visited first. The distance between the device points f1, f2, and f3 in these two leaf nodes and u1 is calculated to obtain the 2 nearest neighbors of u1 as f1 and f3. k Set to the larger value of the distance between u1 and f1 and f3. The distance between u1 and node N6 is greater than d k , so the iteration ends and the result set is returned. Finally, the 2 nearest neighbors of user point u1 are {f1, f3}. Following the same process, the 2 nearest neighbors of user point u2 are {f1, f3}.

[0080] 2.2.4 Verification Module

[0081] The verification module will return the final result set, which is the reverse k-nearest neighbor result of the query point in the indoor space. In the verification module, k-nearest neighbor calculation is performed on all user points contained in all nodes in the candidate node set. If the query point is contained in the candidate node set, the user point is added to the result set; otherwise, it is not added to the result set. Then all user points contained in all nodes in the required node set are added to the result set. Finally, the result set is returned. Algorithm 4 describes the algorithm flow in detail.

[0082] Algorithm 4 Verification algorithm

[0083]

[0084]

[0085] When entering the verification module, the parameters inherited from the pruning module are: query point f2, k value 2, user set and device set are the same as the pruning module, candidate node set C1 = {N1}, and required node set C2 = {N2}. Initialize the result set to be empty, add all users (u3, u4) in the required node N2 to the result set, and find the k nearest neighbors (k = 2) for all users (u1, u2) in the candidate node N1. The 2 nearest neighbors of user point u1 are {f1, f3}, and the 2 nearest neighbors of user point u2 are {f1, f3}. The k nearest neighbors of u1 and u2 do not contain query point f2, so users u1 and u2 are not added to the result set. The final result set is {u3, u4}, which is the reverse 2 nearest neighbors of query point f2 in the indoor space.

[0086] The protection content of the present invention is not limited to the above embodiments. Without departing from the spirit and scope of the present invention, changes and advantages that can be thought of by those skilled in the art are included in the present invention and are protected by the attached claims.

Claims

1. A method for reverse k-nearest neighbor query in indoor space, characterized in that: The method uses indoor space information and its corresponding VIP tree structure to simplify the calculation of indoor distance and traverse different rooms, and uses user point information and device point information to prune and verify the reverse k-nearest neighbors of the query point, specifically including the following steps: Step (1): Filter candidate nodes and mandatory nodes from the leaf nodes of the VIP tree using a pruning algorithm; the specific steps of step (1) include: Step (1.1): Initialize the candidate node set, the required node set and the access node set; wherein the candidate node set includes all candidate nodes and is initialized to all leaf nodes of the VIP tree; the required node set includes all required nodes and is initialized to empty; the access node set stores the nodes that need to be traversed and is initialized to the root node of the VIP tree; Step (1.2): continuously extract each leaf node N from the access set, and perform a loop operation on all device points f except the query point q to determine whether the node N can be pruned by the device point f, until the access set is empty; the pruning means that if all possible points in the node N are closer to the device point f than to the query point q, then the node N can be pruned by the device point f; Step (2): Use a verification algorithm to verify the users in the candidate nodes to determine whether they are the reverse k-nearest neighbors of the query point; and directly add the user points contained in the required nodes to the result set; the specific steps of step (2) include: Step (2.1): Determine whether the user point contained in the node in the candidate node set is the reverse k-nearest neighbor of the query point. If so, add the user point to the result set; Step (2.2): Add the user points contained in the required nodes directly to the result set.

2. The method according to claim 1, characterized in that The indoor space information includes indoor space room information and indoor space door information; wherein the indoor space room information includes: room number, room type, room longitude and latitude, and a set of doors contained in the room; the indoor space door information includes: door number, door type, longitude and latitude of the door; The VIP tree structure includes VIP tree node information and VIP tree distance matrix; wherein, the VIP tree node information includes: node number, node type, father node, child node set, room set within the node; the VIP tree distance matrix includes: starting gate, ending gate, distance; the user point information includes: user number, room number, longitude and latitude; the device point information includes: device number, room number, longitude and latitude.

3. The method according to claim 1, characterized in that In step (1.2), the loop operation is specifically as follows: determine whether the device point f, q is located in the leaf node N, and then determine whether the leaf node N can be pruned by the device point f based on the distance relationship between the device point f, q and the access gate in the leaf node N, and based on other positional relationships; the distance between the device point and all access gates in the node is obtained using a distance calculation algorithm.

4. The method according to claim 1, characterized in that In step (2.1), the method for determining whether the user point is the reverse k-nearest neighbor of the query point is as follows: perform k-nearest neighbor calculation on the user points contained in the nodes in the candidate node set. If the query point is included in its k-nearest neighbors, the reverse k-nearest neighbors of the query point also include the user point, that is, the user point is the reverse k-nearest neighbor of the query point.

5. Application of the method according to any one of claims 1 to 4 in indoor space query.