Indoor positioning method fusing GIS and user characteristic behavior analysis

By combining GIS geospatial data modeling and a particle filter framework with user behavior characteristics, the problems of low indoor positioning accuracy and insufficient understanding of user intent were solved, achieving high-precision and stable indoor positioning, and improving user experience and space utilization efficiency.

CN121594877APending Publication Date: 2026-03-03JIANGXI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511769842.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing indoor positioning technologies suffer from low positioning accuracy, frequent drift, and inability to understand user intent in high-precision scenarios, lacking comprehensive consideration of building structure, user behavior, and environmental characteristics.

Method used

By using GIS geospatial data acquisition and modeling, combined with data from accelerometers, gyroscopes, magnetometers, and barometers, user gait and movement status are identified. A particle filtering framework is established, and by updating particle weights and resampling, user behavior features are integrated to optimize positioning, thus achieving a closed loop of perception-inference-optimization.

Benefits of technology

It improves indoor positioning accuracy and stability, and the navigation path is highly matched with the user's intent. It solves bottlenecks such as large signal interference and particle degradation, and improves user experience and space utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121594877A_ABST
    Figure CN121594877A_ABST
Patent Text Reader

Abstract

The invention provides an indoor positioning method fusing GIS and user characteristic behavior analysis. The indoor positioning method comprises the following steps: constructing a semantic GIS model comprising a structural layer, a functional layer and a POI layer; based on multi-sensor data, Kalman filtering and ellipsoid calibration are adopted for noise reduction processing, and barometer height measurement and magnetometer magnetic anomaly detection are combined; the gait, stride frequency and step length of the user are recognized, an activity-position transition probability matrix is established, and intention inference is carried out in combination with a GIS function layer; designing a particle filtering framework: dynamically initializing a particle swarm based on a Wi-Fi signal, propelling particles in combination with a motion model, calculating a signal matching degree through Gaussian matching, and fusing an environment adaptive weight and a behavior feature weight to realize weight updating; an adaptive resampling mechanism triggered by an ESS threshold is adopted, user behavior characteristics are fused to carry out optimization circulation, a maximum posterior probability position is calculated, local grid optimization is carried out, and the problems of low indoor positioning precision, large signal fluctuation and particle degradation are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of indoor positioning and navigation technology, and in particular to an indoor positioning method that integrates GIS and user characteristic behavior analysis. Background Technology

[0002] Indoor positioning technology is widely used in scenarios such as shopping malls, hospitals, and underground parking lots. However, existing technologies have significant limitations. Traditional GPS cannot be used due to indoor signal blockage and multipath effects, while indoor positioning technologies based on Wi-Fi and Bluetooth generally have an accuracy of less than 1.2 meters, which is difficult to meet the requirements for high precision.

[0003] Existing methods mostly rely solely on signal strength matching, lacking comprehensive consideration of building structure, user behavior, and environmental characteristics. This leads to frequent problems such as positioning drift and particle depletion. Furthermore, they fail to understand user intent, resulting in positioning results that are out of sync with actual user needs. For example, they may navigate to the wrong store in a shopping mall or fail to accurately track the location of medical staff in a hospital.

[0004] While existing research has attempted to introduce techniques such as particle filtering and behavior analysis, it lacks a systematic approach to deeply integrate GIS semantic models with user behavior characteristics, making it difficult to achieve a closed loop of perception-inference-optimization. There is an urgent need for a high-precision indoor positioning method that can comprehensively consider building spatial structure, user behavior patterns, and environmental interference factors to improve positioning accuracy, stability, and user experience, and meet the high requirements of scenarios such as smart buildings, precision marketing, and emergency evacuation. Summary of the Invention

[0005] The purpose of this invention is to provide an indoor positioning method that integrates GIS and user characteristic behavior analysis.

[0006] The problem to be solved by this invention is to address key issues in indoor positioning such as excessive environmental interference, low positioning accuracy, and weak behavioral understanding.

[0007] An indoor positioning method integrating GIS and user characteristic behavior analysis is proposed, and the technical solution adopted is as follows: S1: GIS geospatial data acquisition and modeling, acquiring CAD drawings and BIM on-site survey data of buildings, constructing semantic GIS models, including structural layers, functional layers, and POI layers, and outputting vector maps containing geometric and attribute information; S2: Based on the data collected by the mobile phone from the accelerometer, gyroscope, magnetometer, and barometer, noise reduction, deviation elimination, and coordinate system alignment are performed. The received signal strength indications of Wi-Fi SSID and Bluetooth beacon are scanned and recorded. A time-based sliding window averaging filter is used to smooth fluctuations. The barometer data is used for altitude measurement, and the magnetometer data is used to detect magnetic anomalies. S3: Based on the collected data, identify the user's gait, cadence, and stride length, and identify the transition of movement state. Establish an activity-location transition probability matrix, combine the user's current location and GIS semantic function layer to infer activity and intent, and use a path loss model based on the GIS structure layer to calculate the probability of passage between any two points. S4: Establish a particle filtering framework. When there is no prior knowledge, randomly initialize the particle swarm based on the first Wi-Fi scan result. When there is a previous position, randomly initialize it around it. Based on the collected data and motion model, advance each particle forward. The new position of the particle = old position + step size * (movement direction + noise). S5: Match the signal strength at the current position of the particle with the signal scanned by the actual device, calculate the matching degree based on the Gaussian distribution probability function and update the weight. When the particle passes through the wall and unreachable area during the prediction stage, its weight is directly set to zero. The weight is updated in combination with user behavior characteristics and environmental characteristics. S6: Resample particles according to their weights, copy only high-weight particles, perform optimization loops based on user behavior features, calculate the maximum posterior probability estimate of the particle swarm after resampling, and use it as the final position output.

[0008] Furthermore, in step S1, CAD drawings and BIM site survey data of the building are acquired, a semantic GIS model is constructed, and a vector map containing geometric and attribute information is output, including: We obtain CAD drawings of the building from the architectural design unit, including floor plans and sections in AutoCAD format, and acquire BIM point cloud data with millimeter-level precision. To avoid data deviation, we use the FME software coordinate transformation tool to align the Beijing 54 coordinate system of the CAD drawings with the WGS84 coordinate system of the BIM point cloud data to ensure that the two spatial positions are completely matched. Structural layer: The core structural elements of the building are automatically extracted from the fused data, and each element is assigned geometric coordinates and attribute labels. The walls are identified by their thickness and material, and are marked as load-bearing walls. Functional layer: Based on structural layer data and combined with building purpose, functional areas are divided through a preset rule engine; POI layer: Key location points are manually marked on the basis of the functional layer. Each POI point includes a name, coordinates, and functional description. Image recognition is used to supplement the POI attributes. The constructed semantic GIS model is exported in GeoJSON format to ensure that each geographic feature contains complete geometric and attribute information. The geometric information is accurate coordinates, and the attribute information includes the accessibility of the structural layer, the purpose of the functional layer, and the functional description of the POI layer. Logical inconsistencies are detected by the QGIS data verification tool, and a correction report is generated to ensure that the output data is 100% usable.

