Positioning trajectory smoothing processing method and device, electronic equipment and storage medium

By dynamically adjusting the absolute median difference determination factor and introducing spatial kinematic constraints in the positioning trajectory processing, the problem that fixed thresholds cannot adapt to complex motion states is solved, and high-precision and continuous positioning trajectory generation is achieved.

CN123160701APending Publication Date: 2026-11-24BEIJING LANDSPACETECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611322217.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

When dealing with positioning trajectory processing under complex motion conditions, existing technologies cannot adaptively match different motion modes with fixed thresholds, leading to misjudgment or missed judgment. Furthermore, the lack of constraints from physical motion laws results in trajectory distortion.

Method used

A positioning trajectory smoothing method is adopted, which dynamically adjusts the judgment factor of absolute median difference through a sliding window and performs secondary screening in combination with spatial kinematic constraints, including distance, direction and curvature constraints, to generate a high-precision smooth positioning trajectory.

Benefits of technology

It significantly improves the accuracy and physical authenticity of positioning trajectories, reduces the false rejection rate and outlier omission rate, ensures the continuity of trajectories and conforms to the boundaries of physical motion capabilities, and achieves high-precision positioning trajectory generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160701A_ABST
    Figure CN123160701A_ABST
Patent Text Reader

Abstract

This application relates to the field of positioning data processing technology, and provides a method, apparatus, electronic device, and storage medium for smoothing positioning trajectories. The method includes: acquiring the original trajectory point data of a target object; extracting a sequence of trajectory points through a sliding window; dynamically adjusting the decision factor of the absolute median difference based on historical motion characteristics and performing outlier screening to obtain initially screened trajectory points; performing secondary screening on the initially screened trajectory points based on spatial kinematic constraints to obtain target trajectory points; and generating a smoothed positioning trajectory based on the target trajectory points. This application improves the accuracy, continuity, and robustness of positioning trajectories in complex motion scenarios through a dual mechanism of statistical dynamic adaptation and physical law constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of positioning data processing technology, specifically to a positioning trajectory smoothing processing method, device, electronic device, and storage medium. Background Technology

[0002] In practical applications of GPS, UWB, BeiDou and other positioning, navigation and trajectory tracking, the raw positioning data is often affected by environmental interference, resulting in outliers or jitter due to factors such as signal blockage, electromagnetic interference and equipment accuracy. These outliers need to be processed by smoothing algorithms.

[0003] Existing technologies often employ statistical filtering methods that combine sliding windows with fixed thresholds. However, such methods have significant limitations when faced with complex changes in the motion state of the target object: on the one hand, fixed statistical thresholds cannot adaptively match the discrete features of data under different motion modes such as static, uniform, or variable speed, which can easily lead to misjudgment of normal points in low-speed scenarios or omission of outliers in high-speed variable speed scenarios; on the other hand, pure statistical filtering lacks consideration of the laws of physical motion, and the smoothed trajectory may exhibit abrupt changes that violate kinematic principles or residual abnormal points, resulting in trajectory distortion.

[0004] Therefore, there is an urgent need for a trajectory smoothing solution that can take into account both adaptive adaptation of motion state and constraints of physical laws. Summary of the Invention

[0005] To address the problems of existing technologies where fixed thresholds are difficult to adapt to complex motion states and the lack of physical constraints leads to trajectory distortion, this application provides a positioning trajectory smoothing method, device, electronic device, and storage medium to achieve high-precision and high-continuity smoothing of positioning trajectories in complex motion scenarios.

[0006] To achieve the above objectives, this application adopts the following technical solution: In a first aspect, this application provides a method for smoothing positioning trajectories, comprising: acquiring original trajectory point data of a target object; extracting a sequence of trajectory points from the original trajectory point data through a sliding window; dynamically adjusting the decision factor of the absolute median difference based on the historical motion characteristics corresponding to the trajectory point sequence, and performing outlier screening on the trajectory point sequence based on the adjusted decision factor to obtain preliminary screening trajectory points; performing secondary screening on the preliminary screening trajectory points based on spatial kinematic constraints to obtain target trajectory points; and generating a smoothed positioning trajectory of the target object based on the target trajectory points.

[0007] The above scheme employs a dual processing mechanism of "statistical dynamic initial screening + physical kinematic secondary verification". First, it uses historical motion characteristics to drive the adaptive adjustment of the absolute median difference judgment factor, enabling the outlier identification threshold to match the current motion intensity of the target in real time, thus solving the problem of misjudgment or omission in variable speed or static scenarios with fixed thresholds. Then, it introduces spatial kinematic constraints to verify the physical rationality of the initial screening results, eliminating residual outliers that are not statistically excessive but violate motion laws. Thus, while ensuring real-time processing, it significantly improves the accuracy and physical authenticity of smooth trajectories.

[0008] As one implementation method, dynamically adjusting the decision factor of the absolute median difference based on the historical motion features corresponding to the trajectory point sequence includes: obtaining the current velocity of the current trajectory point in the trajectory point sequence and the previous velocity of the previous trajectory point; determining an adaptive adjustment coefficient based on the velocity difference between the current velocity and the previous velocity, and the historical average velocity; and determining the adjusted decision factor based on the initial decision factor and the adaptive adjustment coefficient. This implementation method concretizes the abstract historical motion features into a velocity change dimension, constructing the adjustment coefficient by quantifying the deviation of the velocity mutation degree at the current moment from the historical average level. This makes the adjustment of the decision factor have clear physical meaning and calculability, enhancing the algorithm's response sensitivity to switching between different motion modes.

[0009] As one implementation method, the adjusted decision multiple is determined based on the initial decision multiple and the adaptive adjustment coefficient, satisfying the following formula: ,in, The adjusted determination factor. The initial determination multiple, For preset adjustment coefficients, For the current speed, For the previous velocity, The historical average speed is... , The number of historical speed samples. For the first A historical velocity, where t is the current sampling time.

[0010] This formula is used to calculate the MAD (Median Absolute Deviation) multiple after adaptive calibration to adapt to the outlier discrimination requirements under different motion states.

[0011] This formula provides a specific adaptive calibration mathematical model. By introducing a ratio term between the speed difference and the historical average, it achieves linear or nonlinear scaling of the judgment factor as the motion state fluctuates, ensuring a low false alarm rate during smooth motion and automatically relaxing the threshold during drastic speed changes to avoid losing effective signals.

[0012] As one implementation method, the spatial kinematic constraints include at least one of distance constraints, direction constraints, and curvature constraints. The secondary screening of the initial trajectory points based on these spatial kinematic constraints to obtain target trajectory points includes: under the distance constraint, verifying whether the straight-line distance between adjacent trajectory points exceeds a distance threshold determined based on the historical maximum motion speed and sampling time interval; under the direction constraint, verifying whether the angle between the motion directions of adjacent trajectory points exceeds a preset angle threshold; under the curvature constraint, verifying whether the curvature of the trajectory segment formed by continuous trajectory points exceeds a preset curvature threshold; and determining the initial trajectory points that satisfy the enabled spatial kinematic constraints as the target trajectory points. This implementation method constructs a multi-dimensional physical verification system. Distance constraints prevent positional jumps exceeding physical limits, direction constraints suppress unreasonable abrupt changes in heading, and curvature constraints ensure the geometric continuity of the trajectory curve. The synergistic effect of these three constraints effectively eliminates residual noise from various morphological anomalies, ensuring that the output trajectory strictly conforms to the actual motion capability of the target object.

[0013] As one implementation, the step of verifying whether the curvature of the trajectory segment formed by continuous trajectory points exceeds a preset curvature threshold under the curvature constraint includes: calculating the curvature of the trajectory segment using a three-point circular arc fitting algorithm based on three consecutive normal trajectory points among the continuous trajectory points, wherein the curvature of the trajectory segment satisfies the following formula: , in, The curvature of the trajectory segment is... , , These are the two-dimensional coordinates of the three consecutive normal trajectory points. This implementation provides a curvature quantization calculation method based on local geometric features. Compared with simple difference approximation, three-point circular arc fitting can more accurately reflect the curvature of the trajectory, effectively identify abnormal inflection points that, although their position and direction do not change much, exhibit abrupt changes in curvature, and further improve the smoothness and naturalness of the trajectory shape.

