An adaptive fusion indoor positioning method based on MT-STCN and PDR, medium and equipment
By fusing multi-task spatiotemporal convolutional networks and adaptive extended Kalman filters, the accuracy and robustness issues of traditional PDR and deep learning models in indoor positioning are solved, achieving high-precision and low-cost adaptive indoor positioning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHEAST UNIV
- Filing Date
- 2026-02-10
- Publication Date
- 2026-05-29
Smart Images

Figure CN122108100A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile positioning technology, and in particular to indoor mobile positioning methods, media, and devices based on deep learning algorithms. Background Technology
[0002] With the development of mobile internet and IoT technologies, the demand for location-based services is booming, especially in indoor environments. However, indoor pedestrian positioning faces many challenges. For example, it is highly dependent on external infrastructure. Global Navigation Satellite System (GNSS) signals are severely attenuated or even completely disabled in large shopping malls, basements, and other indoor spaces, making it impossible to provide reliable and effective positioning services. Positioning technologies based on Wi-Fi fingerprints or Bluetooth beacons require significant manpower and resources for pre-deployment of infrastructure and continuous daily maintenance. Smartphones have built-in Inertial Measurement Units (IMUs) that integrate accelerometers, gyroscopes, and magnetometers. In contrast, Pedestrian Dead Reckoning (PDR), based on smartphone-built-in IMUs, can detect steps, estimate step length and heading using IMU data to achieve location estimation. PDR requires no external equipment and has advantages such as low cost, strong privacy, and readily available availability, making it one of the most infrastructure-free indoor positioning technologies with the greatest potential for generalization.
[0003] The PDR algorithm consists of three main parts: step count detection, step size estimation, and heading estimation. However, traditional PDR still has limitations. Although the method does not require external infrastructure, it heavily relies on step size models and heading estimation, and the raw data for these models depends on IMU (Instrument Detection Unit) acquisition. Due to the diversity of pedestrians and the frequent changes in device carrying posture, the raw IMU data is complex, and traditional PDR is prone to integration drift and accumulated errors, resulting in limited positioning accuracy.
[0004] Deep learning algorithms have opened up new avenues for inertial positioning (IDR), enabling end-to-end learning of complex motion features from raw IMU data and automatically constructing a mapping from low-dimensional signals to high-dimensional motion states through multi-layer nonlinear transformations. This data-driven paradigm significantly reduces reliance on manual modeling, effectively mitigating the error accumulation problem in traditional PDR methods while lowering the requirements for precise initial conditions and strong motion constraints. However, deep learning models heavily rely on high-quality training data, and their "black box" nature results in a lack of interpretable physical constraints in the output. When encountering motion patterns not fully covered by the training set or unknown environments, the network may exhibit unpredictable drift, and its generalization ability still faces significant challenges. This problem is particularly prominent when using a mobile phone's built-in IMU to collect human motion state data.
[0005] Therefore, there is an urgent need for a robust indoor positioning method that does not require external infrastructure, can effectively utilize raw IMU data, and takes into account prior physical models. Summary of the Invention
[0006] Purpose of the invention: To address the aforementioned existing technologies, this invention proposes an adaptive fusion indoor positioning method, medium, and device based on MT-STCN (Multi-task Spatio-Temporal Convolutional Network) and PDR. The method extracts high-dimensional features through lightweight MT-STCN, combines it with context-aware PDR to provide motion priors, and utilizes AEKF to dynamically fuse the results of the two methods, thereby achieving high-precision and robust trajectory optimization.
[0007] Technical solution: An adaptive fusion indoor positioning method based on MT-STCN and PDR, comprising:
[0008] S1: Acquire a six-degree-of-freedom inertial data sequence, including three-axis acceleration and three-axis angular velocity, through the inertial measurement unit (IMU) built into the smartphone;
[0009] S2: Input the inertial data sequence into the pre-trained multi-task spatiotemporal convolutional network MT-STCN, and output the device's carrying attitude category, displacement regression prediction value, and heading increment estimate value.
[0010] S3: Determine whether the pedestrian is in a straight-ahead state based on the pedestrian heading increment estimate output by the MT-STCN: If the pedestrian is in a turning state, match the preset initial attitude corresponding to the carrying attitude category; if the pedestrian is in a straight-ahead state, calculate the initial attitude based on the inertial data sequence using the Madgwick attitude estimation algorithm; the initial attitude serves as a context-aware attitude prior.
[0011] S4: Perform low-pass filtering on the inertial data sequence, and calculate the predicted PDR displacement and estimated PDR heading increment based on the attitude prior and the pedestrian dead reckoning (PDR) model.
[0012] S5: Real-time evaluation of the consistency between the MT-STCN output and the PDR model output in displacement prediction and heading increment estimation, to obtain consistency evaluation results;
[0013] S6: Based on the consistency evaluation results, the observation noise covariance matrix is dynamically adjusted using an adaptive extended Kalman filter, and the MT-STCN output and the PDR model output are fused to perform trajectory extrapolation and obtain the fused trajectory.
[0014] Furthermore, in S2, the MT-STCN adopts a hierarchically doubling dilated convolutional structure: the receptive field is expanded between cascaded time block layers by a doubling dilation factor; each time block within a layer contains two causal convolutional layers with the same kernel size and sharing the same doubling dilation factor.
[0015] Furthermore, in S3, the specific implementation of Madgwick pose estimation includes:
[0016] S3-3: Let the attitude unit quaternion of the sensor coordinate system s relative to the navigation coordinate system n be... The three-axis angular velocity vector in the sensor coordinate system Transform to projection in navigation coordinate system Angular velocity in the navigation coordinate system Integrating the results yields the preliminary predicted attitude quaternion;
[0017] S3-4: Construct the objective function to represent the current attitude quaternion. The error between the predicted direction of gravity and the normalized direction of gravity measured by the accelerometer;
[0018] S3-5: Calculate the gradient of the objective function with respect to the quaternion, correct the result of the integral along the negative gradient direction, and obtain the final initial attitude.
[0019] Furthermore, in the calculation of the PDR displacement prediction value in S4, the gait cycle of the pedestrian is extracted in real time, the ratio of the remaining sampled data points after the gait event is detected in the current data frame to the gait cycle is calculated, and the ratio is included in the step count as a non-integer step increment, so as to realize the solution of the accurate displacement increment in the current frame.
[0020] Furthermore, in S5, the differences between the PDR model and the MT-STCN output in terms of displacement and heading increments are first calculated. and Then, a linear interpolation strategy is used, based on the difference value. and Real-time mapping yields measurement noise scaling factors for displacement and heading increments. and The scaling factor characterizes the sensitivity of measurement noise to changes in error estimation.
[0021] Furthermore, in step S6, the measurement noise scaling factor is utilized. and The diagonal elements of the preset measurement noise covariance matrix are weighted and corrected to dynamically adjust the trust weights of the adaptive extended Kalman filter on the MT-STCN output and the PDR model output under the current motion state.
[0022] Furthermore, S1 also includes: setting the IMU data sampling frequency to 100Hz and constructing a data frame tensor with a dimension of 6×100; during the training phase, using a GPS signal with a sampling frequency of 1Hz as an external constraint, and obtaining the true location value through time alignment and the Vincenty formula.
[0023] Furthermore, the MT-STCN also integrates channel attention mechanism and time attention mechanism, and uses a composite loss function including cross-entropy and mean absolute error (MAE) for multi-task collaborative training.
[0024] A computer-readable storage medium storing computer program instructions; when executed by a processor, the computer program instructions implement the adaptive fusion indoor positioning method.
[0025] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the adaptive fusion indoor positioning method.
[0026] Beneficial effects: (1) High-precision non-integer step displacement calculation is achieved. This invention calculates the ratio of the remaining sampling points within a frame to the entire gait cycle and incorporates it as an increment into the step count. This effectively solves the displacement discretization error caused by rounding the step count in traditional PDR frame processing, making the displacement increment description within a single frame more accurate.
[0027] (2) The system's adaptability to changes in device carrying posture is enhanced. This invention utilizes the device carrying posture category and pedestrian heading increment output by the MT-STCN model as prior information to dynamically guide the PDR module to adjust its initial posture. This solves the problem of poor performance of existing positioning methods when the user is holding the device or has it in their pocket, and achieves context-aware positioning.
[0028] (3) Significantly improved positioning accuracy: The AEKF adaptive fusion mechanism proposed in this invention calculates the scaling factor of the prediction difference in real time through a linear interpolation strategy, and dynamically corrects the observation noise covariance matrix. This not only alleviates the problem of accumulated error in traditional PDR, but also uses the physical constraints of PDR to suppress outlier jitter that may occur in deep learning, making the positioning more accurate.
[0029] (4) Feature modeling that balances computational efficiency and global perspective is achieved. The MT-STCN designed in this invention adopts a 4-level cascaded time block and a layer-by-layer doubling dilation factor. While maintaining lightweight and easy edge deployment, this structure significantly expands the receptive field through causal dilated convolution, enabling it to capture long-term pedestrian movement trends and making displacement regression and heading prediction more coherent.
[0030] (5) It has the advantages of low cost and easy deployment. This system only relies on the data of the inertial measurement unit (IMU) built into the device and does not rely on any external infrastructure (such as Wi-Fi, Bluetooth beacons) or complex pre-built fingerprint database. Therefore, it has the advantages of extremely low deployment cost, strong scalability and can be run anytime and anywhere. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating the overall system flow of the present invention.
[0032] Figure 2 This is a schematic diagram of the MT-STCN network implemented in this invention;
[0033] Figure 3 This is a schematic diagram of the Temporal Block module in the MT-STCN network of the present invention;
[0034] Figure 4 This is a flowchart of the AEKF algorithm implemented in this invention;
[0035] Figure 5 This is a comparison chart showing the performance of the proposed AEKF algorithm with the standalone PDR algorithm and MT-STCN algorithm in different indoor carrying postures. Detailed Implementation
[0036] The invention will now be further explained with reference to the accompanying drawings.
[0037] like Figure 1 As shown, an adaptive fusion indoor positioning method based on MT-STCN and pedestrian dead reckoning includes the following steps:
[0038] S1: Acquires six-DOF inertial data sequences, including three-axis acceleration and three-axis angular velocity, via a smartphone's built-in IMU. The acquisition process includes both indoor and outdoor environments. In indoor environments, only IMU signals are acquired for prediction. In open outdoor environments, GPS signals are additionally collected to obtain ground-valued locations for network training.
[0039] S1 includes the following specific steps:
[0040] S1-1: Using software on a smartphone, the IMU sampling frequency was set to 100 Hz, and the GPS sampling frequency was set to 1 Hz. Different subjects carried their phones and walked along a route that included straight sections and turns, using different carrying methods.
[0041] S1-2: The collected data is processed by frame segmentation. First, the IMU (100Hz) and GPS (1Hz) data are time-aligned. Then, each GPS time point is used as the end point of the current data frame, and the IMU data within the previous 1-second time window (a total of 100 points) is extracted to form an independent training sample. Each training sample is represented as a tensor with a dimension of 6×100.
[0042] S1-3: Each frame of data is labeled, where the device's carrying posture is known before data acquisition. The label for the actual displacement is obtained by calculating the latitude and longitude coordinates of the two GPS points that divide the frame using the Vincenty formula. The label for the heading increment is obtained by numerically integrating the gyroscope data within the data frame using the known carrying posture of the phone. Carrying posture categories include holding the phone in front of the body, holding the phone and swinging it freely with the arm, putting the phone in a pants pocket, and remaining stationary.
[0043] S2: The inertial data sequence is input into the pre-trained MT-STCN. This model adopts a hierarchical doubling dilated convolutional structure to break through the perception bottleneck of traditional TCN and integrates an attention mechanism to enhance the weight of key features. The model finally decouples and outputs attitude category, displacement prediction value and heading increment estimate, providing multi-dimensional state support for subsequent fusion localization.
[0044] S2 includes the following specific steps:
[0045] A 6×100 dimension data frame is input into the MT-STCN network. The structure of the MT-STCN network is as follows: Figure 2As shown, the overall structure consists of four cascaded temporal blocks; the receptive field is expanded between layers through a progressively increasing dilation factor; each temporal block within a layer contains two causal convolutional layers with the same kernel size and sharing the same dilation factor, and also includes an attention mechanism and a multilayer perceptron (MLP). The MT-STCN network outputs pose classification results, pedestrian displacement regression predictions, and pedestrian heading increment estimates.
[0046] The models for channel attention and temporal attention mechanisms are as follows:
[0047]
[0048]
[0049] in, Represents the channel weight vector. This indicates that a pooling operation is performed on the input feature Y. Represents the ReLU activation function. This represents the Sigmoid activation function; represents the time weight vector, softmax represents the softmax activation function, and tanh represents the tanh activation function. , , , All are linear layer weights.
[0050] Causal dilated convolution is as follows Figure 3 The main structure of the Temporal Block module shown is as follows:
[0051]
[0052] in, This represents the output value at time step t. Is the convolution kernel at the 1st The weight of each position, Indicates the kernel size. This represents the input signal after dilation sampling. It is an expansion factor that controls the extent of receptive field expansion, through To achieve discontinuous sampling and expand the receptive field; Indicates the input sampling function. This represents actual input. Represents a time index variable. .when When the model degenerates into a standard causal convolution, it is considered to be in a non-standard, non-standard, At that time, exponential growth of the receptive field is achieved through interval sampling.
[0053] Unlike conventional TCN structures that suffer from overly simplistic dilation factor settings or limited receptive field expansion, this invention designs a hierarchical gain-based temporal convolutional network. By introducing a layer-by-layer doubling dilation mapping mechanism between the four Temporal Blocks, it achieves maximum spatial receptive field coverage with minimal computational cost. Within each Block, a homogeneous dilation strategy using dual convolutional layers sharing a dilation factor effectively enhances the nonlinear mapping depth of local features under causal logic constraints. This structure, characterized by inter-layer doubling dilation and intra-layer feature alignment, significantly improves the stability of location estimation in complex indoor scenes.
[0054] MT-STCN selects a composite loss function Training was conducted to simultaneously optimize both pose category classification and frame-level gait parameter regression tasks. Let cross-entropy be the loss function. A smooth L1 loss function is used. The loss function represents the regression prediction value of pedestrian displacement. The loss function represents the estimated pedestrian heading increment. , , These are adjustable weighting coefficients that control the importance of each task.
[0055] The training cycles were set to 100 to 200 times; in this embodiment, 150 cycles were selected. After 150 training cycles, the model reached a stable convergence state on both the training and validation sets.
[0056] The trained MT-STCN model is used to output IMU data from subjects in a real indoor environment to obtain their posture category and displacement prediction values. and heading increment estimate .
[0057] S3: Determine whether to go straight based on the pedestrian heading increment estimate output by MT-STCN, and dynamically select either a preset initial attitude or an initial attitude estimated by the Madgwick attitude estimation algorithm to provide context-aware attitude prior.
[0058] S3 includes the following specific steps:
[0059] S3-1: Determine whether the straight-ahead threshold has been reached based on the pedestrian heading increment estimate output by the MT-STCN model. The threshold needs to be calibrated according to the actual scenario, or a preset value can be used.
[0060] S3-2: If turning, select a preset initial attitude based on the carrying attitude category output by the MT-STCN model. The preset initial attitude is a baseline attitude parameter, such as an initial quaternion value, obtained in advance through experimental measurement for each known device carrying attitude.
[0061] S3-3: If the movement is in a straight line, the original IMU signal is processed by a gradient descent-based Madgwick quaternion filter to obtain the preliminary predicted attitude quaternion, which is the output initial attitude.
[0062] Specifically, let the attitude unit quaternion of the sensor coordinate system s relative to the navigation coordinate system n be... ,in , , , Quaternion components, , , It is a unit vector in three-dimensional space.
[0063] A gyroscope measures the three-axis angular velocity vector in the sensor coordinate system. (Unit: rad / s), then it is converted to a projection in the navigation coordinate system according to the quaternion rotation formula. The quaternion rotation formula is:
[0064] ;
[0065] in Quaternion conjugate, Represents the multiplication of quaternions.
[0066] For the first sampling point in each frame, the angular velocity in the navigation coordinate system is calculated according to the following formula. Integrate to obtain the attitude quaternion at the current moment.
[0067]
[0068] in The time derivative of the attitude quaternion. Represents the instantaneous attitude quaternion (corresponding to the attitude) ), and Let these represent the quaternions at the current time and the previous time, respectively. It is the sampling period. It is the sampling frequency.
[0069] S3-4: Constructing the objective function Its representation is given by the attitude quaternion at the current moment. The predicted direction of gravity is the same as the normalized direction of gravity measured by the accelerometer. The error between them is specifically in the form of:
[0070]
[0071] in, To transform the gravity vector in the global coordinate system according to the quaternion rotation formula pass The theoretical gravity projection rotated to the sensor coordinate system. Objective function value. The smaller the magnitude, the more it indicates the attitude quaternion at the current moment. The closer the predicted direction of gravity is to the measured value, the more accurate the attitude estimation.
[0072] S3-5: To minimize Calculate the gradient of the function ,in, for Jacobian matrix for quaternions.
[0073] The initial predicted attitude quaternions obtained in S3-3 are corrected along the negative gradient direction to obtain the final initial attitude quaternions. The corrected differential equation is:
[0074]
[0075] in, It is an adjustable gain coefficient. It is the three-axis angular velocity vector at the current moment after conversion. This continuously calibrates the initial attitude obtained by gyroscope integration to the direction most consistent with the current gravity observation, effectively suppressing the cumulative drift of the gyroscope.
[0076] This method, which uses the output of the network model as prior information to dynamically guide the PDR module to adjust its initial posture, solves the problem of poor performance of existing positioning methods when the user holds the device in various postures such as holding it in their hand or putting it in their pocket, and significantly enhances the system's adaptability to changes in the device's carrying posture.
[0077] S4: Perform Butterworth low-pass filtering on the inertial data sequence obtained in S1; based on the attitude prior obtained in S3, calculate the PDR displacement prediction value and the PDR heading increment estimate value for the filtered data using the pedestrian dead reckoning (PDR) model.
[0078] To address the challenge of ensuring step integrity in traditional PDR (Pedestrian Track Detection) with fixed frame lengths, this invention constructs a non-integer step length calculation framework using Butterworth filtering and attitude prior constraints. The core technology lies in matching gait periodic features within the intra-frame sampled sequence and calculating the contribution increment of the remaining gait based on its temporal proportion. This method transforms traditional discrete estimation based on steps into full-temporal sampling integration, effectively reducing displacement quantization errors caused by frame-by-frame processing and improving the spatial resolution of pedestrian track estimation.
[0079] S4 includes the following specific steps:
[0080] S4-1: Perform Butterworth low-pass filtering on each frame of the input inertial data sequence. The cutoff frequencies for accelerometer and gyroscope data are 3 Hz and 6 Hz, respectively.
[0081] S4-2: Calculate the resultant acceleration after filtering Use the Weinberg formula to estimate the step size :
[0082]
[0083] in, and It represents the peak and trough values of the resultant acceleration within a gait cycle. It is an empirical gain coefficient that needs to be pre-calibrated experimentally. This is the acceleration due to gravity.
[0084] S4-3: The ratio of the remaining data points within one frame to the total gait cycle is used to determine the precise number of steps.
[0085]
[0086]
[0087] Where N is the number of steps detected. The gait period is the time interval between two consecutive gait events. The sum of the number of acceleration peaks and valleys observed within a frame. This indicates rounding down to the nearest integer. This represents the predicted pedestrian displacement within a single frame.
[0088] S4-4: Using the initial attitude quaternion obtained in S3, combined with the gyroscope data after Butterworth filtering in S4-1, the attitude quaternion is updated in real time according to the quaternion integration formula in S3-3. The estimated pedestrian heading increment for one frame is obtained by the following formula. :
[0089] .
[0090] in, This represents the two-parameter arctangent function.
[0091] S5: Real-time evaluation of the predictive consistency between MT-STCN output and PDR output for displacement prediction and heading increment estimate.
[0092] Step S5 includes the following specific steps:
[0093] S5-1: Calculate the displacement difference between PDR and MT-STCN outputs Difference in heading increment :
[0094] .
[0095] S5-2: Calculate the measurement noise scaling factor using an independent linear interpolation strategy, representing the sensitivity to changes in error estimation:
[0096]
[0097] in, and These represent the measurement noise scaling factors for displacement and heading increments, respectively. and These represent the maximum difference thresholds for the set displacement and heading increments, respectively. and These represent the lower and upper limits of the noise scaling factor for displacement measurement, respectively. and These represent the lower and upper limits of the noise scaling factor for the heading increment measurement, respectively.
[0098] The scaling factor for the prediction difference is calculated in real time using a linear interpolation strategy, dynamically correcting the observation noise covariance matrix in S6. This not only alleviates the accumulated error problem of traditional PDR, but also uses the physical constraints of PDR to suppress outlier jitter that may occur in deep learning, resulting in more accurate localization.
[0099] S6: Based on the prediction consistency evaluation results, an adaptive extended Kalman filter (AEKF) is designed, which can dynamically adjust the observation noise covariance matrix, fuse the MT-STCN output and PDR output, and perform trajectory extrapolation to obtain the fused trajectory.
[0100] like Figure 4 As shown, S6 includes the following specific steps:
[0101] S6-1: Define the state vector and observation vector .
[0102] in, The position coordinates of the two-dimensional plane representing the current state. Indicates the course; This represents the position coordinates estimated using MT-STCN. This indicates the heading estimated using MT-STCN.
[0103] Initialize state vector Initialize the covariance matrix , The identity matrix is used to initialize the process noise covariance matrix. Initialize the measurement noise covariance matrix .
[0104] S6-2: Execution Status Prediction
[0105] .
[0106] in, yes The prior predicted state at time 10:00. yes Post-hoc estimation of state at time step This is the state transition function. The noise term in the model is a Gaussian distribution with a mean of 0, which conforms to... , , , These represent the process noise at the x and y positions and the heading increment in the state vector, respectively.
[0107] S6-3: Execution State Covariance Prediction: .
[0108] in, yes Prior prediction covariance at time 1 It is a posterior estimate of covariance. It is a state transition function Jacobian matrix, , Let be the process noise covariance matrix.
[0109] S6-4: Construct the observation model using the output data of MT-STCN. and Update location:
[0110]
[0111] in, express The observed value at time; The observation function has the same form of expression as the state transition function. It is the same Gaussian distribution measurement noise term with a mean of 0 that is introduced, which conforms to... , , , These represent the measurement noise at the x and y positions and the heading increment in the observation vector, respectively. and They are independent of each other.
[0112] S6-5: Calculate the Jacobian matrix of the observation function. .
[0113] S6-6: Measurement noise scaling factor obtained based on S5 and , Measurement noise covariance matrix at time It becomes:
[0114]
[0115] in, and This represents the standard deviation of measurements at x and y positions. This represents the standard deviation of the heading increment measurement.
[0116] S6-7: Perform update, calculate Time-based Kalman filter gain: ;
[0117] The state vector at time step 1 is updated as follows: ;
[0118] The covariance matrix at time step is updated as follows: .
[0119] Figure 5 The diagrams show the trajectories under three carrying postures. Straight lines represent the actual trajectories, circles represent the MT-STCN-calculated trajectories, triangles represent the PDR trajectories, and diamonds represent the AEKF-fused trajectories. In scenarios (a) and (b), the AEKF trajectory, combining the outputs of MT-STCN and PDR, more accurately reproduces the path. Although in the weakly constrained scenario (c), the traditional PDR accumulates errors rapidly, resulting in significant trajectory deviations; and MT-STCN exhibits bias at the first and second turns, AEKF, through the introduction of an observation update mechanism, dynamically adjusts the weights of both, effectively correcting the local biases of MT-STCN and suppressing the long-term drift of PDR.
[0120] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An adaptive fusion indoor positioning method based on MT-STCN and PDR, characterized in that, include: S1: Acquire a six-degree-of-freedom inertial data sequence, including three-axis acceleration and three-axis angular velocity, through the inertial measurement unit (IMU) built into the smartphone; S2: Input the inertial data sequence into the pre-trained multi-task spatiotemporal convolutional network MT-STCN, and output the device's carrying attitude category, displacement regression prediction value, and heading increment estimate value. S3: Determine whether the pedestrian is in a straight-ahead state based on the pedestrian heading increment estimate output by the MT-STCN: If the pedestrian is in a turning state, match the preset initial attitude corresponding to the carrying attitude category; if the pedestrian is in a straight-ahead state, calculate the initial attitude based on the inertial data sequence using the Madgwick attitude estimation algorithm; the initial attitude serves as a context-aware attitude prior. S4: Perform low-pass filtering on the inertial data sequence, and calculate the predicted PDR displacement and estimated PDR heading increment based on the attitude prior and the pedestrian dead reckoning (PDR) model. S5: Real-time evaluation of the consistency between the MT-STCN output and the PDR model output in displacement prediction and heading increment estimation, to obtain consistency evaluation results; S6: Based on the consistency evaluation results, the observation noise covariance matrix is dynamically adjusted using an adaptive extended Kalman filter, and the MT-STCN output and the PDR model output are fused to perform trajectory extrapolation and obtain the fused trajectory.
2. The adaptive fusion indoor positioning method based on MT-STCN and PDR according to claim 1, characterized in that, In S2, the MT-STCN adopts a hierarchical doubling dilated convolutional structure: the receptive field is expanded between cascaded time block layers by a doubling dilation factor; each time block within a layer contains two causal convolutional layers with the same kernel size and sharing the same doubling dilation factor.
3. The adaptive fusion indoor positioning method based on MT-STCN and PDR according to claim 1, characterized in that, In S3, the specific implementation of Madgwick pose estimation includes: S3-3: Let the attitude unit quaternion of the sensor coordinate system s relative to the navigation coordinate system n be... The three-axis angular velocity vector in the sensor coordinate system Transform to projection in navigation coordinate system Angular velocity in the navigation coordinate system Integrating the results yields the preliminary predicted attitude quaternion; S3-4: Construct the objective function to represent the current attitude quaternion. The error between the predicted direction of gravity and the normalized direction of gravity measured by the accelerometer; S3-5: Calculate the gradient of the objective function with respect to the quaternion, correct the result of the integral along the negative gradient direction, and obtain the final initial attitude.
4. The adaptive fusion indoor positioning method based on MT-STCN and PDR according to claim 1, characterized in that, In the calculation of the PDR displacement prediction value in S4, the gait cycle of the pedestrian is extracted in real time, the ratio of the remaining sampled data points after the gait event is detected in the current data frame to the gait cycle is calculated, and the ratio is included in the step count as a non-integer step increment to achieve the solution of the accurate displacement increment in the current frame.
5. The adaptive fusion indoor positioning method based on MT-STCN and PDR according to claim 1, characterized in that, In step S5, the differences between the PDR model and the MT-STCN output in terms of displacement and heading increments are first calculated. and Then, a linear interpolation strategy is used, based on the difference value. and Real-time mapping yields measurement noise scaling factors for displacement and heading increments. and The scaling factor characterizes the sensitivity of measurement noise to changes in error estimation.
6. The adaptive fusion indoor positioning method based on MT-STCN and PDR according to claim 5, characterized in that, In step S6, the measurement noise scaling factor is used. and The diagonal elements of the preset measurement noise covariance matrix are weighted and corrected to dynamically adjust the trust weights of the adaptive extended Kalman filter on the MT-STCN output and the PDR model output under the current motion state.
7. An adaptive fusion indoor positioning method based on MT-STCN and PDR according to any one of claims 1-6, characterized in that, The S1 further includes: setting the IMU data sampling frequency to 100Hz and constructing a data frame tensor with a dimension of 6×100; during the training phase, using a GPS signal with a sampling frequency of 1Hz as an external constraint, and obtaining the true location value through time alignment and the Vincenty formula.
8. An adaptive fusion indoor positioning method based on MT-STCN and pedestrian dead reckoning as described in any one of claims 2-6, characterized in that: The MT-STCN also integrates channel attention and temporal attention mechanisms, and uses a composite loss function including cross-entropy and mean absolute error (MAE) for multi-task collaborative training.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, they implement the adaptive fusion indoor positioning method as described in any one of claims 1-8.
10. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the adaptive fusion indoor positioning method according to any one of claims 1-8.