[0009] Furthermore, in step S2, noise reduction, bias elimination, and coordinate system alignment are performed. A time-based sliding window averaging filter is used to smooth fluctuations. Barometer data is used for altitude measurement, and a magnetometer is used to detect magnetic anomalies. This includes: Kalman filtering is applied to accelerometer and gyroscope data. The state vector = position + velocity + acceleration. The process noise covariance matrix is ​​adjusted to suppress high-frequency noise. When violent motion with acceleration > 5 m / s² is detected, the process noise parameter is increased to avoid over-smoothing. An ellipsoidal calibration algorithm is used to calibrate the magnetometer data. Interference parameters are calculated based on 5 seconds of static data, and the original magnetic field vector is converted into a calibrated vector to eliminate magnetic field distortion caused by the metal structure. Using gyroscope data as a reference, accelerometer and magnetometer data are transformed to the same coordinate system through a quaternion rotation matrix. The rotation matrix R is obtained by gyroscope integration. Accelerometer data a = R·a_raw, magnetometer data m = R·m_raw, where a_raw is the original accelerometer data and m_raw is the original magnetometer data. The accelerometer and gyroscope data are averaged using a 500ms sliding window with 25 data points in the window. The barometer data is filtered using a 300ms window. The acceleration value at the current time t is the average of all acceleration values ​​from t-500ms to t. The output frequency is 100Hz. Using the barometric altitude formula: Where P is the real-time air pressure, and P0 is the standard atmospheric pressure at sea level (101325 Pa). Temperature compensation is performed using temperature sensor data. Based on the international standard atmospheric model and the ideal gas law, the deviation between sea level temperature and the standard temperature is equated to a virtual altitude deviation. This virtual altitude deviation is substituted into the air pressure formula, and its exponential relationship is utilized, followed by a first-order linear approximation Taylor expansion. T represents the current temperature in °C. Calculate the deviation of the current magnetic field strength from the standard Earth magnetic field of 25-65 μT. If |deviation|>20 μT, mark it as a magnetic anomaly and associate it with the structural layer in the GIS model.

[0010] Furthermore, in step S3, the user's gait, cadence, and stride length are identified, and motion state transitions are recognized to establish an activity-position transition probability matrix, including: Threshold peak detection is performed based on the Z-axis accelerometer data processed by S2. The Z-axis data is averaged and filtered by a 500ms sliding window with a window size of 25 points and a sampling rate of 50Hz. The standard deviation σ and mean μ of the data within the window are calculated. The dynamic threshold is set to μ + 2σ. Peak points exceeding the threshold are detected, which are the gait cycle points. The step frequency is calculated by the time interval between adjacent peaks. Step frequency = 1 / interval, with the unit being steps / second. The height-stride length empirical model is adopted, and the basic stride length is calculated by combining user information = 0.4 + 0.03 * height, in meters. Dynamic correction is performed by integrating accelerometer data, and the stride length = (integrated result * 0.5) + basic stride length, where the integrated result is the area of ​​the accelerometer Z-axis data within the gait cycle. The state is determined based on the variance of accelerometer data: <0.05m² / s indicates stationary, 0.05-0.2m² / s indicates walking, and >0.2m² / s indicates running. When the state changes, a state transition flag is triggered. Based on users' historical location data, location-activity pairs are extracted, and a two-dimensional probability matrix is ​​established. The rows represent the current location, and the columns represent the target location. The transition probability is calculated as: P(target location|current location) = (number of moves from the current location to the target location) / (total number of moves from the current location). The general matrix is ​​weighted and adjusted based on the user's historical behavior.

[0011] Furthermore, in step S3, the user's current location and the GIS semantic function layer are combined to infer activity and intent. Based on the GIS structure layer, a path loss model is used to calculate the probability of passage between any two points, including: By comparing the current location with the functional attributes of the GIS semantic function layer, location semantic information can be obtained. Using a Bayesian inference framework, the probability of user intent is calculated as: P(intent|location, time) ∝ P(location|intent) × P(time|intent), and the final probability is obtained after normalization. When a user's actual behavior does not match their inferred intent, the probability weight of that intent is reduced to avoid accumulating errors. Obtain wall information between two points from the GIS structural layer; An improved logarithmic distance path loss model is adopted: , where d is the distance between the signal receiving point and the transmitting source, PL(d) is the current path loss value, d0 is the reference distance, PL(d0) is the path loss at the reference distance, and n is the path loss exponent, which is adjusted according to the building material type; Calculate the probability of passage based on the Sigmoid function. Where k=0.5 is an adaptive coefficient, based on a signal strength threshold of 80dB; If there is a wall between two points that prevents passage, then the probability of passage is set to 0.

[0012] Furthermore, in S4, a particle filter framework is established. When there is no prior knowledge, the particle swarm is randomly initialized based on the first Wi-Fi scan result. When there is a previous position, it is randomly initialized around it, including: Define a particle, each particle contains four state variables: (x, y, z) coordinates, motion direction angle θ, velocity v, and weight w. Experiments have verified that the best balance is achieved between accuracy and computational efficiency. The total number of particles is fixed at 500. The core class for particle filtering is developed using Java language based on Android. It inherits the standard particle filtering framework, and overrides the initialization of particle swarm, state prediction method, and weight update method. Particle objects are stored based on a dynamic array, and each particle contains the above state variables. The initial weights of all particles are set to 1 / 500, or 0.002, to ensure that the sum of the weights is 1. When there is no prior knowledge, the particle swarm is randomly initialized based on the first Wi-Fi scan result: based on the first Wi-Fi scan result obtained by S2, the received signal strength indication value of all wireless access points is extracted, and the signal strength mean μ and standard deviation σ are calculated; Select the wireless access point with the highest received signal strength indicator value and obtain its coordinates in the GIS model; Centered on the coordinates of the wireless access point, with a radius of 10 meters, the particle positions are randomly generated using a Gaussian distribution: x1=3.5+N(0,2.5), y1=2.1+N(0,2.5), z1=0, defaulting to the ground level, with subsequent heights corrected by the barometer, where N(0,2.5) represents Gaussian noise with a mean of 0 and a standard deviation of 2.5; Based on the distance d1 from the particle position to the wireless access point, the initial weights are calculated using the exponential decay model. ; If there is a previous position, then randomly initialize around it: take the final position output at the previous moment as the center point, and dynamically adjust the initialization radius according to the user's motion state identified by S3. The radius is 1.5 meters for the stationary state, 2.5 meters for the walking state, and 4.0 meters for the running state. Particles are generated around the anchor point with an adaptive radius and uniform distribution, x2=x_prev+(2×radius)×(rand()-0.5), y2=y_prev+(2×radius)×(rand()-0.5), where x and y are the coordinates of the particle, z2=z_prev+N(0,0.2), where z2 is the height noise. Due to the accuracy limitations of the barometer, radius is the quantization radius of the uncertain position region, and rand() is a random number between 0 and 1. The distance d2 from the particle position to the anchor point is included in the weight w2, w2=1-(d2 / radius)×0.5.

[0013] Furthermore, in step S4, each particle is advanced based on the collected data and motion model, including: The uniform linear motion model is adopted, and the state transition equations are: x_new=x_old+step_length×cos(θ_old)+noise_x, y_new=y_old+step_length×sin(θ_old)+noise_y, z_new=z_old+step_height×noise_z, where step_length is the step length recognition of S3, θ_old is the current motion direction angle of the particle, which comes from gyroscope data, noise_x, noise_y, and noise_z are Gaussian noise, which satisfy the normal distribution (0,0.1), and step_height is dynamically adjusted according to the step frequency of S3. When the step frequency is <1.2 steps / second, step_height=0.1m, and when the step frequency is >1.5 steps / second, step_height=0.15m. The noise standard deviation is dynamically adjusted according to the environment. The non-magnetic anomaly region has a standard deviation of σ=0.1, while the magnetic anomaly region obtained based on S2 detection has a standard deviation of σ=0.2. The motion uncertainty is increased due to magnetic field interference.