[0014] As one implementation method, generating a smooth positioning trajectory of the target object based on the target trajectory points includes: using the median of the trajectory points within the sliding window as a benchmark, performing a weighted correction on the target trajectory points, wherein the weight of each target trajectory point decreases linearly as its distance from the median increases, and the weight satisfies the following formula: , in, For the first The weights of each normal trajectory point The preset maximum weight (value range 0.4-0.5) The preset minimum weight (value range 0.1-0.2) is used. For the first The distance between each trajectory point and the median of the trajectory points within the window. The median distance is the sum of the distances between all normal trajectory points and the median. Based on the target trajectory points after weighted correction, smooth trajectory coordinates are generated. For the missing positions after outlier removal, linear interpolation is used to supplement the coordinate information based on the adjacent valid trajectory points to obtain the smooth positioning trajectory.

[0015] The above formula calculates the weights of each normal trajectory point during the trajectory smoothing process to achieve weighted correction based on distance from the median. This implementation adopts a distance-adaptive weighting strategy based on the median benchmark during the smoothing stage, which not only preserves the core trend information within the window but also performs differentiated fusion based on the reliability of data points, avoiding the detail blurring caused by simple averaging; at the same time, it is combined with a linear interpolation mechanism to effectively fill the data gaps caused by outlier removal, ensuring the temporal continuity and spatial integrity of the final output trajectory.

[0016] As one implementation, the method further includes: obtaining the average positional deviation between the smoothed positioning trajectory and the reference trajectory; dynamically adjusting the window length of the sliding window and the initial judgment multiple of the absolute median difference based on the average positional deviation and the current motion scene type; wherein, when the current motion scene type is a static scene and the average positional deviation is greater than a preset deviation threshold, the window length is reduced and the initial judgment multiple is decreased; when the current motion scene type is a variable speed scene and the average positional deviation is greater than the preset deviation threshold, the window length is increased and the initial judgment multiple is increased.

[0017] This implementation introduces a closed-loop feedback optimization mechanism based on reference trajectory, which can dynamically optimize system parameters according to the matching degree between actual processing effect and scene type. In static scenes, it enhances the ability to suppress small jitters by shortening the window and increasing sensitivity, and in variable speed scenes, it improves the tracking stability of real motion trends by expanding the window and relaxing the threshold, thereby achieving adaptive evolution of performance in all scenarios.

[0018] Secondly, this application also provides a positioning trajectory smoothing processing device, comprising: a data acquisition module for acquiring original trajectory point data of a target object; a window truncating module for truncating a trajectory point sequence from the original trajectory point data through a sliding window; an outlier screening module for dynamically adjusting the decision factor of the absolute median difference based on the historical motion characteristics corresponding to the trajectory point sequence, and performing outlier screening on the trajectory point sequence based on the adjusted decision factor to obtain initially screened trajectory points; a secondary screening module for performing secondary screening on the initially screened trajectory points based on spatial kinematic constraints to obtain target trajectory points; and a trajectory generation module for generating a smooth positioning trajectory of the target object based on the target trajectory points. This device embodiment corresponds to the method embodiment, implementing the above-mentioned dual outlier removal and trajectory smoothing processing logic through a modular architecture, possessing the same adaptive capabilities and physical constraint verification functions, facilitating integration and deployment in embedded systems or cloud servers.

[0019] Thirdly, this application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the positioning trajectory smoothing processing method as described above. This electronic device carries the above-described method flow through a hardware carrier, providing a physical technical foundation for positioning terminals, navigation devices, or data processing centers.

[0020] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the positioning trajectory smoothing method described above. This storage medium, as a carrier of a software product, enables the above technical solution to be distributed, stored, and loaded in the form of program code.

[0021] The beneficial effects of this application include: The technical solution provided in this application fundamentally solves the technical problems of poor adaptability and lack of physical rationality of traditional trajectory smoothing methods in complex motion scenarios by constructing a dual processing architecture of "statistical dynamic adaptation + physical law constraint". Specifically, on the one hand, it uses historical motion characteristics to drive the real-time calibration of the absolute median difference judgment multiple, breaking the rigid limitation of fixed statistical thresholds, and enabling the outlier identification mechanism to flexibly expand and contract with the change of the target's motion state, significantly reducing the false rejection rate in static scenarios and the false rejection rate in variable speed scenarios; on the other hand, it introduces a spatial kinematic constraint system including distance, direction and curvature dimensions to perform secondary physical verification on the data after the initial statistical screening, forcibly removing residual outliers that, although not exceeding the statistical discrete range, violate the laws of kinematics, ensuring that the smoothed trajectory strictly conforms to the true motion capability boundary of the target. Furthermore, by combining distance adaptive weighted smoothing and gap interpolation mechanisms based on the median benchmark, as well as parameter feedback optimization strategies based on reference trajectories, the continuity, detail retention, and robustness of trajectory output are further improved. Without increasing hardware costs, high-precision, low-latency, and physically intuitive positioning trajectory generation is achieved. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the positioning trajectory smoothing system architecture according to an embodiment of this application; Figure 2 This is a schematic diagram of the sliding window outlier determination process according to an embodiment of this application; Figure 3 This is a schematic diagram of the adaptive threshold calibration and positional shape constraint logic in an embodiment of this application; Figure 4 This is a curve comparing the trajectory processing effects of embodiments of this application.

[0023] Among them, 100-positioning data acquisition module, 200-sliding window processing module, 300-adaptive threshold calibration module, 400-position shape constraint module, 500-trajectory smoothing output module, and 600-feedback optimization module. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0026] Terminology Explanation: MAD (Median Absolute Deviation) is a robust statistic that measures the dispersion (i.e., volatility or variability) of data. It is defined as the median of the absolute differences between each observation in a dataset and its median.

[0027] UWB is an abbreviation for Ultra Wide Band, a wireless communication technology based on the IEEE 802.15.4 series of standards. Its core characteristic is the use of extremely narrow pulse signals (nanosecond or even picosecond) to transmit data, rather than the continuous carrier waves relied upon by traditional wireless technologies. It is called "ultra-wideband" because its signal occupies an extremely wide spectral bandwidth, typically exceeding 500MHz, or a relative bandwidth exceeding 20%.

[0028] AOA: In Bluetooth technology, especially Bluetooth Low Energy (BLE), AOA stands for Angle of Arrival. It is a core technology for high-precision indoor positioning and direction-finding, introduced in the core specifications of Bluetooth 5.1 and later versions. This technology is mainly used to solve the problem of insufficient positioning accuracy of traditional Bluetooth signal strength index (RSSI), enabling devices to achieve centimeter-level positioning accuracy.

[0029] Visual SLAM (Visual Simultaneous Localization and Mapping) refers to a technology that uses mobile platforms (such as robots, autonomous vehicles, or augmented reality devices) to acquire environmental image sequences through single or multiple visual sensors (such as monocular, binocular, or RGB-D cameras), simultaneously estimating their own pose (position and orientation) and constructing a spatial structure model of the environment in an unknown environment. This technology is a core research area at the intersection of computer vision, multi-view geometry, state estimation, and robotics.

[0030] Wi-Fi fingerprinting (also known as Wi-Fi fingerprint-based positioning or Wi-Fi RSSIFingerprinting) is an indoor positioning technology based on the concept of location fingerprinting. Its core principle lies in utilizing the characteristic signal strength distribution patterns formed by radio signals emitted by multiple Wi-Fi access points (APs) during spatial propagation due to multipath effects, reflection, refraction, and path loss. These patterns are then matched with a pre-built location-signal mapping database to estimate the location of the mobile terminal. This technology does not rely on physical ranging / angle measurement methods such as time of arrival (TOA) or angle of arrival (AOA), but rather treats location estimation as a pattern recognition problem; its essence is a "data-driven" positioning paradigm.

