Indoor-outdoor seamless positioning switching method and system based on trajectory prediction and fingerprint verification

By generating trajectory and fingerprint databases at building entrances and exits, and combining support vector machine models and sliding window technology, a seamless switch from GNSS to indoor positioning mode was achieved. This solved the problem of weakened positioning performance of GNSS in complex indoor environments and improved the continuity and reliability of positioning.

CN122179727APending Publication Date: 2026-06-09HANGZHOU DIANZI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2026-02-13
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In complex indoor environments, GNSS positioning performance is weakened or unusable, making it difficult for PDR positioning to achieve effective positioning switching and calibration in indoor-outdoor transition areas, thus affecting the availability of seamless indoor-outdoor connectivity.

Method used

By employing trajectory prediction and fingerprint verification, a virtual simulation environment is established at building entrances and exits, and multimodal fingerprints are collected in the field to generate trajectory and fingerprint databases. Support vector machine models are used for decision training, and combined with sliding window and fingerprint matching, seamless switching from GNSS to indoor positioning mode is achieved.

Benefits of technology

It improves the continuity and reliability of indoor and outdoor positioning, ensures high-precision positioning of pedestrians in the transition area between indoor and outdoor environments, solves the problems of unknown initial position and error accumulation in PDR, and achieves seamless connection between indoor and outdoor environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179727A_ABST
    Figure CN122179727A_ABST
Patent Text Reader

Abstract

The application discloses an indoor and outdoor seamless connection positioning switching method and system based on trajectory prediction and fingerprint verification, and the method comprises the following steps: S1, a virtual simulation environment is established at the building entrance, random trajectories and reward guide trajectories are generated, and a trajectory database is established; a fingerprint database is established; S2, feature extraction is carried out based on the trajectory database, and a support vector machine (SVM) model is used for binary classification training; S3, a sliding window is set, real-time pedestrian trajectory data is input into the SVM model for sliding prediction, and it is judged whether the SVM is continuously triggered in the window; S4, multi-modal fingerprint matching is started, and it is judged whether the fingerprint matching is successful; and S5, switching from a GNSS positioning mode to an indoor positioning mode is executed, and indoor and outdoor seamless connection positioning switching is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of pedestrian positioning technology, and specifically relates to a method and system for seamless indoor and outdoor positioning switching based on trajectory prediction and fingerprint verification. Background Technology

[0002] With the development of smart terminals and IoT devices, location information is playing an increasingly important role in services. In open outdoor environments, the Global Navigation Satellite System (GNSS) is considered a mature technology. However, in complex indoor environments, due to factors such as multipath effects, signal attenuation, and obstacle blockage, the positioning performance of GNSS is significantly reduced or even rendered unusable. Therefore, how to achieve high-precision positioning in indoor environments and efficiently integrate it with GNSS to achieve seamless indoor-outdoor positioning remains a hot research topic.

[0003] Among them, PDR (Pedestrian Dead Retrieval) has become a mainstream technology for indoor positioning due to its unique positioning advantages and accuracy. However, PDR suffers from problems such as unknown initial pedestrian positions and long-distance positioning error accumulation. These problems make it difficult to form effective positioning handover and verification in joint positioning scenarios with GNSS, especially in indoor-outdoor transition areas with complex physical properties and near-disruption of satellite signals. This affects the usability of this technology in seamless indoor-outdoor positioning. Summary of the Invention

[0004] To address the aforementioned problems in existing technologies, this invention provides a method and system for seamless indoor and outdoor positioning switching based on pedestrian trajectory prediction and fingerprint verification. This invention uses trajectory prediction and fingerprint positioning methods and performs verification in GNSS-PDR seamless indoor and outdoor positioning scenarios, improving the continuity and reliability of indoor and outdoor positioning and expanding the technical solutions for seamless indoor and outdoor positioning.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for seamless indoor-outdoor location switching based on trajectory prediction and fingerprint verification includes the following steps:

[0007] S1: Establish a virtual simulation environment near the building entrance and exit, generate random trajectories and reward guidance trajectories, and sample pedestrian positions, speeds, accelerations and heading angle sequences to establish a trajectory database; at the same time, conduct on-site collection of multimodal fingerprints in the transition area of ​​the building entrance and exit to establish a fingerprint database containing geomagnetic features and wireless signal features.

[0008] S2: Based on the trajectory database in step S1, feature extraction is performed, including mean velocity, standard deviation of acceleration, and rate of change of heading angle. A support vector machine (SVM) model is used for binary classification training to determine the pedestrian's movement tendency.

[0009] S3: Set a sliding window to predict pedestrian trajectory data in real time, and determine whether the SVM is continuously triggered within the window. If yes, proceed to step S4; otherwise, maintain the sliding of the prediction window.

[0010] S4: Initiate multimodal fingerprint matching; determine whether the fingerprint matching is successful. If yes, confirm the initial landmark of the pedestrian entering the room and proceed to step S5; otherwise, return to step S3.

[0011] S5: Performs the switch from GNSS positioning mode to indoor positioning mode, and smoothly calibrates the initial position based on the fingerprint matching results to achieve seamless indoor and outdoor positioning switching.