[0014] Furthermore, in step S5, the signal intensity at the particle's current position is matched with the signal scanned by the actual device, and the matching degree is calculated and the weights are updated based on a Gaussian distribution probability function, including: Feature vectors are constructed based on the GIS model in S1 and the Wi-Fi and Bluetooth signal data obtained in S2. For each particle, query the pre-stored signal fingerprint of that location in the GIS model based on its coordinates (x, y, z); The weighted Euclidean distance is used to assign weights to Wi-Fi and Bluetooth signals respectively, with Wi-Fi weight = 0.7 and Bluetooth weight = 0.3, and the matching distance is calculated. The probability is calculated based on the matching distance by using the exponential part of the probability density function of the Gaussian distribution as the likelihood function. Where σ is the adaptive standard deviation, with an initial value of 2.0, which is dynamically adjusted according to the environment; Before normalization, the probability P is used as the new weight update factor for the particle, w_new=w_old×P, where w_old is the old weight of the particle and w_new is the new weight of the particle. If the current environmental signal fluctuates greatly, σ will automatically increase to 3.0; when the signal is stable, σ will decrease to 1.5.

[0015] Furthermore, in S5, when a particle passes through a wall or inaccessible area during the prediction phase, its weight is directly set to zero. The weight is then updated by combining user behavior characteristics and environmental characteristics, including: Ray detection is performed on the particle prediction path based on the GIS structure layer data constructed using S1. If an intersection is detected, the weight of that particle is set to 0, and w_new=0. Spatial grid indexing is used to accelerate wall detection, reducing the complexity from O(n1) to O(log n1) and ensuring that the time taken for a single detection is less than 5ms, where n1 is the total number of all walls in the GIS model; Behavioral feature fusion: Based on the activity intent inference results of S3, the particle weights are weighted, w_behavior=1+0.2×intent_prob, where w_behavior is the behavior weight factor and intent_prob is the intent probability; Environmental feature fusion: Based on S2 magnetic anomaly detection, the weights are attenuated, w_environment=1-0.3×anomaly_strength, where w_environment is the environmental weight factor and anomaly_strength is the magnetic anomaly intensity; The final weights are fused based on Bayes' theorem, where w_new is the prior weight, and w_behavior and w_environment are the likelihoods. The final weight is: w_final = w_new × w_behavior × w_environment.

[0016] Furthermore, in step S6, particles are resampled according to weights, an optimization loop is performed based on user behavior features, and the maximum posterior probability estimate of the resampled particle swarm is calculated, including: Calculate the effective sample number (ESS) of the current particle swarm. ,in Let ESS be the weight of the i-th particle. When ESS < 30% of the total number of particles, resampling is triggered. The particles are divided into three layers according to their weights: a high-weight layer (weight > 0.005) is directly copied according to the weight ratio; a medium-weight layer (weight ≤ 0.005) is resampled using residuals, copying the integer part first and then randomly copying the remaining fractional part according to probability; and a low-weight layer (weight ≤ 0.002) is discarded directly. By adjusting the copy ratio, the total number of particles after resampling is ensured to remain at 500 to avoid particle depletion. Quantify behavioral characteristics by extracting key features from the activity-location transition probability matrix and intent inference results obtained from S3: activity probability, location preference, and time features. Apply a behavior feature adjustment factor to high-weight particles with a weight > 0.005, and give additional weight boost to particles that meet the behavior features. w_adjusted = weight × (1 + 0.3 × activity_prob × position_prob), where w_adjusted is the final weight, activity_prob is the activity probability, and position_prob is the position preference probability. After resampling, perform 1-2 behavior optimization loops on the new particle swarm, adjusting the weights and resampling in each loop, until the adjustment range of the behavior feature weights is less than 5%. In the resampled particle swarm, the posterior probability of each position (x,y,z) is calculated as follows: P(x,y,z|data)=Σ(w_i×δ(x-x_i,y-y_i,z-z_i)), where data is the observed data, δ is the Dirac function, w_i is the particle weight, and (x_i,y_i,z_i) is the particle position; The position with the highest posterior probability is selected as the final output, i.e., (x_final,y_final,z_final)=argmax(P(x,y,z|data)), where argmax() is the maximum value of the parameter; Local optimization is performed on the candidate positions. A 5×5 meter grid is constructed with the position with the highest posterior probability as the center, the posterior probability of each grid point is calculated, and the grid point with the highest probability is selected as the final output.

[0017] The beneficial effects of this invention are: to achieve a leap from passive location tracking to active intent understanding in indoor positioning, to organically integrate building space structure, user behavior patterns and environmental interference factors, to form a complete closed loop of perception-inference-optimization, and to improve positioning accuracy.

[0018] It maintains high stability in complex indoor environments such as crowded shopping malls or office buildings, while optimizing the user experience: the navigation path is highly matched with the user's actual intention, avoiding navigation errors and location drift problems common in traditional positioning systems.

[0019] It not only solves the core bottlenecks of indoor positioning such as high signal interference, particle degradation, and poor environmental adaptability, but also makes the positioning results naturally match the user's daily activity patterns by actively integrating user behavior characteristics. It provides a highly reliable and intelligent location service foundation for application scenarios such as smart building management, precise commercial marketing, and emergency evacuation command, and truly realizes the leap of indoor positioning from technically usable to user-friendly, improving the efficiency of indoor space utilization and the value of user experience. Attached Figure Description

[0020] Figure 1This is a flowchart of an indoor positioning method that integrates GIS and user characteristic behavior analysis. Detailed Implementation

[0021] The present invention will be further described clearly and completely below, but the scope of protection of the present invention is not limited thereto.

[0022] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0023] Example 1 An indoor positioning method integrating GIS and user characteristic behavior analysis is proposed, and the technical solution adopted is as follows: S1: GIS geospatial data acquisition and modeling, acquiring CAD drawings and BIM on-site survey data of buildings, constructing semantic GIS models, including structural layers, functional layers, and POI layers, and outputting vector maps containing geometric and attribute information; S2: Collects data from accelerometer, gyroscope, magnetometer, and barometer from smartphones, performs noise reduction, eliminates bias, aligns coordinates, scans and records the received signal strength indications of Wi-Fi SSID and Bluetooth beacon, uses time-based sliding window averaging filter to smooth fluctuations, barometer data is used for altitude measurement, and magnetometer data is used to detect magnetic anomalies. S3: Based on the collected data, identify the user's gait, cadence, and stride length, and identify the transition of movement state. Establish an activity-location transition probability matrix, combine the user's current location and GIS semantic function layer to infer activity and intent, and use a path loss model based on the GIS structure layer to calculate the probability of passage between any two points. S4: Establish a particle filtering framework. When there is no prior knowledge, randomly initialize the particle swarm based on the first Wi-Fi scan result. When there is a previous position, randomly initialize it around it. Based on the collected data and motion model, advance each particle forward. The new position of the particle = old position + step size * (movement direction + noise). S5: Match the signal strength at the current position of the particle with the signal scanned by the actual device, calculate the matching degree based on the Gaussian distribution probability function and update the weight. When the particle passes through the wall and unreachable area during the prediction stage, its weight is directly set to zero. The weight is updated in combination with user behavior characteristics and environmental characteristics. S6: Resample particles according to their weights, copy only high-weight particles, perform optimization loops based on user behavior features, calculate the maximum posterior probability estimate of the particle swarm after resampling, and use it as the final position output.