[0031] Example 1 like Figure 1 and Figure 2 As shown in the figure, this embodiment provides a positioning trajectory smoothing method. This method achieves high-precision smoothing of positioning trajectories in complex motion scenarios by constructing a dual processing architecture that combines statistical dynamic initial screening with physical kinematic secondary verification.

[0032] Specifically, the positioning trajectory smoothing method includes the following steps: Step S100: Obtain the original trajectory point data of the target object.

[0033] In this embodiment, the raw trajectory point data serves as the fundamental input for all subsequent processing steps. Specifically, this data is typically received in real-time by the positioning acquisition module 100 from various positioning devices, such as ultra-wideband (UWB) base stations, Global Navigation Satellite System (GNSS) receivers, or Bluetooth beacons. The raw trajectory point data not only includes the spatial coordinates of the target object (e.g., X, Y, Z three-dimensional coordinates) but also synchronously includes the acquisition timestamp and auxiliary parameters reflecting signal quality (e.g., signal-to-noise ratio, positioning error estimate, etc.). It should be understood that although this embodiment uses three-dimensional coordinates as an example, in other application scenarios, the raw trajectory point data may only contain two-dimensional planar coordinates or one-dimensional linear coordinates, as long as it can characterize the position information of the target object. By acquiring raw data containing multi-dimensional information, sufficient feature support can be provided for subsequent adaptive calibration and morphological constraints, avoiding processing deviations caused by missing information.

[0034] Step S200: Extract the trajectory point sequence from the original trajectory point data using a sliding window.

[0035] Specifically, the sliding window processing module 200, as the core processing unit, employs a point-by-point progressive approach to locally extract data from the continuous data stream. The length of the sliding window can be configured according to the actual sampling frequency and processing latency requirements; for example, it can be set to 5 to 9 trajectory points at a 5Hz sampling rate. This sliding window mechanism transforms an infinitely long real-time data stream into finite-length local data segments, allowing the algorithm to focus on the current motion state for refined processing. This ensures real-time processing while avoiding computational redundancy and noise interference caused by the accumulation of global historical data. The trajectory point sequence is the set of data to be processed within the current window and is the direct object for performing outlier detection and smoothing correction.

[0036] Step S300: Based on the historical motion characteristics corresponding to the trajectory point sequence, dynamically adjust the decision factor of the absolute median difference, and perform outlier screening on the trajectory point sequence based on the adjusted decision factor to obtain the preliminary screening trajectory points.

[0037] This is a crucial step in achieving adaptive outlier identification in this application. Specifically, traditional absolute median difference (MAD) algorithms typically use a fixed decision factor (e.g., 3 times). This may lead to missed outliers when the target object is stationary or in uniform motion due to an overly wide threshold, or to the erroneous rejection of valid signals during rapid changes in speed due to an overly narrow threshold. This embodiment introduces historical motion features as an adjustment factor, allowing the decision factor to flexibly adjust according to changes in the target's motion state. Historical motion features reflect the intensity and stability trend of the target object's motion over a recent time period, such as velocity change rate, acceleration fluctuations, or trajectory curvature changes. When the motion state is detected to be relatively stable, the system automatically lowers the decision factor to increase sensitivity to outliers; when a rapid change in motion state is detected, the system automatically increases the decision factor to accommodate normal motion fluctuations. After this step, most obvious statistical outliers are removed, and the remaining initial screening trajectory points are statistically more reasonable. However, they may still contain a small number of residual outliers that, while not exceeding the statistical discrete range, violate the laws of physical motion.

[0038] Step S400: Based on spatial kinematic constraints, the initial trajectory points are further screened to obtain the target trajectory points.

[0039] This is a crucial step in ensuring the physical authenticity of the trajectory, complementing step S300. Specifically, spatial kinematic constraints refer to geometric verification rules set based on the physical motion capability boundaries of the target object. Independent of statistical distributions, these rules focus on verifying the physical rationality of trajectory points. The position and shape constraint module 400 uses these constraints to perform a secondary verification on the initially screened trajectory points, aiming to eliminate "pseudo-normal points" that appear numerically normal but are physically impossible. For example, even if a trajectory point does not exceed the MAD (Motion Detection) threshold, if its distance from the previous moment exceeds the target object's maximum physical displacement limit, or if its motion direction undergoes an instantaneous 180-degree reversal without deceleration, the point will still be judged as abnormal and eliminated. Through this secondary screening based on physical laws, the output trajectory is forced to strictly conform to the actual motion capability of the target object, overcoming the inherent deficiency of pure statistical filtering methods that lack physical semantic support.

[0040] Step S500: Generate a smooth positioning trajectory of the target object based on the target trajectory points.

[0041] Specifically, the trajectory smoothing output module 500 receives the target trajectory points after double filtering, performs final smoothing correction and continuity completion on them, and outputs high-quality trajectory data that can be directly used by upper-layer applications. This step not only eliminates residual high-frequency jitter but also ensures the continuity of the trajectory on the time axis and the smoothness in space.

[0042] In summary, this embodiment constructs a defense-in-depth outlier removal system by coordinating the statistical dynamic adaptation in step S300 and the physical constraint in step S400. The former solves the problem of mismatch between fixed thresholds and different motion modes, while the latter compensates for the shortcomings of purely statistical methods that ignore physical common sense. The two are sequentially linked and logically complementary, jointly ensuring that the final generated smooth positioning trajectory has both statistical robustness and conforms to the reality of physical kinematics, thereby significantly improving the robustness and usability of the positioning system in complex dynamic environments.

[0043] Example 2 Based on Example 1, this example further specifies the specific implementation method of dynamically adjusting the determination factor of the absolute median difference based on the historical motion characteristics corresponding to the trajectory point sequence. Specifically, the steps include: obtaining the current velocity of the current trajectory point in the trajectory point sequence and the previous velocity of the previous trajectory point; determining the adaptive adjustment coefficient based on the velocity difference between the current velocity and the previous velocity, and the historical average velocity; and determining the adjusted determination factor based on the initial determination factor and the adaptive adjustment coefficient.

[0044] This embodiment constructs an adjustment mechanism that can sensitively reflect the change of the target object's motion state by concretizing the abstract historical motion characteristics into changes in the velocity dimension. The velocity difference between the current velocity and the previous velocity directly characterizes the intensity of the target object's motion or the impact of acceleration or deceleration at the current moment; while the historical velocity average reflects the average motion level of the target object or the background noise floor over a recent period. Combining these two factors to determine the adaptive adjustment coefficient essentially calculates the deviation of the current motion change from the historical norm. When the target object is in a stable motion state, the velocity difference is small, and the adjustment coefficient remains low, keeping the judgment factor at a basic level, thus ensuring sensitivity to small outliers. When the target object undergoes a drastic change in velocity, the velocity difference increases significantly, and the adjustment coefficient rises accordingly, driving the judgment factor to amplify, thus encompassing data fluctuations caused by changes in the actual motion state and preventing the false rejection of valid signals.

[0045] As a preferred implementation, the adjusted decision multiple is determined based on the initial decision multiple and the adaptive adjustment coefficient, satisfying the following formula: , in, This is the adjusted judgment factor, used for identifying outliers in the current window; The initial determination factor is usually set based on the nominal accuracy of the positioning device and the normal environmental noise; for example, a value of 3.0 can be used. This is a preset adjustment coefficient used to control the sensitivity of the judgment factor to changes in speed. Its value range is usually from 0.1 to 0.3, for example, it can be 0.2. The current velocity of the current trajectory point; The velocity of the previous trajectory point; The historical average speed is calculated using the following formula: ,in This represents the number of historical speed samples, typically ranging from 5 to 10. For the first A historical velocity, where t is the current sampling time.

