Positioning method and device for updating WiFi fingerprint database

By combining WiFi signal strength, geomagnetic fingerprint data and inertial sensor motion data, and using improved K nearest neighbor algorithm and thinking evolution algorithm, the RSSI fingerprint library is constructed and updated, which solves the problem of low indoor positioning accuracy and achieves high-precision indoor positioning.

CN120358592APending Publication Date: 2025-07-22CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510499365.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The existing indoor positioning technology has low positioning accuracy in complex indoor environments, especially the positioning of fingerprint libraries based on WiFi is greatly affected by the environment, making it difficult to achieve high-precision indoor positioning.

Method used

By obtaining the WiFi signal strength data, geomagnetic fingerprint data and inertial sensor motion data of the target carrier, combining the improved weighted K nearest neighbor algorithm and thinking evolution algorithm, the RSSI fingerprint library is constructed and updated, and the WiFi positioning boundaries are constrained by geomagnetic matching positioning results, and the PDR positioning results are fused to achieve improved positioning accuracy.

Benefits of technology

It improves the positioning accuracy of the WiFi fingerprint library, reduces the error caused by time accumulation, and realizes dynamic update of the WiFi fingerprint library and high-precision indoor positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358592A_ABST
    Figure CN120358592A_ABST
Patent Text Reader

Abstract

The invention discloses a positioning method and device for updating a WiFi fingerprint database, and relates to the technical field of indoor positioning. The method comprises the following steps: acquiring information data of a target carrier, and processing the information data to obtain processed data; an improved weighted K-nearest neighbor algorithm is adopted to determine a geomagnetic matching positioning result of the target carrier, and then a WiFi fingerprint positioning result is determined; determining a PDR positioning result of the target carrier according to the motion data of the inertial sensor in the online stage and the course information of the PDR; a mind evolutionary algorithm is adopted to determine a fusion positioning result; determining detection data according to the RSSI data in the online stage and the fusion positioning result; determining an updated UMAP dimension reduction fingerprint database based on the detection data after dimension reduction processing, and determining an updated RSSI fingerprint database in combination with the detection data so as to realize positioning; the method and the device aim at realizing updating of the WiFi fingerprint database and improving positioning precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of indoor positioning, and particularly to a positioning method and device for updating a WiFi fingerprint database. Background Art

[0002] The Global Navigation Satellite System (GNSS) has basically solved the problem of real-time high-precision positioning in outdoor open environments, bringing great convenience to people. Currently, the BeiDou-3 Navigation Satellite System (BDS-3) has become the main navigation satellite system for outdoor space positioning. However, due to the complex indoor space structure and physical composition, the received GNSS signals are very weak. At the same time, the multipath effect causes serious signal reflection and refraction phenomena, affecting the positioning accuracy. In completely enclosed environments such as basements and tunnels, GNSS signals are completely unavailable, and it is impossible to use existing outdoor technologies to achieve indoor positioning.

[0003] Based on this, indoor positioning technologies including Ultra-Wide Bandwidth (UWB), Bluetooth Low Energy (BLE), WIFI, geomagnetism, and Pedestrian Dead Reckoning (PDR) have been widely studied, and position estimation or tracking of the target to be measured has been achieved through different calculation algorithms. BLE and WiFi currently commonly use the Received Signal Strength Indication (RSSI) values received by indoor deployed Access Points (APs) for fingerprint database positioning. Its positioning accuracy is affected by the indoor environment, including the number of APs, pedestrian movement, multipath effects, etc. Some studies have shown that the RSSI values at the same location can vary by 5dBm - 10dBm within ten days or so. UWB positioning technology is based on the tag periodically transmitting pulse signals, and the anchors fixed in the positioning area receive the UWB signals from the tags, and positioning is performed using positioning technologies such as Time of Arrival (TOA) and Time Difference of Arrival (TDOA). It has strong anti-interference ability, high bandwidth, and low power consumption, so the positioning accuracy is high. However, it requires precise time synchronization between each receiver to achieve precise positioning, the hardware device cost is relatively high, the deployment difficulty is large, and the popularization and application are limited. Geomagnetism and PDR, as a passive positioning technology, do not require additional positioning devices and have been extensively studied. The geomagnetism positioning technology can be similar to the positioning method of WiFi, and at the same time, detailed geomagnetic data collection needs to be carried out in the positioning area to meet the positioning accuracy requirements; PDR uses inertial sensor data for calculation to deduce the walking path, which has strong independence and low power consumption, but the sensor error will accumulate over time, resulting in a gradual decrease in positioning accuracy. Summary of the Invention

[0004] The purpose of this application is to provide a positioning method and device for updating the WiFi fingerprint database, which can realize the update of the WiFi fingerprint database and improve the positioning accuracy.

[0005] To achieve the above purpose, this application provides the following solutions:

[0006] In the first aspect, this application provides a positioning method for updating the WiFi fingerprint database, including:

[0007] Obtain the information data of the target carrier; the information data includes: WiFi signal strength data in the online stage, WiFi signal strength data in the offline stage, geomagnetic fingerprint data in the online stage, geomagnetic fingerprint data in the offline stage, and inertial sensor motion data in the online stage; the WiFi signal strength data includes: RSSI data;

[0008] Process the information data to obtain processed data; the processed data includes: complete RSSI data, multi-dimensional geomagnetic fingerprint data, and heading information of PDR.

[0009] Construct a fingerprint database; the fingerprint database includes: an RSSI fingerprint database constructed based on the complete RSSI data, a geomagnetic fingerprint database constructed based on the multi-dimensional geomagnetic fingerprint data, and a UMAP dimensionality reduction fingerprint database obtained by performing dimensionality reduction processing on the RSSI fingerprint database using the UMAP method.

[0010] Adopt an improved weighted K-nearest neighbor algorithm to determine the geomagnetic matching positioning result of the target carrier according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data.

[0011] Adopt an improved weighted K-nearest neighbor algorithm to determine the WiFi fingerprint positioning result based on the geomagnetic matching positioning result, the complete RSSI data after dimensionality reduction processing, and the RSSI data in the online stage.

[0012] Determine the PDR positioning result of the target carrier according to the inertial sensor motion data in the online stage and the heading information of PDR.

[0013] Adopt a thinking evolution algorithm to determine the fusion positioning result according to the geomagnetic matching positioning result, the WiFi fingerprint positioning result, and the PDR positioning result.

[0014] Determine the detection data according to the RSSI data in the online stage and the fusion positioning result.

[0015] Perform dimensionality reduction processing on the detection data, and update the UMAP dimensionality reduction fingerprint database using the processed detection data to obtain an updated UMAP dimensionality reduction fingerprint database.

[0016] Process the RSSI fingerprint database based on the detection data and the updated UMAP dimensionality reduction fingerprint database to obtain an updated RSSI fingerprint database to achieve positioning.

[0017] In a second aspect, the present application provides a positioning device for updating a WiFi fingerprint database, and the positioning device for updating a WiFi fingerprint database includes:

[0018] An information data acquisition module for acquiring information data of a target carrier; the information data includes: WiFi signal strength data in the online stage, WiFi signal strength data in the offline stage, geomagnetic fingerprint data in the online stage, geomagnetic fingerprint data in the offline stage, and inertial sensor motion data in the online stage; the WiFi signal strength data includes: RSSI data.

[0019] A processing module for processing the information data to obtain processed data; the processed data includes: complete RSSI data, multi-dimensional geomagnetic fingerprint data, and the heading information of PDR;

[0020] A fingerprint database construction module for constructing a fingerprint database; the fingerprint database includes: an RSSI fingerprint database constructed according to the complete RSSI data, a geomagnetic fingerprint database constructed according to the multi-dimensional geomagnetic fingerprint data, and a UMAP dimensionality reduction fingerprint database obtained by performing dimensionality reduction processing on the RSSI fingerprint database using the UMAP method;

[0021] A geomagnetic matching positioning result determination module for using an improved weighted K-nearest neighbor algorithm to determine the geomagnetic matching positioning result of the target carrier according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data;

[0022] A WiFi fingerprint positioning result determination module for using an improved weighted K-nearest neighbor algorithm to determine the WiFi fingerprint positioning result based on the geomagnetic matching positioning result, the complete RSSI data after dimensionality reduction processing, and the RSSI data in the online stage;

[0023] A PDR positioning result determination module for determining the PDR positioning result of the target carrier according to the inertial sensor motion data in the online stage and the heading information of PDR;

[0024] A fusion positioning result determination module for using a thinking evolution algorithm to determine the fusion positioning result according to the geomagnetic matching positioning result, the WiFi fingerprint positioning result, and the PDR positioning result;

[0025] A detection data determination module for determining detection data according to the RSSI data in the online stage and the fusion positioning result;

[0026] An update module for performing dimensionality reduction processing on the detection data and using the processed detection data to update the UMAP dimensionality reduction fingerprint database to obtain an updated UMAP dimensionality reduction fingerprint database;