[0024] Furthermore, in step S1, CAD drawings and BIM site survey data of the building are acquired, a semantic GIS model is constructed, and a vector map containing geometric and attribute information is output, including: We obtain architectural CAD drawings from architectural design firms, including AutoCAD-format floor plans and sections, and acquire millimeter-precision BIM point cloud data such as Revit-format component information. To avoid data discrepancies, we use FME software coordinate transformation tools to align the Beijing 54 coordinate system of the CAD drawings with the WGS84 coordinate system of the BIM point cloud data, ensuring that the two spatial positions are completely matched. Structural layer: Automatically extract core structural elements of the building, such as walls, stairs, and elevators, from the fused data, and assign geometric coordinates and attribute labels to each element. Geometric coordinates are such as polygon boundaries, and attribute labels are such as "walls - not passable" and "stairs - passable". Walls are identified by thickness such as 200mm and material such as concrete, and are marked as load-bearing walls. Functional layer: Based on the structural layer data and combined with the building's uses such as offices, meeting rooms, and corridors, functional areas are divided through a preset rule engine. The rule engine is such as "continuous wall enclosed space = functional area". Four adjacent wall enclosed areas are labeled as "meeting room - can accommodate 10 people" and associated with attributes such as "equipment type - projector". POI layer: Based on the functional layer, key locations such as service desk, restrooms, and emergency exits are manually marked. Each POI includes a name, coordinates, and functional description such as "Restroom - Male and Female Separation". POI attributes are supplemented through image recognition, such as by taking photos of buildings with a mobile phone, for example, recognizing "Emergency Exit" signs and associating them with "Emergency Passage" tags. The constructed semantic GIS model is exported in GeoJSON format, ensuring that each geographic feature contains complete geometric and attribute information. Geometric information includes precise coordinates such as latitude and longitude or (x,y) points in a relative coordinate system, and attribute information includes "accessibility" in the structural layer, "purpose" in the functional layer, and "functional description" in the POI layer. Logical inconsistencies are detected using the QGIS plugin, such as the coordinates of "meeting room in the functional layer" exceeding the range of "walls in the structural layer," and a correction report is generated to ensure that the output data is 100% usable.

[0025] Furthermore, in step S2, noise reduction, bias elimination, and coordinate system alignment are performed. A time-based sliding window averaging filter is used to smooth fluctuations. Barometer data is used for altitude measurement, and a magnetometer is used to detect magnetic anomalies. This includes: Kalman filtering is applied to accelerometer and gyroscope data. The state vector = position + velocity + acceleration. The process noise covariance matrix is ​​adjusted to suppress high-frequency noise such as user hand shaking. When violent motion with acceleration > 5 m / s² is detected, the process noise parameter is increased to avoid over-smoothing. An ellipsoidal calibration algorithm is used to calibrate the magnetometer data. Interference parameters are calculated based on 5 seconds of static data. The original magnetic field vector is converted into a calibrated vector to eliminate magnetic field distortion caused by metal structures such as elevator shafts. Since the gyroscope is sensitive to rotation, the gyroscope data is used as a reference. The accelerometer and magnetometer data are transformed to the same coordinate system, such as the local coordinate system of the device, through a quaternion rotation matrix. The rotation matrix R is obtained by gyroscope integration. The accelerometer data is a = R·a_raw, and the magnetometer data is m = R·m_raw, where a_raw is the original accelerometer data and m_raw is the original magnetometer data. The accelerometer and gyroscope data are averaged using a 500ms sliding window with 25 data points in the window. The barometer data is filtered using a 300ms window. The acceleration value at the current time t is the average of all acceleration values ​​from t-500ms to t. The output frequency is 100Hz. Using the barometric altitude formula: Where P is the real-time air pressure, and P0 is the standard atmospheric pressure at sea level (101325 Pa). Temperature compensation is performed using temperature sensor data. Based on the international standard atmospheric model and the ideal gas law, the deviation between sea level temperature and the standard temperature is equated to a virtual altitude deviation. This virtual altitude deviation is substituted into the air pressure formula, and its exponential relationship is utilized, followed by a first-order linear approximation Taylor expansion. T represents the current temperature in °C. Calculate the deviation of the current magnetic field strength from the standard Earth magnetic field of 25-65 μT. If |deviation|>20 μT, mark it as a magnetic anomaly, such as a sudden change in the magnetic field when the elevator is running, and associate it with the structural layer in the GIS model, such as magnetic anomaly - located in the elevator shaft.

[0026] Furthermore, in step S3, the user's gait, cadence, and stride length are identified, and motion state transitions are recognized to establish an activity-position transition probability matrix, including: Threshold peak detection is performed based on the Z-axis accelerometer data processed by S2. The Z-axis data is averaged and filtered by a 500ms sliding window with a window size of 25 points and a sampling rate of 50Hz. The standard deviation σ and mean μ of the data within the window are calculated. The dynamic threshold is set to μ + 2σ. Peak points exceeding the threshold are detected, which are the gait cycle points. The step frequency is calculated by the time interval between adjacent peaks. Step frequency = 1 / interval, with the unit being steps / second. The height-stride length empirical model is adopted, and the basic stride length is calculated by combining user information such as height 170cm = 0.4 + 0.03 * height, in meters. Dynamic correction is performed by integrating accelerometer data. The stride length = (integrated result * 0.5) + basic stride length, where the integrated result is the area of ​​the accelerometer Z-axis data within the gait cycle. The state is determined based on the variance of accelerometer data: <0.05m² / s indicates stationary, 0.05-0.2m² / s indicates walking, and >0.2m² / s indicates running. When the state changes, such as from stationary to walking, a state transition flag is triggered. Based on users' historical location data, such as their trajectory over the past 30 days, location-activity pairs such as office-work and corridor-movement are extracted, and a two-dimensional probability matrix is ​​established. The rows represent the current location, and the columns represent the target location. The transition probability is calculated as: P(target location|current location) = (number of moves from the current location to the target location) / (total number of moves from the current location). When the number of times a user moves from the office to the meeting room is 60 and the total number of moves from the office is 100, then P(meeting room|office) = 0.6. Based on users' historical behavior, the general matrix is ​​weighted and adjusted. When 90% of users' office-meeting room moves occur at 10:00 AM, the probability weight for that time period is increased to 0.85.