[0012] In the context of seamless indoor and outdoor positioning using GNSS-PDR, this invention proposes a positioning switching method and system based on trajectory prediction and fingerprint verification to expand available solutions and improve reliability for practical applications. In this technical solution, fingerprint positioning achieves instantaneous spatial awareness by matching signal fingerprints, and has the characteristic of high accuracy in positioning with known locations, providing a known initial position for PDR positioning; while trajectory prediction infers future movement paths based on time series data mining. The combined use of these two technologies can greatly improve the accuracy and efficiency of matching.

[0013] Preferably, step S1: trajectory data generation and database construction

[0014] This step first establishes a virtual simulation environment near the building entrance / exit. Random trajectories are generated using a pedestrian motion model under constraints. An increasing reward intensity mechanism guides these trajectories towards the entrance / exit, generating reward-guided trajectories. Finally, the random trajectories and multiple reward-guided trajectories are merged to create a complete trajectory database, providing a data foundation for subsequent feature extraction and model training. Simultaneously, multimodal fingerprints are collected and databases are built in the field. A gridded deployment is implemented in the transition area between the building entrance / exit, collecting geomagnetic field intensity sequences and public radio frequency signals (such as WiFi RSSI and Bluetooth broadcast features) in the area. Then, a fingerprint database containing location coordinates, multimodal features, and timestamps is constructed. Finally, a fingerprint matching algorithm based on Euclidean distance is established to provide a location recognition basis for subsequent fingerprint verification, ensuring accurate identification of the initial landmark when a pedestrian enters the indoor positioning system.

[0015] A virtual simulation environment is established near the building entrances and exits to generate hybrid trajectory data, including:

[0016] 1. Random trajectory generation: Pedestrian motion trajectories are generated based on maximum velocity, maximum acceleration, and scene boundary constraints under a random seed;

[0017] 2. Reward-guided trajectory generation: By applying reward weights that increase with distance to important sample points, the trajectory is guided towards the entrance and exit;

[0018] 3. Trajectory Data Hybridization: Random trajectories are merged with multiple reward-guided trajectories to establish a complete trajectory database;

[0019] Among them, the mathematical model for generating random trajectories is:

[0020] Position update: x(t+1) = x(t) + v(t)*cos(θ(t))*dt

[0021] y(t+1) = y(t) + v(t)*sin(θ(t))*dt

[0022] Speed ​​update: v(t+1) = v(t) + a(t)*dt

[0023] Heading update: θ(t+1) = θ(t) + Δθ(t)

[0024] In the formula, t is the system time, Δθ(t) is the change in heading detected by the sensor, x and y are coordinates, v is the velocity, a is the acceleration, θ is the heading angle, and dt is the time interval.

[0025] The incremental reward intensity guidance mechanism is as follows:

[0026] Reward function: R = α * exp(-β * d_door) + γ * f_entry

[0027] d_door: Distance to the center of the door; f_entry: Forced entry function; α, β, γ: Reward weight parameters.

[0028] Multimodal fingerprint field acquisition and database construction:

[0029] Based on actual geographical constraints and signal attenuation testing, a block transition area was divided at the building entrance and exit for grid-based deployment, and geomagnetic field intensity sequences and public radio frequency signals in the building entrance and exit area were collected.

[0030] A fingerprint database containing location coordinates, multimodal features, and timestamps is constructed, and finally a fingerprint matching algorithm based on Euclidean distance is established.

[0031] The mathematical model for fingerprint matching algorithms is as follows:

[0032] The formula for calculating geomagnetic intensity is: B = √(Bx² + By² + Bz²)

[0033] Fingerprint similarity calculation formula: S_total = w_m * S_magnetic + w_w * S_wireless

[0034] Where: S_magnetic = exp(-||F_current - F_database||² / (2 * σ_m²))

[0035] S_wireless = exp(-||F_current_wireless - F_database_wireless||² / (2* σ_w²)).

[0036] In the formula, B represents the geomagnetic intensity, and Bx, By, and Bz are the components of the geomagnetic field in the three coordinate axes, respectively; S_total represents the comprehensive fingerprint similarity, S_magnetic and S_wireless represent the similarity between the geomagnetic and wireless signals, respectively, and w_m and w_w represent the weighting coefficients of the geomagnetic and wireless signals, respectively; F_current and F_database represent the fingerprint features currently collected and in the database, respectively; σ_m and σ_w represent the matching standard deviations of the geomagnetic and wireless signals, respectively.

[0037] Preferably, step S2: feature extraction and SVM training based on the trajectory database.

[0038] This step first uses a sliding window technique to move along the trajectory data and extract an 8-dimensional statistical feature vector for each window segment, including the mean velocity, standard deviation of acceleration, and rate of change of heading angle. Then, a training sample set is constructed based on the extracted feature vectors. Positive and negative samples are marked by whether the trajectory passes through the entrance door. Finally, a support vector machine is used for binary classification training to establish a trajectory prediction classifier, which is used to determine in real time whether the pedestrian trajectory tends towards the entrance or exit.