[0046] The above formula provides a linear adaptive calibration model, the core of which lies in the ratio term. The physical meaning of this ratio. This ratio term constitutes a normalized motion mutation factor: molecule The instantaneous acceleration and deceleration magnitudes are quantified, and the denominator... This provides a reference benchmark that matches the current motion energy level. This normalization process allows the algorithm to adapt to scenarios with different speed levels—whether it's low-speed walking or high-speed driving, the same proportion of acceleration and deceleration will produce similar adjustment effects, avoiding the problem of inconsistent performance of a fixed threshold at different speed levels. Preset adjustment coefficient. This also functions as a gain knob, allowing technicians to fine-tune the system's adaptive strength based on the noise characteristics of the specific source: a larger gain knob allows for more precise adjustments. A smaller value makes the system more forgiving during speed changes, suitable for targets with high noise or high maneuverability; The value makes the system more conservative, suitable for high-precision, low-dynamic scenarios.

[0047] To more intuitively illustrate how this formula achieves the adaptive effect of "low false alarms in steady state and prevention of missed detection in dynamic state," the following examples illustrate three typical motion states: The first scenario is a standstill start or rapid acceleration scenario. Assume the target object suddenly accelerates from a standstill, and its current speed... The previous velocity was 2 m / s. 0 m / s, historical average speed The speed is 1 m / s (including the previous stationary point), with a preset adjustment coefficient. The initial determination multiple is 0.2. The value is 3.0. Substituting into the formula, we get: At this point, the judgment factor is increased from 3.0 to 4.2, significantly relaxing the outlier judgment threshold. This is because at the moment of startup, positioning data is often accompanied by large transient errors or real displacement jumps. Increasing the threshold can effectively avoid misjudging these normal data fluctuations caused by real motion as outliers, thereby preventing trajectory breaks or lags.

[0048] The second scenario is a constant-speed cruise scenario. Assuming the target object maintains a constant speed, the current speed... Compared to the previous time speed All are 2 m / s, historical average speed It is also 2 m / s. Substituting into the formula, we can get: At this point, the multiplier is determined to revert to its initial value. Under uniform speed conditions, the data distribution is relatively stable, requiring no additional threshold compensation. Maintaining a standard decision factor ensures the ability to eliminate random outliers without missing minute abnormal fluctuations due to an excessively wide threshold, thus achieving accurate filtering under steady-state conditions.

[0049] The third scenario is a deceleration or slight movement scenario. Assume the target object's speed changes slowly, with the current speed... The previous velocity was 1.8 m / s. The historical average velocity is 2.0 m / s. The value is 2.0 m / s. Substituting this into the formula, we get: At this point, the multiplier only fluctuates slightly (from 3.0 to 3.06). This indicates that the algorithm is sufficiently robust to slight speed changes and will not overreact to normal speed fine-tuning, thus maintaining the stability of the processing results.

[0050] It should be understood that although this embodiment uses the above linear formula as an example, in other embodiments, nonlinear functions (such as exponential functions or piecewise functions) can also be used to establish the mapping relationship between the speed difference and the adjustment coefficient. As long as it follows the basic adjustment logic of "the greater the speed change, the greater the judgment multiple," it falls within the protection scope of this application. Furthermore, historical speed average... Calculation window It can also be dynamically adjusted according to the application scenario. For example, in a high-dynamic scenario, the window can be shortened to improve the speed of tracking trend changes, while in a low-dynamic scenario, the window can be widened to enhance statistical stability.

[0051] Example 3 Building upon Example 1, this example further specifies the concrete implementation method for secondary screening of initial trajectory points based on spatial kinematic constraints. Specifically, the spatial kinematic constraints include at least one of distance constraints, direction constraints, and curvature constraints. This "at least one" constraint constructs a flexible defense depth. In actual deployment, the system can selectively enable single or combined constraints based on the accuracy characteristics of the positioning device or the motion type of the target object. For example, for a linear conveyor belt monitoring scenario, only distance constraints may need to be enabled; while for complex mobile targets such as drones or vehicles, all three constraints are usually required simultaneously to form a comprehensive physical verification system.

[0052] like Figure 3 As shown, the position and shape constraint module 400 performs a secondary screening on the trajectory points after the initial screening by adaptive MAD. This module can employ a serial cascaded or parallel decision-making logic architecture. In serial mode, trajectory points sequentially pass through distance, direction, and curvature verification checkpoints; failure at any checkpoint results in a marked residual anomaly point being removed. In parallel mode, each constraint independently calculates its decision result, and the final decision is made through a comprehensive logical AND operation. Regardless of the architecture used, the core objective is to verify the rationality of the trajectory points' existence in the physical world, compensating for the lack of physical semantics in pure statistical filtering.

[0053] To address distance constraints, the system verifies whether the straight-line distance between adjacent trajectory points exceeds a distance threshold determined based on the historical maximum motion speed and sampling time interval. Specifically, this distance threshold is not a fixed value but is dynamically determined by the physical motion capability boundary of the target object. For example, if the historical maximum motion speed is 5 m / s and the sampling time interval is 1 s, the theoretical maximum physical displacement is 5 m. Considering measurement error and safety margin, the distance threshold can be set to 5.5 m. When the distance between a trajectory point and the previous valid point exceeds this threshold, even if it does not statistically deviate from the MAD benchmark, it will be judged as an outlier violating physical limits and discarded. This mechanism effectively blocks long-distance jump noise caused by signal multipath effects or occlusion.

[0054] Regarding directional constraints, the system verifies whether the angle between the motion directions of adjacent trajectory points exceeds a preset angle threshold. Specifically, the angle between the motion directions reflects the drastic change in the target object's heading. For most ground-based moving targets, a large-angle (e.g., exceeding 60°) reversal in direction within a short period is generally inconsistent with motion inertia. By setting a reasonable angle threshold, it is possible to effectively identify and eliminate "Z-shaped" jitter noise points that, although the positional deviation is within the allowable range, exhibit unreasonable abrupt changes in the motion vector, ensuring that the smoothed trajectory conforms to the actual maneuvering characteristics of the target.

[0055] For curvature constraints, the system verifies whether the curvature of the trajectory segment formed by continuous trajectory points exceeds a preset curvature threshold. As a preferred implementation, under curvature constraints, verifying whether the curvature of the trajectory segment formed by continuous trajectory points exceeds the preset curvature threshold includes: calculating the trajectory segment curvature using a three-point circular arc fitting algorithm based on three consecutive normal trajectory points. The trajectory segment curvature satisfies the following formula: , in, For the curvature of the trajectory segment, , , These are the two-dimensional coordinates of three consecutive normal trajectory points.

[0056] The three-point circular arc fitting algorithm described above has significant advantages over the traditional simple difference method. The simple difference method approximates curvature by only using the slope change of the line connecting adjacent points, making it susceptible to single-point noise interference and unable to accurately reflect local geometry, especially with large errors when the sampling rate is low or the trajectory curvature is gentle. In contrast, the three-point circular arc fitting accurately calculates curvature by constructing a unique circle passing through the three points, enabling it to keenly capture local curvature characteristics of the trajectory. This means that even if some outliers appear normal in position and direction, if they cause sharp inflection points (i.e., abrupt curvature changes) that violate the inertia of motion in the local trajectory, the algorithm can still accurately identify and eliminate them. For example, in a vehicle turning scenario, the actual turning trajectory should be a smooth arc. If a noise point causing a surge in curvature is mixed in, the three-point fitting algorithm can detect it immediately, while the difference method may miss it due to the inconspicuous change in the slope of the line connecting the preceding and following points. Therefore, introducing this formula further enhances the ability to identify residual points of "morphological anomalies," ensuring the geometric smoothness and physical authenticity of the output trajectory.

[0057] Ultimately, the system identifies the initial trajectory points that satisfy the enabled spatial kinematic constraints as the target trajectory points. Through the layered filtering of these multiple physical constraints, pseudo-normal points that escaped the initial statistical screening but violated common sense about motion are completely eliminated, providing a high-confidence data foundation for subsequent smooth output. It should be understood that the aforementioned distance threshold, angle threshold, and curvature threshold can all be calibrated and adjusted according to specific application scenarios, and this application does not limit their specific values.