[0027] An update positioning module for processing the RSSI fingerprint database based on the detection data and the updated UMAP dimensionality reduction fingerprint database to obtain an updated RSSI fingerprint database for positioning.

[0028] According to the specific embodiments provided by the present application, the present application has the following technical effects:

[0029] The present application provides a positioning method and device for updating a WiFi fingerprint database. The improved weighted K-nearest neighbor algorithm is used to determine the geomagnetic matching positioning result; the geomagnetic matching positioning result is used to constrain the WiFi positioning boundary, and the improved weighted K-nearest neighbor algorithm is adopted to determine the WiFi fingerprint positioning result according to the complete RSSI data after dimensionality reduction processing and the RSSI data in the online stage; the thinking evolution algorithm is used to fuse each positioning result to determine the final positioning result, that is, the detection data, and then the processed detection data is used to update the UMAP dimensionality reduction fingerprint database to obtain the updated UMAP dimensionality reduction fingerprint database; based on the detection data and the updated UMAP dimensionality reduction fingerprint database, the RSSI fingerprint database is processed to obtain the updated RSSI fingerprint database to achieve positioning. The present application fuses the geomagnetic matching positioning result, the WiFi fingerprint positioning result and the PDR positioning result to update the fingerprint database in the offline stage, improves the number and reliability of the reference points of the WiFi fingerprint database, and realizes the dynamic update of the WiFi fingerprint database. Moreover, the thinking evolution algorithm is used for fusion processing, which can reduce the error caused by time accumulation and improve the positioning accuracy. Therefore, the present application can realize the update of the WiFi fingerprint database and improve the positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a flowchart of the positioning method for updating the WiFi fingerprint database;

[0031] Figure 2 It is a schematic diagram of the operation steps of the positioning method in practical applications;

[0032] Figure 3 It is a schematic diagram of the principle of the positioning method for updating the WiFi fingerprint database;

[0033] Figure 4 It is a schematic diagram based on the geomagnetic matching positioning and the WiFi positioning result;

[0034] Figure 5 It is a schematic diagram of the PDR positioning principle;

[0035] Figure 6 It is a schematic diagram of the logic for updating the WiFi fingerprint database;

[0036] Figure 7 It is a system framework diagram of the system for updating the WiFi fingerprint database. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0037] In an exemplary embodiment, as Figure 1 shown, a positioning method for updating a WiFi fingerprint database is provided, including:

[0038] Step 100: Obtain the information data of the target carrier. The information data includes: WiFi signal strength data in the online stage, WiFi signal strength data in the offline stage, geomagnetic fingerprint data in the online stage, geomagnetic fingerprint data in the offline stage, and inertial sensor motion data in the online stage; the WiFi signal strength data includes: RSSI data.

[0039] Step 200: Process the information data to obtain processed data. The processed data includes: complete RSSI data, multi-dimensional geomagnetic fingerprint data, and heading information of PDR.

[0040] In one embodiment, processing the information data to obtain processed data specifically includes:

[0041] Filter the RSSI data in the offline stage, and perform missing value filling processing on the filtered RSSI data to obtain complete RSSI data.

[0042] Use the rotation matrix to transform the geomagnetic fingerprint data in the offline stage to the geographical coordinate system to obtain multi-dimensional geomagnetic fingerprint data; the multi-dimensional geomagnetic fingerprint data includes: three-axis geomagnetic data, geomagnetic intensity modulus, and geomagnetic horizontal intensity; the rotation matrix is determined by Euler angles; the Euler angles are determined according to the gravitational acceleration and the geomagnetic fingerprint data in the offline stage; the Euler angles include: yaw angle, pitch angle, and roll angle.

[0043] Filter the noise of the inertial sensor motion data in the online stage to obtain the denoised inertial sensor motion data; the inertial sensor motion data includes data collected by a three-axis accelerometer, a three-axis magnetometer, and a three-axis gyroscope.

[0044] Use the complementary filtering algorithm to correct the data collected by the three-axis gyroscope with the data collected by the three-axis accelerometer and the three-axis magnetometer for attitude angle estimation to obtain the heading information of PDR; specifically, it includes:

[0045] Determine the attitude angle according to the angular velocity of the three-axis gyroscope, and use the acceleration data collected by the three-axis accelerometer and the data collected by the three-axis magnetometer to correct the angular velocity of the three-axis gyroscope to obtain corrected data.

[0046] Based on the corrected data, determine the Euler angles according to the attitude update equation of the quaternion to obtain the heading information of PDR.

[0047] Step 300: Construct a fingerprint library. The fingerprint library includes: an RSSI fingerprint library constructed according to the complete RSSI data, a geomagnetic fingerprint library constructed according to the multi-dimensional geomagnetic fingerprint data, and a UMAP dimensionality reduction fingerprint library obtained by performing dimensionality reduction processing on the RSSI fingerprint library using the UMAP method.

[0048] Step 400: Use the improved weighted K-nearest neighbor algorithm to determine the geomagnetic matching positioning result of the target carrier according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data.

[0049] In one embodiment, using the improved weighted K-nearest neighbor algorithm to determine the geomagnetic matching positioning result of the target carrier according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data specifically includes:

[0050] Based on the set physical coordinate threshold, use to determine the reference point information within the threshold range.

[0051] Calculate the Euclidean distance according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data corresponding to the reference point information; the calculation formula of the Euclidean distance is:

[0052]

[0053] Based on the Euclidean distance, determine the magnetic field similarity weight within the threshold range; the calculation formula of the magnetic field similarity weight is:

[0054]

[0055] Based on the magnetic field similarity weight threshold, determine the candidate magnetic field similarity weight, and determine the geomagnetic matching positioning result according to the candidate magnetic field similarity weight; the expression of the geomagnetic matching positioning result is:

[0056]

[0057]

[0058] Among them, is the abscissa of the fusion positioning result at the previous moment; x i is the abscissa corresponding to the position of the i-th reference point; is the ordinate of the fusion positioning result at the previous moment; y i is the ordinate corresponding to the position of the i-th reference point; D p is the physical coordinate threshold; is the Euclidean distance between the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data features corresponding to the i-th reference point information; s is the serial number of the feature dimension; mag s is the s-th dimension feature of the geomagnetic fingerprint data in the online stage; MAG is is the s-th dimension feature of the multi-dimensional geomagnetic fingerprint data features corresponding to the i-th reference point information; is the magnetic field similarity weight; d mag is the Euclidean distance; x mag is the abscissa of the geomagnetic matching positioning result; y magis the ordinate of the geomagnetic matching positioning result; k is the reference point number; K is the number of reference points within the magnetic field similarity weight threshold range; w k is the magnetic field weight value of the k-th reference point; x k is the abscissa corresponding to the position of the k-th reference point; y k is the ordinate corresponding to the position of the k-th reference point.

[0059] Step 500: Use the improved weighted K-nearest neighbor algorithm to determine the WiFi fingerprint positioning result based on the geomagnetic matching positioning result, the complete RSSI data after dimensionality reduction processing, and the RSSI data in the online stage.

[0060] In one embodiment, using the improved weighted K-nearest neighbor algorithm to determine the WiFi fingerprint positioning result based on the geomagnetic matching positioning result, the complete RSSI data after dimensionality reduction processing, and the RSSI data in the online stage specifically includes:

[0061] Use the uniform manifold approximation and projection method to perform data dimensionality reduction processing on the RSSI data in the online stage, and use the improved weighted K-nearest neighbor algorithm to determine the WiFi fingerprint positioning result based on the geomagnetic matching positioning result and the complete RSSI data after dimensionality reduction processing; the calculation formula for the WiFi fingerprint positioning result is:

[0062]

[0063]

[0064] where, x wifi is the abscissa of the WiFi fingerprint positioning result; y wifi is the ordinate of the WiFi fingerprint positioning result; e is the serial number of the reference points within the adaptive selection range; E is the number of reference points within the adaptive selection range; w e is the RSSI data weight coefficient; x e is the abscissa corresponding to the position of the e-th reference point; y e is the ordinate corresponding to the position of the e-th reference point; M is the number of access points; RSSI j is the RSSI data value of the j-th access point; is the RSSI data value of the j-th access point at the e-th reference point.

[0065] Step 600: Determine the PDR positioning result of the target carrier according to the inertial sensor motion data in the online stage and the heading information of PDR.

[0066] In one embodiment, determining the PDR positioning result of the target carrier according to the inertial sensor motion data in the online stage and the heading information of PDR specifically includes:

[0067] Based on the inertial sensor motion data in the online phase, determine the real-time acceleration modulus value of the target carrier and the gait cycle information data; the gait cycle information data includes: real-time acceleration, time threshold, and acceleration peak threshold.

[0068] Based on the real-time acceleration modulus value of the target carrier and the gait cycle information data, perform step frequency detection and step length estimation to obtain a processing result; the processing result includes: step frequency detection result and step length estimation result.