[0039] Feature extraction mathematical model:

[0040] Sliding window feature vector: F = [v_mean, σ_acc, σ_θ, σ_v, d_entry, t_eta, v_max, a_max]

[0041] Among them: v_mean = (1 / W) * Σ(v_i), σ_acc = √((1 / W) * Σ((a_i - μ_acc)²))

[0042] In the formula, v_mean is the average velocity, σ_acc is the standard deviation of acceleration, σ_θ is the standard deviation of the rate of change of heading angle, σ_v is the standard deviation of velocity change, d_entry is the distance to the entrance, t_eta is the estimated time of arrival, v_max is the maximum velocity, a_max is the maximum acceleration; W is the sliding window size, v_i and a_i are the velocity and acceleration of the i-th sampling point within the window, respectively, and μ_acc is the mean acceleration.

[0043] The SVM model is as follows:

[0044]

[0045] in, Let w be the transpose of matrix w, φ(x) be the feature mapping function, w be the weight vector, and b be the bias term.

[0046] Preferably, step S3: real-time sliding prediction of pedestrian trajectory data.

[0047] This step first processes the real-time pedestrian trajectory data using a sliding window, extracts features from each window and inputs them into an SVM classifier for prediction, then counts the number of windows that continuously meet the triggering conditions. When the number of consecutive triggers reaches a set threshold, a positioning mode switching prediction is executed. At the same time, the false alarm rate calculation logic is optimized to reduce the probability of false switching, ensuring that the fingerprint verification process is only initiated when the pedestrian is actually approaching the entrance or exit.

[0048] Sliding window prediction: confidence_i = svm_predict(extract_features(window_data))

[0049] Consecutive trigger determination: trigger_count >= N_consecutive

[0050] False alarm rate control: FPR = FP / (FP + TN), where FP is the number of false alarms and TN is the number of true negatives. This metric is used to optimize the probability of false handovers.

[0051] In the formula, confidence_i is the prediction confidence of the i-th sliding window, svm_predict$ is the prediction function of the SVM classifier, extract_features is the feature extraction operation, window_data is the trajectory data in the current window; trigger_count is the count of consecutive windows that meet the triggering condition, N_consecutive is the threshold of the number of consecutive triggers required to perform the switching prediction; FPR is the false alarm rate, FP is the number of false alarm samples, and TN is the number of true negative samples.

[0052] Preferably, step S4: For trajectories that match the prediction window, perform fingerprint matching.

[0053] This step first initiates multimodal fingerprint verification when SVM prediction is triggered and the pedestrian is located at the entrance / exit. Then, it collects the current geomagnetic and WiFi fingerprint features in real time and performs similarity matching with the pre-built fingerprint database.

[0054] Matching Verification: Upon initiating verification, geomagnetic fingerprint sequence matching is prioritized for location determination. If a valid wireless fingerprint (WiFi) exists in the environment, its signal characteristics are calculated using Euclidean distance and fine-weighted summation. Finally, the weighted fusion matching results are used to calculate the overall confidence score. When the overall confidence score exceeds the matching threshold, fingerprint matching is confirmed as successful, providing a location verification basis for switching positioning modes.

[0055] The fingerprint matching and verification process is as follows:

[0056] Multimodal fusion matching: S_total = w_m * S_magnetic + w_w * S_wireless

[0057] Match threshold determination: if S_total > T_match, then the match is successful.

[0058] Fusion: S_total = w_m*S_magnetic + I_wireless*w_w*S_wireless

[0059] In the formula, S_total is the multimodal integrated matching confidence level, w_m and w_w are the weight coefficients of geomagnetic and wireless signals, respectively; S_magnetic and S_wireless are the fingerprint similarity of geomagnetic and wireless signals, respectively; I_wireless is the wireless signal indication function (1 when a valid signal is detected, 0 otherwise); and T_match is the threshold for determining successful fingerprint matching.

[0060] Preferably, in step S5: after successful matching, the positioning mode is switched and the initial position is calibrated.

[0061] The process begins with switching from GNSS positioning mode to indoor positioning mode under dual verification of continuous SVM triggering and successful fingerprint matching. Then, the initial position is calibrated based on the fingerprint matching result. The calibrated precise position is calculated by combining the fingerprint position and the trajectory prediction position. Finally, the indoor positioning system parameters are initialized and sensor fusion is enabled to ensure that pedestrians can obtain continuous and accurate positioning services after entering the indoor environment.

[0062] Positioning switching mathematical model:

[0063] When the conditions of "SVM continuous triggering" and "fingerprint matching S_{total} > T_{match}" are met, the following calibration logic is executed:

[0064] Determine the landmark truth value: regard the location coordinates P_{fp} of the successfully matched position in the fingerprint database as the absolute true position of the row at the current moment.

[0065] Calculate system bias: Obtain the current PDR estimated position P_{est}, and calculate the bias vector δ = P_{fp} - P_{est}.

[0066] Smooth Correction: To prevent the positioning point from suddenly "shifting" on the map and causing a decline in user experience, the current coordinates are not updated directly. Instead, an "error amortization strategy" is adopted. Over the next set time (e.g., 2 seconds), the deviation is linearly decayed and superimposed on the subsequent PDR output, achieving a soft switch from the outdoor coordinate system to the indoor coordinate system.