[0058] Example 4 Building upon Example 1, this example further defines the specific implementation method for generating a smooth positioning trajectory of a target object based on target trajectory points. Specifically, the steps include: using the median of the trajectory points within the sliding window as a benchmark, weighting and correcting the target trajectory points, wherein the weight of each target trajectory point decreases linearly as its distance from the median increases; generating smooth trajectory coordinates based on the weighted and corrected target trajectory points; and supplementing the coordinate information of the missing positions after outlier removal using linear interpolation based on adjacent valid trajectory points to obtain a smooth positioning trajectory.

[0059] This embodiment aims to address the problems of traditional mean filtering being susceptible to residual noise leading to trajectory blurring, and simple median filtering losing local motion details, by constructing a distance-adaptive weighting strategy based on the median benchmark. Specifically, the median within the sliding window represents the most robust motion trend center of the target object within the current local time period, exhibiting strong resistance to outlier interference. Weighting based on the median essentially links the reliability of the data to its deviation from the robust center: points closer to the median are considered more representative of the true motion state and are therefore assigned higher weights; points farther away, although passing the aforementioned double screening and not being identified as outliers, may still contain some measurement noise or transient disturbances, and are therefore assigned lower weights to suppress their impact on the final result. This linearly decreasing weight allocation mechanism allows the smoothing process to retain the overall trajectory trend while maximizing the absorption of local motion details carried by effective data points, achieving a dynamic balance between smoothness and fidelity.

[0060] In a preferred implementation, the weights of each target trajectory point satisfy the following formula: , in, For the first The weights of each target trajectory point; To preset the maximum weight, the value is usually between 0.4 and 0.5. For example, 0.5 can be used to assign the highest confidence level to the core data point that is closest to the median. To preset the minimum weight, the value is usually taken in the range of 0.1 to 0.2. For example, it can be taken as 0.2 to ensure that even effective points that deviate far from the target can still contribute a certain amount of information and avoid being completely discarded. For the first Euclidean distance between each target trajectory point and the median of the trajectory points within the sliding window; This is the sum of the distances between all target trajectory points within the current window and the median.

[0061] The above formula constructs a normalized linear decay model. Ratio term Converting absolute distance into a relative position metric eliminates the impact of differences in distance values ​​at different motion scales on the weight distribution, enabling the algorithm to maintain stable weighting characteristics in scenarios with different speed levels. A dynamic adjustment range for the weights is defined, allowing technicians to flexibly configure it based on the noise level of the positioning source: in low-noise, high-precision scenarios, this range can be narrowed to make the weights of each point more consistent, approximating mean filtering to achieve extreme smoothness; in high-noise scenarios, this range can be widened to enhance dependence on points near the median, improving anti-interference capabilities. Based on the calculated weights... The system uses a weighted average formula. Generating smooth trajectory coordinates ensures that the output is neither a simple average of the original data nor a mechanical copy of the median, but rather an optimal estimate that incorporates both trends and details.

[0062] Furthermore, to address the gaps in trajectory data caused by outlier removal, this embodiment employs timestamp-based linear interpolation logic for completion. Specifically, when a trajectory point at a certain moment is detected as being removed, creating a gap, the system does not simply fill it with the spatial average of the preceding and following points. Instead, it obtains the timestamp of the previous valid trajectory point at the gap location. With coordinates and the timestamp of the next valid trajectory point. With coordinates Based on the target timestamp of the vacant position Using the formula Calculate the interpolated coordinates. This time-based interpolation method fully considers the temporal characteristics of positioning data sampling. Even in extreme cases such as uneven sampling intervals or continuous packet loss, it can ensure the accurate placement of the completion points on the time axis, avoiding temporal misalignment or velocity distortion caused by spatial averaging. This ensures the dual continuity of the final output smooth positioning trajectory in both time and space dimensions, providing high-quality data support for upper-level navigation, tracking, and other applications.

[0063] Example 5 Based on Example 1, this example further defines the parameter optimization mechanism of the positioning trajectory smoothing method. Specifically, the method further includes: obtaining the average positional deviation between the smoothed positioning trajectory and the reference trajectory; dynamically adjusting the window length of the sliding window and the initial judgment multiple of the absolute median difference based on the average positional deviation and the current motion scene type; wherein, when the current motion scene type is a static scene and the average positional deviation is greater than a preset deviation threshold, the window length is reduced and the initial judgment multiple is decreased; when the current motion scene type is a variable speed scene and the average positional deviation is greater than the preset deviation threshold, the window length is increased and the initial judgment multiple is increased.

[0064] It is important to note that the "reference trajectory" in this embodiment does not refer to the unknown actual movement path of the target object during operation, but rather to high-precision benchmark data pre-acquired in a specific testing environment or calibration phase. For example, the reference trajectory can be a calibration trajectory synchronously collected in the same scenario using high-precision measuring equipment such as a total station or laser tracker, or it can be an ideal simulation trajectory generated based on a kinematic model. Therefore, the feedback optimization steps described in this embodiment are essentially a parameter optimization and calibration strategy, which is typically executed during the debugging phase before formal system deployment, or as an asynchronous background analysis task during a specific maintenance window, rather than a necessary step for real-time online processing by the positioning terminal. This design ensures that the technical solution has infringement-comparable comparability in actual product applications (because the reference trajectory is pre-set and reproducible), while also avoiding the logical paradox of not being able to obtain true values ​​during online operation.

[0065] Specifically, the average positional deviation is a key quantitative indicator that measures the degree to which the current parameter configuration matches a specific motion scenario. The system calculates this average deviation by taking the average Euclidean distance between each point on the smooth positioning trajectory and the corresponding point on the reference trajectory within a test period. When the average deviation exceeds a preset deviation threshold (e.g., 0.5m), it indicates that the current window length or initial judgment factor is not well adapted to the current motion characteristics and requires targeted adjustments.

[0066] In static scenarios, if the average positional deviation exceeds a preset deviation threshold, it typically indicates the presence of significant ambient noise or positioning drift. The current parameter settings are too lenient, resulting in these low-frequency, small-amplitude anomalies not being effectively filtered out. In this case, the system adopts a strategy of "reducing the window length and lowering the initial decision factor." Reducing the window length (e.g., from the default 5 points to 3 points) improves the algorithm's temporal resolution, making it more sensitive to transient perturbations and preventing the averaging effect caused by an excessively long window from masking local noise; lowering the initial decision factor... (For example, lowering it from 3.0 to 2.8) directly tightens the statistical threshold for outlier detection, allowing even minor deviations that were previously at the critical point to be identified as anomalies and eliminated. The synergistic effect of these two measures can significantly improve the purity and stability of trajectories under static conditions.

[0067] In variable-speed scenarios, if the average position deviation exceeds a preset deviation threshold, it often indicates a drastic change in the target object's motion state. The current parameter settings are too stringent, causing genuine maneuvering signals to be misjudged as outliers and eliminated, or resulting in trajectory clipping due to window response lag. In this case, the system adopts a strategy of "increasing the window length and raising the initial judgment factor." Increasing the window length (e.g., expanding from the default 5 points to 7 points) allows for the inclusion of more historical samples in the statistics, enhancing the algorithm's stability in estimating dynamic trends and reducing misjudgments caused by instantaneous sampling fluctuations; increasing the initial judgment factor... (For example, increasing the threshold from 3.0 to 3.2) appropriately relaxes the judgment threshold, reserving a larger tolerance for normal acceleration and deceleration fluctuations and preventing the loss of effective motion details. This adaptive relaxation ensures the integrity and tracking performance of the trajectory under high dynamic conditions.

