An indoor positioning method and system fusing WiFi fingerprints and spatial information
By fusing WiFi fingerprints and spatial information to construct WISP features, the problem of low positioning accuracy of WiFi positioning methods in indoor environments is solved, achieving higher-precision indoor positioning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN UNIV
- Filing Date
- 2023-02-22
- Publication Date
- 2026-04-28
AI Technical Summary
Existing WiFi fingerprint positioning methods are easily affected by multipath effects, signal obstruction, and signal instability in indoor environments, resulting in low positioning accuracy and ignoring spatial information of the scene.
By fusing WiFi fingerprints and spatial information, WISP features are constructed. By introducing turning features and optimizing WiFi features, WISP features containing spatial features are generated. Spatial landmarks are used to provide more constraints. Combined with adaptive neighborhood space and bag-of-words tree optimization, positioning accuracy is improved.
It effectively reduces the perceptual confusion caused by WiFi signals, improves indoor positioning accuracy, and enhances the robustness and precision of the positioning method.
Smart Images

Figure CN116193359B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of indoor positioning technology, specifically relating to an indoor positioning method and system that integrates WiFi fingerprint and spatial information. Background Technology
[0002] With the continuous development of location-based service technologies, the demand for positioning technology is increasing. Satellite positioning technology can be widely used for positioning in outdoor environments; however, due to the weak penetration of satellite signals through buildings, its application in indoor environments faces many limitations. Therefore, there is an urgent need to further research reliable indoor positioning technologies. Among commonly used indoor positioning technologies, WiFi-based indoor positioning technology has advantages such as wide coverage, low deployment cost, ease of installation, and non-line-of-sight propagation, thus exhibiting superior universality. With the widespread adoption of smartphones and the development of miniature sensors, high-precision and stable indoor positioning of mobile devices remains a pressing problem to be solved.
[0003] In complex indoor environments, the positioning accuracy of WiFi-based technology is constantly affected by various factors such as multipath effects, signal obstruction, weak signals, and signal instability. Existing WiFi fingerprint positioning based on RSS signals is prone to perceptual confusion, meaning that fingerprints from different locations can be similar. Spatial perceptual confusion is considered the root cause of large positioning errors. Existing WiFi positioning methods typically ignore spatial information of the scene, such as corners and straight corridors. These naturally existing spatial landmarks can provide more spatial constraints for WiFi positioning and avoid large-scale positioning errors. Summary of the Invention
[0004] This invention addresses the problem of low positioning accuracy caused by perceptual confusion of WiFi signals in existing large-scale indoor positioning methods based on WiFi fingerprints. It provides an indoor positioning method and system that integrates WiFi fingerprints and spatial information. The technical solution of this invention introduces turning features and incorporates WiFi features to construct a new WISP feature. This constructed WISP feature includes both WiFi and spatial features, solving the problem of existing WiFi positioning methods ignoring spatial information of the scene. Utilizing existing spatial landmarks provides more spatial constraints for WiFi positioning, thereby improving positioning accuracy and reducing the degree of influence from perceptual confusion of WiFi signals.
[0005] On the one hand, the present invention provides an indoor positioning method that integrates WiFi fingerprint and spatial information, which includes the following steps:
[0006] Step 1: Offline fingerprint map construction: Divide the indoor positioning area into grids and use each grid point as a reference point. Collect WiFi signals at each reference point and generate WISP features to construct a fingerprint map that includes the WISP features of each reference point.
[0007] The WISP feature is generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding based on whether the reference point is located in a straight corridor or at a corner.
[0008] Step 2: Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, perform online positioning using similarity as the positioning index.
[0009] Further optionally, the WiFi feature is obtained by concatenating the WiFi fingerprint vector of the reference point and the WiFi fingerprint vector of the neighborhood space, and is represented as:
[0010] F i =(f(l query_i ),f(l train_1 ),f(l train_2 ),...,f(l train_M ))
[0011] Among them, F i For the WiFi characteristics of reference point i, f(l) query_i f(l) is the WiFi fingerprint vector of reference point i. train_1 ),f(l train_2 ),f(l train_M ) are the WiFi fingerprint vectors of the 1st, 2nd, and Mth reference points in the neighborhood space of reference point i, where M is the number of reference points in the adaptively selected neighborhood space;
[0012] The radius of the adaptively selected neighborhood space is determined according to the following process:
[0013] Calculate the difference measure between a reference point and its neighboring reference points using WiFi fingerprint vectors;
[0014] If the difference metric is less than or equal to a set threshold D thres The radius of the neighborhood space is multiplied, and the difference metric corresponding to the expanded neighborhood space is recalculated. This process is repeated iteratively until the difference metric exceeds the set threshold D. thres Then output the radius of the neighborhood space, where the output radius of the neighborhood space is r = αL, and α is the iteration step size;
[0015] The initial value of the radius of the neighborhood space is the distance L between two adjacent reference points set during grid division.
[0016] Existing WiFi positioning methods typically select RSS (WiFi signal strength) as the WiFi feature or WiFi fingerprint vector. This invention optimizes this approach, reducing spatial ambiguity of WiFi signals by employing contextual awareness of RSS values to enhance WiFi fingerprint representation. Specifically, the spatial relationships between RSS values of the same access point (AP) at multiple adjacent locations are often more robust than individual RSS values from a single location. Furthermore, this invention uses an adaptively selected neighborhood radius to obtain a more effective neighborhood space, improving the effectiveness and accuracy of feature representation.
[0017] Further optionally, the WiFi fingerprint vector is a binary vector generated based on the signal sorting sequence number, that is, the WiFi signals of all transmitters in the positioning area received by the reference point are sorted from weakest to strongest, and the sorting sequence numbers are converted into binary codes and then concatenated into a binary vector.
[0018] The technical solution of this invention utilizes binary encoding with sorted serial numbers to effectively solve the device heterogeneity problem in WiFi fingerprint positioning methods. That is, different devices have different signal strength perception capabilities at the same location. For example, an Apple phone may receive signal strength values of -65dBm and -40dBm from two APs at point a, while a Huawei phone may receive signal strength values of -60dBm and -35dBm from the same two APs at point a. However, although the perceived signal strength values of different devices are different, their signal strength sorting is the same. Therefore, this invention makes full use of sorting features to improve the expression accuracy of WiFi fingerprint vectors, and is no longer limited to RSS features alone.
[0019] Further optionally, the fingerprint map constructed offline has a related bag-of-words tree. The construction process of the bag-of-words tree is as follows: the DBSCAN clustering algorithm is used to cluster the WISP features of all reference points in the offline process, and each cluster is regarded as a cluster location fingerprint; each cluster location fingerprint is regarded as a leaf node of the bag-of-words tree, and the TF-IDF weight value of each leaf node is calculated.
[0020] It should be understood that clustering can avoid redundancy in bag-of-words training and ensure spatial diversity.
[0021] Further, optionally, the process of using the WISP features of the current location and the fingerprint map, and employing similarity as a positioning indicator for online positioning in step 2, is as follows:
[0022] Using the WISP features of the current position and the WISP features of the leaf nodes of the bag-of-words tree corresponding to the clusters, calculate the similarity between the WISP features of the current position and the WISP features of each leaf node;
[0023] Then calculate the product of the similarity and the TF-IDF weight value of the corresponding leaf node, and select the WISP feature of the cluster corresponding to the leaf node with the largest product value;
[0024] Finally, the final localization result is obtained based on the selected WISP features and their positions on the fingerprint map.
[0025] Further, optionally, when using the DBSCAN clustering algorithm to cluster the WISP features of all reference points, a variable window clustering neighborhood radius is used;
[0026] The clustering neighborhood radius is determined according to the following process:
[0027] For the reference point RO, its coordinate information is represented as p = (ro lat ,ro long Correspondingly, the set of location points in the fingerprint map is represented as p. all ={p1,p2,...,p n}, then the kernel density estimate at that reference point is expressed as
[0028]
[0029] Where K(·) represents the kernel function, h is the bandwidth of the kernel, and n is the number of points in the space;
[0030] The variable window scale value var(RO) corresponding to the reference point RO is expressed as:
[0031]
[0032] Then the clustering neighborhood radius r of the variable window is var(RO)ε, where ε is the set threshold for the clustering neighborhood radius.
[0033] The technical solution of this invention improves the clustering efficiency by setting the clustering neighborhood radius of a variable window, which is a significant improvement over a fixed clustering neighborhood radius.
[0034] Further, optionally, during the online positioning phase, when generating the WISP features of the current location, the process for determining whether the current location is on a straight corridor or at a corner is as follows:
[0035] Angular velocity is collected using an inertial measurement unit.
[0036] The peak detection algorithm is used, and the angular velocity change is detected based on the sliding window to determine whether to go straight or turn.
[0037] The maximum absolute value of angular velocity G amax The definition of G is: amax =max(|max(G) a )|,|min(G a )|)
[0038] If G amax <g ath If the current position is on a straight path, then proceed straight ahead, assuming the current location is within a straight corridor; otherwise, turn. ath g dth These are the set judgment threshold and detection threshold, respectively, g ath For the set judgment threshold, w start w end These represent the start and stop times of the sliding window, respectively. The size of the sliding window is the same as the WiFi scanning time interval, and the timestamp of the current WiFi signal scan is the center of the sliding window.
[0039] If it's a turn, then determine whether it's a left / right turn or a U-turn:
[0040] Define intermediate parameter G adif :G adif =||max(G a )|-|min(G a )||
[0041] If G adif <g dth If the value is left or right, it means the current position is at a corner; otherwise, it means a U-turn, using a straight corridor encoding method.
[0042] Secondly, the present invention provides a system based on the indoor positioning method, which includes: a fingerprint map construction module and an online positioning module.
[0043] The fingerprint map construction module is used to build fingerprint maps offline: the indoor positioning area is divided into grids and each grid point is used as a reference point. WiFi signals are collected at each reference point and WISP features are generated, thereby constructing a fingerprint map that includes the WISP features of each reference point; wherein, the WISP features are generated by fusing WiFi features and spatial features, and the spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0044] The online positioning module is used for online positioning based on the fingerprint map: it receives WiFi signals online and generates WISP features of the current location, and then uses the WISP features of the current location and the fingerprint map to perform online positioning using similarity as a positioning index.
[0045] In three aspects, the present invention provides an electronic terminal, which includes: at least one or more processors; and a memory storing one or more computer programs.
[0046] The processor calls the computer program to implement:
[0047] Obtain a pre-built offline fingerprint map or build a fingerprint map offline:
[0048] The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point serves as a reference point. WISP features are then generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0049] Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, online positioning is performed using similarity as a positioning indicator.
[0050] In four aspects, the present invention provides a computer-readable storage medium storing one or more computer programs, which are invoked by a processor to implement:
[0051] Obtain a pre-built offline fingerprint map or build a fingerprint map offline:
[0052] The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point serves as a reference point. WISP features are then generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0053] Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, online positioning is performed using similarity as a positioning indicator.
[0054] Beneficial effects
[0055] 1. The indoor positioning method provided by this invention optimizes the RSS features commonly used in previous positioning methods by fusing WiFi features and spatial features to generate WISP features. The generated WISP features include both the relevant characteristics of the WiFi signal and the spatial characteristics of the location. Specifically, it selects locations such as straight corridors or corners for classification and encoding to generate spatial features. This allows the constructed WISP features to utilize existing spatial landmarks to provide more spatial constraints for WiFi positioning, thereby improving positioning accuracy and reducing the degree of perception confusion caused by WiFi signals.
[0056] 2. In a further preferred embodiment of the present invention, the WiFi features in the WISP features are also optimized. On the one hand, binary encoding using sorting numbers is used to address the device heterogeneity problem in the WiFi fingerprint positioning method, improving the expression accuracy of the WiFi fingerprint vector. On the other hand, to reduce the spatial ambiguity of WiFi signals, contextual awareness of RSS values is used to enhance the WiFi fingerprint representation, especially by employing an adaptively selected radius of the neighborhood space. Therefore, the improved WiFi features of the present invention are more closely aligned with the characteristics of indoor positioning environments, thereby improving indoor positioning accuracy.
[0057] 3. In a further preferred embodiment of the present invention, a bag-of-words tree corresponding to the fingerprint map is constructed. The bag-of-words tree is used to represent the correlation of WISP features between different reference points, thereby guiding the correlation calculation during online positioning and improving indoor positioning accuracy. Furthermore, in the process of constructing the bag-of-words tree, a variable window clustering neighborhood radius is preferred, improving upon the fixed clustering neighborhood radius, which can significantly improve clustering efficiency. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating an indoor positioning method that integrates WiFi fingerprint and spatial information provided by the present invention.
[0059] Figure 2 This is a schematic diagram of a straight corridor and a corner in an interior space, where (a) is a straight corridor and (b) is a corner;
[0060] Figure 3 This is a schematic diagram of WISP feature splicing;
[0061] Figure 4 This is a schematic diagram of using a decision tree to detect turns. Detailed Implementation
[0062] This invention provides an indoor positioning method that integrates WiFi fingerprints and spatial information for indoor positioning, effectively reducing the perceptual confusion caused by WiFi signals and improving positioning accuracy. Firstly, this positioning method improves existing WiFi features by proposing a WISP feature that integrates spatial features. This utilizes existing spatial landmarks to provide more spatial constraints for WiFi positioning, thereby improving positioning accuracy. Secondly, this positioning method further optimizes the online positioning matching process by constructing a fingerprint map that matches a bag-of-words tree. This will be described in detail below, and the invention will be further illustrated with examples.
[0063] Example 1:
[0064] This embodiment provides an indoor positioning method that integrates WiFi fingerprint and spatial information, including the following steps:
[0065] Step 1: Build the fingerprint map offline.
[0066] 1. First, divide the indoor positioning area into a grid. Each grid point serves as a reference point, and the coordinates of each reference point are recorded. The distance between two adjacent reference points is set to L meters. It should be noted that the distance between local reference points may be adjusted depending on the specific spatial layout and obstacle locations. For example, if a reference point after grid division happens to fall on an obstacle, the corresponding grid size should be adjusted appropriately based on the obstacle's position so that the reference point is not on the obstacle.
[0067] It should be understood that the grid size is determined based on the area of the indoor positioning region and the required positioning accuracy, for example, in a 1000m area. 2 In a given space, if the grid unit is 1m, the positioning accuracy can only be at the meter level.
[0068] 2. Collect WiFi signals and generate WiFi fingerprint vectors for reference points.
[0069] Each reference point is traversed, and WiFi signals are collected at each reference point. Existing indoor positioning methods based on WiFi signals typically select RSS values as feature values. However, this embodiment considers that due to differences in WiFi chip and antenna types, even at the same location, the detected WiFi signal strength (RSS value) will vary. Furthermore, to address the device heterogeneity problem of WiFi fingerprint-based positioning methods—that is, different devices have different signal strength perception capabilities at the same location—this embodiment proposes a ranking-based WiFi feature approach. Although different devices perceive different signal strength magnitudes, their signal strength ranking is the same. Assuming at reference point RP... i Received from k WiFi transmitter APs kWiFi signals (k = 1, 2, 3…) are collected. The signal strengths are sorted from weakest to strongest, and the sorting numbers are converted into binary codes. The binary bits of undetected AP signal strengths are all set to 0. Table 1 below is an example. There are 4 APs in the space. At a certain reference point, all collected WiFi signals are sorted from weakest to strongest, and the sorting numbers are converted into binary vectors. Finally, the sorted signal WiFi fingerprint vector f(l) for that reference point is obtained. query_i The value is 010011100001.
[0070] Table 1
[0071]
[0072]
[0073] 3. Fuse the WiFi fingerprint vectors of reference points in the adaptive neighborhood space to generate WiFi features.
[0074] To reduce spatial ambiguity of WiFi signals, context-aware RSS values are employed to enhance WiFi fingerprint representation. Specifically, the spatial relationships between the RSS values of the same AP at multiple adjacent locations are often more robust than individual RSS values from a single location. Based on this, this embodiment proposes WiFi features based on adaptive spatial domain context for fingerprint recognition, which describes the distribution of RSS signal strength among a set of selected neighboring locations. As a spatially relative form, it can better mitigate fingerprint ambiguity caused by multipath fading. For example, if an AP adjusts its transmit power, the RSS values observed at several selected neighboring locations will undergo the same or similar changes, thus keeping the WiFi features of the corresponding spatial domain context less affected or unaffected. Specifically:
[0075] 1) Calculate the difference measure D(l) between a reference point and its neighboring reference points using WiFi fingerprint vectors. query_i ,l train_ij ).
[0076]
[0077] Where, f(l) query_i f(l) is the WiFi fingerprint vector of reference point i. train_i ) represents the WiFi fingerprint vector of other reference points in the adjacent grid, and M represents the number of reference points in the neighborhood space.
[0078] 2) Determine the radius of the neighborhood space.
[0079] Initially, M=4 indicates that there are four neighboring reference points. The difference measure D(l) is calculated. query_i ,ltrain_ij After that, compare it with the set threshold D. thres Comparison. If D(l) query_i ,l train_ij )>D thres If the spatial neighborhood radius is L, then the search radius is increased to 2L, and the difference measure D(l) between the reference point and its 16 neighboring reference points is calculated again. query_i ,l train_ij The search range is iterated by expanding exponentially in this process until D(l) is reached. query_i ,l train_ij ) < D thres This yields the final spatial neighborhood radius r = αL, where α is the iteration step size. A threshold D is set. thres It's usually based on experience points.
[0080] Then, the WiFi fingerprint vector of the reference point and the WiFi fingerprint vector of the neighborhood space are concatenated to obtain the WiFi feature.
[0081] 4. Construct spatial features.
[0082] Spatial features in indoor scenes typically include various landmarks such as turns, corridors, and staircases, with turns being the most common indoor landmark in existing indoor infrastructure. To enrich fingerprint information and improve positioning accuracy, spatial features are added to WiFi features. First, the location area is divided into different zones based on its spatial features. Common indoor environments mainly have two types of spatial features, such as... Figure 2 The straight corridors and corners are shown.
[0083] The spatial features of reference points on straight corridors are encoded as all 0s, and the spatial features of reference points at corners are encoded as all 1s, with the number of binary bits matching the number of binary bits used to sort the WiFi signal strength.
[0084]
[0085] 5. Integrate WiFi features and spatial features to generate WISP features.
[0086] The WiFi features and spatial features of the reference point are fused, that is, each WiFi feature vector is concatenated with its corresponding spatial feature vector to generate WISP features, such as... Figure 3 As shown. Based on the WISP features of all reference points, a WISP feature map of the entire indoor positioning area is obtained (a fingerprint map composed of the WISP features and locations of all reference points).
[0087] For example, if the spatial neighborhood features of a point are 110,110,001,111 and the turning feature is 111, then the WISP feature of that point is 110110001111111.
[0088] It should be noted that in this embodiment, the WISP features are preferably constructed according to the methods described in 1-5 above. This approach introduces spatial features and optimizes the WiFi features, moving away from solely selecting RSS features. In other feasible embodiments, spatial features must at least be incorporated into the WISP features. As for the WiFi fingerprint vector and the WiFi fingerprint vector of the neighborhood space in the WiFi features, WiFi fingerprints obtained through other existing methods can be selected, or a neighborhood space with a fixed radius can be chosen.
[0089] 6. Construct the bag-of-words tree corresponding to the fingerprint map.
[0090] First, to avoid redundancy in ChowLiu training, this embodiment uses the DBSCAN algorithm to cluster the spatial locations of the input WISP features, ensuring spatial diversity.
[0091] It should be noted that this embodiment of the invention utilizes the DBSCAN algorithm to cluster WISP features in the fingerprint map, thereby dividing the obtained WISP feature vectors into several major categories. Furthermore, this embodiment optimizes the traditional DBSCAN algorithm by proposing a method for determining the variable window clustering neighborhood radius. Compared to a fixed clustering neighborhood radius, determining the neighborhood range of a location point using a variable window clustering neighborhood radius can significantly improve clustering efficiency. Specifically:
[0092] For the reference point RO, its coordinate information is represented as p = (ro lat ,ro long ), ro lat ,ro long This represents the coordinates of the reference point RO in the coordinate system. Correspondingly, the set of location points within the fingerprint map is represented as p. all ={p1,p2,...,p n}, then the kernel density estimate at that reference point Represented as:
[0093]
[0094] Where K(·) represents the kernel function, h is the bandwidth of the kernel, and n is the number of points in the space.
[0095] This embodiment uses the squared exponential covariance as the kernel function, which can be expressed by the following formula:
[0096]
[0097] in, S represents the variance factor, and l represents the length dimension parameter. i ,S jAll are defined input values.
[0098] When calculating the variable window scale corresponding to the reference point RO, the kernel density value of the points in the region where RO is located is expressed as: The variable window scale value var(RO) corresponding to RO is expressed as:
[0099]
[0100] Then the variable window clustering radius r = var(RO)ε.
[0101] After clustering, each cluster is considered a leaf node of a Chow Liu tree, or a cluster location fingerprint. This invention uses the Chow Liu tree to determine the correlation between WISP features of different reference points. TF-IDF weights are assigned to the leaf nodes:
[0102]
[0103] Among them, the number of words n in a certain leaf node is counted. id Compared to the total number of words n in the fingerprint database d The proportion of N is used as the TF part. The number N of a certain leaf node in the fingerprint database is counted. i The proportion relative to the total number of leaf nodes N is used as the IDF component. The combined value of the two is the TF-IDF weight value; the higher the value, the greater the discriminative power. Generally, one RSS value represents one word, therefore WISP features consist of multiple words.
[0104] Step 2: Online Positioning. The system receives WiFi signals online and generates WISP features for the current location. Then, using these WISP features and the fingerprint map, similarity is used as the positioning metric for online positioning.
[0105] In this embodiment, the mobile device is equipped with a WiFi signal receiver and an IMU (inertial measurement unit including accelerometer and gyroscope). The WiFi sorting signal fingerprint vector generation is consistent with the offline map construction stage, except that spatial features are extracted through IMU data.
[0106] 1. Corner Feature Detection
[0107] During the online positioning phase, two common pedestrian movement patterns are associated with corresponding spatial features: one is walking straight in a stable direction, and the other is turning left or right within short periods. Built-in motion sensors in smartphones (such as accelerometers and gyroscopes) can detect these activities, retrieving specific signal patterns to determine device movement and direction. Turning is detected using a decision tree, such as... Figure 4 As shown.
[0108] First, a peak detection algorithm is used to detect angular velocity changes in gyroscope data based on a sliding window. The judgment determines the local maximum or minimum value to distinguish between straight-ahead and turning directions, and the maximum value of the absolute value of the angular velocity G. amax The definition is as follows:
[0109] G amax =max(|max(G) a )|,|min(G a )|)
[0110] Set the judgment threshold g ath If G amax <g ath If the current position is on a straight corridor, proceed straight; otherwise, turn.
[0111] w start w end These represent the start and stop times of the sliding window, respectively. The size of the sliding window is defined to be the same as the WiFi scanning time interval, and the timestamp of the current WiFi signal scan is the center of the sliding window.
[0112] Set the detection threshold g dth Furthermore, based on the angle change, it is determined whether it is a left / right turn or a U-turn, and an intermediate parameter G is defined. adif :
[0113] G adif =||max(G a )|-|min(G a )||
[0114] If G exists adif <g dth If the symbol indicates a left / right turn, otherwise it indicates a U-turn. The specific codes are as follows:
[0115]
[0116] It should be understood that, based on the above method, the spatial state can be detected in real time during the online positioning phase, thereby encoding spatial features. Furthermore, during the WiFi feature generation process in the online positioning phase, the WiFi fingerprint vectors of other locations within the neighborhood of the current location are determined by similar RSS sorted vectors from an offline fingerprint database (used for offline fingerprint map construction).
[0117] Calculate the currently collected RSS sorting vector f(l) loc_i ) and the RSS sorting vector f(l) in the offline fingerprint database query_i The similarity s of )
[0118]
[0119] Where LCS represents the length of the longest common subsequence of the vector, and len is the length of the RSS sorted vector f(l loc_i The vector length; here, the RSS sorted vector is the WiFi fingerprint vector mentioned earlier. Then, the top M vectors with the highest similarity are selected to form the reference point fingerprint vector within this neighborhood space.
[0120] It should be noted that, for the current position, the value of M can be determined by referring to the RSS sorting vector with the highest similarity in the offline fingerprint database; or it can be determined by referring to the local RSS sorting vector with the highest similarity in the offline fingerprint database. The present invention does not impose specific restrictions on this, but its length should ensure the feasibility of calculation. If there is a need for padding, the missing digits should be padded according to the encoding rules.
[0121] Similarly, when constructing WISP features, whether from an offline fingerprint database or the WISP features corresponding to the current location, the length should ensure computational feasibility. If padding is required, padding should be applied to the less significant digits according to the encoding rules. It should be understood that, referring to the offline stage, the WISP features of the current location can be obtained in the online positioning stage.
[0122] Online localization based on fingerprint similarity:
[0123] In this embodiment, the WISP feature v of the current position is calculated first. loc Compared with the WISP features of each major class in the bag-of-words tree during the offline stage. query_i The similarity p(v) between loc ,v query_i The specific formula is as follows:
[0124]
[0125] The higher the similarity between the WISP feature vector on the front and the reference point vector in the fingerprint map, the greater the probability that the mobile device is located at the corresponding reference point.
[0126] The similarity is multiplied by the corresponding TF-IDF weight, and the cluster with the largest product value is selected. Finally, the location corresponding to the cluster feature is used as the localization location. However, when obtaining the localization location based on the location corresponding to the cluster feature, it is not limited to using the center point or other methods to determine the final location.
[0127] It should be understood that this embodiment is a preferred implementation of the technical solution of the present invention. In other feasible embodiments, based on the proposed improved WISP features, after constructing a fingerprint map containing the WISP features of each reference point, online positioning can also be achieved according to the similarity principle, but the accuracy is inferior to that of this embodiment. Therefore, this embodiment is the best embodiment of the present invention, but not the only implementation.
[0128] Example 2:
[0129] This embodiment provides a system based on the indoor positioning method, which includes: a fingerprint map construction module and an online positioning module.
[0130] The fingerprint map construction module is used to build fingerprint maps offline: the indoor positioning area is divided into grids and each grid point is used as a reference point. WiFi signals are collected at each reference point and WISP features are generated, thereby constructing a fingerprint map that includes the WISP features of each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0131] The online positioning module is used for online positioning based on the fingerprint map: it receives WiFi signals online and generates WISP features of the current location, and then uses the WISP features of the current location and the fingerprint map to perform online positioning using similarity as a positioning index.
[0132] If further divided, the online positioning module can be further divided into a WiFi signal receiving unit, a WISP feature generation unit, and a positioning unit. The WiFi signal receiving unit receives WiFi signals online, the WISP feature generation unit generates WISP features for the current location, and the positioning unit uses the WISP features of the current location and the fingerprint map, employing similarity as a positioning metric for online positioning.
[0133] Similarly, if further divided, the fingerprint map construction module can be divided into a WiFi signal receiving unit, a WISP feature generation unit, and a map generation unit. The WiFi signal receiving unit collects WiFi signals at each reference point, the WISP feature generation unit generates WISP features, and the map generation unit constructs a fingerprint map that includes the WISP features of each reference point.
[0134] It should be noted that, in other feasible embodiments, the method of the present invention also includes a bag-of-words tree construction module, used to construct a bag-of-words tree corresponding to the fingerprint map.
[0135] It should be understood that the implementation process of each module can be referred to the content described in the aforementioned method. The above division of functional modules is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. At the same time, the above-mentioned integrated units can be implemented in the form of hardware or software functional units.
[0136] For example, in hardware implementation, the WiFi signal receiving unit refers to the assembled WiFi signal receiver. Simultaneously, an inertial measurement unit, such as an accelerometer or gyroscope, is also included. The data collected by the inertial measurement unit is then transmitted to the WISP feature generation unit, which generates the WISP feature for the current location.
[0137] Example 3:
[0138] This embodiment provides an electronic terminal, which includes at least one or more processors and a memory storing one or more computer programs.
[0139] In some implementations, the processor calls the computer program to perform the following:
[0140] Offline fingerprint map construction: The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point is used as a reference point. Then, WISP features are generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0141] Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, online positioning is performed using similarity as a positioning indicator.
[0142] In other implementations, the processor calls the computer program to achieve:
[0143] Obtain a pre-built offline fingerprint map:
[0144] The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point serves as a reference point. WISP features are then generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0145] Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, online positioning is performed using similarity as a positioning indicator.
[0146] It should be understood that in this type of implementation, the fingerprint map built offline is implemented by other electronic terminals, and this electronic terminal performs online positioning by obtaining the built fingerprint map.
[0147] Please refer to the explanation of the method above for the specific implementation process of each step.
[0148] It should be noted that, in some implementations, referring to the description of Embodiment 1, the electronic terminal also includes an inertial measurement unit, such as an accelerometer or gyroscope. In addition, a WiFi signal receiver should also be provided.
[0149] The memory may include high-speed RAM, and may also include a non-volatile defibrillator, such as at least one disk storage device.
[0150] If the memory and processor are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an industry-standard architecture bus, an external device interconnect bus, or an extended industry-standard architecture bus, etc. The bus can be categorized as an address bus, data bus, control bus, etc.
[0151] Optionally, in a specific implementation, if the memory and processor are integrated on a single chip, the memory and processor can communicate with each other through an internal interface.
[0152] It should be understood that, in the embodiments of the present invention, the processor may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.
[0153] Example 4:
[0154] This embodiment provides a computer-readable storage medium that stores one or more computer programs.
[0155] In some implementations, the computer program is called by the processor to perform the following:
[0156] Offline fingerprint map construction: The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point is used as a reference point. Then, WISP features are generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0157] Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, online positioning is performed using similarity as a positioning indicator.
[0158] In other implementations, the computer program is called by a processor to perform the following:
[0159] Obtain a pre-built offline fingerprint map:
[0160] The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point serves as a reference point. WISP features are then generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner.
[0161] Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, online positioning is performed using similarity as a positioning indicator.
[0162] It should be understood that in this type of implementation, the computer program that constructs the fingerprint map offline is stored in other media, and the computer-readable storage medium obtains the constructed fingerprint map for online positioning.
[0163] Please refer to the explanation of the method above for the specific implementation process of each step.
[0164] The readable storage medium is a computer-readable storage medium, which can be an internal storage unit of the controller described in any of the foregoing embodiments, such as the controller's hard drive or memory. The readable storage medium can also be an external storage device of the controller, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the controller. Further, the readable storage medium can include both the controller's internal storage unit and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or will be output.
[0165] Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0166] It should be emphasized that the examples described in this invention are illustrative rather than limiting. Therefore, this invention is not limited to the examples described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solutions of this invention, without departing from the spirit and scope of this invention, whether modifications or substitutions, are also within the protection scope of this invention.
Claims
1. An indoor positioning method integrating WiFi fingerprint and spatial information, characterized in that: Includes the following steps: Step 1: Offline fingerprint map construction: Divide the indoor positioning area into grids and use each grid point as a reference point. Collect WiFi signals at each reference point and generate WISP features to construct a fingerprint map that includes the WISP features of each reference point. The WISP feature is generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference point based on whether it is located in a straight corridor or at a corner. The WiFi feature is obtained by concatenating the WiFi fingerprint vector of the reference point and the WiFi fingerprint vector of the neighborhood space, and is expressed as follows: , in, For reference point i WiFi characteristics For reference point i WiFi fingerprint vector, All are reference points i The WiFi fingerprint vectors of the 1st, 2nd, and Mth reference points in the neighborhood space, where M is the number of reference points in the adaptively selected neighborhood space; The radius of the adaptively selected neighborhood space is determined according to the following process: Calculate the difference measure between a reference point and its neighboring reference points using WiFi fingerprint vectors; If the difference metric is less than or equal to a set threshold The radius of the neighborhood space is multiplied, and the difference metric corresponding to the expanded neighborhood space is recalculated. This process is repeated iteratively until the difference metric exceeds the set threshold. Output the radius of the neighborhood space. , This is the iteration step size; The initial value of the radius of the neighborhood space is the distance between two adjacent reference points set during grid division. L ; Step 2: Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location. Then, using the WISP features of the current location and the fingerprint map, perform online positioning using similarity as the positioning index.
2. The indoor positioning method according to claim 1, characterized in that: The WiFi fingerprint vector is a binary vector generated based on the signal sorting sequence number. That is, the WiFi signals of all transmitters in the indoor positioning area received by the reference point are sorted from weakest to strongest, and the sorting sequence numbers are converted into binary codes and then concatenated into a binary vector.
3. The indoor positioning method according to claim 1, characterized in that: The fingerprint map constructed offline has a related bag-of-words tree. The construction process of the bag-of-words tree is as follows: the DBSCAN clustering algorithm is used to cluster the WISP features of all reference points in the offline process, and each cluster is regarded as a cluster location fingerprint; each cluster location fingerprint is regarded as a leaf node of the bag-of-words tree, and the TF-IDF weight value of each leaf node is calculated.
4. The indoor positioning method according to claim 3, characterized in that: Step 2, which utilizes the WISP features of the current location and the fingerprint map to perform online positioning using similarity as a positioning indicator, is as follows: Using the WISP features of the current position and the WISP features of the leaf nodes of the bag-of-words tree corresponding to the clusters, calculate the similarity between the WISP features of the current position and the WISP features of each leaf node; Then calculate the product of the similarity and the TF-IDF weight value of the corresponding leaf node, and select the WISP feature of the cluster corresponding to the leaf node with the largest product value; Finally, the final localization result is obtained based on the selected WISP features and their positions on the fingerprint map.
5. The indoor positioning method according to claim 3, characterized in that: When using the DBSCAN clustering algorithm to cluster the WISP features of all reference points, a variable window clustering neighborhood radius is used. The clustering neighborhood radius is determined according to the following process: For reference point Its coordinate information is represented as Representing the set of location points in the fingerprint map as Then the kernel density estimate at that reference point is expressed as : , in, Represents the kernel function. For the core bandwidth, This represents the number of location points within the space. Corresponding reference point Corresponding variable window scaling value Represented as: , Then the clustering neighborhood radius of the variable window , This is the threshold value set for the cluster neighborhood radius.
6. The indoor positioning method according to claim 1, characterized in that: During the online positioning phase, when generating the WISP features of the current location, the process for determining whether the current location is on a straight corridor or at a corner is as follows: Angular velocity is collected using an inertial measurement unit. ; The peak detection algorithm is used, and the angular velocity change is detected based on the sliding window to determine whether to go straight or turn. Maximum value of absolute angular velocity The definition of is: , like If so, proceed straight ahead, and assume the current position is within a straight corridor; Otherwise, it's a turn; , These are the set judgment threshold and detection threshold, respectively. , These represent the start and stop times of the sliding window, respectively. The size of the sliding window is the same as the WiFi scanning time interval, and the current WiFi signal scanning timestamp is the center of the sliding window. If it's a turn, then determine whether it's a left / right turn or a U-turn: Define intermediate parameters : , like If the value is left or right, it means the current position is at a corner; otherwise, it means a U-turn, using a straight corridor encoding method.
7. A system based on the indoor positioning method according to any one of claims 1-6, characterized in that: include: The fingerprint map building module is used to build fingerprint maps offline: the indoor positioning area is divided into grids and each grid point is used as a reference point. WiFi signals are collected at each reference point and WISP features are generated, thereby building a fingerprint map that includes the WISP features of each reference point. The WISP feature is generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding based on whether the reference point is located in a straight corridor or at a corner. The online positioning module is used for online positioning based on the fingerprint map: it receives WiFi signals online and generates WISP features of the current location, and then uses the WISP features of the current location and the fingerprint map to perform online positioning using similarity as a positioning index.
8. An electronic terminal, characterized in that: include: At least one or more processors; A memory that stores one or more computer programs; The processor calls the computer program to implement: Obtain a pre-built offline fingerprint map or build a fingerprint map offline: The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point serves as a reference point. WISP features are then generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner. Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location, then use the WISP features of the current location and the fingerprint map, and use similarity as a positioning indicator for online positioning; The WiFi feature is obtained by concatenating the WiFi fingerprint vector of the reference point and the WiFi fingerprint vector of the neighborhood space, and is represented as: , in, For reference point i WiFi characteristics For reference point i WiFi fingerprint vector, All are reference points i The WiFi fingerprint vectors of the 1st, 2nd, and Mth reference points in the neighborhood space, where M is the number of reference points in the adaptively selected neighborhood space; The radius of the adaptively selected neighborhood space is determined according to the following process: Calculate the difference measure between a reference point and its neighboring reference points using WiFi fingerprint vectors; If the difference metric is less than or equal to a set threshold The radius of the neighborhood space is multiplied, and the difference metric corresponding to the expanded neighborhood space is recalculated. This process is repeated iteratively until the difference metric exceeds the set threshold. Output the radius of the neighborhood space. , This is the iteration step size; The initial value of the radius of the neighborhood space is the distance between two adjacent reference points set during grid division. L .
9. A computer-readable storage medium, characterized in that: One or more computer programs are stored, which are invoked by a processor to implement: Obtain a pre-built offline fingerprint map or build a fingerprint map offline: The fingerprint map includes WISP features for each reference point. After the indoor positioning area is divided into grids, each grid point serves as a reference point. WISP features are then generated using WiFi signals collected at each reference point. The WISP features are generated by fusing WiFi features and spatial features. The spatial features are generated by classifying and encoding the reference points based on whether they are located in a straight corridor or at a corner. Online positioning based on the fingerprint map: Receive WiFi signals online and generate WISP features of the current location, then use the WISP features of the current location and the fingerprint map, and use similarity as a positioning indicator for online positioning; The WiFi feature is obtained by concatenating the WiFi fingerprint vector of the reference point and the WiFi fingerprint vector of the neighborhood space, and is represented as: , in, For reference point i WiFi characteristics For reference point i WiFi fingerprint vector, All are reference points i The WiFi fingerprint vectors of the 1st, 2nd, and Mth reference points in the neighborhood space, where M is the number of reference points in the adaptively selected neighborhood space; The radius of the adaptively selected neighborhood space is determined according to the following process: Calculate the difference measure between a reference point and its neighboring reference points using WiFi fingerprint vectors; If the difference metric is less than or equal to a set threshold The radius of the neighborhood space is multiplied, and the difference metric corresponding to the expanded neighborhood space is recalculated. This process is repeated iteratively until the difference metric exceeds the set threshold. Output the radius of the neighborhood space. , This is the iteration step size; The initial value of the radius of the neighborhood space is the distance between two adjacent reference points set during grid division. L .
Citation Information
Patent Citations
Indoor positioning method based on Wi-Fi and image fusion fingerprints
CN113316080A