[0069] Based on the step frequency detection result, step length estimation result, and heading information of PDR, determine the PDR positioning result of the target carrier.

[0070] Step 700: Use the thinking evolution algorithm to determine the fusion positioning result based on the geomagnetic matching positioning result, WiFi fingerprint positioning result, and PDR positioning result.

[0071] In one embodiment, using the thinking evolution algorithm to determine the fusion positioning result based on the geomagnetic matching positioning result, WiFi fingerprint positioning result, and PDR positioning result specifically includes:

[0072] Initialize the position coordinate population; each position coordinate in the position coordinate population is used as a candidate solution.

[0073] At the current iteration number, calculate the error with each candidate solution based on the geomagnetic matching positioning result, WiFi fingerprint positioning result, and PDR positioning result, and determine the fitness value.

[0074] Search based on the fitness value within the set fitness threshold range to obtain a search result; use the candidate solution corresponding to the search result as the parent generation; perform crossover and mutation based on the parent generation to obtain new candidate solutions.

[0075] Add the new candidate solutions to the position coordinate population, and perform elimination processing on the candidate solutions based on the set fitness threshold range to obtain the processed candidate solutions.

[0076] Judge whether the stop condition is reached; the stop condition is that the current iteration number reaches the set iteration number or the error at the current iteration number is within the set error interval; if so, use the candidate solution at the current iteration number as the fusion positioning result; if not, perform search, crossover, and mutation again.

[0077] Step 800: Determine the detection data based on the RSSI data in the online phase and the fusion positioning result.

[0078] In one embodiment, determining the detection data based on the RSSI data in the online phase and the fusion positioning result specifically includes:

[0079] Assign the RSSI data in the online stage to the fused positioning result to obtain the fused positioning result after assignment; calculate the physical coordinate distance based on the fused positioning result after assignment and the WiFi fingerprint positioning reference points to obtain the Edist set; the Edist set includes: the physical coordinate distance and the values corresponding to the WiFi fingerprint positioning reference points.

[0080] Judge whether the values in the Edist set are less than the set physical coordinate distance threshold to obtain a judgment result; determine the detection data according to the judgment result.

[0081] Step 900: Perform dimensionality reduction processing on the detection data, and use the processed detection data to update the UMAP dimensionality reduction fingerprint database to obtain the updated UMAP dimensionality reduction fingerprint database.

[0082] Step 1000: Process the RSSI fingerprint database based on the detection data and the updated UMAP dimensionality reduction fingerprint database to obtain an updated RSSI fingerprint database to achieve positioning.

[0083] In one embodiment, processing the RSSI fingerprint database based on the detection data and the updated UMAP dimensionality reduction fingerprint database to obtain an updated RSSI fingerprint database to achieve positioning specifically includes:

[0084] Based on the updated UMAP dimensionality reduction fingerprint database, retain and expand the detection data to the RSSI fingerprint database to obtain an updated RSSI fingerprint database.

[0085] In addition, the positioning method for updating the WiFi fingerprint database further includes:

[0086] Perform supervised dimensionality reduction processing on the complete RSSI data using the uniform manifold approximation and projection method.

[0087] Based on real-time geomagnetic fingerprint data and a geomagnetic fingerprint database, this application determines the geomagnetic matching positioning result of the target carrier by constructing the magnetic field similarity weight within the threshold range and using the Improved Weighted K-Nearest Neighbors (IWKNN) algorithm. According to the dimensionality-reduced real-time RSSI data, it uses the complete RSSI data of K reference points in the geomagnetic matching positioning result to solve the average Euclidean distance to limit the WiFi positioning area, and determines the WiFi fingerprint positioning result using the IWKNN algorithm. According to the real-time inertial sensor motion data, it uses a low-pass filter to denoise the accelerometer and magnetometer, and a high-pass filter to denoise the gyroscope, and fuses the heading angle using the complementary filtering algorithm to determine the PDR positioning result of the target carrier. For the geomagnetic matching positioning result, WiFi fingerprint positioning result, and PDR positioning result, it uses the thinking evolution algorithm to determine the fused positioning result. It assigns the current real-time RSSI data to the fused positioning result, determines a certain reference point according to the physical coordinate threshold, and decides whether to average the RSSI value or retain the value. It assigns the determined value to the selected corresponding RP or expands the retained value to the fingerprint database to achieve the dynamic update of the fingerprint database. This application updates the WiFi fingerprint database by combining WiFi and geomagnetic fingerprint libraries with pedestrian dead reckoning (PDR), which can solve the problem of updating the WiFi fingerprint database without reducing the positioning accuracy.

[0088] As Figures 2 - 3 shown, the specific operation steps of the method mentioned in this application are as follows:

[0089] Step 101: In the offline stage, collect the WiFi signal strength data of the target carrier, namely RSSI data, geomagnetic fingerprint data, and in the online stage, collect real-time inertial sensor motion data, real-time RSSI data, and real-time geomagnetic fingerprint data. The acquisition of these data is obtained by multiple sensors integrated on the target carrier.

[0090] In practical applications, the RSSI data is collected multiple times in the four directions of southeast, northwest at the same reference point. Each direction at the same reference point is collected for 15s, and then switched to the next direction; the user can perform a similar process for the next reference point until all the required data is collected in the test area.

[0091] The geomagnetic fingerprint data is collected 2 times at the same reference point along the forward direction, and each collection is for 15s until all the required data is collected in the test area.

[0092] In this embodiment, the indoor positioning area is divided into a grid network with an X, Y spacing of approximately 1.20m. The tester uses the same intelligent mobile terminal to collect data at the vertices of each grid network in the positioning area, and simultaneously records the local coordinate information of the positioning area where the reference point is located, which is recorded as the collection result of the reference point.

[0093] In practical applications, during the online phase, testers collect real-time inertial sensor motion data, real-time RSSI data, and real-time geomagnetic fingerprint data of the target carrier in the planned path for positioning.

[0094] Step 102: Perform data preprocessing on the RSSI data and geomagnetic fingerprint data respectively to obtain the RSSI data after filling in missing values, that is, complete RSSI data and multi-dimensional geomagnetic fingerprint data, and construct offline fingerprint databases respectively; perform supervised dimensionality reduction on the complete RSSI data through the Uniform Manifold Approximation and Projection (UMAP) algorithm.

[0095] Take the average of the collected RSSI data as the RSSI measurement value of the current RP point, and use the maximum number of accessible AccessPoints (APs) as the feature dimension to fill in the missing values. The missing values are filled with -100, with the unit of dBm, to construct an offline fingerprint database of complete RSSI data.

[0096] Take the average of the collected geomagnetic fingerprint data as the geomagnetic measurement value of the current RP point, and construct multi-dimensional geomagnetic features through rotation transformation, with the unit of μT, to construct an offline fingerprint database of multi-dimensional geomagnetic fingerprint data.

[0097] For the offline fingerprint database of complete RSSI data, use the RP coordinates as labels, and by adjusting the UMAP parameters, refine the mapping relationship from the fingerprint space to the position space with a supervised dimensionality reduction method, and at the same time save the mapping relationship between the dimensionality-reduced result and the actual coordinates to obtain the dimensionality-reduced data; the UMAP parameters include n_neighbors, n_components, min_dist, random_state, metric, target_metric, target_weight.

[0098] Among them, n_neighbors is the size of the local neighborhood for manifold approximation according to the number of adjacent sample points. n_components is the dimension of the embedding space (determining the dimension of the dimensionality-reduced space). min_dist is the effective minimum distance between the embedded points. random_state is the seed used by the random number generator. metric is the metric used to calculate the distance in the high-dimensional space, and optional ones include Euclidean distance, cosine distance, etc. target_metric is the metric used to measure the distance of the target array for supervised dimensionality reduction. target_weight is the weight factor between the data topology and the target topology.

[0099] In practical applications, the RSSI data is screened, and the appropriate and stable number M of non-repeated received MAC addresses is selected as the data dimension. The RSSI values at each reference point are supplemented, and the missing values are set to -100 dBm to enhance the data and ensure the same data dimension, obtaining complete RSSI data.

[0100] In practical applications, due to the high dimension of RSSI data, considering that the dimension of geomagnetic fingerprint data is relatively small, the matching error is relatively large when only using the geomagnetic modulus value. Therefore, multi-dimensional geomagnetic fingerprint data is constructed by combining three-axis geomagnetic data, geomagnetic intensity modulus, and geomagnetic horizontal intensity. To obtain relatively stable geomagnetic field data, it is necessary to transform the measured geomagnetic fingerprint data of the target carrier (data in the carrier system) to the geographic coordinate system (navigation system). The conversion between coordinate systems can be realized by the rotation matrix defined by Euler angles, as shown in formulas (1), (2), and (3). After calculating the rotation matrix, the Euler angles can be calculated based on the measured gravitational acceleration and geomagnetic data, and finally, the measured geomagnetic data is transformed to the navigation coordinate system. The Euler angles include yaw angle (ψ), pitch angle (θ), and roll angle (γ).