[0027] Furthermore, in step S3, the user's current location and the GIS semantic function layer are combined to infer activity and intent. Based on the GIS structure layer, a path loss model is used to calculate the probability of passage between any two points, including: Associate the current location, such as the office, with the functional attributes of the GIS semantic function layer, such as the office area - which can accommodate 10 people, to obtain the location semantic information; Using a Bayesian inference framework, the probability of user intent is calculated as: P(intent|location, time) ∝ P(location|intent) × P(time|intent). If the user is in the office at 9:30 AM, then P(start work|office, 9:30) = [P(office|start work) × P(9:30|start work)] / P(office, 9:30). Based on historical data, P(office|start work) = 0.8, and based on the time distribution, P(9:30|start work) = 0.9. After normalization, the final probability is obtained. When a user's actual behavior does not match their inferred intent, such as failing to work after starting, the probability weight of that intent is reduced to avoid accumulating errors. Obtain wall information between two points from the GIS structure layer, such as wall - impassable, staircase - passable; An improved logarithmic distance path loss model is adopted: Where d is the distance between the signal receiving point and the transmitting source, PL(d) is the current path loss value, d0 is the reference distance, PL(d0) is the path loss at the reference distance, and n is the path loss index, which is adjusted according to the building material type. d0=1m, the measured baseline value PL(d0)=30dB, n=2.5, which is dynamically adjusted based on the building material. For concrete walls, n=3.0, and for glass walls, n=2.0. Calculate the probability of passage based on the Sigmoid function. Where k=0.5 is the adaptive coefficient, based on a signal strength threshold of 80dB. When the distance between two points d=5m and n=2.5, then PL(d)=30+10×2.5×log 10 (5)≈47.5dB, probability of passage = This is highly probable; If there is a wall between two points that prevents passage, such as a concrete wall, then the probability of passage is set to 0.

[0028] Furthermore, in S4, a particle filter framework is established. When there is no prior knowledge, the particle swarm is randomly initialized based on the first Wi-Fi scan result. When there is a previous position, it is randomly initialized around it, including: Define a particle, each particle contains four state variables: (x, y, z) coordinates, motion direction angle θ, velocity v, and weight w. Experiments have verified that the best balance is achieved between accuracy and computational efficiency. The total number of particles is fixed at 500. The core class for particle filtering is developed using Java language based on Android. It inherits the standard particle filtering framework, and overrides the initialization of particle swarm, state prediction method, and weight update method. Particle objects are stored based on a dynamic array, and each particle contains the above state variables. The initial weights of all particles are set to 1 / 500, or 0.002, to ensure that the sum of the weights is 1. When there is no prior knowledge, the particle swarm is randomly initialized based on the first Wi-Fi scan result: based on the first Wi-Fi scan result obtained by S2, the received signal strength indication value of all wireless access points is extracted, and the signal strength mean μ and standard deviation σ are calculated; Select the wireless access point with the highest received signal strength indicator value, such as Office_Wireless Access Point, and obtain its coordinates in the GIS model, such as (x=3.5, y=2.1); Centered on the coordinates of the wireless access point, and with a radius of 10 meters in a typical indoor environment, particle positions are randomly generated using a Gaussian distribution: x1=3.5+N(0,2.5), y1=2.1+N(0,2.5), z1=0, with the default ground level, and subsequent heights corrected by the barometer. N(0,2.5) represents Gaussian noise with a mean of 0 and a standard deviation of 2.5. Based on the distance d1 from the particle position to the wireless access point, the initial weights are calculated using the exponential decay model. The particle weight 2 meters away from the wireless access point is The particle weight at a distance of 5 meters from the wireless access point is approximately 0.35. If there is a previous position, then randomly initialize around it: take the final position output at the previous time step, such as (x_prev=4.2, y_prev=3.1) as the center point, and dynamically adjust the initialization radius according to the user's motion state identified by S3. The radius is 1.5 meters for the stationary state, 2.5 meters for the walking state, and 4.0 meters for the running state. Particles are generated around the anchor point with an adaptive radius and uniform distribution, x2=x_prev+(2×radius)×(rand()-0.5), y2=y_prev+(2×radius)×(rand()-0.5), where x and y are the coordinates of the particle, z2=z_prev+N(0,0.2), where z2 is the height noise. Due to the accuracy limitations of the barometer, radius is the quantization radius of the uncertain position region, and rand() is a random number between 0 and 1. The distance d2 from the particle position to the anchor point is included in the weight w2, w2=1-(d2 / radius)×0.5, distance=0 meters, that is, the anchor point position weight=1.0, distance=radius weight=0.5.

[0029] Furthermore, in step S4, each particle is advanced based on the collected data and motion model, including: The uniform linear motion model is adopted, and the state transition equations are: x_new=x_old+step_length×cos(θ_old)+noise_x, y_new=y_old+step_length×sin(θ_old)+noise_y, z_new=z_old+step_height×noise_z, where step_length is the step length recognition of S3, θ_old is the current motion direction angle of the particle, which comes from gyroscope data, noise_x, noise_y, and noise_z are Gaussian noise, which satisfy the normal distribution (0,0.1), and step_height is dynamically adjusted according to the step frequency of S3. When the step frequency is <1.2 steps / second, step_height=0.1m, and when the step frequency is >1.5 steps / second, step_height=0.15m. The noise standard deviation is dynamically adjusted according to the environment. The non-magnetic anomaly region has a standard deviation of σ=0.1, while the magnetic anomaly region obtained based on S2 detection has a standard deviation of σ=0.2. The motion uncertainty is increased due to magnetic field interference.

[0030] Furthermore, in step S5, the signal intensity at the particle's current position is matched with the signal scanned by the actual device, and the matching degree is calculated and the weights are updated based on a Gaussian distribution probability function, including: Based on the GIS model in S1 and the Wi-Fi and Bluetooth signal data obtained in S2, feature vectors are constructed and stored at location (3.5, 2.1): Wi-Fi signal vector = [-65, -72], corresponding to the received signal strength indication of the two wireless access points; Bluetooth beacon vector = [-50, -60], corresponding to the two beacons. For each particle, query the pre-stored signal fingerprint of that location in the GIS model based on its coordinates (x,y,z). The particle position (3.5,2.1,0) matches the pre-stored fingerprint: Wi-Fi received signal strength indicator = [-65,-72], Bluetooth received signal strength indicator = [-50,-60]. Compare this fingerprint with the real-time signal scanned by the current device, such as Wi-Fi received signal strength indicator = [-64,-70], Bluetooth received signal strength indicator = [-52,-58]. Using a weighted Euclidean distance, weights are assigned to Wi-Fi and Bluetooth signals respectively, with Wi-Fi weight = 0.7 and Bluetooth weight = 0.3, to calculate the matching distance. ; The probability is calculated based on the matching distance by using the exponential part of the probability density function of the Gaussian distribution as the likelihood function. Where σ is the adaptive standard deviation, with an initial value of 2.0, which is dynamically adjusted according to the environment; Before normalization, the probability P is used as the new weight update factor for the particle, w_new = w_old × P, where w_old is the old weight of the particle, w_new is the new weight of the particle, the original weight of the particle = 0.002, and the matching distance = 1.8. The new weight is 0.002 × 0.75 = 0.0015. If the current environmental signal fluctuates greatly or there is a large flow of people, S2 will detect that the standard deviation of the received signal strength indicator is >5dB, and σ will automatically increase to 3.0. When the signal is stable and the fluctuation is <2dB, σ will decrease to 1.5.