[0067] This invention also discloses an indoor-outdoor seamless positioning switching system based on trajectory prediction and fingerprint verification, used to execute the above method, comprising the following modules:

[0068] Trajectory data generation module: A virtual simulation model is established at the building entrance and exit to generate random trajectories and reward guidance trajectories. The position, speed, acceleration and heading angle sequences of pedestrians are sampled to establish a trajectory database. At the same time, multimodal fingerprints are collected in the transition area of ​​the building entrance and exit to establish a fingerprint database containing geomagnetic features and wireless signal features.

[0069] Feature extraction training module: Features are extracted based on the trajectory database, and an SVM model is used for binary classification training;

[0070] Sliding prediction module: Sets a sliding window to perform real-time sliding prediction on pedestrian trajectory data, and determines whether the SVM is continuously triggered within the window. If so, the fingerprint matching module will execute; otherwise, the prediction window will continue to slide.

[0071] Fingerprint matching module: For trajectories that match the prediction window, multimodal fingerprint matching is initiated; it is then determined whether the fingerprint matching is successful. If so, the initial landmark of the pedestrian entering the building is confirmed and executed by the smoothing calibration module; otherwise, it is executed by the sliding prediction module.

[0072] Smooth calibration module: Performs the switch from GNSS positioning mode to indoor positioning mode, and performs smooth calibration on the initial position based on the fingerprint matching results, so as to achieve seamless indoor and outdoor positioning switching.

[0073] Compared with the prior art, the present invention has the following significant advantages:

[0074] This invention uses trajectory prediction and fingerprint positioning methods and performs verification in GNSS-PDR seamless indoor and outdoor positioning scenarios, which improves the continuity and reliability of indoor and outdoor positioning switching and expands the technical solutions for indoor and outdoor seamless positioning (PDR initial position). Attached Figure Description

[0075] Figure 1 This is a flowchart of a preferred embodiment of the present invention, which describes a method for seamless indoor and outdoor positioning switching based on trajectory prediction and fingerprint verification.

[0076] Figure 2 This is a technical roadmap diagram of a preferred embodiment of the present invention.

[0077] Figure 3 This is a schematic diagram of the sliding window feature extraction principle.

[0078] Figure 4 This is a state transition diagram for switching positioning modes.

[0079] Figure 5 This is a diagram showing the effect of ideal trajectory calibration.

[0080] Figure 6 This is a diagram of a trajectory calibration implementation example.

[0081] Figure 7 This is a graph showing the trend of satellite signal strength changes in the indoor-outdoor transition zone.

[0082] Figure 8 This is a graph showing the effectiveness of SVM predictions based on time-series features in a simulation scenario.

[0083] Figure 9 This is a block diagram of a seamless indoor / outdoor positioning switching system based on trajectory prediction and fingerprint verification, according to a preferred embodiment of the present invention. Detailed Implementation

[0084] To provide a more detailed description of the present invention and to facilitate understanding by those skilled in the art, the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0085] Please see Figure 1 A preferred embodiment of the present invention provides a method for seamless indoor and outdoor positioning switching based on trajectory prediction and fingerprint verification, comprising the following steps:

[0086] S1: Trajectory data generation and database construction; Multimodal fingerprint field collection and database construction;

[0087] S2: Feature extraction and SVM training based on trajectory database;

[0088] S3: Real-time sliding prediction of pedestrian trajectory data;

[0089] S4: For trajectories that match the prediction window, perform fingerprint matching;

[0090] S5: After successful matching, perform positioning mode switching and initial position calibration.

[0091] The following is a detailed explanation of each step.

[0092] In step S1, a virtual simulation model is established near the building entrance and exit. Simultaneously, multimodal fingerprint data is collected and databases are built. Fingerprint features such as geomagnetism and WiFi are used for verification in the entrance and exit area to determine the initial landmark for pedestrians entering the indoor positioning system. The specific steps are as follows:

[0093] Step 1.1, set the following parameters for the model:

[0094] Number of trajectory points: 60 sampling points

[0095] Sampling interval: 0.5 seconds

[0096] Number of repetitions: 50

[0097] Incentive-guided iterations: 50

[0098] The generation of mixed trajectory data includes:

[0099] 1. Random trajectory generation: A pedestrian motion model under constraints is used;

[0100] 2. Reward-guided trajectory generation: The trajectory is guided towards the entrance / exit by increasing the reward intensity;

[0101] 3. Trajectory Data Mixing: Random trajectories are merged with multiple reward-guided trajectories to create a new database;

[0102] Mathematical model for trajectory generation:

[0103] Position update: x(t+1) = x(t) + v(t)*cos(θ(t))*dt

[0104] y(t+1) = y(t) + v(t)*sin(θ(t))*dt

[0105] Speed ​​update: v(t+1) = v(t) + a(t)*dt

[0106] Heading update: θ(t+1) = θ(t) + Δθ(t)