[0068] To illustrate the effectiveness of the feedback optimization mechanism more intuitively, a specific calibration test data example is provided below. During the debugging phase of an indoor UWB positioning system, the target object was first kept stationary within the test area for 1 minute. Data was collected, and the average positional deviation between the smooth trajectory and the high-precision calibration trajectory was calculated. If the measured average deviation was 0.6m, exceeding the preset threshold of 0.5m, the system determined the current default parameters (window length N=5, initial judgment multiple). The window did not perform well in static mode, so it automatically adjusted the window length to 3 and... The value was adjusted to 2.8. After reprocessing, the average static deviation decreased to 0.35m, meeting the accuracy requirements. Subsequently, the target object was controlled to move at varying speeds of 1-3m / s within the test area, and data was collected again. If the average deviation was measured to be 0.65m at this time, the system determined that the current parameter was too sensitive under variable speed conditions, and therefore adjusted the window length to 7. The value was adjusted to 3.2. After reprocessing, the average speed deviation dropped back to 0.45m. Through this round of offline calibration, the system obtained the optimal parameter sets adapted to both static and variable speed scenarios. In subsequent actual operation, the corresponding parameter configurations can be called according to the scene recognition results, thereby achieving high-precision trajectory output in all scenarios.

[0069] More specifically, the following example can be used: the feedback optimization module calculates the mean positional deviation by comparing the smoothed trajectory with the actual motion trajectory (such as a calibration trajectory of a known path): , in The number of deviations is counted. The coordinates of the points on the smoothed trajectory. The coordinates of the actual trajectory points; key parameters are dynamically adjusted based on the mean deviation: when In the case of a static scene, the window length is reduced to 3 points and the window size is lowered. Up to 2.8, the formula is adjusted as follows: For variable speed scenarios, increase the window length to 7 points and improve... In section 3.2, the formula is adjusted as follows: This enables continuous optimization of processing accuracy and adaptability to complex and ever-changing motion environments.

[0070] It should be understood that the specific values ​​of the above parameter adjustments (such as window increments / decreases, and adjustment step sizes) are merely illustrative examples. In practical applications, technicians can determine the optimal adjustment strategy through experimental calibration based on the noise characteristics of the positioning device, the sampling frequency, and the accuracy requirements of the application scenario. Furthermore, this feedback optimization process can also be implemented using automated optimization algorithms such as iterative search and gradient descent. As long as it adheres to the core concept of "adjusting window and threshold parameters differently for different motion scenarios based on the evaluation results of reference trajectory deviations," it falls within the scope of protection of this application.

[0071] Example 6 like Figure 1 As shown, this embodiment provides a positioning trajectory smoothing processing device. This device adopts a modular architecture to implement the positioning trajectory smoothing processing method in the aforementioned embodiments, ensuring comprehensive coverage of software and hardware product forms. Specifically, the positioning trajectory smoothing processing device includes a data acquisition module, a window capture module, an outlier initial screening module, a secondary screening module, and a trajectory generation module. The modules establish communication connections through a data bus or memory sharing mechanism, forming a complete processing link from raw data input to smooth trajectory output. It should be understood that... Figure 1 The module division shown is only a schematic diagram of functional logic. In actual engineering implementation, these modules can be encapsulated as independent software components or dynamic link libraries, or integrated into different threads or hardware acceleration units on a single processor, as long as they have the corresponding data processing functions.

[0072] The data acquisition module is used to acquire the raw trajectory point data of the target object. Specifically, this module serves as the data entry point for the entire device, responsible for interfacing with various positioning sensors (such as UWB base stations, GNSS receivers, etc.), and real-time parsing and caching the raw data stream containing location coordinates, timestamps, and signal quality parameters. In one embodiment, the data acquisition module may also include a data preprocessing subunit, used to standardize the format of the raw data, transform the coordinate system, or filter abnormal messages to ensure that the data input to subsequent processing stages conforms to preset specifications.

[0073] The window extraction module is used to extract trajectory point sequences from the original trajectory point data using a sliding window. Specifically, this module maintains a fixed-length or variable-length circular buffer and updates the window content point by point according to the sampling time sequence. Whenever new data arrives, the window automatically slides forward one position, discarding the oldest data point and incorporating the newest data point, thereby generating the trajectory point sequence to be processed at the current moment. This sliding window mechanism transforms continuous time series data into discrete local data blocks, providing a standardized data granularity for subsequent statistical analysis and morphological verification, while also ensuring the real-time performance and low latency of the system.

[0074] The outlier screening module dynamically adjusts the decision factor of the absolute median difference (MAD) based on the historical motion characteristics corresponding to the trajectory point sequence, and performs outlier screening on the trajectory point sequence based on the adjusted decision factor to obtain the initially screened trajectory points. Specifically, this module is the core unit for implementing statistical adaptive filtering in this device. It integrates adaptive calibration logic, which can calculate the optimal MAD decision factor in real time based on the historical motion characteristics (such as the rate of change of velocity) of the data within the current window, rather than relying on a fixed threshold. In terms of data flow, after the trajectory point sequence output by the window capture module enters this module, it first undergoes adaptive factor calculation, and then uses this factor to perform MAD outlier judgment, eliminating obvious statistical anomalies. Through this dynamic adaptation mechanism, this module can effectively solve the problem of misjudgment or omission in different motion states caused by traditional fixed thresholds, providing a statistically relatively pure data foundation for subsequent processing.

[0075] The secondary screening module is used to perform a secondary screening of the initial screening trajectory points based on spatial kinematic constraints to obtain the target trajectory points. Specifically, this module constitutes the physical rationality verification defense line of this device. It receives the initial screening trajectory points from the outlier screening module and verifies them one by one according to preset spatial kinematic constraints (such as distance limits, direction angle thresholds, curvature thresholds, etc.). In a preferred embodiment, this module can adopt a serially cascaded verification architecture, that is, it sequentially performs distance constraint, direction constraint, and curvature constraint checks, and if any constraint is not satisfied, it is judged as a residual outlier and is removed. This secondary screening mechanism based on physical laws makes up for the lack of physical semantics in pure statistical methods, ensuring that the final retained target trajectory points are not only reasonable in numerical distribution, but also kinematically realistic and reliable.

[0076] The trajectory generation module is used to generate a smooth positioning trajectory for the target object based on the target trajectory points. Specifically, this module is located at the end of the processing chain and is responsible for the final smoothing correction and continuity completion of the filtered target trajectory points. Internally, it implements a distance adaptive weighting algorithm based on the median benchmark, as well as linear interpolation logic for data gaps. After processing by this module, the output smooth positioning trajectory eliminates residual high-frequency jitter while maintaining continuity on the time axis and smoothness in space, and can be directly used by upper-level navigation, tracking, or visualization applications.

[0077] Furthermore, to support parameter optimization and scenario adaptation of the system, the device in this embodiment also includes a parameter configuration interface (not shown separately in the figure). This interface is integrated into the configuration end of each of the above modules or directly connected to the outlier screening module and the window capture module. Specifically, the parameter configuration interface is used to load pre-calibrated system parameters, such as the window length of the sliding window, the initial judgment multiple of the absolute median difference, and the threshold of the spatial kinematic constraints. These parameters can be the optimal values ​​determined based on the reference trajectory during the offline calibration stage, or they can be preset parameter sets for different motion scenarios (such as static scenarios and variable speed scenarios). Through the parameter configuration interface, the system can flexibly adjust the processing strategy to adapt to different application environments without modifying the core algorithm code. It should be noted that this parameter configuration interface mainly undertakes the parameter loading and switching functions, and it does not itself constitute a closed-loop control unit that obtains the true value online in real time and provides feedback for adjustment, thereby avoiding functional deficiencies or difficulties in infringement comparison caused by the inability to obtain the true value in actual products.

[0078] Through the modular architecture described above, the positioning trajectory smoothing processing device provided in this embodiment decouples the complex method process into processing units with clearly defined functions and interfaces. The modules work closely together in terms of timing and logically progress layer by layer, jointly constructing a dual-defense system of "statistical dynamic initial screening + physical kinematic secondary verification." This architectural design not only facilitates iterative maintenance of the software and parallel acceleration of the hardware, but also provides a standardized carrier for cross-platform deployment of the technical solution on different terminal devices and cloud platforms, effectively supporting the practical application of the method embodiment in actual products.

[0079] Example 7 This application also provides an electronic device, including at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which, when executed, enable the at least one processor to perform any of the positioning trajectory smoothing methods described in Embodiments 1 to 5 above.