[0101] The representation of the rotation matrix defined by Euler angles:

[0102]

[0103] Similarly, formula (2) is obtained:

[0104]

[0105] Among them, represents the rotation matrix around the Z axis of the navigation system; represents the rotation matrix around the X axis of the navigation system; represents the rotation matrix around the Y axis of the navigation system; represents the rotation matrix from the navigation system (n system) to the carrier system (b system).

[0106] Then, the rotation matrix from the b system to the n system is expressed as:

[0107]

[0108] The roll angle and pitch angle are calculated using the gravitational acceleration, and the yaw angle is calculated using the geomagnetism. Assuming that the geomagnetic intensity observed by the magnetometer and accelerometer of the target carrier in the b system is and the acceleration is Among them, are the three-axis geomagnetic components respectively, are the three-axis acceleration components respectively. γ and θ can be obtained from formula (4):

[0109]

[0110] Among them, g is the local gravitational acceleration value in the n system.

[0111] ψ can be obtained from formula (5):

[0112]

[0113] Convert the measured geomagnetic data to the navigation coordinate system. Assume the magnetic field vector in the navigation system is Then m b Convert to m n The expression is represented as:

[0114]

[0115] It is obtained that the converted geomagnetic three-axis data is more stable than the unconverted geomagnetic three-axis components. Use formulas (7) and (8) to calculate M and M h , and form multi-dimensional geomagnetic fingerprint data.

[0116]

[0117] Among them, M is the geomagnetic intensity modulus; is the coordinate corresponding to the X-axis of the magnetic field vector in the geographic coordinate system in the geographic coordinate system; is the coordinate corresponding to the Y-axis of the magnetic field vector in the geographic coordinate system in the geographic coordinate system; is the coordinate corresponding to the Z-axis of the magnetic field vector in the geographic coordinate system in the geographic coordinate system; M h is the geomagnetic horizontal intensity.

[0118] The average values of both the RSSI data and the geomagnetic fingerprint data are taken as the current reference point information. Build an offline fingerprint database based on the reference point information, the complete RSSI data, and the multi-dimensional geomagnetic fingerprint data respectively.

[0119] In practical applications, when the position tags of fingerprints with similar RSS measurement values are far apart, serious positioning errors will occur. And UMAP is a manifold learning method. It can retain as much local and global data structures as possible. At the same time, it can perform supervised learning according to the provided tags to improve the spatial structure of features and enhance stability. For the constructed complete RSSI data offline fingerprint database, select the reference point coordinates as the supervision labels and perform supervised UMAP dimensionality reduction on the complete RSSI data.