[0031] Furthermore, in S5, when a particle passes through a wall or inaccessible area during the prediction phase, its weight is directly set to zero. The weight is then updated by combining user behavior characteristics and environmental characteristics, including: Based on the GIS structural layer data constructed by S1, such as the coordinates of wall polygons, ray detection is performed on the particle prediction path. The particle moves from position A(3.5,2.1) to B(3.5,3.1). Ray intersection is used to check whether line segment AB intersects with the wall-impassable polygon in the structural layer. If an intersection such as AB passing through a concrete wall is detected, then the weight of that particle is directly set to 0, and w_new=0; Spatial grid indexes such as R-trees are used to accelerate wall detection, reducing the complexity from O(n1) to O(log n1) and ensuring that the time taken for a single detection is less than 5ms, where n1 is the total number of all walls in the GIS model; Behavioral feature fusion: Based on the activity intent inference result of S3, such as the probability of working in the office = 0.85, the particle weights are weighted, w_behavior = 1 + 0.2 × intent_prob, where w_behavior is the behavior weight factor and intent_prob is the intent probability. If the intent probability = 0.85, then w_behavior = 1.17. Environmental feature fusion: Based on S2, the magnetic anomaly detection, such as the magnetic anomaly intensity of the elevator shaft = 0.8, is weighted by attenuating the weights, w_environment = 1 - 0.3 × anomaly_strength, where w_environment is the environmental weight factor and anomaly_strength is the magnetic anomaly intensity. If the magnetic anomaly intensity = 0.8, then w_environment = 0.76. Based on Bayes' theorem, the final weights are fused, where w_new is the prior weight, and w_behavior and w_environment are the likelihoods. The final weight is: w_final = w_new × w_behavior × w_environment, where w_new = 0.0015, w_behavior = 1.17, and w_environment = 0.76. Therefore, w_final = 0.0015 × 1.17 × 0.76 ≈ 0.0013, where w_final is the final weight.

[0032] Furthermore, in step S6, particles are resampled according to weights, an optimization loop is performed based on user behavior features, and the maximum posterior probability estimate of the resampled particle swarm is calculated, including: Calculate the effective sample number (ESS) of the current particle swarm. ,in The weight of the i-th particle is ESS. When ESS < 30% of the total number of particles, such as 150 out of 500 particles, resampling is triggered. The particles are divided into three layers according to their weights: a high-weight layer (weight > 0.005) and a medium-weight layer (weight 0.002 < weight ≤ 0.005). The particles are directly copied according to their weight ratio, such as a particle with a weight of 0.01 being copied twice. The particles are resampled using residual resampling, first copying the integer part and then randomly copying the remaining fractional part according to probability. The particles are discarded directly. By adjusting the copy ratio, the total number of particles is ensured to remain at 500 after resampling to avoid particle depletion. Quantify behavioral characteristics by extracting key features from the activity-location transition probability matrix and intent inference results obtained from S3: activity probability such as work probability = 0.85, location preference such as office probability = 0.7, and time features such as 9:30 AM probability = 0.9. Apply a behavioral feature adjustment factor to high-weight particles with a weight > 0.005. Give additional weight boost to particles that meet the behavioral features. w_adjusted = weight × (1 + 0.3 × activity_prob × position_prob), where w_adjusted is the final weight, activity_prob is the activity probability, and position_prob is the position preference probability. If the particle's current position is the office, position_prob = 0.7, and the current activity is work, activity_prob = 0.85, then the adjustment factor = 1 + 0.3 × 0.85 × 0.7 ≈ 1.18. After resampling, perform 1-2 behavior optimization loops on the new particle swarm, adjusting the weights and resampling in each loop, until the adjustment range of the behavior feature weights is less than 5%. In the resampled particle swarm, the posterior probability of each position (x,y,z) is calculated as follows: P(x,y,z|data)=Σ(w_i×δ(x-x_i,y-y_i,z-z_i)), where data is the observed data, δ is the Dirac function, w_i is the particle weight, and (x_i,y_i,z_i) is the particle position; The position with the highest posterior probability is selected as the final output, i.e., (x_final,y_final,z_final)=argmax(P(x,y,z|data)), where argmax() is the maximum value of the parameter; Local optimization is performed on the candidate positions. A 5×5 meter grid is constructed with the position with the highest posterior probability as the center, the posterior probability of each grid point is calculated, and the grid point with the highest probability is selected as the final output.

[0033] Example 2 This embodiment uses a user named Zhang San in a shopping mall as an example to illustrate the specific application process of the method of the present invention. Zhang San is a male, 175cm tall, and is using a smartphone with an app that integrates this positioning method.

[0034] The backend first obtained the CAD architectural floor plan and BIM as-built model data of the shopping center, and then used FME software to align the Beijing 54 coordinate system of the CAD drawings with the WGS84 coordinate system of the BIM data to ensure the consistency of spatial reference.

[0035] Structural layer: The geometry and attributes of all walls, stairs, and elevator shafts were automatically extracted. The walls were marked with a thickness of 200mm, the material of lightweight bricks, and were not passable. The stairs were passable, and the elevator shafts were not passable.

[0036] Functional layer: Based on the structural layer, the rule engine divides the building into functional areas such as clothing retail area, catering area, children's playground, cinema, and restrooms.

[0037] POI layer: Based on the functional layer, key points are manually marked. Uniqlo store coordinates (x1, y1), attribute: apparel retail; Starbucks coffee coordinates (x2, y2), attribute: catering, with seating; third floor men's restroom coordinates (x3, y3, z3), attribute: sanitary facilities.

[0038] Generate a semantic GIS model containing all geometric and attribute information, export it as a GeoJSON file, and integrate it into the location app.

[0039] As Zhang San walks through the mall, his mobile phone continuously collects sensor data. The accelerometer and gyroscope data are denoised using Kalman filtering. The state vector includes position, velocity, and acceleration. The magnetometer data is ellipsoidally calibrated to eliminate interference from metal railings and elevators in the mall.

[0040] After averaging and filtering with a 300ms sliding window, substitute into the formula (Temperature compensation has been applied), Zhang San's current height is calculated to be z=15.2 meters, indicating that he is located on the third floor of the shopping mall.

[0041] The phone scanned the RSSI values ​​of multiple nearby wireless access points and beacons. For example, the Starbucks_Guest strength was -65dBm and the Mall_WiFi_Floor3 strength was -70dBm. These data were also filtered by sliding window averaging to smooth out fluctuations.

[0042] Peak detection was performed on the filtered Z-axis accelerometer data at a sampling rate of 50Hz. Continuous steps were detected, and the step frequency was calculated to be 1.8 steps / second. The dynamic step length was calculated as (base step length 0.4 + 0.03 * 1.75) + (integral correction value) ≈ 0.95 meters / step. The acceleration variance was 0.15 m² / s, which was determined to be a walking state.

[0043] Through subsequent steps, Zhang San's current location and time (11:30 AM) were initially located near the third-floor dining area. Combined with the GIS functional layer showing that the area is a dining area, Bayesian inference was used. Historical data showed that users in the dining area and nearing lunchtime have a high probability of intending to find a restaurant. Therefore, it was inferred that the probability P(intent) of Zhang San's current intention is to find a restaurant is 0.85.

[0044] Based on the GIS structure layer, calculate the accessibility from Zhang San's current location to each surrounding POI. The path to Starbucks is unobstructed, with a accessibility probability of 0.99; to reach another store, one needs to pass through a fire door, where the signal attenuation is significant, resulting in a accessibility probability of 0.6; to reach a closed store, one needs to pass through a wall, with an accessibility probability of 0.

[0045] Since this is the first time the system has located Zhang San in this shopping mall, it uses no prior initialization. It selects the strongest Wi-Fi access point (Mall_WiFi_Floor3) with known coordinates (x4, y4, z4). Centered on this point, with a radius of 10 meters, it randomly generates 500 particles using a Gaussian distribution. The initial weight of each particle is based on its distance d from the center point. calculate.