[0080] Specifically, this electronic device constitutes the physical operating platform for the aforementioned positioning trajectory smoothing method. In practical applications, the processor can be a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, responsible for reading program instructions from memory and driving hardware resources to complete data operations. The memory includes high-speed random access memory (RAM) and non-volatile memory (such as disk or flash memory). The RAM is used to cache the original trajectory point sequence, historical velocity average, and intermediate variables in the adaptive calibration process within the sliding window, ensuring that the processor can achieve microsecond-level data access when performing outlier screening and secondary screening. The non-volatile memory persistently stores the computer program code implementing the method of this application and preset parameter configurations (such as initial judgment multiple, curvature threshold, etc.). It should be understood that although this embodiment uses a single processor as an example, in other embodiments, multi-core processors can be used to process data of different coordinate axes in parallel, or a distributed computing cluster can be used to meet the real-time smoothing requirements of massive positioning data, as long as it can execute the aforementioned method flow. Through this hardware and software combined architecture, electronic devices can transform abstract statistical algorithms and physical constraint logic into actual signal processing capabilities, achieving high-precision output of positioning trajectories in complex motion scenarios while ensuring low latency.

[0081] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the positioning trajectory smoothing method described in any one of the foregoing embodiments 1 to 6.

[0082] Specifically, a computer-readable storage medium is an independent object carrying the software implementation of the technical solution of this application. This medium can be a tangible, non-volatile storage device, such as a read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), optical disc (CD-ROM / DVD), magnetic disk, or solid-state drive; or it can be a volatile storage device, such as random access memory (RAM), temporarily carrying program instructions during specific system startup or loading processes. When the computer program stored on this medium is loaded into the processor of an electronic device and executed, the processor is configured to perform a series of steps, including acquiring raw trajectory point data, dynamically adjusting the absolute median difference determination factor, performing secondary screening of spatial kinematic constraints, and generating a smooth positioning trajectory. This distribution method using a storage medium as a carrier allows the trajectory smoothing algorithm of this application to be flexibly deployed in various positioning terminals, navigation servers, or cloud data processing platforms, freed from specific hardware constraints. For example, in the upgrade and maintenance of UWB indoor positioning systems, technicians only need to update the program files in the internal storage medium of the base station or tag to enable the device to obtain the latest smooth processing capabilities based on adaptive thresholds and positional constraints, without replacing hardware modules, thereby significantly reducing the system's operation and maintenance costs and the technical iteration threshold.

[0083] Example 8 To further verify the effectiveness of the positioning trajectory smoothing method provided in the aforementioned embodiments in practical applications, this embodiment uses an ultra-wideband (UWB) indoor positioning scenario as an example for comprehensive explanation. It should be understood that although this embodiment uses UWB positioning as an example, the aforementioned method is also applicable to other positioning technologies with multipath effects or non-line-of-sight errors, such as Bluetooth AOA, Wi-Fi fingerprinting, and visual SLAM, as long as their original data includes temporal location coordinates and corresponding quality indication information.

[0084] In this application scenario, the test environment is set as a 50m×50m indoor open area with several UWB base stations deployed. The target object, wearing a UWB tag, performs a complex motion test within this area, including stationary movement, constant-speed walking, sharp turns, and variable-speed running. The sampling frequency for positioning data is set to 5Hz, meaning one raw trajectory point is acquired every 200ms. The system processing parameters are configured as follows: the default length N of the sliding window is set to 5 trajectory points; the initial decision factor for the absolute median difference (MAD) is... Set to 3.0; adaptive adjustment coefficient Set to 0.2; Number of historical speed samples The threshold is set to 5. Regarding spatial kinematic constraints, based on the target object's historical maximum velocity of 5 m / s and a sampling interval of 1 s, the distance constraint threshold is set to 5.5 m (including a safety margin); the directional constraint angle threshold is set to 60°; and the curvature constraint threshold is set to 0.2 m.- ¹. Maximum weight of the trajectory smoothing output module Set to 0.5, minimum weight Set it to 0.2.

[0085] During the test, the system executes the smoothing process described in the aforementioned embodiments in real time.

[0086] The positioning data acquisition module receives 3D coordinate data (accuracy ±0.3m) output by the UWB device in real time, simultaneously acquires timestamps and signal-to-noise ratio parameters, and transmits them to the sliding window processing module. The sliding window progressively extracts five trajectory points as a group, calculating the median and MAD value for each coordinate axis: for example, if the X-axis trajectory points within a window are [2.1, 2.3, 5.8, 2.2, 2.4], the median M... x =2.3m, the absolute deviation sequence is [0.2,0,3.5,0.1,0.1], MAD x =0.1m.

[0087] The following example, using a typical scenario of a target object suddenly starting from rest and entering variable-speed motion, illustrates the working process of the adaptive mechanism. When the target object is stationary, its current speed... Compared to the previous speed All are close to 0, historical average speed It also remains at an extremely low level, at which point, according to the formula... Calculated decision multiple It is kept near the initial value of 3.0. This low threshold makes the system highly sensitive to small drifts or sudden outliers in a static state, and can effectively filter out static jitter caused by environmental noise.

[0088] Subsequently, when the target object suddenly accelerates to 2 m / s, the adaptive threshold calibration module extracts historical trajectory data and calculates the current velocity v. t =2m / s, previous velocity v t-1 =0 m / s (target changes from rest to uniform velocity), historical average velocity v av9 =1m / s, substituting into the calibration formula k t =3.0×(1+0.2×|2-0| / 1)=3.6; Simultaneously, the detection positioning accuracy signal-to-noise ratio is 20dB (within a reasonable range), requiring no secondary calibration, and the final output k t =3.6. This dynamic adjustment process adaptively widens the outlier detection threshold according to the intensity of the motion, avoiding misjudging real acceleration / deceleration displacements as outliers, thus ensuring the continuity of the trajectory during dynamic switching phases. The sliding window processing module determines that the absolute deviation of the trajectory point with an X-axis coordinate of 5.8m is 3.5m > 3.6 × 0.1m = 0.36m, and marks it as an outlier and removes it.

[0089] The positional morphology constraint module performs a secondary screening on the remaining four normal points within the window: if the distance between a point and the previous normal point is calculated to be 5.6m, exceeding the 5.5m distance constraint, it is marked as a residual abnormal point and removed; the remaining three points, whose distance, direction, and curvature all meet the constraints, are output as valid trajectory points. This geometric morphology-based verification mechanism effectively compensates for the blind spot of pure statistical filtering in identifying noise points that are "numerically normal but morphologically distorted," ensuring that the smoothed trajectory strictly conforms to the biomechanical characteristics of human movement.