[0107] Among them, the reward-based incentive mechanism:

[0108] Reward function: R = α * exp(-β * d_door) + γ * f_entry

[0109] d_door: distance to the center of the door; f_entry: forced entry function; α, β, γ: reward weight parameters;

[0110] like Figure 2 As shown, the building entrance area includes outdoor area A, transition area B, and indoor area C, with the entrance door located at the boundary between areas B and C. During trajectory generation, a reward-based guidance mechanism is used to increase the probability of the trajectory passing through the entrance door.

[0111] Step 1.2, Geomagnetic fingerprint collection

[0112] Data collection points are arranged in a grid pattern with 1-meter intervals.

[0113] Geomagnetic intensity measurement: B = √(Bx² + By² + Bz²)

[0114] Fingerprint feature vector: F_magnetic = [B, Bx, By, Bz, σ_B]

[0115] Step 1.3, Wireless signal fingerprint collection

[0116] Target of data collection: Public wireless radio frequency signals (Wi-Fi) in the collection environment.

[0117] Fingerprint feature vector: F_{wireless} = [RSSI_1, RSSI_2, ..., RSSI_n]

[0118] Step 1.4, fingerprint fusion database construction

[0119] Fingerprint similarity calculation:

[0120] S_total = w_m * S_magnetic + w_w * S_wireless

[0121] S_magnetic: Geomagnetic fingerprint similarity, S_wireless: WiFi fingerprint similarity, w_m, w_w: weighting coefficients

[0122] Fingerprint database construction:

[0123] Database_Fingerprint = {position_i: [x_i, y_i, z_i], magnetic_i: F_magnetic_i, uwb_i: F_UWB_i, timestamp_i: t_i}

[0124] In step S2, feature extraction and SVM training are performed based on the trajectory database. This step extracts statistical features of trajectory segments through a sliding window, including mean velocity, standard deviation of acceleration, and rate of change of heading angle, and then uses SVM for binary classification training. The specific steps are as follows:

[0125] Step 2.1, Sliding window feature extraction

[0126] Window size optimization: W = [3, 5, 7, 10, 12, 15, 20]

[0127] Feature vector construction (8-dimensional features):

[0128] F = [v_mean, σ_acc, σ_θ, σ_v, d_entry, t_eta, v_max, a_max]

[0129] Where: v_mean: average velocity, σ_acc: standard deviation of acceleration, σ_θ: standard deviation of rate of change of heading angle, σ_v: standard deviation of velocity change, d_entry: distance to the entrance, t_eta: estimated time of arrival, v_max: maximum velocity, a_max: maximum acceleration;

[0130] Feature calculation formula:

[0131] v_mean = (1 / W) * Σ(v_i)

[0132] σ_acc = √((1 / W) * Σ((a_i - μ_acc)²))

[0133] σ_θ = √((1 / W) * Σ((Δθ_i - μ_Δθ)²))

[0134] d_entry = √((x_i - x_door)² + (y_i - y_door)²)

[0135] t_eta = d_entry / v_mean

[0136] Among them: v_mean = (1 / W) * Σ(v_i), σ_acc = √((1 / W) * Σ((a_i - μ_acc)²))

[0137] In the formula, v_mean is the average velocity, σ_acc is the standard deviation of acceleration, σ_θ is the standard deviation of the rate of change of heading angle, σ_v is the standard deviation of velocity change, d_entry is the distance to the entrance, t_eta is the estimated time of arrival, v_max is the maximum velocity, a_max is the maximum acceleration; W is the sliding window size, v_i and a_i are the velocity and acceleration of the i-th sampling point within the window, respectively, and μ_acc is the mean acceleration. Figure 3 As shown, the sliding window moves along the trajectory data, and each window extracts an 8-dimensional feature vector for SVM classification training.

[0138] Step 2.2, SVM binary classification training

[0139] Classifier Design:

[0140] SVM model:

[0141] φ(x): Feature mapping function, w: Weight vector, b: Bias term

[0142] Training parameter optimization:

[0143] Kernel function: Radial basis function (RBF), penalty parameter: C = 100, kernel parameter: γ = 0.1, trigger threshold: T_svm = 0.7

[0144] Sample labeling strategy:

[0145] If the trajectory passes through the entrance door, all sampling points on that trajectory are marked as positive samples (label = 1).

[0146] In addition, all sampling points of this trajectory are labeled as negative samples (label = 0).

[0147] In step S3, real-time sliding prediction of pedestrian trajectory data is performed. When multiple consecutive windows meet the trigger conditions, the positioning mode is switched. The specific steps are as follows:

[0148] Step 3.1, Real-time sliding prediction

[0149] Sliding window prediction: confidence_i = svm_predict(extract_features(window_data))

[0150] Sliding window prediction, pseudocode as follows:

[0151] for i = 1:(N - W + 1)

[0152] window_data = trajectory(i:i+W-1, :)

[0153] feature_i = extract_features(window_data)

[0154] confidence_i = svm_predict(feature_i)

[0155] if confidence_i > T_svm

[0156] trigger_count = trigger_count + 1

[0157] trigger_positions = [trigger_positions; position_i]

