Indoor wireless fingerprint positioning method and system
By constructing a mobile model in indoor wireless fingerprint positioning and maximizing posterior probability using Markov model and Bayesian model, the problems of low positioning accuracy and ease of failure in traditional fingerprints are solved, and the positioning accuracy is significantly improved.
Patent Information
- Application Number
- CN202510166660.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-13
AI Technical Summary
The traditional fingerprint positioning algorithm only matches the current RSSI data in each positioning cycle, which easily matches the wrong grid, resulting in positioning failure and low positioning accuracy.
By meshing the indoor area, a user's movement model is constructed in the indoor area, and the RSSI eigenvector sequence corresponding to the user's most recent n positioning cycles is obtained. Based on the Markov model and Bayesian model, the target grid sequence that makes the user pass through the posterior probability of the grid sequence in the last n positioning cycles take the maximum value, thereby determining the user's location.
It greatly improves the accuracy of indoor wireless fingerprint positioning, alleviates the problems of low positioning accuracy and easy positioning failure in traditional fingerprint positioning methods.
Smart Images

Figure CN119997200A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless fingerprint positioning, and in particular to an indoor wireless fingerprint positioning method and system. Background Art
[0002] Fingerprint positioning is a technology that realizes indoor positioning based on the strength of wireless signals (such as WiFi, Bluetooth, RFID, etc.). A wireless receiving device is used to collect the signal strength (Received Signal Strength Indication, RSSI) characteristics of multiple wireless base stations in the indoor environment to infer the location of the receiving device. When the indoor structure is fixed and the position of the wireless base station is fixed, the signal strength of different base stations received at a specified location is theoretically constant. The signal strength of multiple base stations constitutes the signal strength feature vector of the location, which is called "fingerprint".
[0003] The implementation of fingerprint positioning generally includes two steps:
[0004] (1) Offline phase. Offline data collection is performed in a specific area to collect the signal strength of different base stations at that location and record the distribution of these signal strengths at that specific location. Generally, the coverage area can be divided into grids and measurements are performed at the geometric center of each grid. Finally, the fingerprint data of each grid is obtained to form a fingerprint database.
[0005] (2) Online stage: When the device is moving, it collects the wireless signal strength of each base station on site in real time, matches it with the fingerprint data in the database, and determines the grid closest to the fingerprint data as the current location of the device.
[0006] The RSSI value measured at a given location is sensitive to the on-site environment. The presence of obstructions between the receiver and the base station, or changes in the room layout, will affect the signal strength of the receiver. In addition, there are often multiple fingerprints in the fingerprint database that are similar. Therefore, the traditional fingerprint positioning algorithm only matches the current RSSI data in each positioning cycle, often matching the wrong grid, resulting in positioning failure. Summary of the invention
[0007] The purpose of the present invention is to provide an indoor wireless fingerprint positioning method and system in order to solve at least one of the above technical problems.
[0008] In the first aspect, an embodiment of the present invention provides an indoor wireless fingerprint positioning method, including: gridding the indoor area and constructing a mobile model of the user in the indoor area; obtaining the RSSI feature vector sequence corresponding to the user's most recent n positioning cycles; n is an integer greater than 1; based on the mobile model and the Markov model and the Bayesian model, determining the target grid sequence corresponding to the maximum value of the posterior probability of the grid sequence passed by the user in the most recent n positioning cycles; determining the user's location based on the target grid sequence.
[0009] Furthermore, the mobility model includes: the user moves only to adjacent grids within a positioning cycle; the RSSI value measured by the user at the target position in the indoor area obeys Gaussian distribution, including:
[0010]
[0011] Where p(r) is the RSSI value measured by the user at the target location, is the RSSI measurement value of the jth beacon in the ith grid, r is the target location, σ ij is the standard deviation of the RSSI distribution of the jth beacon in the ith grid; the grid sequence that the user passes through in the indoor area obeys the first-order Markov model.
[0012] Furthermore, based on the mobility model, the Markov model, and the Bayesian model, determining a target grid sequence corresponding to a maximum posterior probability of a grid sequence passed by the user in the most recent n positioning cycles, includes:
[0013]
[0014] Where, C={c1,c2,…,c n} is the grid sequence that the user has passed through in the latest n positioning cycles, c i is the grid that the user passes through in the i-th positioning cycle, P(c i ) is the area proportion of the i-th grid in the entire indoor area, P(c i |c i-1 ) is the conditional probability that the user is in the i-1th grid in the previous position and the i-th grid in the current position, r ij is the RSSI measurement value of the jth beacon in the i-th positioning cycle, is the RSSI fingerprint vector of the jth beacon in the ith positioning cycle, R i is the measured value of the RSSI feature vector corresponding to the i-th positioning cycle, is the RSSI feature vector corresponding to the user passing through the i-th grid determined based on the preset fingerprint database, m is the number of beacons in the indoor area, σi is the mean square error of the RSSI values in the i-th grid.
[0015] Furthermore, the method also includes: respectively obtaining RSSI feature vectors corresponding to each grid in the indoor area; the RSSI feature vectors include RSSI values of each beacon; and constructing the preset fingerprint database based on the RSSI feature vectors corresponding to each grid.
[0016] In the second aspect, an embodiment of the present invention also provides an indoor wireless fingerprint positioning system, including: a construction module, an acquisition module, a determination module and a positioning module; wherein the construction module is used to grid the indoor area and construct a mobile model of the user in the indoor area; the acquisition module is used to obtain the RSSI feature vector sequence corresponding to the user's most recent n positioning cycles; n is an integer greater than 1; the determination module is used to determine, based on the mobile model and the Markov model and the Bayesian model, a target grid sequence corresponding to the maximum value of the posterior probability of the grid sequence passed by the user in the most recent n positioning cycles; the positioning module is used to determine the user's location based on the target grid sequence.
[0017] Furthermore, the construction module is also used to: respectively obtain the RSSI feature vector corresponding to each grid in the indoor area; the RSSI feature vector includes the RSSI value of each beacon; and construct a preset fingerprint database based on the RSSI feature vector corresponding to each grid.
[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: a wireless communication module, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the embodiment of the present invention when executing the computer program.
[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method provided in the embodiment of the present invention is implemented.
[0020] The present invention provides an indoor wireless fingerprint positioning method and system, which matches the grid signal strength with the grid sequence passed by the user's motion path, and based on the Markov model and the Bayesian probability model, maximizes the posterior probability of the grid sequence on the premise of measuring the RSSI vector sequence, thereby inferring the optimal grid for the current RSSI vector matching, greatly improving the indoor wireless fingerprint positioning accuracy, and alleviating the technical problems of low positioning accuracy and easy positioning failure in traditional fingerprint positioning methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A flowchart of an indoor wireless fingerprint positioning method provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of a gridded plan of an indoor area provided by an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of adjacent grids in a mobile model provided by an embodiment of the present invention;
[0025] Figure 4 A schematic diagram of a path decision tree provided by an embodiment of the present invention;
[0026] Figure 5 A flowchart of another indoor wireless fingerprint positioning method provided by an embodiment of the present invention;
[0027] Figure 6 A schematic diagram of an indoor wireless fingerprint positioning system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] Embodiment 1
[0030] Figure 1 The present invention provides a flowchart of an indoor wireless fingerprint positioning method.
[0031] like Figure 1 As shown, the method specifically comprises the following steps:
[0032] Step S102: grid the indoor area and construct a user movement model in the indoor area.
[0033] Step S104, obtaining the RSSI feature vector sequence corresponding to the user's latest n positioning cycles; n is an integer greater than 1.
[0034] Step S106, based on the mobility model, the Markov model and the Bayesian model, determine the target grid sequence corresponding to the maximum posterior probability of the grid sequence that the user has passed in the latest n positioning cycles.
[0035] Step S108: determining the user's location based on the target grid sequence.
[0036] Figure 2 Schematic diagram of a gridded plan view of an indoor area provided according to an embodiment of the present invention. Figure 2 As shown, the yellow part in the picture is the inaccessible area, such as the booth, the red part is the entrance, and the green part is the exit.
[0037] In an embodiment of the present invention, the mobility model includes:
[0038] The user only moves to adjacent grids in a positioning cycle;
[0039] The RSSI value measured by the user at the target location in the indoor area follows a Gaussian distribution, including:
[0040]
[0041] Where p(r) is the RSSI value measured by the user at the target location, is the RSSI measurement value of the jth beacon in the ith grid, r is the target location, σ ij is the standard deviation of the RSSI distribution of the jth beacon in the i-th grid;
[0042] The sequence of grids that users pass through in the indoor area obeys a first-order Markov model.
[0043] Specifically, the method provided in the embodiment of the present invention further includes:
[0044] Obtain the RSSI feature vector corresponding to each grid in the indoor area respectively; the RSSI feature vector includes the RSSI value of each beacon;
[0045] Based on the RSSI feature vector corresponding to each grid, a preset fingerprint database is constructed.
[0046] Specifically, the maximum posterior probability calculation process in step S106 is as follows:
[0047] Assume there are m beacons (wireless transmitters) in the indoor area, R t ={r1,r2,…,r m}, corresponding to the RSSI values of m beacons at time t (i.e., the tth positioning cycle), i.e., the feature vector;
[0048] Q={R1,R2,…,R n} is the RSSI feature vector sequence corresponding to the latest n positioning cycles;
[0049] C={c1,c2,…,c n} is the grid sequence that the user has passed through in the last n positioning cycles;
[0050] The positioning problem in the present invention is equivalent to finding a grid sequence C that maximizes the posterior probability P(C|Q).
[0051] According to the Bayesian formula:
[0052]
[0053] in:
[0054]
[0055] where r ij is the RSSI value of the jth beacon at the i-th time, C i is the grid sequence at the i-th moment:
[0056] C i ={c1,c2,…,c i}
[0057] Considering that the currently measured RSSI value is only related to the current position, formula (1) is simplified to:
[0058]
[0059] The grid sequence that the user passes through in the indoor area obeys the first-order Markov model, and we can know that:
[0060]
[0061] For a given RSSI sequence Q, P(Q) is a constant that is independent of position. Therefore, from equations (1) to (4), we can obtain:
[0062]
[0063] ln is the natural logarithm. Considering that the RSSI value measured by the user at the target location in the indoor area follows a Gaussian distribution, formula (5) can be transformed into:
[0064]
[0065] in,
[0066] In the formula, is the RSSI fingerprint vector of the jth beacon in the ith positioning cycle, R i is the measured value of the RSSI feature vector corresponding to the i-th positioning cycle, is the RSSI feature vector corresponding to the user passing through the i-th grid determined based on the preset fingerprint database, m is the number of beacons in the indoor area, σ i is the mean square error of the RSSI values in the i-th grid.
[0067] P(c i ) is the area proportion of the i-th grid in the entire indoor area;
[0068] P(c i |c i-1 ) is the conditional probability that the user is in the i-1th grid in the previous location and the i-th grid in the current location (it should be noted that the i-1th grid and the i-th grid can be the same grid). Based on the mobility model, the user can only move to adjacent grids at most in one positioning cycle. It is only necessary to calculate the probability of the user being in the i-1th grid in the current location. i-1 Among the 9 grids centered on i area share.
[0069] Figure 3 FIG. 1 is a schematic diagram of adjacent grids in a mobile model provided according to an embodiment of the present invention. Figure 3 As shown, assuming Figure 3 The grids in are all squares of equal size, then the conditional probability of the five surrounding grids is 0.2. Figure 2 ), then its corresponding conditional probability is 0. In actual operation, it can also be adjusted according to the direction of the flow of people (for example, the flow of people habitually follows the on-site guide flow) to increase the weight of the grid in the direction of the flow of people. Finally, the conditional probabilities of the above adjacent grids should be normalized.
[0070] The initial grid c1 means the first grid where the user enters the positioning area (such as entering from the museum entrance), which is generally the entrance area. When calculating from the first grid, the probability of the entrance and exit areas can be increased. Even if it is clear that the user can only enter from the entrance, then when calculating the first grid, the probabilities of grids in other areas can be treated as 0.
[0071] Finally, the conditional probability of each grid to its adjacent grids should be saved in the database and loaded into the memory during initialization for access during calculation.
[0072] From the above description, it can be seen that the present invention provides an indoor wireless fingerprint positioning method, which matches the grid signal strength with the grid sequence passed on the user's movement path, and based on the Markov model and the Bayesian probability model, maximizes the posterior probability of the grid sequence on the premise of measuring the RSSI vector sequence, thereby inferring the optimal grid matching the current RSSI vector, greatly improving the indoor wireless fingerprint positioning accuracy, and alleviating the technical problems of low positioning accuracy and easy positioning failure in traditional fingerprint positioning methods.
[0073] Embodiment 2
[0074] The data structure used in an indoor wireless fingerprint positioning method provided by an embodiment of the present invention is as follows:
[0075] The RSSI of m Bluetooth beacons constitutes an m-dimensional feature vector R;
[0076] Ideally, the grid sequence C should be recorded starting from the first grid after entering the positioning area. However, considering the amount of calculation, it is recommended that the sequence length n be a fixed length (such as 3 or 4), that is, only the most recent n grids are retained.
[0077] The posterior probability is calculated for each valid adjacent grid in the sequence as the next level node. Therefore, these grids form an n-layer decision tree, called a path decision tree. The general form of the path decision tree is as follows Figure 4 As shown in the figure, each node represents a grid that the user may pass through. The goal of the algorithm is to find a path that maximizes the posterior probability of formula (6) in the above figure as an estimate of the nearest n grids.
[0078] In memory, each node needs to save the following data:
[0079] 1) Node number
[0080] 2) Fingerprint vector
[0081] 3) RSSI mean square error σ
[0082] 4) Conditional probability P(c i |c i-1 )
[0083] 5) The probability of this node P(c i )
[0084] The path decision tree is stored in memory (the data structure of the tree is not described here). The number of layers of the tree is the length n of the grid sequence (for example, 3 or 4). The more layers there are, the more accurate the estimate of the current position is, but the amount of calculation will increase exponentially. In order to control the scale of the tree, the number of nodes in the i-th layer does not exceed 3i. If the number of layers is 4, the number of leaf nodes in the tree is at most 33×5=135, which means that the posterior probability needs to be calculated at most 135 times for each step, and at most 45 times for 3 layers. Note that it is multiplied by 5 here because the last layer of leaf nodes needs to examine 5 adjacent grids respectively.
[0085] Figure 5 FIG. 1 is a flow chart of another indoor wireless fingerprint positioning method provided according to an embodiment of the present invention. Figure 5 As shown, based on the above data structure and Figure 4 The path decision tree shown in FIG. 1 includes the following steps:
[0086] (1) The user enters from the entrance, detects the Bluetooth beacon, reads the RSSI of m Bluetooth beacons, and obtains the vector R;
[0087] (2) Determine whether it is the first positioning; if so, read K grids near the entrance, store them in the path decision tree as the first-layer nodes, and execute step (3); if not, directly execute step (3);
[0088] (3) Take a leaf node c from the path decision tree i , for leaf node c i Trace back all parent grid nodes, read the grid number, fingerprint vector R, RSSI mean square error σ, conditional probability P(c i |c i-1 ), and the probability P(c) of this grid node;
[0089] (4) Substitute the above data into formula (6) to calculate the leaf node c i The posterior probability of the corresponding path;
[0090] (5) Determine whether all leaf nodes have been traversed; if not, repeat steps (3) and (4); if yes, output the grid c corresponding to the maximum posterior probability max , as the current position estimate;
[0091] (6) Real-time detection of whether the current grid has changed; if so, the first-layer nodes are deleted and the nodes of subsequent layers are merged: nodes with the same grid number are merged into one, and their child nodes are also merged, and the child nodes with the same grid number are merged into one, and so on;
[0092] (7) Sort all leaf nodes in descending order of posterior probability, take the first 3n-1 nodes, retain the paths corresponding to these nodes, and update the path decision tree (this step is to control the size of the tree and avoid divergence);
[0093] (8) Finally, for the leaf nodes of the updated path decision tree, their valid adjacent grids are taken to form a new layer of leaf nodes.
[0094] Embodiment 3
[0095] Figure 6 is a schematic diagram of an indoor wireless fingerprint positioning system provided according to an embodiment of the present invention. Figure 6 As shown, the system includes: a construction module 10, an acquisition module 20, a determination module 30 and a positioning module 40.
[0096] Specifically, the construction module 10 is used to grid the indoor area and construct a user movement model in the indoor area;
[0097] The acquisition module 20 is used to obtain the RSSI feature vector sequence corresponding to the user's latest n positioning cycles; n is an integer greater than 1;
[0098] A determination module 30 is used to determine a target grid sequence corresponding to a maximum posterior probability of a grid sequence passed by the user in the latest n positioning cycles based on a mobility model, a Markov model, and a Bayesian model;
[0099] The positioning module 40 is used to determine the user's location based on the target grid sequence.
[0100] Specifically, building block 10 is further used for:
[0101] Obtain the RSSI feature vector corresponding to each grid in the indoor area respectively; the RSSI feature vector includes the RSSI value of each beacon;
[0102] Based on the RSSI feature vector corresponding to each grid, a preset fingerprint database is constructed.
[0103] The present invention also provides an electronic device, comprising: a wireless communication module, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the embodiment of the present invention when executing the computer program.
[0104] The present invention also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the method provided in the embodiment of the present invention is implemented.
[0105] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0106] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. An indoor wireless fingerprint positioning method, characterized in that: include: Meshing the indoor area and constructing a user movement model in the indoor area; Obtain the RSSI feature vector sequence corresponding to the user's most recent n positioning cycles; n is an integer greater than 1; Based on the mobility model, the Markov model, and the Bayesian model, determine a target grid sequence corresponding to a maximum posterior probability of a grid sequence passed by the user in the most recent n positioning cycles; The user's location is determined based on the target grid sequence.
2. The method according to claim 1, characterized in that: The mobility model includes: The user only moves to adjacent grids in a positioning cycle; The RSSI value measured by the user at the target location in the indoor area follows a Gaussian distribution, including: Where p(r) is the RSSI value measured by the user at the target location, is the RSSI measurement value of the jth beacon in the ith grid, r is the target location, σ ij is the standard deviation of the RSSI distribution of the jth beacon in the i-th grid; The sequence of grids that the user passes through in the indoor area obeys a first-order Markov model.
3. The method according to claim 1, characterized in that: Based on the mobility model, the Markov model, and the Bayesian model, determining a target grid sequence corresponding to a maximum posterior probability of a grid sequence passed by the user in the most recent n positioning cycles, including: Where, C={c1,c2,…,c n } is the grid sequence that the user has passed through in the latest n positioning cycles, c i is the grid that the user passes through in the i-th positioning cycle, P(c i ) is the area proportion of the i-th grid in the entire indoor area, P(c i |c i-1 ) is the conditional probability that the user is in the i-1th grid in the previous position and the i-th grid in the current position, r ij is the RSSI measurement value of the jth beacon in the i-th positioning cycle, is the RSSI fingerprint vector of the jth beacon in the ith positioning cycle, R i is the measured value of the RSSI feature vector corresponding to the i-th positioning cycle, is the RSSI feature vector corresponding to the user passing through the i-th grid determined based on the preset fingerprint database, m is the number of beacons in the indoor area, σ i is the mean square error of the RSSI values in the i-th grid.
4. The method according to claim 3, characterized in that: The method further comprises: Respectively obtain the RSSI feature vector corresponding to each grid in the indoor area; the RSSI feature vector includes the RSSI value of each beacon; The preset fingerprint database is constructed based on the RSSI feature vector corresponding to each grid.
5. An indoor wireless fingerprint positioning system, characterized in that: include: Building module, acquiring module, determining module and locating module; among them, The construction module is used to grid the indoor area and construct a movement model of the user in the indoor area; The acquisition module is used to obtain the RSSI feature vector sequence corresponding to the user's latest n positioning cycles; n is an integer greater than 1; The determination module is used to determine the target grid sequence corresponding to the maximum value of the posterior probability of the grid sequence passed by the user in the latest n positioning cycles based on the mobility model, the Markov model and the Bayesian model; The positioning module is used to determine the user's location based on the target grid sequence.
6. The method according to claim 5, characterized in that: The building blocks are also used to: Respectively obtain the RSSI feature vector corresponding to each grid in the indoor area; the RSSI feature vector includes the RSSI value of each beacon; Based on the RSSI feature vector corresponding to each grid, a preset fingerprint database is constructed.
7. An electronic device, characterized in that: include: A wireless communication module, a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.