A Nearest Neighbor Query System and Method for Automated Guided Tours in Exhibition Halls
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]上述技术缺点在于:需要大量布设硬件标签,定制专用接收设备,使用成本高,扩展和维护不方便;为此,另一种基于最近邻查询的定位识别技术的正逐渐成为展览馆自动讲解系统的主流
[0032]1、相比硬标记技术实现的展览馆自动讲解系统,本发明不需要大规模布设无线识别标签(或传感器),也不需要定制专用的识别设备,只需要布设有限数量的iBeacon蓝牙信标,配合具有蓝牙接收模块的移动设备即可实现定位识别,成本低、布展容易、扩展和维护也很方便;
Smart Images

Figure CN116600276B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nearest neighbor query technology, specifically to an intention nearest neighbor query system and method for automatic explanation in exhibition halls. Background Technology
[0002] Location-sensing automated guided tour systems are commonly used in exhibition halls, museums, and other similar venues. These systems require no human guides; visitors wear signal receivers that automatically emit sound when they pass by or approach certain exhibits or attractions, providing information about the exhibit. These automated guided tour systems generally employ location recognition technology, retrieving audio and video data from a backend database based on the identified exhibit ID for playback.
[0003] Currently, the main technology for location identification on the market is hard tagging technology. The principle is to deploy special wireless identification tags on each exhibit. Visitors hold dedicated receiving devices, and when the receiving devices approach the tags, the exhibits are identified based on the received tag information.
[0004] The drawbacks of the above-mentioned technologies are that they require a large number of hardware tags and customized receiving equipment, resulting in high operating costs and inconvenience in expansion and maintenance. Therefore, another positioning and identification technology based on nearest neighbor query is gradually becoming the mainstream of automatic interpretation systems in exhibition halls.
[0005] The most basic idea for solving the nearest neighbor problem is to start from the coordinates of the query point, calculate the distance to all spatial objects, find the minimum distance, and return the corresponding spatial object. This method is simple to implement and does not require additional data structure support, but the algorithm has high time complexity, low efficiency, and long processing time, making it unsuitable for real-time queries with large amounts of data.
[0006] To improve the query efficiency of spatial data objects, various nearest neighbor query methods based on spatial indexes have been proposed. R-Tree is currently the most commonly used spatial data indexing method and is recognized as a relatively efficient spatial index, widely used in spatial databases and multidimensional databases. Therefore, nearest neighbor query methods based on R-Tree or its various variants have been proposed, such as NN (Nearest Neighbor Search) or K-NN (K-Nearest Neighbor Search) methods.
[0007] Existing neural network (NN) or k-NN methods generally rely on finding the shortest Euclidean distance to the target for search. However, this approach has significant drawbacks when applied to indoor location and search, as it can lead to considerable errors in judging the intent of visitors in indoor exhibition halls. For example, when exhibits are densely packed with small gaps, or when there are walls, screens, or other obstacles obstructing the view, simply relying on the closest identification method cannot accurately reflect the visitor's intent, easily resulting in misidentification and thus incorrect machine interpretation. Summary of the Invention
[0008] The purpose of this invention is to provide an intention nearest neighbor query system and method for automatic explanation in exhibition halls, so as to solve the problems mentioned in the background art.
[0009] To achieve the above objectives, the present invention provides the following technical solution: a nearest neighbor query system for automatic guided tours in exhibition halls, comprising a Bluetooth beacon device, a Bluetooth module, a wireless signal receiver, and a server.
[0010] The positioning and identification system consists of a Bluetooth beacon device and a Bluetooth module;
[0011] The Bluetooth beacon devices are deployed at a density of at least three within a 10*10 meter range. Each Bluetooth beacon device is wirelessly controlled by an external wireless signal receiver and a server. The wireless signal receiver and the Bluetooth beacon device are imaged on the server using the MAC address and the corresponding positioning point linear coordinate system.
[0012] The Bluetooth module and Bluetooth beacon device are wirelessly positioned and imaged on the server using three-point coordinates.
[0013] Preferably, the indoor positioning system further includes an indoor positioning system based on Bluetooth iBeacon technology.
[0014] Preferably, the indoor positioning system based on Bluetooth iBeacon technology includes a linear coordinate locator installed in the server (4), which is configured in coordination with R-Tree-like spatial data indexing logic.
[0015] Preferably, the R-Tree spatial data indexing logic is as follows: an object in the R-Tree represents a tuple in the spatial database, and each tuple has a unique identifier (ObjID) for retrieval assistance.
[0016] Preferably, the tuple (MBR, ObjID) is further divided into index record entries, where MBR (Minimum Bounding Rectangle) is a minimum bounding rectangle, the size and position of which are set by the two endpoints on the diagonal. The MBR conforms to two categories: bounding spatial objects and rectangular monitoring ranges.
[0017] Preferably, the rectangular frame representing the spatial target's MBR and the MBR marked with numbers are further subdivided into leaf nodes and non-leaf nodes at the lowest level. The non-leaf nodes contain entries in the form of (MBR, Child-pointer). The MBR covers all rectangles in the lower-level node entries. The Child-pointer contains the address of the lower-level node in the R-Tree. The corresponding leaf nodes cover the inner barrier objects in the directory rectangle, which can be walls, screens, or unknown obstacles affecting MBR detection. The directory rectangles can overlap.
[0018] A method for automatically querying the nearest neighbor of an exhibition hall's guided tour intention includes the following steps:
[0019] S1: Construct an indoor linear coordinate system, deploy Bluetooth beacon devices and exhibits, add location information to the cloud database, and use the Bluetooth module and Bluetooth beacon devices to wirelessly locate and image on the server through the three-point positioning method.
[0020] S2: Based on the spatial layout of the exhibits and obstacles, construct a spatial index of exhibits containing obstacles;
[0021] S3: Combine the intention nearest neighbor query algorithm to find the best matching object.
[0022] Preferably, the specific steps of S1 are as follows:
[0023] Step 1: According to the deployment site, first draw a suitable linear coordinate system in the indoor area using a server. Personnel need to deploy Bluetooth beacons to suitable locations. However, the deployment location needs to be in accordance with the following: the density of Bluetooth beacon deployment should be controlled within a 10*10 meter range, with no fewer than three beacons deployed. Based on the actual deployment situation, personnel should determine the MAC address of the Bluetooth beacon and its corresponding location coordinates and wirelessly connect it to the coordinate reading structure of the cloud database.
[0024] Step 2: Bluetooth beacon deployment;
[0025] Step 3: The observer's position coordinates within the exhibition hall at a given moment are dynamically captured using Bluetooth ranging and triangulation methods.
[0026] Preferably, the specific steps of S2 are as follows:
[0027] Step 1: Using the R-Tree spatial data indexing algorithm, an object in the R-Tree represents a tuple in the spatial database. Then, a predefined tuple represents an independent and unique identifier (ObjID) used to distinguish and determine the index. Substituting the identifier (ObjID) into the actual application, it corresponds to an exhibit in the cloud database. Furthermore, the index record entries containing the tuple (MBR,ObjID) in the leaf nodes of the R-Tree are used as a minimum bounding rectangle. The child-pointer contains the address of the lower-level node in the R-Tree.
[0028] Step 2: The MBR (Minimum Bounding Rectangle) is a minimum bounding rectangle whose size and position are determined by the two endpoints on the diagonal, and is an approximate representation of a spatial object;
[0029] Step 3: The rectangle represents the MBR of the spatial target, which contains specific spatial objects.
[0030] Preferably, the MBR satisfies two basic conditions: first, it can enclose the spatial object; second, the enclosing rectangle is the smallest possible. The entries contained in the non-leaf nodes are in the form of (MBR, Child-pointer), where the MBR covers all the rectangles in the lower-level node entries, and the child-pointer contains the addresses of the lower-level nodes in the R-Tree.
[0031] Compared with existing automated guided tour systems in exhibition halls, the advantages of this invention are:
[0032] 1. Compared with the automatic explanation system of exhibition halls implemented by hard tag technology, the present invention does not require large-scale deployment of wireless identification tags (or sensors) or customized special identification equipment. It only requires the deployment of a limited number of iBeacon Bluetooth beacons, which can be used with mobile devices with Bluetooth receiving modules to achieve positioning and identification. It is low in cost, easy to set up, and convenient to expand and maintain.
[0033] 2. The classic nearest neighbor query technique starts from the coordinates of the query point, calculates the distance to all spatial objects, finds the minimum distance by comparison, and returns the corresponding spatial object. This method has high time complexity and is inefficient when dealing with a large amount of spatial data. This invention introduces OptiMinVsDist and PessMinVsDist distances and proposes a series of pruning strategies based on these distances. In the depth-first search process of the tree, the scope of query comparison can be reduced, effectively reducing the number of node visits in the large-scale spatial search process and greatly improving the efficiency of nearest neighbor query.
[0034] 3. This invention relates to an intentional nearest neighbor query system and method for automated guided tours in exhibition halls. Existing nearest neighbor query technologies rely solely on distance to determine the best exhibit to view, partially solving the visibility problem between the target object and the observation point. However, they do not consider the viewer's viewing intentions. The intentional nearest neighbor query method proposed in this invention is used to query the spatial object that best matches the viewer's intentions. This method comprehensively evaluates multiple factors, including dwell time, visible distance, visible area size, and historical viewing records, to determine the most likely object of interest for the viewer, thereby returning the exhibit that best matches the viewer's intentions. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the system construction of the present invention;
[0036] Figure 2 This is a schematic diagram of the Bluetooth beacon deployment of the present invention;
[0037] Figure 3 This is a schematic diagram illustrating the three-point positioning principle of the present invention;
[0038] Figure 4 This is a schematic diagram of the MBR hierarchical organization of a spatial object with obstacles according to the present invention;
[0039] Figure 5 This is a schematic diagram of the R-Tree structure of the spatial object with obstacles according to the present invention;
[0040] Figure 6 The present invention is MinDist(Q,P) i P j ) Diagram showing three different distance scenarios;
[0041] Figure 7 This is a schematic diagram of the PessMinVsDist distance and OptiMinVsDist distance from R1 and R2 to Q under the root node of this invention;
[0042] Figure 8 This is a schematic diagram showing the visual status of each child node object of R1 and R2 to Q in this invention;
[0043] Figure 9 This is a schematic diagram illustrating the visual state of the leaf node object to Q in this invention;
[0044] Figure 10 This is a schematic diagram of the pruning strategy 1 of the present invention;
[0045] Figure 11 This is a schematic diagram of pruning strategy 2 of the present invention;
[0046] Figure 12 This is a schematic diagram of pruning strategy 3 of the present invention;
[0047] Figure 13This is a schematic diagram of pruning strategy 4 of the present invention;
[0048] Figure 14 This is a schematic diagram of the pruning strategy 5 of the present invention;
[0049] Figure 15 This is a schematic diagram illustrating the process of searching for the intended nearest neighbor object by exploring, pruning, and sorting according to the present invention.
[0050] In the diagram: 1. Bluetooth beacon device; 2. Bluetooth module; 3. Wireless signal receiver; 4. Server. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Please see Figure 1 This invention provides a technical solution: a nearest neighbor query system for automatic explanation in exhibition halls, comprising a Bluetooth beacon device 1, a Bluetooth module 2, a wireless signal receiver 3, and a server 4. The positioning and identification system consists of the Bluetooth beacon device 1 and the Bluetooth module 2. The Bluetooth beacon device 1 is deployed at least three times within a 10*10 meter range. Each Bluetooth beacon device 1 is wirelessly controlled by an external wireless signal receiver 3 and the server 4. The wireless signal receiver 3 and the Bluetooth beacon device 1 are imaged in the server 4 using their MAC addresses and corresponding linear coordinates of their positioning points.
[0053] The Bluetooth module 2 and the Bluetooth beacon device 1 are wirelessly positioned and imaged on the server 4 using three-point coordinates.
[0054] In this embodiment, the indoor positioning system also includes an indoor positioning system based on Bluetooth iBeacon technology.
[0055] In this embodiment: the indoor positioning system using Bluetooth iBeacon technology includes a linear coordinate locator installed in server 4, which is configured in coordination with R-Tree-like spatial data indexing logic.
[0056] In this embodiment, the R-Tree spatial data indexing logic is as follows: an object in the R-Tree represents a tuple in the spatial database, and each tuple has a unique identifier (ObjID) for retrieval assistance.
[0057] In this embodiment: the tuple (MBR, ObjID) is further divided into index record entries, where MBR (Minimum Bounding Rectangle) is a minimum bounding rectangle. The size and position of the rectangle are set by the two endpoints on the diagonal. MBR meets the following conditions: it encloses a spatial object and is a minimum bounding rectangle.
[0058] In this embodiment: the rectangle represents the MBR of the spatial target. The MBR is further subdivided into leaf nodes and non-leaf nodes. The non-leaf nodes contain entries in the form of (MBR, Child-pointer). The MBR covers all rectangles in the lower-level node entries. The child-pointer contains the address of the lower-level node in the R-Tree. The corresponding leaf nodes cover the inner barrier objects in the directory rectangle, which can be walls, screens, or unknown obstacles that affect MBR detection. The directory rectangles can overlap.
[0059] The specified MBR coverage method can be used to analyze and calculate obstacles that have unknown impacts on MBR detection.
[0060] In this embodiment: Bluetooth beacon device 2 is a sensor of Bluetooth Low Energy (BLE) iBeacon that can transmit Bluetooth signals, and Bluetooth module 2 is a mobile device that can receive Bluetooth signals.
[0061] The Bluetooth sensors and receivers used provide a flexible selection of Bluetooth communication devices to choose from.
[0062] A method for automatically querying the nearest neighbor of an exhibition hall's guided tour intention includes the following steps:
[0063] S1: Construct an indoor linear coordinate system, deploy Bluetooth beacon device 1 and exhibits, add location information to the cloud database, and use Bluetooth module 2 and Bluetooth beacon device 1 to wirelessly position and image on server 4 through a three-point positioning method.
[0064] Step 1: According to the deployment site, first draw a suitable linear coordinate system in the indoor area using server 4. Personnel need to deploy Bluetooth beacons to suitable locations. However, the deployment location needs to be in accordance with the following: the density of Bluetooth beacon deployment should be controlled within a 10*10 meter range, with no fewer than three beacons deployed. Based on the actual deployment situation, personnel should determine the MAC address of the Bluetooth beacon and its corresponding location coordinates and wirelessly connect it to the coordinate reading structure of the cloud database.
[0065] Step 2: Bluetooth beacon deployment; such as Figure 2 As shown, point A is the origin of the established rectangular coordinate system, points B, C, and D are the deployment positions of the three Bluetooth beacons, points M, N, and P are the display positions of the exhibits, and rectangle EFGH is the exhibition area of the exhibition hall.
[0066] Step 3: The observer's position coordinates within the exhibition hall at a given moment are dynamically captured using Bluetooth ranging and triangulation methods.
[0067] like Figure 3 The principle of three-point positioning can be seen from the diagram. Figure 3 In the diagram, O1, O2, and O3 represent the centers of the three circles, whose positions are determined by the deployed Bluetooth beacons. Point Q represents the position of an observer holding a Bluetooth receiver module (such as a mobile phone) at a certain moment, and its coordinates are determined by the intersection of the three circles.
[0068] According to the distance formula (1), the distance between the observation point Q and the i-th Bluetooth beacon can be calculated, which is the radius R of the circle in the figure. i .
[0069] R i =10 (|RSSI|-A) / 10*n (Formula 1)
[0070] In the above formula: RSSI: refers to the strength value of the Bluetooth beacon electromagnetic signal obtained by the Bluetooth receiver module; "A" is the absolute value of the Bluetooth beacon signal strength at one meter; and "n" is the environmental attenuation factor value.
[0071] Based on the deployment locations of the Bluetooth beacons, the coordinates of the three center points can be determined: O1(x1, y1), O2(x2, y2), and O3(x3, y3). i and radius R i The coordinates of the intersection point Q of the three circles can be calculated using the following formula;
[0072]
[0073] Substituting the data into the equation, we obtain the coordinates of the intersection point Q:
[0074]
[0075] S2: Based on the spatial layout of the exhibits and obstacles, construct a spatial index of exhibits containing obstacles;
[0076] Step 1: The spatial data indexing algorithm of R-Tree is adopted. According to the object representation in R-Tree, a tuple is represented in the spatial database. Then, the set tuple represents an independent and unique identifier (ObjID) used to distinguish and determine the index. Substitute the identifier (ObjID) into the actual use to correspond to an exhibit in the cloud database. Moreover, the index record entry of the leaf node in R-Tree containing the tuple (MBR, ObjID) is used as a minimum bounding rectangle. The child-pointer contains the address of the lower-level node in R-Tree.
[0077] Step 2: The MBR (Minimum Bounding Rectangle) is a minimum bounding rectangle whose size and position are determined by the two endpoints on the diagonal, and is an approximate representation of a spatial object. The MBR satisfies two basic conditions: first, it can enclose the spatial object; second, such a bounding rectangle is the smallest. The entries contained in non-leaf nodes are in the form of (MBR, Child-pointer), where the MBR covers all the rectangles in the lower-level node entries, and the child-pointer contains the addresses of the lower-level nodes in the R-Tree.
[0078] Step 3: The rectangular box represents the MBR of the spatial target, which contains specific spatial objects. The MBR marked with numbers is at the bottom level, which is the leaf node and contains the actual exhibit objects.
[0079] MBR hierarchical organization with barrier objects, such as Figure 4 As shown, R1, R2, ..., R n The directory is represented by a rectangle; double solid lines indicate indoor barrier objects, such as walls, screens, or other obstacles, labeled OL1, OL2, ..., OL. n The root node is R, which contains two child nodes R1 and R2, and one obstacle node OL1; node R1 in turn contains R... 11 and R 12 Two child nodes and one obstacle node OL2; R 11 The child nodes include three leaf nodes (4, 5, and 6) and one obstacle node (OL4); the leaf nodes point to specific spatial objects, that is, the location range of a certain exhibit.
[0080] S3: Combine the intention nearest neighbor query algorithm to find the best matching object.
[0081] The specific algorithm steps for S3 are as follows:
[0082] Input: Object dataset Ds, obstacle set Ls, spectator's position Pt at time t
[0083] Output: Nearest neighbor objects
[0084] 1. Initialize objects such as Que, ActList, and HistList-K (the list of accessed items).
[0085] 2. Establish an R-Tree index T_Idx based on the spatial relationship between the dataset Ds and the obstacle set Ls.
[0086] / / Determine if Pt is an observation point. If the maximum displacement of the most recent n samples does not exceed the threshold ε, it indicates that the viewer is in a stationary state, and the standing point is the observation point; initiate a nearest neighbor query. Otherwise, it indicates that the viewer is in a moving state, and no query needs to be initiated.
[0087] 3. IF Then Q←Pt ELSE Return NULL / / Pi corresponds to the position at time ti*Δt
[0088] 4. Initialize the queue (Que) to contain the tree (T_Idx.Root()) / / Breadth-first traversal of the R-Tree, initially adding the root node (MBR) to the queue (Que).
[0089] 5. While Que! = NULL DO / / Loop through each node of the tree until the queue is empty.
[0090] 6. CurNode←Que.dequeque() / / Retrieves the first node of the queue as the current MBR.
[0091] 7. Calculate the parameters (including visible edge set, invisible edge set, visible region set, and invisible region set) of each child node's MBR after occlusion of the current MBR by the OL obstacle object Q.
[0092] 8. Calculate the PessMinVsDist and OptiMinVsDist distances from Q to the MBR of each child node based on the parameters.
[0093] 9. FOR child IN GetChildren(CurNode)DO
[0094] 10. `Que.enqueque(child)` / / Adds all child nodes of the node at position `CurNode` to the tail of the queue for subsequent traversal.
[0095] 11. END FOR
[0096] 12. END DO
[0097] 13. `ActList.AddItem(T_Idx.Root())` / / Initialize the activity list `ActList` and push the root node `T_Idx` into `ActList`.
[0098] / / Perform a depth-first traversal of each node in the tree until the NN object is found or the traversal is complete.
[0099] 14.While Count(ActList.Items)>0Do
[0100] 15. FOR Item IN ActList DO
[0101] 16. IF PruningByRule(Item) = True THEN / / Call the pruning rule and check each node one by one whether it needs pruning.
[0102] 17. ActList.Remove(Item) / / Removes the object that needs pruning.
[0103] 18.END IF
[0104] 19. END FOR
[0105] 20. SortByOptiMinVsDis(ActList) / / Sorts the pruned list items in ascending order by the distance from OptiMinVsDist.
[0106] 21. HeadItem←GetFirstItem(ActList) / / Get the first element of the list
[0107] 22. IF IsActualObject(HeadItem) = True THEN / / If the first element is a real object
[0108] 23. IF HeadItem IS NOT IN HistList-K THEN / / If the current object is not in the recently viewed list
[0109] 24. HistList-K.ADDITEM(HeadItem) / / Adds the current object to the recently viewed list.
[0110] 25. RETRUN HeadItem; / / Returns the nearest neighbor object to be found.
[0111] 26.END IF
[0112] 27.END IF
[0113] 27. `ActList.Remove(ActList.Remove(Item))` / / Removes the first element of the list.
[0114] 28. `ActList.AddItems(GetChilds(HeadItem))` / / Replaces the first element of the list with its child node objects, searching downwards.
[0115] 29.END DO
[0116] In the above algorithm, the distances OptiMinVsDist and PessMinVsDist are defined as follows:
[0117] OptiMinVsDist distance:
[0118] Given an observation point Q, a minimum spatial boundary rectangle R, and a set of barrier objects O, the projection of a ray emitted from Q onto rectangle R after being occluded by the barrier objects O cuts the inner edge of R (the edge closest to Q) into k visible segments, denoted as e1 = P1P2, e2 = P3P4, ..., e k =P 2k-1 P 2k , where e i (1≤i≤k) represents the visible edge segment, P 2i-1 P i For e i The two endpoints are the intersections of the line formed by point Q and the endpoint of the barrier line with the inner edge of R, or the vertices of the inner edge of R. The OptiMinVsDist distance from Q to R is defined as:
[0119]
[0120] In formula (4), e i Let MinDist(e) be the visible segment on the inner edge of R. i Q) is the distance from point Q to line segment e. i The shortest distance from point Q to all visible segments e1, e2, ..., e is the distance from Q to all visible segments e1, e2, ..., e3. When Q is inside R, the distance is 0; when there are no visible segments, the distance is infinite; otherwise, OptiMinVsDist is the distance from point Q to all visible segments e1, e2, ..., e3. k The minimum distance to MinDist.
[0121] like Figure 6 As shown, MinDist() is a distance calculation function that calculates the shortest distance from a point to a line segment. Point Q to line segment P i P j There are three cases for the shortest distance d, and the calculation method is shown in formula (5):
[0122]
[0123] Distance between PessMinVsDist:
[0124] Given an observation point Q, a minimum spatial boundary rectangle R, and a set of barrier objects O, if all four sides of R are visible (i.e., rays originating from Q are occluded by barrier O and do not fall on rectangle R), denoted as VE. i (1≤i≤4), then the PessMinVsDist distance from Q to R is defined as:
[0125]
[0126] Equation (6) shows that PessMinVsDist is equal to the smallest of the MaxDist distances from Q to the m fully visible edges. Here, MaxDist() is a distance calculation function that calculates the maximum distance from point Q to a specified edge, i.e., it takes the larger distance from the point to the two endpoints of the edge. For example, let edge VE i The coordinates of the two endpoints PiP2 are P1(x1, y1) and P2(x2, y2), respectively, and MaxDist(VE) i Q) is the distance from point Q(x0, y0) to VE. i The maximum distance between the two endpoints P1 and P2 is calculated using the following formula:
[0127]
[0128] In practice, the exhibition layout of a certain exhibition hall is as follows: Figure 4 As shown, the solid-line rectangles numbered 1, 2, ..., 12 are the smallest enclosing rectangles of the exhibits, and the linear obstacles numbered OL1, OL2, OL3, OL4, such as walls, screens, and partitions, are labeled R1, R2, R4, ..., R5. 11 R 12 The dashed boxes represent the intermediate MBRs built according to the R-Tree rule, with the outermost rectangle representing the MBR of the root node. Point Q is the standing position of a visitor at a certain moment; if the visitor has stayed at this point for more than a specified threshold (e.g., 30 seconds), it is marked as an observation point. The main steps of the intention nearest neighbor query algorithm are as follows:
[0129] (1) The spatial relationship between exhibit objects and obstacle objects is established by constructing a tree index T_Idx according to the R-Tree index construction algorithm. Its tree structure is as follows: Figure 5 As shown.
[0130] (2) Using the breadth-first traversal algorithm of the tree, first take the root node R of T_Idx as the current node, expand the child nodes R1, R2 and the obstacle line OL1 of R, draw rays outward from Q, calculate the intersection points of the two rays drawn from the two endpoints of Q and OL1 with each side of R1 and R2, and construct the complete set of visible edges, the set of invisible edges, the set of visible edge segments, the set of visible regions enclosed by visible edges (or dividing rays), and the set of invisible regions enclosed by invisible edges (or dividing rays) based on these intersection points and the vertices of the rectangle.
[0131] like Figure 7As shown, R1 and Q are both above OL1. Rays emitted from Q towards R1 will not be blocked by OL1. The entire region of R1 is visible, and all four of its edges are visible. The shortest distance from Q to the inner edge of R1 is QM, so OptiMinVsDist(Q, R1) = ||QM||. The bottom edge of R1 is the edge closest to Q among the four edges, and the MaxDist distance from the bottom edge to Q is ||QN||. Therefore, PessMinVsDist(Q, R1) = ||QN||. R2 and Q are located on the top and bottom sides of OL1, respectively. Rays emitted from Q towards R2 will be blocked by OL1. Rays QA and QA' emanating from Q divide R2 into a set of visible regions (the empty regions of R2 {(V1, P1, P2), (P4, V4, P3)}) and a set of invisible regions (the shaded areas of R2) {(P1, P2, V2, V3, P3, P4)}. QP4 is the closest point from Q to the visible region of R2. OptiMinVsDist(Q, R2) = ||QP4||, as shown below. Figure 6 The dotted line is shown.
[0132] (3) Traverse the second level of tree T_Idx, taking R1 and R2 as the current nodes, and examine the visible state parameters of each child object under the combined action of the current level obstacle lines OL2, OL4 and the parent node obstacle line. Based on these parameters, calculate the PessMinVsDist and OptiMinVsDist distances from the child node objects to Q. The specific process is as follows:
[0133] Using R1 as the current node, expand the child nodes R1. 11 R 12 And the obstacle line OL2 at node R1. Starting from Q, R 11 R 12 Visibility after obstruction, such as Figure 8 As shown in the diagram, the blank areas are the visible areas, and the shaded areas are the invisible areas. 11 Not obscured by OL2, all four edges are fully visible. From Q to R 11 The shortest distance between the inner edges is QM, and OptiMinVsDist(Q, R) 11 )=||QM||,R 11 The bottom edge is the edge closest to Q among the four edges, and the MaxDist distance from the bottom edge to Q is ||QN||, PessMinVsDist(Q, R) 11 )=||QN||。 R 12 Part of the region is obscured by OL2. Two rays, QB and QB', emanating from the two endpoints Q and OL2, will obstruct R. 12 Divide into a visible region set (the blank area of R2: a polygon composed of (V1, V2, P1, P4)) and a non-visible region set (R 12The shaded area is a polygon composed of (P1, V3, P2). QV2 is the closest point in the visible region from Q to R2, therefore OptiMinVsDist(Q, R) 12 ) = ||QV2||, such as Figure 8 The dotted line is shown.
[0134] Using R2 as the current node, expand the child nodes R of R2. 21 R 22 And the obstacle line OL4 at node R2. Starting from Q, R 21 Completely occluded by OL4, all four of its edges are invisible. By definition, OptiMinVsDist(Q, R) 21 R = +∞. 22 Not obscured by OL4, but R 22 A portion of the region falls within the non-visible region of the parent node R2, i.e., inside the polygon R2(P1,P2,V2,V3,P3,P4). The portion of R2 falling within this polygon is used to construct a new non-visible region set (V1,V2,P1,P2), and the portion not falling within it is used to construct a new visible region set (P2,P1,V3,V4). OptiMinVsDist(Q,R) 22 = ||QP2||.
[0135] (4) Figure 9 As shown, the third level of tree T_Idx is traversed according to the aforementioned method, and R is taken respectively. 11 R 12 R 21 R 22 As the current node, examine the visible state parameters of each child object under the combined influence of the current layer obstacle line and the parent node obstacle line. Based on these parameters, calculate the PessMinVsDist and OptiMinVsDist distances from leaf nodes 1, 2, 3, ..., 12 to Q.
[0136] (5) Starting from the root node R, perform a depth-first traversal of the R-Tree. Each time, select the first element of the activity list ActList, expand its child nodes, and then prune according to the pruning strategy. Sort the nodes in ascending order based on the distance OptiMinVsDist. Repeat the above steps until a leaf node object appears after the first element of the activity list ActList has been pruned and sorted.
[0137] The pruning strategy is as follows:
[0138] Pruning Strategy 1: For a given query point Q, if the number of invisible edges of MBR R is 4, that is, R is completely occluded for Q, then discard R and its child nodes, such as... Figure 10 As shown.
[0139] Pruning Strategy 2: For a given query node Q, if MBRR1 and R2 satisfy OptiMinVsDist(Q, R1) > PessMinVsDist(Q, R2) and R2 has 4 fully visible edges, then discard R1 and its child nodes, such as... Figure 11 As shown.
[0140] Pruning Strategy 3: For a given query point Q, if there exists an MBR R1 and a real object Obj, and the real distance from Q to Obj, ActualDist(Q, Obj) > PessMinVsDist(Q, R2), and R2 has 4 fully visible edges, then discard Obj. Figure 12 As shown.
[0141] Pruning Strategy 4: For a given query point Q, if MBRR1 and the actual object Obj exist, and OptiMinVsDist(Q, R1) > ActualDist(Q, Obj), then discard R1 and its child nodes. Figure 13 As shown.
[0142] Pruning Strategy 5: For a given query point Q, if the visible area of the real object Obj relative to Q is less than a given threshold (e.g., 50%), it indicates that the current object is not the viewer's intended object, and therefore the spatial object Obj is discarded. Figure 14 As shown.
[0143] (6) Check whether the leaf node object of the first element of ActList appears in the recently viewed list HistList-K. If it appears, it means that the visitor has recently viewed this exhibit. Remove the first element from the ActList and continue the depth-first traversal to find the next closest target. Otherwise, it means that the exhibit has not been visited recently. Return the first element object of the ActList and add it to the HistList-K list.
[0144] like Figure 15 As shown, after six steps of exploration, pruning, and sorting, the final target object 9 is the nearest neighbor object found. From Figure 15 As can be seen, although object 7 is closer to object 9, it is obscured by an obstacle and cannot be seen by the viewer, so it is not the object the viewer intends to see.
[0145] The contents not described in detail in this specification are existing technologies known to those skilled in the art.
[0146] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for querying the nearest neighbor of intent for automatic guided tours in exhibition halls, characterized in that, The following steps are included: S1: Construct an indoor linear coordinate system, deploy Bluetooth beacon devices (1) and exhibits, add location information to the cloud database, and use Bluetooth module (2) and Bluetooth beacon devices (1) to wirelessly position and image on the server (4) through a three-point positioning method; S2: Based on the spatial layout of the exhibit objects and obstacle objects, construct a spatial index of exhibit objects with obstacle objects; the spatial index of exhibit objects with obstacle objects adopts an R-Tree structure, where objects are represented as tuples (minimum bounding rectangle MBR, object identifier ObjID), and the entries contained in non-leaf nodes are in the form of (minimum bounding rectangle MBR, leaf node address Child-pointer), and leaf nodes contain actual exhibit objects; the index of the R-Tree structure also contains obstacle objects as barrier objects. S3: Combine the intention nearest neighbor query algorithm to find the best matching object; The intention nearest neighbor query algorithm in S3 specifically includes the following steps: Given an object dataset Ds, an obstacle set Ls, and the position of the spectator at time t Pt, output the nearest neighbor object. Initialize the queue Que, the activity list ActList, and the history access list HistList-K; An R-Tree index T_Idx is established based on the spatial relationship between the dataset Ds and the obstacle set Ls; Determine if the observer is in a stationary observation state: If the maximum displacement of the most recent n samples does not exceed the threshold ε, then determine the current standing point as the observation point Q and start the nearest neighbor query; otherwise, return empty and do not need to start the query. The initial queue Que contains the root node of tree T_Idx, and the R-Tree is traversed in breadth-first order. Traverse the queue Que, remove the current node CurNode each time, and calculate the set of visible edges, the set of invisible edges, the set of visible regions, and the set of invisible regions of the minimum bounding rectangle (MBR) corresponding to the node after it is occluded by the obstacle object OL, from the observation point Q to the minimum bounding rectangle (MBR) of each child node. Based on the above parameters, calculate the PessMinVsDist distance and OptiMinVsDist distance from the observation point Q to the minimum bounding rectangle (MBR) of each child node; where: The OptiMinVsDist distance is defined as the shortest distance from the observation point Q to the visible segment on the inner edge of the minimum bounding rectangle MBR when occluded by obstacles; if there is no visible segment, the distance is infinite. The distance between PessMinVsDist is defined as: The minimum value of the farthest distance from observation point Q to the fully visible edge of the minimum bounding rectangle MBR; Add all child nodes of the current node CurNode to the queue Que and continue traversal; Initialize the activity list ActList, push the root node into ActList, and use depth-first traversal of the R-Tree; Iterate through each node in the activity list ActList and apply pruning strategies to determine whether the node needs to be removed. Sort the pruned activity list ActList in ascending order by the distance from OptiMinVsDist; Get the first element (HeadItem) of the list: If the first element HeadItem of the list is a real object and does not appear in the history list HistList-K, then add it to the history list HistList-K and return the object as the nearest neighbor object; Otherwise, remove the first element of the list, add its child nodes to the activity list ActList, and continue the depth-first traversal.
2. The method for querying the nearest neighbor of intent for automatic interpretation in exhibition halls according to claim 1, characterized in that: The specific steps of S1 are as follows: Step 1: According to the deployment site, first draw a suitable linear coordinate system indoors using a server (4). Personnel need to deploy the Bluetooth beacons to the appropriate locations, but this deployment location needs to be based on: the density of Bluetooth beacon deployment should be controlled at 10. At least three Bluetooth beacons should be deployed within a 10-meter range. Personnel should determine the MAC address and corresponding location coordinates of the Bluetooth beacons and wirelessly connect them to the coordinate reading structure of the cloud database based on the actual deployment situation. Step 2: Bluetooth beacon deployment; Step 3: The observer's position coordinates within the exhibition hall at a given moment are dynamically captured using Bluetooth ranging and triangulation methods.
3. The method for querying the nearest neighbor of intent for automatic interpretation in exhibition halls according to claim 1, characterized in that: The pruning strategy includes at least one of the following: If the minimum bounding rectangle (MBR) has 4 invisible edges, then discard the minimum bounding rectangle (MBR) and its child nodes. If the minimum bounding rectangle (MBR) satisfies OptiMinVsDist > PessMinVsDist and has 4 fully visible edges, then discard the minimum bounding rectangle (MBR) and its child nodes. If the actual distance from the real object Obj to the observation point Q is greater than the PessMinVsDist of a minimum bounding rectangle MBR and the minimum bounding rectangle MBR has 4 fully visible edges, then the real object Obj is discarded. If OptiMinVsDist (observation point Q, minimum bounding rectangle MBR) is greater than the actual distance ActualDist (observation point Q, actual object Obj), then discard the minimum bounding rectangle MBR and its child nodes. If the visible area of the real object Obj relative to the observation point Q is less than a set threshold, then the real object Obj is discarded.
Citation Information
Patent Citations
Intelligent terminal for indoor positioning and bluetooth indoor positioning system
CN105338489A
Data communication method, Bluetooth beacon repeater and Bluetooth positioning system
CN108289294A