[0046] Based on the gait identified by S3, the stride length is 0.95m, the direction angle θ comes from the gyroscope, and a uniform motion model is used to propel each particle: x_new=x_old+0.95*cos(θ)+N(0,0.1), y_new=y_old+0.95*sin(θ)+N(0,0.1), z_new=15.2 (remains unchanged)+N(0,0.1), and the altitude mainly depends on the barometer.

[0047] Each particle, based on its predicted (x, y, z) coordinates, queries the pre-stored Wi-Fi fingerprint of that location in the GIS model. The received fingerprints for Starbucks_Guest are approximately -67dBm, and for Mall_WiFi_Floor3, approximately -72dBm. A weighted Euclidean distance is calculated between the particle fingerprint and the actual fingerprint scanned by Zhang San's phone (-65dBm, -70dBm), with a Wi-Fi weight of 0.7 and a Bluetooth weight of 0.3, yielding a distance d = 1.5. This distance is then substituted into a Gaussian function. , as a weight update factor.

[0048] During the process, the paths of 30 particles passed through the areas marked as walls in the GIS structure layer, and the weights of these particles were directly set to 0.

[0049] The final weight is calculated by combining signal matching degree, behavioral intent, and environmental characteristics: basic weight w_new=w_old*0.78; behavioral weight factor w_behavior=1+0.2*0.85=1.17, the intent is to find a restaurant; environmental weight factor w_environment=1, there is currently no magnetic anomaly, and final weight w_final=w_new*1.17*1.

[0050] The effective sample size (ESS) was calculated, and it was found that the ESS had dropped to 120 < 500 * 30% = 150, triggering the resampling mechanism.

[0051] Particles are stratified by weight: particles with a weight > 0.005 are replicated; particles with a weight between 0.002 and 0.005 participate in residual resampling; particles with a weight ≤ 0.002 are discarded. After resampling, the total number of particles is restored to 500.

[0052] For the high-weight particles after resampling, the behavior feature adjustment factor w_adjusted=w*(1+0.3*0.85*0.9), where 0.9 is the probability that the particle is located in the catering functional area, is further applied to perform optimization loop.

[0053] Calculate the weighted center of all particles to obtain the position with the maximum a posteriori probability: (x=102.5, y=58.3, z=15.2). Optimize the local mesh of 5m*5m centered on this point, and finally output the precise coordinates of Zhang San as (x=102.7, y=58.1, z=15.2).

[0054] The system indicated that Zhang San was near the Starbucks on the third floor, and based on the high probability that he intended to find a restaurant, it proactively pushed a navigation prompt that the Starbucks was 20 meters ahead.

[0055] The above formulas are all dimensionless calculations. Dimensionless calculations can be performed using various methods such as standardization, which will not be elaborated here. The formulas are derived from software simulations based on a large amount of collected data, and the preset parameters in the formulas can be set by those skilled in the art according to the actual situation.

[0056] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0057] This invention provides an indoor positioning method that integrates GIS and user behavior analysis. It constructs a semantic GIS model comprising a structural layer, a functional layer, and a point-of-in-interest (POI) layer. Based on multi-sensor data, it employs Kalman filtering and ellipsoidal calibration for noise reduction, combined with barometer altimeter measurement and magnetometer magnetic anomaly detection. It identifies user gait, stride frequency, and stride length, establishing an activity-location transition probability matrix, and infers intent using the GIS functional layer. A particle filtering framework is designed: a particle swarm is dynamically initialized based on Wi-Fi signals, and particles are propelled using a motion model. Signal matching is calculated through Gaussian matching, and environmental adaptive weights and behavioral feature weights are fused for weight updates. An adaptive resampling mechanism triggered by an ESS threshold is employed, incorporating user behavior features for optimization loops, calculating the maximum posterior probability position, and performing local mesh optimization. This addresses the problems of low indoor positioning accuracy, large signal fluctuations, and particle degradation.

Claims

1. An indoor positioning method integrating GIS and user characteristic behavior analysis, characterized in that, include: S1: Construct a semantic GIS model containing a structural layer, a functional layer, and a POI layer; obtain geometric and attribute information of the building space; export the layered semantic GIS model into a standardized geographic information format; and use spatial data verification tools to detect and correct logical contradictions. S2: Collect multimodal sensing data from the smartphone, including inertial sensor data, magnetic field data, air pressure data, and wireless signal strength data, and preprocess the data; S3: Based on the preprocessed sensor data, identify user motion characteristics and state transitions, construct an activity-location transition probability matrix in conjunction with the semantic GIS model, and calculate the spatial traversal probability; S4: Establish a particle filter localization framework, initialize the particle swarm according to the initial localization conditions, predict the particle position based on user motion characteristics and motion model, and the new particle position = old position + step size * (motion direction + noise) ; S5: Update particle weights based on wireless signal matching degree and GIS spatial constraints, and optimize weights by combining user behavior characteristics and environmental characteristics; S6: Optimize particle distribution through resampling and calculate the maximum posterior probability estimate of the particle swarm as the user location output.

2. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The step S1 involves obtaining the geometric and attribute information of the building space, including: Acquire CAD drawing data and BIM point cloud data of the building, and perform multi-source coordinate system unified processing; Construct a hierarchical semantic GIS model, which includes a structural layer, a functional layer, and a POI layer; Structural layer: Extract building structural elements from multi-source data, and assign geometric coordinates and physical attributes to the structural elements, including wall thickness, material and load-bearing status; Functional layer: Based on the structural layer and the preset rule engine, functional areas are divided according to the building's purpose; POI layer: Mark key location points on the basis of functional areas, configure name, coordinates and functional description attributes for each location point, and supplement attribute information through image recognition technology.

3. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The S2 step involves acquiring multimodal sensing data from the smartphone and preprocessing the data, including: An adaptive Kalman filter is used for inertial sensor data to adjust process noise parameters according to the motion state; An ellipsoidal calibration algorithm is used to perform static calibration on the magnetic field data, and magnetic field interference parameters are calculated based on the sampled data under static conditions. Using gyroscope data as a reference, a coordinate system for multi-sensor data is realized based on a quaternion rotation matrix. A time window-based moving average filtering algorithm is used to smooth the data from inertial sensors and barometers, with the window length adapted to the sensor type. Altitude information is calculated based on barometric pressure data, and environmental compensation is performed using temperature data. The barometric altitude formula is as follows: Where P is the real-time air pressure and P0 is the standard atmospheric pressure at sea level. T is the current temperature; By comparing the measured magnetic field strength with the standard geomagnetic field range, magnetic anomaly regions are identified, and these regions are spatially associated with building structures in the GIS model.

4. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, In step S3, user motion characteristics and state transitions are identified based on preprocessed sensor data, and an activity-location transition probability matrix is ​​constructed using the semantic GIS model, including: Adaptive threshold peak detection is performed based on preprocessed acceleration data. Dynamic threshold is determined by sliding window statistical analysis to identify gait cycle points and calculate step frequency. Combining user physiological characteristic parameters and acceleration data integration results, the stride length parameter is calculated: using the height-stride length empirical model, the basic stride length is calculated as 0.4 + 0.03 * height, and corrected by integrating the accelerometer data. The stride length is calculated as (integration result * 0.5) + basic stride length, where the integration result is the area of ​​the accelerometer Z-axis data within the gait cycle. Based on the variance features of acceleration data, a motion state threshold range is defined to identify stationary, walking, and running states, and a marker is triggered when the state transitions. A location transfer probability model is constructed based on user historical trajectory data. The transfer frequency between different locations is statistically analyzed to generate a location transfer probability matrix. The rows represent the current location and the columns represent the target location. The transfer probability is calculated as: P(target location|current location) = (number of moves from the current location to the target location) / (total number of moves from the current location). The general location transfer probability matrix is ​​adaptively weighted and corrected based on users' personalized behavior patterns.

5. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The calculation of spatial mobility probability in S3 includes: By comparing the current location with the functional attributes of the GIS semantic function layer, location semantic information can be obtained. A Bayesian inference framework is constructed to calculate the probability distribution of user activity intent based on location and time features: P(intent|location, time)∝P(location|intent)×P(time|intent). The final probability is obtained after normalization, and the intent probability weight is adjusted according to the actual user behavior feedback. Extract spatial obstacle information from the GIS structural layer to identify impassable areas; Signal propagation loss is calculated using an improved logarithmic distance path loss model: , where d is the distance between the signal receiving point and the transmitting source, PL(d) is the current path loss value, d0 is the reference distance, PL(d0) is the path loss at the reference distance, and n is the path loss exponent, which is adjusted according to the building material type; Based on signal propagation loss and a preset threshold, the probability of passage between spatial point pairs is calculated using a nonlinear mapping function. , where k=0.5 is the adaptive coefficient, and when there is an impassable obstacle between two points, the corresponding probability of passage is set to zero.

6. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The particle filtering localization framework is established in S4, and the particle swarm is initialized according to the initial localization conditions, including: Define particle state variables, including spatial coordinates, motion direction angle, motion velocity, and weight parameters; Two initialization strategies are adopted based on the initial positioning conditions: When there is no historical location information, the location of the high signal strength access point is determined based on the first frame of wireless signal strength data. Using this location as the central region, an initial particle spatial distribution is generated using a Gaussian distribution function: x1=3.5+N(0,2.5), y1=2.1+N(0,2.5), z1=0, where N(0,2.5) represents Gaussian noise with a mean of 0 and a standard deviation of 2.

5. Initial weights are then calculated based on the distance of the particles to the access point, using an exponential decay model. ; When historical location information exists, the historical positioning result is used as the center point, and the particle distribution range is adjusted according to the identified user movement state. An adaptive radius is used to generate a particle spatial distribution around the center point, x2=x_prev+(2×radius)×(rand()-0.5), y2=y_prev+(2×radius)×(rand()-0.5), where x2 and y2 are the coordinates of the particle, z2=z_prev+N(0,0.2), where z2 is the height noise, where radius is the quantization radius of the uncertain position region, and rand() is a random number between 0 and 1. The initial weight w2 is calculated based on the distance d2 from the particle to the center point, w2=1-(d2 / radius)×0.5, and the initial weights of all particles are normalized to a sum of 1.

7. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The S4 step of predicting particle positions based on user motion characteristics and motion models includes: The particle state is predicted using a uniform linear motion model. The new position of the particle is calculated based on the historical position, step length parameter, and motion direction angle. The step length parameter is obtained based on the user's gait recognition results, and the motion direction angle is obtained from gyroscope data. In the vertical direction, the height change is dynamically set according to the user's step frequency, and different motion intensities correspond to different height change parameters. Gaussian noise is introduced during the location prediction process to simulate motion uncertainty. The noise standard deviation is adjusted according to environmental conditions. When a magnetic anomaly environment is detected, the horizontal noise standard deviation is increased.

8. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The S5 update of particle weights based on wireless signal matching degree and GIS spatial constraints includes: Feature vectors are constructed based on pre-stored signal data in the GIS model and real-time acquired multi-source wireless signals. Based on the spatial coordinates of the particles, the pre-stored signal fingerprint data of the corresponding locations is queried from the GIS model. The matching degree between the real-time signal and the pre-stored signal fingerprint is calculated using a weighted distance metric method. Different signal sources are assigned different weights based on their stability, and the matching distance is calculated. A likelihood function is constructed based on a Gaussian probability distribution model to convert the matching degree into a probability value. , where σ is the adaptive standard deviation adjusted according to the stability of the environmental signal, and the probability value is used as the weight update factor, which is multiplied by the current weight of the particle to obtain the updated weight value; When an environmental signal fluctuation is detected to exceed a preset threshold, the standard deviation parameter is increased; when the signal is stable, the standard deviation parameter is decreased.

9. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The weight optimization in S5 combines user behavior characteristics and environmental characteristics, including: Based on the building space obstacle data of the GIS structure layer, spatial geometry detection is performed on the predicted motion trajectory of particles. When the particle motion trajectory is detected to intersect with the impassable area, the corresponding particle weight is reset to zero. A spatial index structure is used to accelerate the obstacle detection process, reducing the complexity from O(n1) to O(log n1), where n1 is the total number of all walls in the GIS model; Based on the user activity intent inference results described in S3, a behavior weight factor is constructed to weight the particle weights, w_behavior=1+0.2×intent_prob, where w_behavior is the behavior weight factor and intent_prob is the intent probability; Based on the environmental magnetic anomaly detection results described in S2, an environmental weight factor is constructed, and the weight is attenuated. w_environment=1-0.3×anomaly_strength, where w_environment is the environmental weight factor and anomaly_strength is the magnetic anomaly intensity. The final weights are fused based on Bayes' theorem, where w_new is the prior weight, and w_behavior and w_environment are the likelihoods. The final weight w_final = w_new × w_behavior × w_environment.

10. The indoor positioning method integrating GIS and user characteristic behavior analysis as described in claim 1, characterized in that, The S6 step, which optimizes particle distribution through resampling and calculates the maximum posterior probability estimate of the particle swarm as the user location output, also includes: Calculate the effective sample size (ESS) of the particle swarm optimization. ,in The weight of the i-th particle is used to trigger a resampling mechanism when the number of valid samples is lower than a preset threshold. Based on the particle weight, particles are divided into multiple weight layers, and a differentiated processing strategy is adopted for different weight layers. High-weight particles are directly copied according to their weight ratio, while medium-weight particles are processed using a residual resampling strategy: the integer part is copied first, and the remaining fractional part is copied randomly according to probability. Low-weight particles are eliminated, and the total number of particles remains constant after resampling. Key features are extracted from the activity-location transition probability matrix and intent inference results obtained from S3: activity probability, location preference, and time features. Apply a behavior feature adjustment factor to high-weight particles: w_adjusted = weight × (1 + 0.3 × activity_prob × position_prob), where w_adjusted is the final weight, activity_prob is the activity probability, and position_prob is the position preference probability. After resampling, multiple rounds of behavior optimization iterations are performed. In each round of iteration, weights are adjusted and particles are redistributed until the weight adjustment magnitude converges to a stable threshold. The posterior probability distribution of spatial location is calculated based on the resampled particle swarm, P(x,y,z|data)=Σ(w_i×δ(x-x_i,y-y_i,z-z_i)), where data is the observed data, δ is the Dirac function, w_i is the particle weight, and (x_i,y_i,z_i) is the particle position; Select the position with the highest posterior probability as the final localization result, (x_final,y_final,z_final)=argmax(P(x,y,z|data)), where argmax() is the maximum value of the parameter; A local fine-grained search is performed with the initial positioning result as the central area. The probability distribution of candidate grid points is calculated, and the grid point with the best probability is selected as the final positioning output.