[0120] Among them, assume X = [X1, X2,..., X N is the complete RSSI data, PL = [L1, L2,..., L N is its position label, and N is the number of reference points;

[0121] X i = [x1, x2, …, x M is the M RSSI values collected at the i-th reference point, L i = [l1, l2] is the corresponding two-dimensional (2D) location tag.

[0122] Given an input hyperparameter k, for each X i , select a set of the k nearest neighbors of the location tag L i according to a distance metric (such as the Euclidean distance) to calculate the weights w:

[0123]

[0124] where ρ i is the distance to the first nearest neighbor, and σ i is the distance to the k-th nearest neighbor.

[0125] Then, determine the low-dimensional embedding of the fingerprint by minimizing the fuzzy set cross-entropy using the Stochastic Gradient Descent (SGD) algorithm, while saving the mapping relationship between the result after dimensionality reduction and the actual coordinates.

[0126] The positioning result diagrams of Step 103 and Step 104 are as Figure 4 shown, and the positioning process is described as follows.

[0127] Step 103: According to the fusion positioning result determined at the previous moment, determine the reference points within the range by a threshold; construct a magnetic field similarity weight for the real-time geomagnetic fingerprint data and the reference points of the multi-dimensional geomagnetic fingerprint data within the threshold range, and use the Improved Weighted K-Nearest Neighbor (IWKNN) algorithm to determine the geomagnetic matching positioning result of the target carrier.

[0128] In practical applications, Step 103 specifically includes:

[0129] Obtain the fusion positioning result at the previous moment, set the physical coordinate threshold to 5m, and determine the reference point information within the range. Determine the number of reference points according to formula (10).

[0130]

[0131] where is the fusion positioning result at the previous moment, (x i , y i ) is the position of the i-th reference point, D p is the set physical coordinate threshold, which is 5m.

[0132] Calculate the Euclidean distance between the real-time fingerprint data and the multi-dimensional geomagnetic fingerprint data within the threshold range to determine the magnetic field similarity weight of each magnetic field candidate reference point. That is:

[0133] Calculate the Euclidean distance based on the real-time geomagnetic fingerprint data at the current position and the characteristics of the multi-dimensional geomagnetic fingerprint data within the threshold range to obtain the magnetic field similarity weight within the range. The Euclidean distance calculation formula for the real-time geomagnetic fingerprint data at the current position and the characteristics of the multi-dimensional geomagnetic fingerprint data within the threshold range, as well as the calculation formula for the magnetic field similarity weight within the range, are shown in Formula (11) and Formula (12) respectively.

[0134] The Euclidean distance calculation formula for the magnetic field characteristics of the real-time geomagnetic fingerprint data of the target carrier and the multi-dimensional geomagnetic fingerprint data within the threshold range is as follows:

[0135]

[0136] Among them, represents the Euclidean distance between the real-time geomagnetic fingerprint data and the characteristics of the multi-dimensional geomagnetic fingerprint data at the i-th reference point, and mag s represents the s-th dimension feature of the real-time geomagnetic fingerprint data, and MAG is represents the s-th dimension feature of the characteristics of the multi-dimensional geomagnetic fingerprint data at the i-th reference point, and s represents the dimension of the geomagnetic fingerprint data characteristics.

[0137] The calculation formula for the magnetic field similarity weight within the range is as follows:

[0138]

[0139] Among them, represents the magnetic field similarity weight of the i-th reference point, and min(d mag ) represents the minimum Euclidean distance of the reference points within the range.

[0140] Determine that the magnetic field similarity weight threshold is 0.3 and the weights greater than the threshold are retained. According to the threshold, determine the candidate magnetic field similarity weights and the information (coordinates) of the candidate reference points within the range, and use the IWKNN algorithm to determine the geomagnetic matching positioning result of the target carrier. The IWKNN algorithm is based on the WKNN algorithm and changes the weight coefficient of the ordinary WKNN algorithm. The weight coefficient calculation formula of the WKNN algorithm is shown in Formula (13), and the geomagnetic matching positioning result calculation formula is shown in Formula (14).

[0141] The weight coefficient calculation formula of the WKNN algorithm:

[0142]

[0143] At this time, w kis the magnetic field weight value of the k-th reference point, and K is the number of reference points within the magnetic field similarity weight threshold range.

[0144] Calculation formula for geomagnetic matching positioning result:

[0145]

[0146] where (x mag , y mag ) represents the geomagnetic matching positioning result.

[0147] Step 104: After dimensionality reduction of the real-time RSSI data, use the complete RSSI data of K reference points of the geomagnetic matching positioning result to constrain the boundary, limit the WiFi positioning search area, and use the IWKNN algorithm to determine the WiFi fingerprint positioning result.

[0148] In practical applications, Step 104 specifically includes:

[0149] Perform dimensionality reduction operation on the real-time RSSI data in the current model according to the constructed UMAP model in Step 102, utilize the RSSI information of K reference points used in the geomagnetic matching positioning result, and calculate the average RSSI Euclidean distance D according to formula (15) RSSI . Within this range, use the IWKNN algorithm to determine the WiFi fingerprint positioning result.

[0150] Average RSSI Euclidean distance D of K reference points RSSI Calculation formula:

[0151]

[0152] where RSSI j is the RSSI value of the j-th AP observed online, represents the RSSI value of the j-th AP at the k-th reference point.

[0153] According to the calculated D RSSI , repeat the judgment K times to adaptively select the required number of reference points E within the range. The selection method is shown in formula (16):

[0154]

[0155] where represents the RSSI value of the j-th AP at the i-th reference point.

[0156] After satisfying formula (10) and formula (16), the i-th reference point with RSSI information is selected. Then, the RSSI weight coefficient calculation formula is shown in formula (17):

[0157]

[0158] The w at this time e is the RSSI weight coefficient of the e-th reference point, and E is the number of reference points adaptively selected within the range.

[0159] Calculation formula for WiFi fingerprint positioning result:

[0160]

[0161] Among them, (x wifi , y wifi ) represents the WiFi fingerprint positioning result.

[0162] Step 105: Filter the motion data of the inertial sensor to obtain the denoised inertial measurement sensor data; use the complementary filter algorithm to use the three-axis acceleration data and the three-axis magnetometer data to assist in correcting the data of the gyroscope to provide a stable attitude angle estimation, so as to determine the heading information of PDR.

[0163] In practical applications, the specific content of the said step 105 includes:

[0164] The inertial sensor includes a three-axis accelerometer, a three-axis magnetometer and a three-axis gyroscope. Data is collected by the sensor. Since the collected data contains noise, filtering processing is performed for noise reduction. Among them, for the data collected by the accelerometer and the magnetometer, low-pass filtering is used for noise reduction to obtain acceleration data and geomagnetic data respectively (which is also the data required for geomagnetic matching positioning. When performing geomagnetic matching positioning, other features need to be calculated, and together with the features of the three-axis magnetometer, they form the dimension of the geomagnetic fingerprint data). For the data collected by the gyroscope, high-pass filtering is used for noise reduction to obtain angular velocity data.

[0165] When the target carrier is in a singular attitude, the "gimbal lock" problem will occur when using Euler angles for coordinate rotation, that is, the target carrier loses the degree of freedom of a certain coordinate axis, making the rotation around that axis ineffective. At this time, the quaternion method is mostly used to calculate Euler angles.

[0166] Represent the attitude by quaternion: q is a four-dimensional hypercomplex number, q0 is the real part, representing the rotation angle, and q1-q3 are the imaginary parts, jointly forming the rotation axis. The definition of quaternion is:

[0167]

[0168] The rotation matrix based on quaternion is:

[0169]

[0170] Then the formula for solving Euler angles through quaternion is:

[0171]

[0172] The heading information of the PDR is part of the PDR positioning result calculation. To provide a more stable and accurate heading angle estimation, a complementary filtering algorithm is used to fuse the acceleration data, magnetometer data, and angular velocity data generated by the gyroscope. The Mahony complementary filtering algorithm is a classic algorithm in this type of method, which mainly uses the angular velocity to calculate the attitude angle and simultaneously uses the acceleration data and magnetometer data to correct the angular velocity.

[0173] Assume that the output of the magnetometer in the body frame is m b , the output of the accelerometer is a b , and the output of the gyroscope is ω b . Normalize the acceleration output data and the magnetometer output data, and we can get:

[0174]

[0175] The gravitational acceleration in the n system is g, which can be expressed after normalization as After coordinate transformation We can obtain the theoretical output value v of the acceleration in the b frame. Cross-multiply and v, and then we can get the acceleration error correction vector e a . The formula can be expressed as:

[0176]

[0177] The normalized magnetometer output data is transformed from the b frame to the n frame, which can be expressed as:

[0178]

[0179] In the n frame, the theoretical value of the magnetic field intensity is:

[0180]

[0181] From this, we can calculate the theoretical output value u of the magnetometer in the b frame. Cross-multiply and u, and finally we can get the magnetic error correction vector e m . The formula can be expressed as:

[0182]

[0183] Through the acceleration error correction vector and the magnetic error correction vector, we can obtain the gyroscope error correction amount δ. Then the gyroscope data correction formula can be expressed as:

[0184]

[0185] Among them, K P and KI is the error control term, which is set by the parameter tuning method.

[0186] After completing the gyroscope data correction, calculate the quaternion at the current moment based on the attitude update equation of the quaternion, and then solve for the Euler angles through formula (21).

[0187] The attitude update equation based on the quaternion is:

[0188]

[0189] where ΔT is the time interval, q t+ΔT is the quaternion at time t + ΔT, and q t is the quaternion at time t, which is:

[0190]

[0191] is the differential equation matrix of the quaternion at time t, and the formula is:

[0192]

[0193] where w x , w y and w z are the angular velocity observation values output by the gyroscope in the b - system from time t to time t + ΔT.

[0194] Step 106: Determine the PDR positioning result of the target carrier according to the real - time inertial sensor motion data and the PDR heading information.

[0195] In the online positioning stage, before performing PDR positioning, initialization positioning is also required. This initialization only exists before the first gait occurs and is used to give an indoor location point as the initial position for dead reckoning. Taking the initial position as the center, determine the initialization coordinate information. According to steps 103 and 104, use the WiFi fingerprint positioning result as the initialization position to perform pedestrian dead reckoning.

[0196] PDR positioning includes three parts: step frequency detection, step length estimation, and heading estimation. Calculate these three parts respectively according to the real - time inertial sensor motion data. The PDR positioning process is as Figure 5 shown.

[0197] The step frequency detection part specifically includes:

[0198] Based on the motion data of the inertial sensor, determine the real-time acceleration modulus value of the target carrier, the maximum and minimum values of the real-time acceleration in a gait cycle, the time threshold and the acceleration threshold in a gait cycle, and perform peak-valley judgment. When the peak-valley judgment and the threshold judgment are satisfied, the gait estimation result is recorded as one step. Since the acceleration data includes the local gravitational acceleration, the influence of gravity needs to be removed.

[0199] The calculation formula for removing the influence of gravity after denoising the real-time acceleration modulus value is as follows:

[0200]

[0201] where a is the real-time acceleration modulus value after denoising and removing the influence of gravity, and g is the local gravitational acceleration in the n system.

[0202] Perform a trend judgment on the wave peak: During the walking process, when the acceleration value at the current moment minus the previous value is greater than 0, the acceleration curve is in the rising stage; when the acceleration value of the next moment minus the value at the current moment is less than 0, the acceleration curve is in the falling stage; then the acceleration value at the current moment is retained as the peak value.

[0203] Similarly, perform a trend judgment on the wave valley:

[0204] When the acceleration value at the current moment minus the previous value is less than 0, the acceleration curve is in the falling stage; when the acceleration value of the next moment minus the value at the current moment is greater than 0, the acceleration curve is in the rising stage; then the acceleration value at the current moment is retained as the valley value.

[0205] Perform an acceleration threshold judgment on the retained peak values and valley values. Set the acceleration threshold to 0.5 m / s 2 , if the peak value is greater than the threshold, it is retained as the step-counting wave peak, and if the valley value is less than the negative threshold, it is retained as the step-counting wave valley. Eliminate the influence of pseudo wave peaks and pseudo wave valleys.

[0206] The time consumed in a gait cycle is in the range of 0.2 s - 1 s. Set a gait cycle time threshold to 0.4 s, and judge whether the time difference between adjacent wave peaks is greater than the threshold. If it is satisfied, it is recorded as the occurrence of a gait.

[0207] The step length estimation part specifically includes:

[0208] Estimate the step length of the target carrier according to the step length detection model at the current moment to obtain the step length estimation result S; the step length estimation model adopts the Weinberg model based on acceleration data, and its calculation process is shown in formula (32):

[0209]

[0210] Wherein, K1 is a constant; a max and a min are the maximum and minimum values of the real-time acceleration in a gait cycle.

[0211] Wherein, the coefficient K1 of the step length estimation model is obtained by collecting non-online positioning data in the experimental area multiple times and calculating through the least squares method.

[0212] According to the step frequency detection result, the step length estimation result, the PDR heading information, and the fusion positioning result determined at the previous moment, determine the PDR positioning result of the target carrier.

[0213] The heading estimation part specifically includes:

[0214] Determined according to the PDR heading information described in step 105.

[0215] Through detecting step frequency iteration, perform pedestrian dead reckoning according to formula (33) to determine the PDR positioning result, and formula (33) is expressed as:

[0216]

[0217] Wherein, (x t+1 , y t+1 ) and (x t , y t ) respectively represent the position estimation coordinates of the target carrier at the moment t + 1 and the moment t, l t+1 , ψ t+1 are respectively the estimated step length and the estimated heading angle from the moment t to the moment t + 1.

[0218] Step 107: For the geomagnetic matching positioning result, the WiFi fingerprint positioning result, and the PDR positioning result, use the thinking evolution algorithm to determine the fusion positioning result. Take the geomagnetic positioning result, the WiFi fingerprint positioning result, and the PDR positioning result as the input of the thinking evolution algorithm, and take reaching the required set threshold as the requirement to output the fusion positioning result.

[0219] In practical applications, step 107 specifically includes:

[0220] Initialize the population of position coordinates, with each position coordinate as a candidate solution; calculate the error from each candidate solution based on the geomagnetic matching positioning result, WiFi fingerprint positioning result, and PDR positioning result, and evaluate the fitness value; search for candidate solutions with higher fitness values as parents; generate new candidate solutions through crossover and mutation, where the crossover operation combines two parent candidate solutions to generate new candidate solutions, and the mutation operation is used to introduce randomness to prevent the algorithm from falling into a local optimal solution; add the new candidate solutions to the population of position coordinates and eliminate candidate solutions with lower fitness values; determine whether the number of iterations or the error meets the requirements. If yes, output the optimal solution; if not, perform the search, crossover, and mutation again to determine whether the requirements are met. The optimal solution is the fused positioning result.

[0221] The logic demonstration diagram for updating the WiFi fingerprint database in steps 108 and 109 is as Figure 6 shown, and the specific process is as described below.

[0222] Step 108: Assign the current real-time RSSI data to the fused positioning result; calculate the physical coordinate distance between the fused positioning result and the reference points selected for WiFi fingerprint positioning, and at the same time retain the reference point information in the Edist set; set a physical coordinate distance threshold, and judge the values in the Edist set. If a certain value is less than the threshold, assign the RSSI data obtained by averaging the real-time RSSI data and the RP RSSI data corresponding to this value to the RP corresponding to this value; otherwise, retain the fused positioning result and the real-time RSSI data, that is, retain the value.

[0223] In practical applications, step 108 specifically includes:

[0224] The fused positioning result is closer to the real position. Assign the current real-time RSSI data to the fused positioning result and perform a judgment operation as new information.

[0225] Calculate the physical coordinate distance between the fused positioning result and the K reference points in the WiFi fingerprint positioning, and jointly save the calculation results and the reference point information in the Edist set for subsequent operations.

[0226] According to the physical coordinate distance threshold, judge the calculation results in the Edist set, specifically including:

[0227] Set the physical coordinate distance threshold to 0.3, with the same unit as the reference point coordinates, which is m. If a certain value is less than or equal to the threshold, assign the RSSI data obtained by averaging the RSSI data of the new information and the RSSI data of the RP corresponding to this value to the RP corresponding to this value; otherwise, retain the fused positioning result and the real-time RSSI data, that is, retain the value.

[0228] Step 109: Dimension reduction is performed on the averaged RSSI values or the RSSI data of the reserved values, the UMAP change is detected, and the UMAP model is adjusted; the original averaged RSSI values are assigned to the corresponding RPs or the reserved values are expanded into the fingerprint database to achieve dynamic update of the fingerprint database.

[0229] In practical applications, Step 109 specifically includes:

[0230] Supervised dimension reduction is performed on the averaged RSSI data or the RSSI data of the reserved values through UMAP, the UMAP change is detected, and the UMAP model is adjusted to apply the updated content to the next stage. That is, according to the UMAP parameters, the UMAP model is retrained for positioning at the next moment.

[0231] The original averaged RSSI data and the corresponding RPs are used to replace the original RPs to update the fingerprint database information, or the reserved values are expanded into the fingerprint database to achieve dynamic update of the fingerprint database.

[0232] Through the above method, the present application utilizes the characteristics of easy acquisition and strong adaptability of WiFi signal strength values, geomagnetic fingerprint data, and inertial sensor motion data to implement a positioning technology for updating the WiFi fingerprint database by combining WiFi and geomagnetic fingerprint libraries with pedestrian dead reckoning (PDR). The geomagnetic fingerprint positioning is used to constrain the WiFi positioning area, the positioning accuracy is improved by dimension-reducing the RSSI data, and the fusion positioning result is obtained through the thinking evolution algorithm by combining PDR and used as the coordinates of the current position point to expand or update the fingerprint database. In addition, the inertial sensor motion data is used to determine the step frequency and step length in PDR positioning, and the heading information is calculated by complementary filtering fusion using the data output by the accelerometer and magnetometer and the angular velocity output by the gyroscope to improve the accuracy, making the positioning of the model as accurate as possible, ensuring the accuracy of fingerprint database update, and enhancing the stability of the system. Without significantly increasing the positioning cost, the present application utilizes multiple sensors equipped on the target carrier to increase the information source, and under the support of the positioning algorithm, updates the WiFi fingerprint database for indoor positioning, providing a low-cost, fast, and stable fingerprint database update positioning technology for indoor environments.

[0233] The present application provides a positioning device for updating a WiFi fingerprint database, including:

[0234] An information data acquisition module, configured to acquire information data of a target carrier; the information data includes: WiFi signal strength data in the online stage, WiFi signal strength data in the offline stage, geomagnetic fingerprint data in the online stage, geomagnetic fingerprint data in the offline stage, and inertial sensor motion data in the online stage; the WiFi signal strength data includes: RSSI data.

[0235] A processing module for processing information data to obtain processed data. The processed data includes: complete RSSI data, multi-dimensional geomagnetic fingerprint data, and heading information of PDR.

[0236] A fingerprint database construction module for constructing a fingerprint database. The fingerprint database includes: an RSSI fingerprint database constructed based on the complete RSSI data, a geomagnetic fingerprint database constructed based on the multi-dimensional geomagnetic fingerprint data, and a UMAP dimensionality reduction fingerprint database obtained by performing dimensionality reduction processing on the RSSI fingerprint database using the UMAP method.

[0237] A geomagnetic matching positioning result determination module for determining the geomagnetic matching positioning result of the target carrier using an improved weighted K-nearest neighbor algorithm based on the geomagnetic fingerprint data and multi-dimensional geomagnetic fingerprint data in the online stage.

[0238] A WiFi fingerprint positioning result determination module for determining the WiFi fingerprint positioning result using an improved weighted K-nearest neighbor algorithm based on the geomagnetic matching positioning result, the complete RSSI data after dimensionality reduction processing, and the RSSI data in the online stage.

[0239] A PDR positioning result determination module for determining the PDR positioning result of the target carrier based on the inertial sensor motion data in the online stage and the heading information of PDR.

[0240] A fusion positioning result determination module for determining the fusion positioning result using the thinking evolution algorithm based on the geomagnetic matching positioning result, the WiFi fingerprint positioning result, and the PDR positioning result.

[0241] A detection data determination module for determining detection data based on the RSSI data in the online stage and the fusion positioning result.

[0242] An update module for performing dimensionality reduction processing on the detection data and updating the UMAP dimensionality reduction fingerprint database using the processed detection data to obtain an updated UMAP dimensionality reduction fingerprint database.

[0243] An update positioning module for processing the RSSI fingerprint database based on the detection data and the updated UMAP dimensionality reduction fingerprint database to obtain an updated RSSI fingerprint database for positioning.

[0244] Such as Figure 7 In practical applications, this embodiment provides a system for updating the WiFi fingerprint database, including:

[0245] A data acquisition module for acquiring RSSI data, geomagnetic fingerprint data, and real-time inertial sensor motion data at the current reference point position using various sensors integrated on the target carrier.

[0246] The data acquisition module includes an inertial sensor integration unit, a wireless signal strength measurement unit, and a data storage unit. The inertial sensor integration unit is used to receive the accelerometer data, gyroscope data, magnetometer data, etc. of the target carrier at the current reference point. The wireless signal strength measurement unit is used to receive the measured wireless signal strength (RSSI) in the environment. The data storage unit is used to store various sensor data collected (such as RSSI, acceleration, angular velocity, geomagnetic data, etc.), store historical positioning data, and store the models and parameters of the positioning algorithm for subsequent processing and analysis.

[0247] The preprocessing module is used to perform data preprocessing on the RSSI data and geomagnetic fingerprint data respectively to obtain the RSSI data after filling the missing values, that is, the complete RSSI data and the multi-dimensional geomagnetic fingerprint data, and construct the offline fingerprint libraries respectively; perform supervised dimensionality reduction on the complete RSSI data through the Uniform Manifold Approximation and Projection (UMAP) algorithm. The preprocessing module includes a missing value filling fingerprint library construction unit, a multi-dimensional geomagnetic fingerprint library construction unit, and a UMAP dimensionality reduction unit.

[0248] The missing value filling fingerprint library construction unit is used to fill the missing values for the maximum number of access points (APs) that the RP can receive, which is the global RP feature dimension (that is, each RP has the same number of feature dimensions). The missing values are filled with -100, and the unit is dBm. According to the reference point coordinates and RSSI data, an offline fingerprint library of complete RSSI data is constructed. The multi-dimensional geomagnetic fingerprint library construction unit is used to convert the averaged geomagnetic measurement values owned by the current RP into geomagnetic measurement values in the navigation system through a rotation matrix to construct multi-dimensional geomagnetic features, and the unit is μT. According to the reference point coordinates and multi-dimensional geomagnetic features, an offline fingerprint library of multi-dimensional geomagnetic data is constructed. The UMAP dimensionality reduction unit is used to take the RP coordinates as labels for the offline fingerprint library of complete RSSI data, adjust the UMAP parameters, and use the supervised dimensionality reduction method to refine the mapping relationship from the fingerprint space to the position space, and save the mapping relationship between the dimensionality-reduced result and the actual coordinates to obtain the dimensionality-reduced data.

[0249] The geomagnetic matching positioning module is used to determine the reference points within the range determined by the threshold according to the fusion positioning result determined at the previous moment; construct the magnetic field similarity weights for the real-time geomagnetic fingerprint data and the reference points of the multi-dimensional geomagnetic fingerprint data within the threshold range, and use the improved weighted K-nearest neighbor algorithm (IWKNN) to determine the geomagnetic matching positioning result of the target carrier. The geomagnetic matching positioning module includes a candidate reference point determination unit, a magnetic field similarity weight determination unit, and a geomagnetic matching unit.

[0250] The candidate reference point determination unit is used to set a physical coordinate distance threshold for the fusion positioning result determined at the previous moment to determine candidate reference points; the physical coordinate distance threshold is set to 5 m. The magnetic field similarity weight determination unit is used to calculate the Euclidean distance between the real-time geomagnetic fingerprint data at the current position and the characteristics of the multi-dimensional geomagnetic fingerprint data within the threshold range to obtain the magnetic field similarity weight within the range. The magnetic field matching unit is used to determine the geomagnetic matching positioning result of the target carrier according to the IWKNN algorithm for the weights greater than the magnetic field similarity weight threshold and the corresponding candidate reference point information; the magnetic field similarity weight threshold is set to 0.3.

[0251] The WiFi fingerprint positioning module is used to reduce the dimension of the real-time RSSI data and then use the complete RSSI data of K reference points in the geomagnetic matching positioning result to constrain the boundary, limit the WiFi positioning search area, and use the IWKNN algorithm to determine the WiFi fingerprint positioning result.

[0252] The WiFi fingerprint positioning module includes a UMAP dimension reduction unit and a WiFi fingerprint matching unit. The UMAP dimension reduction unit is used to reduce the dimension of the real-time RSSI data. The WiFi fingerprint matching unit is used to calculate the average Euclidean distance between the reduced real-time RSSI data and the RSSI information of K reference points used in the geomagnetic matching positioning result, adaptively select the number of reference points within the average Euclidean distance range, calculate the weights, and determine the WiFi fingerprint positioning result of the target carrier according to the IWKNN algorithm.

[0253] The PDR heading information determination module is used to filter the noise of the inertial sensor motion data to obtain the denoised inertial measurement sensor data; the complementary filtering algorithm is used to fuse the heading angles measured by the accelerometer and gyroscope of the target carrier to determine the heading information of the PDR.

[0254] The PDR heading information determination module includes a noise filtering unit and a heading angle fusion unit. The noise filtering unit is used to filter the data containing noise collected by the inertial sensor. For the data collected by the accelerometer and magnetometer, low-pass filtering is used to remove noise to obtain acceleration data and geomagnetic data respectively. For the data collected by the gyroscope, high-pass filtering is used to remove noise to obtain angular velocity data. The heading angle fusion unit is used to fuse the heading angles calculated by the accelerometer, magnetometer and gyroscope using the complementary filtering algorithm, and determine the heading estimation result of the target carrier based on the attitude update equation of quaternion according to the current attitude.

[0255] The PDR positioning module is used to determine the PDR positioning result of the target carrier according to the real-time inertial sensor motion data and PDR heading information. The PDR positioning module includes a step frequency detection unit, a step length estimation unit, a heading estimation unit, and a dead reckoning unit. The step frequency detection unit is used to perform peak-valley judgment according to the acceleration modulus value, acceleration peak / valley value, acceleration threshold value, and time threshold value in a gait cycle. When the peak-valley judgment and threshold judgment are satisfied, the gait estimation result is recorded as one step, and the step frequency detection result of the target carrier is obtained. The step length estimation unit is used to estimate the step length of the target carrier according to the step length regression model at the current moment, and obtain the step length estimation result. The heading estimation unit is used to determine the current attitude of the target carrier according to the inertial sensor data at the current position point, and obtain the heading estimation result by using the PDR heading information determination module. The dead reckoning unit is used to calculate according to the step frequency detection result, step length estimation result, and heading estimation result, and obtain the current dead reckoning result.

[0256] The fusion positioning module is used to determine the fusion positioning result by using the thinking evolution algorithm for the geomagnetic matching positioning result, WiFi fingerprint positioning result, and PDR positioning result.

[0257] The fusion positioning module includes a fusion positioning unit. The fusion positioning unit is used to calculate the fitness value based on the geomagnetic matching positioning result, WiFi fingerprint positioning result, and PDR positioning result, select parents according to the fitness, and generate new candidate solutions through crossover and mutation, add them to the original population, and continuously update. When the iteration times or error requirements are met, the fusion positioning result is output.

[0258] The fingerprint assignment module is used to assign the current real-time RSSI data to the fusion positioning result as new information judgment; calculate the physical coordinate distance between the fusion positioning result and the selected reference point in the WiFi fingerprint positioning, and at the same time retain the reference point information in the Edist set; set the physical coordinate distance threshold, and judge the values in the Edist set. If a certain value is less than the threshold, the RSSI data obtained by averaging the RSSI data of the new information and the RP RSSI data corresponding to this value is assigned to the RP corresponding to this value. Otherwise, the fusion positioning result and the real-time RSSI data are retained, that is, the value is retained.

[0259] The fingerprint database update module is used to reduce the dimension of the averaged RSSI value or the RSSI data of the retained value, detect the change of UMAP, and adjust the UMAP model; assign the original averaged RSSI value to the corresponding RP or expand the retained value to the fingerprint database to realize the dynamic update of the fingerprint database.

[0260] The fingerprint database update module includes a UMAP model update unit and an updated and expanded fingerprint database unit. The UMAP model update unit is used to perform UMAP supervised dimensionality reduction on the results generated by the fingerprint assignment module, detect UMAP changes, and update the UMAP model. The updated and expanded fingerprint database unit is used to replace the original RP with the original averaged RSSI data and the corresponding RP, update the fingerprint database information, or expand the reserved value into the fingerprint database to achieve dynamic update of the fingerprint database.

[0261] An embodiment of the present application further provides an electronic device, including a memory and a processor. The memory is used to store a computer program, and the processor is used to run the computer program so that the electronic device executes a method for updating a WiFi fingerprint database based on the combination of WiFi and geomagnetic fingerprint databases and pedestrian dead reckoning (PDR) provided in Embodiment 1.

[0262] In practical applications, the above electronic device can be a series of electronic devices with data interaction functions such as smartphones, PDAs, intelligent toys, and portable vehicle navigation devices.

Claims

1. A positioning method for updating a WiFi fingerprint database, characterized in that Including: Obtaining information data of a target carrier; the information data includes: WiFi signal strength data in the online stage, WiFi signal strength data in the offline stage, geomagnetic fingerprint data in the online stage, geomagnetic fingerprint data in the offline stage, and inertial sensor motion data in the online stage; the WiFi signal strength data includes: RSSI data; Processing the information data to obtain processed data; the processed data includes: complete RSSI data, multi-dimensional geomagnetic fingerprint data, and heading information of PDR; Constructing a fingerprint library; the fingerprint library includes: an RSSI fingerprint library constructed according to the complete RSSI data, a geomagnetic fingerprint library constructed according to the multi-dimensional geomagnetic fingerprint data, and a UMAP dimensionality reduction fingerprint library obtained by performing dimensionality reduction processing on the RSSI fingerprint library using the UMAP method; Using an improved weighted K-nearest neighbor algorithm to determine the geomagnetic matching positioning result of the target carrier according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data; Using an improved weighted K-nearest neighbor algorithm, based on the geomagnetic matching positioning result, and the complete RSSI data after dimensionality reduction processing and the RSSI data in the online stage, to determine the WiFi fingerprint positioning result; Determining the PDR positioning result of the target carrier according to the inertial sensor motion data in the online stage and the heading information of PDR; Using a thinking evolution algorithm to determine the fusion positioning result according to the geomagnetic matching positioning result, the WiFi fingerprint positioning result, and the PDR positioning result; Determining detection data according to the RSSI data in the online stage and the fusion positioning result; Performing dimensionality reduction processing on the detection data, and using the processed detection data to update the UMAP dimensionality reduction fingerprint library to obtain an updated UMAP dimensionality reduction fingerprint library; Based on the detection data and the updated UMAP dimensionality reduction fingerprint library, processing the RSSI fingerprint library to obtain an updated RSSI fingerprint library to achieve positioning.

2. The positioning method for updating the WiFi fingerprint database according to claim 1, characterized in that, Processing the information data to obtain processed data, specifically including: Screening the RSSI data in the offline stage, and performing missing value filling processing on the screened RSSI data to obtain complete RSSI data; Using a rotation matrix to convert the geomagnetic fingerprint data in the offline stage to the geographic coordinate system to obtain multi-dimensional geomagnetic fingerprint data; the multi-dimensional geomagnetic fingerprint data includes: three-axis geomagnetic data, geomagnetic intensity modulus, and geomagnetic horizontal intensity; the rotation matrix is determined by Euler angles; the Euler angles are determined according to the gravitational acceleration and the geomagnetic fingerprint data in the offline stage; the Euler angles include: yaw angle, pitch angle, and roll angle; Filtering the noise of the inertial sensor motion data in the online stage to obtain denoised inertial sensor motion data; the inertial sensor motion data includes data collected by a three-axis accelerometer, a three-axis magnetometer, and a three-axis gyroscope; Using a complementary filtering algorithm to correct the data collected by the three-axis gyroscope with the data collected by the three-axis accelerometer and the three-axis magnetometer to perform attitude angle estimation to obtain the heading information of PDR; specifically including: Determine the attitude angle according to the angular velocity of the triaxial gyroscope, and correct the angular velocity of the triaxial gyroscope by using the acceleration data collected by the triaxial accelerometer and the data collected by the triaxial magnetometer to obtain corrected data; Based on the corrected data, determine the Euler angle according to the attitude update equation of the quaternion to obtain the heading information of PDR.

3. The positioning method for updating the WiFi fingerprint database according to claim 1, characterized in that, Adopt an improved weighted K-nearest neighbor algorithm to determine the geomagnetic matching positioning result of the target carrier according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data, specifically including: Based on the set physical coordinate threshold, use to determine the reference point information within the threshold range; Calculate the Euclidean distance according to the geomagnetic fingerprint data in the online stage and the multi-dimensional geomagnetic fingerprint data corresponding to the reference point information; the calculation formula of the Euclidean distance is: Determine the magnetic field similarity weight within the threshold range based on the Euclidean distance; the calculation formula of the magnetic field similarity weight is: Determine the candidate magnetic field similarity weight based on the magnetic field similarity weight threshold, and determine the geomagnetic matching positioning result according to the candidate magnetic field similarity weight; the expression of the geomagnetic matching positioning result is: Among them, is the abscissa of the fusion positioning result at the previous moment; x i is the abscissa corresponding to the position of the i-th reference point; is the ordinate of the fusion positioning result at the previous moment; y i is the ordinate corresponding to the position of the i-th reference point; D p is the physical coordinate threshold; is the Euclidean distance between the multi-dimensional geomagnetic fingerprint data characteristics corresponding to the geomagnetic fingerprint data in the online stage and the information of the i-th reference point; s is the serial number of the feature dimension; mag s is the s-th dimension feature of the geomagnetic fingerprint data in the online stage; MAG is is the s-th dimension feature of the multi-dimensional geomagnetic fingerprint data characteristics corresponding to the information of the i-th reference point; is the magnetic field similarity weight; d mag is the Euclidean distance; x mag is the abscissa of the geomagnetic matching positioning result; y mag is the ordinate of the geomagnetic matching positioning result; k is the reference point serial number; K is the number of reference points within the magnetic field similarity weight threshold range; w k is the magnetic field weight value of the k-th reference point; x k is the abscissa corresponding to the position of the k-th reference point; y k is the ordinate corresponding to the position of the k-th reference point.

4. The positioning method for updating the WiFi fingerprint database according to claim 1, wherein Adopt an improved weighted K-nearest neighbor algorithm to determine the WiFi fingerprint positioning result based on the geomagnetic matching positioning result, the complete RSSI data after dimensionality reduction processing, and the RSSI data in the online stage, specifically including: Perform data dimensionality reduction processing on the RSSI data in the online stage by using the uniform manifold approximation and projection method, and adopt an improved weighted K-nearest neighbor algorithm to determine the WiFi fingerprint positioning result based on the geomagnetic matching positioning result and the complete RSSI data after dimensionality reduction processing; the calculation formula of the WiFi fingerprint positioning result is: Among them, x wifi is the abscissa of the WiFi fingerprint positioning result; y wifi is the ordinate of the WiFi fingerprint positioning result; e is the serial number of the reference point within the adaptive selection range; E is the number of reference points within the adaptive selection range; w e is the RSSI data weight coefficient; x e is the abscissa corresponding to the position of the e-th reference point; y e is the ordinate corresponding to the position of the e-th reference point; M is the number of access points; RSSI j is the RSSI data value of the j-th access point; is the RSSI data value of the j-th access point at the e-th reference point.

5. The positioning method for updating the WiFi fingerprint database according to claim 1, wherein Determine the PDR positioning result of the target carrier according to the inertial sensor motion data in the online stage and the heading information of PDR, specifically including: According to the inertial sensor motion data in the online stage, determine the real-time acceleration modulus value of the target carrier and the gait cycle information data; the gait cycle information data includes: real-time acceleration, time threshold, acceleration peak threshold; Perform step frequency detection and step length estimation according to the real-time acceleration modulus value of the target carrier and the gait cycle information data to obtain a processing result; the processing result includes: step frequency detection result and step length estimation result; Determine the PDR positioning result of the target carrier according to the step frequency detection result, the step length estimation result, and the heading information of PDR.

6. The positioning method for updating the WiFi fingerprint database according to claim 1, characterized in that, Adopt the thinking evolution algorithm to determine the fusion positioning result according to the geomagnetic matching positioning result, the WiFi fingerprint positioning result, and the PDR positioning result, specifically including: Initialize the position coordinate population; each position coordinate in the position coordinate population is used as a candidate solution; In the current iteration, calculate the error with each candidate solution according to the geomagnetic matching positioning result, the WiFi fingerprint positioning result, and the PDR positioning result, and determine the fitness value; Perform a search based on the fitness value within the set fitness threshold range to obtain a search result; Use the candidate solution corresponding to the search result as the parent generation; Perform crossover and mutation based on the parent generation to obtain new candidate solutions; Add the new candidate solutions to the population of position coordinates, and eliminate the candidate solutions based on a set fitness threshold range to obtain the processed candidate solutions; Determine whether the stopping condition is reached; the stopping condition is that the current iteration number reaches the set iteration number or the error at the current iteration number is within the set error range; If so, use the candidate solutions at the current iteration number as the fusion positioning result; If not, perform search, crossover, and mutation again.

7. The positioning method for updating the WiFi fingerprint database according to claim 1, wherein Determine the detection data according to the RSSI data in the online phase and the fusion positioning result, specifically including: Assign the RSSI data in the online phase to the fusion positioning result to obtain the assigned fusion positioning result; Calculate the physical coordinate distances according to the assigned fusion positioning result and the WiFi fingerprint positioning reference points to obtain the Edist set; the Edist set includes: the physical coordinate distances and the corresponding values of the WiFi fingerprint positioning reference points; Determine whether the values in the Edist set are less than the set physical coordinate distance threshold to obtain a judgment result; Determine the detection data according to the judgment result.

8. The positioning method for updating the WiFi fingerprint database according to claim 1, characterized in that, Process the RSSI fingerprint library based on the detection data and the updated UMAP dimensionality-reduced fingerprint library to obtain an updated RSSI fingerprint library for positioning, specifically including: Based on the updated UMAP dimensionality-reduced fingerprint library, retain and expand the detection data to the RSSI fingerprint library to obtain an updated RSSI fingerprint library.

9. The positioning method for updating the WiFi fingerprint database according to claim 1, wherein The positioning method for updating the WiFi fingerprint library further includes: Perform supervised dimensionality reduction processing on the complete RSSI data using the Uniform Manifold Approximation and Projection algorithm.

10. A positioning device for updating a WiFi fingerprint database, characterized in that, The positioning device for updating the WiFi fingerprint library includes: An information data acquisition module for acquiring the information data of the target carrier; the information data includes: the WiFi signal strength data in the online phase, the WiFi signal strength data in the offline phase, the geomagnetic fingerprint data in the online phase, the geomagnetic fingerprint data in the offline phase, and the inertial sensor motion data in the online phase; the WiFi signal strength data includes: RSSI data; A processing module for processing the information data to obtain processed data; the processed data includes: complete RSSI data, multi-dimensional geomagnetic fingerprint data, and the heading information of PDR; A fingerprint library construction module for constructing a fingerprint library; the fingerprint library includes: an RSSI fingerprint library constructed according to the complete RSSI data, a geomagnetic fingerprint library constructed according to the multi-dimensional geomagnetic fingerprint data, and a UMAP dimensionality-reduced fingerprint library obtained by performing dimensionality reduction processing on the RSSI fingerprint library using the UMAP method; A geomagnetic matching positioning result determination module for determining the geomagnetic matching positioning result of the target carrier according to the geomagnetic fingerprint data in the online phase and the multi-dimensional geomagnetic fingerprint data using an improved weighted K-nearest neighbor algorithm; A WiFi fingerprint positioning result determination module for determining the WiFi fingerprint positioning result based on the geomagnetic matching positioning result, the complete RSSI data after dimensionality reduction processing, and the RSSI data in the online phase using an improved weighted K-nearest neighbor algorithm; The PDR positioning result determination module is used to determine the PDR positioning result of the target carrier according to the inertial sensor motion data in the online stage and the heading information of the PDR; The fused positioning result determination module is used to adopt the thinking evolution algorithm to determine the fused positioning result according to the geomagnetic matching positioning result, the WiFi fingerprint positioning result and the PDR positioning result; The detection data determination module is used to determine the detection data according to the RSSI data in the online stage and the fused positioning result; The update module is used to perform dimensionality reduction processing on the detection data and update the UMAP dimensionality reduction fingerprint database with the processed detection data to obtain an updated UMAP dimensionality reduction fingerprint database; The updated positioning module is used to process the RSSI fingerprint database based on the detection data and the updated UMAP dimensionality reduction fingerprint database to obtain an updated RSSI fingerprint database for positioning.