[0158] else

[0159] trigger_count = 0

[0160] End

[0161] Step 3.2, Continuous Trigger Detection

[0162] Triggering conditions:

[0163] If `trigger_count >= N_consecutive`, perform a location mode switch prediction, record the switch time and location, and initiate the fingerprint verification process. Here, `N_consecutive` is the number of consecutively triggered windows, typically between 3 and 5.

[0164] Step 3.3, False Alarm Rate Optimization

[0165] False alarm rate control strategy: The test path eventually passes through the entrance door. All points on this path are not considered false alarms. Even if some windows are not triggered, they are not counted as missed alarms. Only triggered windows are counted as false alarms.

[0166] False Alarm Rate (FPR) Calculation: FPR = FP / (FP + TN)

[0167] Wherein: FP: number of false alarms (triggered but not passed through the gate), TN: number of true negative alarms (not passed through the gate and not triggered), this indicator is used to optimize the probability of false handover.

[0168] In the above formula, confidence_i is the prediction confidence of the i-th sliding window, svm_predict$ is the prediction function of the SVM classifier, extract_features is the feature extraction operation, window_data is the trajectory data in the current window, trigger_count is the count of consecutive windows that meet the triggering condition, and N_consecutive is the threshold of the number of consecutive triggers required to perform the switching prediction.

[0169] In step S4, for trajectories matching the prediction window, fingerprint matching is performed. Fingerprint features are used for verification at entrances and exits to confirm the pedestrian's initial landmark upon entering the indoor positioning system. The state transitions throughout the matching process are as follows: Figure 4 As shown, the specific steps are as follows:

[0170] Step 4.1, trigger area fingerprint verification

[0171] When SVM prediction is triggered, fingerprint verification is initiated:

[0172] If SVM is triggered and located at an entrance / exit, multimodal fingerprint verification is initiated, collecting the current geomagnetic and UWB fingerprints and matching them with the fingerprint database.

[0173] Step 4.2, Fingerprint matching algorithm

[0174] Geomagnetic fingerprint matching: S_magnetic = exp(-||F_current - F_database||² / (2 * σ_m²))

[0175] Where F_current: current geomagnetic fingerprint features, F_database: geomagnetic fingerprint features in the database, σ_m: geomagnetic matching standard deviation;

[0176] Wireless signal matching: Calculate the Euclidean distance or cosine similarity between the currently acquired RSSI vector and the database to obtain S_{wireless}.

[0177] Step 4.3, Multimodal fingerprint fusion and matching

[0178] The pseudocode is as follows: S_total = w_m*S_magnetic + w_w*S_wireless

[0179] Matching threshold determination: if S_total > T_match

[0180] Fingerprint matching successful

[0181] Get the coordinates of the matching position

[0182] else

[0183] Fingerprint matching failed

[0184] Continue tracking

[0185] End

[0186] Fusion: S_{total} = w_m*S_{magnetic} + I_{wireless}*w_w*S_{wireless}

[0187] Where S_total is the multimodal integrated matching confidence level, w_m and w_w are the weight coefficients of geomagnetic and wireless signals, respectively; S_magnetic and S_wireless are the fingerprint similarity of geomagnetic and wireless signals, respectively; I_wireless is the wireless signal indication function (1 when a valid signal is detected, 0 otherwise); and T_match is the threshold for determining successful fingerprint matching.

[0188] like Figure 5 As shown, trajectory prediction and fingerprint matching form a dual verification mechanism.

[0189] In step S5, under the dual verification of continuous SVM triggering and successful fingerprint matching, the switch from GNSS positioning mode to indoor positioning mode is performed. The specific positioning mode switch is as follows:

[0190] When SVM is continuously triggered and the fingerprint matching score S_{total} > T_{match}, the following calibration logic is executed:

[0191] Determine the landmark truth value: regard the location coordinates P_{fp} of the successfully matched position in the fingerprint database as the absolute true position of the row at the current moment;

[0192] Calculate the deviation: Obtain the position P_{est} estimated by the PDR based on the inertial sensor, and calculate the deviation vector δ = P_{fp} - P_{est};

[0193] Smooth correction: Within seconds, the deviation is linearly attenuated and superimposed on the subsequent PDR output, achieving a soft switch from the outdoor coordinate system to the indoor coordinate system.

[0194] In step S5, after successful matching, the positioning mode is switched and the initial position is calibrated to confirm the initial landmark of the pedestrian entering the indoor positioning system. The specific steps are as follows:

[0195] Step 5.1, Landmark Confirmation Mechanism

[0196] Landmark confirmation logic:

[0197] When fingerprint matching is successful, the initial indoor location landmark is confirmed.

[0198] landmark_position = matched_position

[0199] landmark_confidence = S_total

[0200] Otherwise, maintain the current positioning mode and continue monitoring trajectory changes.

[0201] Step 5.2, Location mode switching decision

[0202] Switching decision: Pseudocode as follows

[0203] If SVM triggers continuously and fingerprint matching succeeds

[0204] Switch to indoor positioning mode

[0205] Initialize indoor positioning parameters

[0206] Record switch point as landmark