[0090] The trajectory smoothing output module uses the X-axis median of 2.3m as a benchmark, based on a weighting formula. (Pick , Weights were calculated for the three valid points (2.1m, 2.2m, 2.4m) with distances of 0.2m, 0.1m, and 0.1m respectively. The weights are as follows: , , The smoothed coordinates are For the two outlier points (gap positions) that were removed, linear interpolation was used to supplement the data based on the valid trajectory points before and after them. The interpolation formula is as follows: , For the valid timestamps before and after, Use timestamps for missing positions to ensure trajectory continuity.

[0091] The feedback optimization module compares the smooth trajectory with the actual trajectory and calculates an average deviation of 0.4m, which meets the accuracy requirements and requires no parameter adjustment. When the positioning target enters a variable speed motion state (speed fluctuation of 1-3m / s), the average deviation rises to 0.6m. The feedback optimization module adjusts the sliding window length to 7 points and increases the initial MAD multiple k0 to 3.2. After the adjustment, the average deviation falls back to 0.45m, continuously adapting to changes in motion state.

[0092] The test results of this embodiment show that the outlier removal accuracy of the system reaches 93%, the deviation between the smoothed trajectory and the actual path is ≤0.5m, and the processing delay is ≤75ms. It can meet the actual needs of indoor positioning trajectory optimization and is especially suitable for scenarios with high requirements for real-time performance and anti-interference capabilities.

[0093] like Figure 4As shown in the figure, this diagram visually demonstrates the advantages of the method in this embodiment in terms of processing effect. The horizontal axis represents time (unit: seconds), and the vertical axis represents the X-axis coordinate (unit: meters). The red solid line a represents the original positioning trajectory, which clearly shows multiple large jumps and frequent high-frequency jitters. The orange dashed line d represents the trajectory processed using only the fixed-threshold MAD algorithm. Although most outliers were eliminated, residual anomalies remain at some turning points, and over-smoothing caused trajectory clipping occurs in some real maneuvering sections. The thick blue solid line c represents the actual motion true value trajectory synchronously acquired using a high-precision total station. The green solid line b represents the smoothed positioning trajectory processed by the method in this embodiment. A comparison shows that the green solid line b and the thick blue solid line c highly overlap and closely match in their overall trend. They not only maintain extremely high stability in straight sections but also completely preserve the true motion details at key turning points without distortion or lag. Quantitative statistics show that, throughout the entire testing period, the average positional deviation between the smoothed trajectory output by this embodiment and the actual true trajectory is controlled within 0.5m, and the key steering features of the trajectory are fully preserved. There is no trajectory distortion caused by excessive smoothing. The processing effect is significantly better than the single median-MAD scheme, which can meet the stringent requirements for low latency in indoor real-time navigation and tracking applications.

[0094] In summary, this embodiment, through operation with specific parameters in a real UWB positioning scenario, fully verifies the superior performance of the dual mechanism of "statistical dynamic initial screening + physical kinematic secondary verification" in complex motion environments. This scheme not only resolves the inherent contradiction between static accuracy and dynamic tracking performance when fixed thresholds are applied, but also fundamentally eliminates trajectory distortions that violate physical laws by introducing spatial geometric constraints. Without increasing hardware costs, it achieves high-precision, low-latency, and physically intuitive positioning trajectory output, demonstrating significant practical value and promising prospects for wider application.

[0095] The embodiments described above collectively demonstrate the beneficial effects of this application: (1) The median-MAD algorithm combined with adaptive threshold calibration has strong anti-interference ability and improves the outlier discrimination accuracy by more than 35%. Compared with the fixed parameter scheme, it effectively solves the problems of missed judgment and misjudgment under different motion states. The misjudgment rate in static scenes is reduced to less than 5%, and the missed judgment rate in variable speed scenes is reduced to less than 8%. (2) Multi-dimensional position and shape constraints realize secondary screening to ensure that the trajectory conforms to the physical motion law. The deviation between the smoothed trajectory and the actual path is reduced to less than 0.5m, which is better than the existing single median or sliding window scheme, and retains the key turning and changing details of the trajectory. (3) Pure software algorithm design, based on the sliding window architecture, has strong real-time performance (processing delay ≤ 80ms), no hardware improvement is required, reducing system cost. It is compatible with various positioning devices such as GPS, UWB, and Beidou, and has strong versatility. (4) The feedback optimization mechanism dynamically adjusts the window length and MAD parameters to adapt to complex motion scenarios such as static, uniform speed, and variable speed, improves the robustness of the system, and can be widely used in indoor navigation, UAV trajectory control, vehicle positioning and other fields.

[0096] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for smoothing positioning trajectories, characterized in that, include: Obtain the original trajectory point data of the target object; A sequence of trajectory points is extracted from the original trajectory point data using a sliding window; Based on the historical motion characteristics corresponding to the trajectory point sequence, the decision factor of the absolute median difference is dynamically adjusted, and the outlier screening is performed on the trajectory point sequence based on the adjusted decision factor to obtain the initial screening trajectory points. The initial trajectory points are further screened based on spatial kinematic constraints to obtain the target trajectory points. A smooth positioning trajectory of the target object is generated based on the target trajectory points.

2. The method according to claim 1, characterized in that, The step of dynamically adjusting the determination factor of the absolute median difference based on the historical motion features corresponding to the trajectory point sequence includes: Obtain the current velocity of the current trajectory point in the trajectory point sequence, and the previous velocity of the previous trajectory point; Based on the speed difference between the current speed and the previous speed, and the historical average speed, an adaptive adjustment coefficient is determined; The adjusted decision multiple is determined based on the initial decision multiple and the adaptive adjustment coefficient.

3. The method according to claim 2, characterized in that, The adjusted decision multiple is determined based on the initial decision multiple and the adaptive adjustment coefficient, satisfying the following formula: , in, The adjusted determination factor. The initial determination multiple, For preset adjustment coefficients, For the current speed, For the previous velocity, The historical average speed is... , The number of historical speed samples. For the first A historical velocity, where t is the current sampling time.

4. The method according to claim 1, characterized in that, The spatial kinematic constraints include at least one of distance constraints, orientation constraints, and curvature constraints; The secondary screening of the initial trajectory points based on spatial kinematic constraints to obtain the target trajectory points includes: Under the distance constraint, it is verified whether the straight-line distance between adjacent trajectory points exceeds the distance threshold determined based on the historical maximum motion speed and sampling time interval; Under the directional constraint, check whether the angle between the motion directions of adjacent trajectory points exceeds a preset angle threshold; Under the curvature constraint, check whether the curvature of the trajectory segment formed by continuous trajectory points exceeds the preset curvature threshold. The initial trajectory points that satisfy the enabled spatial kinematic constraints are determined as the target trajectory points.

5. The method according to claim 4, characterized in that, The step of verifying whether the curvature of the trajectory segment formed by continuous trajectory points exceeds a preset curvature threshold under the curvature constraint includes: Based on three consecutive normal trajectory points in the continuous trajectory points, the curvature of the trajectory segment is calculated using a three-point circular arc fitting algorithm. The curvature of the trajectory segment satisfies the following formula: , in, The curvature of the trajectory segment is... , , These are the two-dimensional coordinates of the three consecutive normal trajectory points.

6. The method according to claim 1, characterized in that, The step of generating a smooth positioning trajectory of the target object based on the target trajectory points includes: Using the median of the trajectory points within the sliding window as a benchmark, the target trajectory points are weighted and corrected, wherein the weight of each target trajectory point decreases linearly as its distance from the median increases, and the weights satisfy the following formula: , in, For the first The weights of the target trajectory points. To preset the maximum weight, To preset the minimum weight, For the first The distance between each of the target trajectory points and the median. The median is the sum of the distances between all the target trajectory points and the median; based on the weighted and corrected target trajectory points, smooth trajectory coordinates are generated; For the missing positions after outlier removal, linear interpolation is used to supplement the coordinate information based on the adjacent valid trajectory points to obtain the smooth positioning trajectory.

7. The method according to claim 1, characterized in that, The method further includes: Obtain the average positional deviation between the smoothed positioning trajectory and the reference trajectory; Based on the mean positional deviation and the current motion scene type, the window length of the sliding window and the initial determination factor of the absolute median difference are dynamically adjusted. Specifically, when the current motion scene type is a static scene and the average position deviation is greater than a preset deviation threshold, the window length is reduced and the initial judgment multiplier is decreased; when the current motion scene type is a variable speed scene and the average position deviation is greater than the preset deviation threshold, the window length is increased and the initial judgment multiplier is increased.

8. A positioning trajectory smoothing processing device, characterized in that, include: The data acquisition module is used to acquire the original trajectory point data of the target object; A window capture module is used to capture a sequence of trajectory points from the original trajectory point data through a sliding window; The outlier screening module is used to dynamically adjust the decision factor of the absolute median difference based on the historical motion characteristics corresponding to the trajectory point sequence, and perform outlier screening on the trajectory point sequence based on the adjusted decision factor to obtain the initial screening trajectory points. The secondary screening module is used to perform secondary screening on the initial screening trajectory points based on spatial kinematic constraints to obtain the target trajectory points. The trajectory generation module is used to generate a smooth positioning trajectory of the target object based on the target trajectory points.

9. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the positioning trajectory smoothing processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the positioning trajectory smoothing method according to any one of claims 1 to 7.