[0207] switch_mode = 'indoor'

[0208] else

[0209] Continue GNSS positioning mode

[0210] Maintain outdoor positioning status

[0211] switch_mode = 'outdoor'

[0212] End

[0213] Step 5.3, Initial Position Calibration and Smoothing

[0214] Determine the truth value: consider the position P_{fp} where the fingerprint match is successful as the accurate position.

[0215] Calculate the deviation: Obtain the current PDR estimated position P_{est}, and calculate the deviation vector δ = P_{fp} - P_{est}.

[0216] Error amortization: Over the next K steps (K=2), the deviation δ is linearly amortized and compensated for in the positioning result, using the following formula:

[0217] P_output(t+k) = P_pdr(t+k) + (Kk)*δ / K

[0218] Step 5.4, Initialize positioning system parameters

[0219] When it is determined that switch_mode == 'indoor', initialize the indoor positioning system parameters, set the indoor positioning accuracy requirements, enable indoor positioning sensor fusion, and update the positioning filter parameters.

[0220] The following experiment will be conducted to verify the technical advantages of this invention.

[0221] like Figure 6 As shown, the fingerprint matching verification method proposed in this invention effectively corrects the cumulative initial position error caused by the rapid decline in the performance of the outdoor positioning terminal during the switching process from outdoor to indoor positioning system, making the outdoor Beidou-indoor inertial navigation technical solution feasible.

[0222] like Figure 7 As shown, sensors were used to verify the precipitous drop in BeiDou satellite positioning performance at the indoor-outdoor physical boundary, proving that the problem scenario created by this invention truly exists.

[0223] like Figure 8 As shown, in a simulation environment, the time series prediction proposed in this invention can achieve high-confidence prediction before the effective step size limit of SVM matching, proving that under the premise of reasonable combination, time series prediction can eliminate redundant interference without affecting the availability of SVM.

[0224] like Figure 9 As shown, a preferred embodiment of the present invention provides an indoor-outdoor seamless positioning switching system based on trajectory prediction and fingerprint verification, used to execute the above method, including the following modules:

[0225] Trajectory data generation module: A virtual simulation model is established at the building entrance and exit to generate random trajectories and reward guidance trajectories. The position, speed, acceleration and heading angle sequences of pedestrians are sampled to establish a trajectory database. At the same time, multimodal fingerprints are collected in the transition area of ​​the building entrance and exit to establish a fingerprint database containing geomagnetic features and wireless signal features.

[0226] Feature extraction training module: Features are extracted based on the trajectory database, and an SVM model is used for binary classification training;

[0227] Sliding prediction module: Sets a sliding window to perform real-time sliding prediction on pedestrian trajectory data, and determines whether the SVM is continuously triggered within the window. If so, the fingerprint matching module will execute; otherwise, the prediction window will continue to slide.

[0228] Fingerprint matching module: For trajectories that match the prediction window, multimodal fingerprint matching is initiated; it is then determined whether the fingerprint matching is successful. If so, the initial landmark of the pedestrian entering the building is confirmed and executed by the smoothing calibration module; otherwise, it is executed by the sliding prediction module.

[0229] Smooth calibration module: Performs the switch from GNSS positioning mode to indoor positioning mode, and performs smooth calibration on the initial position based on the fingerprint matching results, so as to achieve seamless indoor and outdoor positioning switching.

[0230] Other aspects of this embodiment can be found in the above method embodiments.

[0231] The above embodiments are used to explain the present invention and for the purpose of facilitating understanding, and are not intended to limit the present invention.

Claims

1. A seamless indoor / outdoor positioning handover method based on trajectory prediction and fingerprint verification, characterized by: Specifically, the following steps are included: S1: Establish a virtual simulation environment at the building entrance and exit, generate random trajectories and reward guidance trajectories, and sample pedestrian positions, speeds, accelerations and heading angle sequences to establish a trajectory database; at the same time, conduct on-site collection of multimodal fingerprints in the transition area of ​​the building entrance and exit to establish a fingerprint database containing geomagnetic features and wireless signal features. S2: Based on the trajectory database of step S1, feature extraction is performed, and a support vector machine (SVM) model is used for binary classification training to determine the pedestrian's movement tendency. S3: Set a sliding window, input pedestrian trajectory data into the SVM model in real time for sliding prediction, and determine whether the SVM is continuously triggered within the window. If yes, proceed to step S4; otherwise, maintain the sliding window and continue monitoring. S4: Initiate multimodal fingerprint matching, determine whether the fingerprint matching is successful, if so, confirm the initial landmark of the pedestrian entering the room, and proceed to step S5; if the matching fails, return to step S3. S5: Performs the switch from GNSS positioning mode to indoor positioning mode, and smoothly calibrates the initial position based on the fingerprint matching results to achieve seamless indoor and outdoor positioning switching.

2. The indoor-outdoor seamless positioning switching method based on trajectory prediction and fingerprint verification as described in claim 1, characterized in that the steps... In S1, a virtual simulation environment is established at the building entrances and exits to generate random trajectory and reward-guided trajectory data, specifically including: 1) Random trajectory generation: Pedestrian motion trajectory is generated based on the maximum velocity, maximum acceleration and scene boundary constraints under random seed; 2) Reward-guided trajectory generation: By applying reward weights that increase with distance to important sample points, the trajectory is guided towards the entrance and exit; 3) Trajectory data fusion: Combine random trajectories with multiple reward-guided trajectories to establish a complete trajectory database.

3. The indoor / outdoor seamless positioning switching method based on trajectory prediction and fingerprint verification as described in claim 2, characterized in that, In step S1, the on-site collection and database construction of multimodal fingerprints are as follows: A grid-like deployment was carried out in the transition area of ​​building entrances and exits to collect geomagnetic field intensity sequences and public radio frequency signals in the building entrance and exit areas. A fingerprint database containing location coordinates, multimodal features, and timestamps is constructed, and finally a fingerprint matching algorithm based on Euclidean distance or Mahalanobis distance is established.

4. The indoor / outdoor seamless positioning switching method based on trajectory prediction and fingerprint verification as described in claim 1, characterized in that, In step S2, a sliding window technique is first used to move along the trajectory data and extract an 8-dimensional statistical feature vector for each window segment, including the mean velocity, standard deviation of acceleration, and rate of change of heading angle. Then, a training sample set is constructed based on the extracted feature vectors. Positive and negative samples are marked by whether the trajectory passes through the entrance door. Finally, a support vector machine (SVM) is used for binary classification training to establish a trajectory prediction classifier, which is used to determine in real time whether the pedestrian trajectory tends towards the entrance or exit.

5. The indoor / outdoor seamless positioning switching method based on trajectory prediction and fingerprint verification as described in claim 1, characterized in that, In step S3, the real-time pedestrian trajectory data is first processed by sliding window, features are extracted from each window and input into the SVM model for prediction, and then the number of windows that continuously meet the triggering conditions is counted. When the number of consecutive triggers reaches a set threshold, the positioning mode switching prediction is executed. At the same time, the false alarm rate calculation logic is optimized to reduce the probability of false switching.

6. The indoor / outdoor seamless positioning switching method based on trajectory prediction and fingerprint verification as described in claim 1, characterized in that, In step S4, multimodal fingerprint verification is initiated when SVM prediction is triggered and the pedestrian is located at the entrance / exit. Then, the current geomagnetic and WiFi fingerprint features are collected in real time and matched with the pre-built fingerprint database for similarity. When starting the matching verification, the sequence matching of geomagnetic fingerprints is performed first for positioning; if a valid WiFi fingerprint exists in the environment, the Euclidean distance of its signal characteristics is calculated and then finely weighted; finally, the comprehensive confidence score is calculated by weighted fusion matching results, and fingerprint matching is confirmed to be successful when the comprehensive confidence score exceeds the matching threshold.

7. The indoor / outdoor seamless positioning switching method based on trajectory prediction and fingerprint verification as described in any one of claims 1-6, characterized in that, In step S5, under the dual verification of continuous SVM triggering and successful fingerprint matching, the switch from GNSS positioning mode to indoor positioning mode is performed. The specific positioning mode switch is as follows: When SVM is continuously triggered and the fingerprint matching score S_{total} > T_{match}, the following calibration logic is executed: Determine the landmark truth value: regard the location coordinates P_{fp} of the successfully matched position in the fingerprint database as the absolute true position of the row at the current moment; Calculate the deviation: Obtain the position P_{est} estimated by the PDR based on the inertial sensor, and calculate the deviation vector δ = P_{fp} - P_{est}; Smooth correction: Within seconds, the deviation is linearly attenuated and superimposed on the subsequent PDR output, achieving a soft switch from the outdoor coordinate system to the indoor coordinate system.

8. A seamless indoor / outdoor positioning switching system based on trajectory prediction and fingerprint verification, used to perform the method as described in any one of claims 1-7, comprising the following modules: Trajectory data generation module: A virtual simulation model is established at the building entrance and exit to generate random trajectories and reward guidance trajectories. The position, speed, acceleration and heading angle sequences of pedestrians are sampled to establish a trajectory database. At the same time, multimodal fingerprints are collected in the transition area of ​​the building entrance and exit to establish a fingerprint database containing geomagnetic features and wireless signal features. Feature extraction training module: Features are extracted based on the trajectory database, and an SVM model is used for binary classification training; Sliding prediction module: Sets a sliding window to perform real-time sliding prediction on pedestrian trajectory data, and determines whether the SVM is continuously triggered within the window. If so, the fingerprint matching module will execute; otherwise, the prediction window will continue to slide. Fingerprint matching module: For trajectories that match the prediction window, multimodal fingerprint matching is initiated; it is then determined whether the fingerprint matching is successful. If so, the initial landmark of the pedestrian entering the building is confirmed and executed by the smoothing calibration module; otherwise, it is executed by the sliding prediction module. Smooth calibration module: Performs the switch from GNSS positioning mode to indoor positioning mode, and performs smooth calibration on the initial position based on the fingerprint matching results, so as to achieve seamless indoor and outdoor positioning switching.