Positioning method, apparatus, device, medium and product based on factor graph optimization
Patent Information
- Application Number
- CN202610746159.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]然而,由于不同环境下的信号传播特性、基站分布存在显著差异,现有技术在进行融合时,无法根据环境变化自适应地调整融合策略,因此导致定位精度不足
[0019]第五方面,本申请实施例提供了一种计算机程序产品,计算机程序产品中的指令由电子设备的处理器执行时,使得电子设备执行如第一方面的一种基于因子图优化的定位方法。
Smart Images

Figure CN122815500A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of positioning technology, and in particular relates to a positioning method, apparatus, equipment, medium and product based on factor graph optimization. Background Technology
[0002] In the field of positioning technology, Global Navigation Satellite System (GNSS) is the core technology for achieving high-precision positioning. However, due to the influence of obstruction, multipath, and non-line-of-sight (NLOS) in complex urban environments, positioning errors are large.
[0003] Therefore, existing technologies combine observation information from communication networks to assist GNSS positioning, thereby improving the accuracy and availability of positioning in complex urban environments.
[0004] However, due to significant differences in signal propagation characteristics and base station distribution under different environments, existing technologies cannot adaptively adjust the fusion strategy according to environmental changes when performing fusion, resulting in insufficient positioning accuracy. Summary of the Invention
[0005] This application provides a positioning method, apparatus, device, medium, and product based on factor graph optimization, which can adaptively adjust the fusion strategy according to environmental changes, thereby improving positioning accuracy.
[0006] In a first aspect, embodiments of this application provide a localization method based on factor graph optimization, the method comprising: The observed factors are constructed based on multi-source positioning observation data to form a factor graph. The positioning results to be estimated are used as state nodes of the factor graph to construct a factor graph optimization model. The factor graph optimization model is iteratively solved based on the solver, and telemetry data reflecting the operating status of the solver are collected during the iterative solution process. Telemetry data is input into the adaptive control network, which then outputs solver parameters based on the telemetry data to adjust the solver. The solver is updated based on the solver parameters. The updated solver is then used to perform iterative solutions to the factor graph optimization model until the preset convergence condition is met, thus obtaining the final location result obtained by the solver for the factor graph optimization model.
[0007] In one feasible implementation, the factor graph optimization model is iteratively solved based on a solver, including: Obtain a first weight component generated by the deep learning model based on the quality features of the observed data, and at least one second weight component generated based on the residual; wherein the residual is determined based on the estimate of the current state node in each iteration solution.
[0008] The first and second weight components are multiplied to obtain the fused weights, and the observed factors are updated based on the fused weights to obtain the updated factor graph optimization model. The updated factor graph optimization model is solved until it converges, and the final localization result is obtained.
[0009] In one feasible implementation, before obtaining the first weight component generated by the deep learning model based on the quality features of the observed data, and at least one second weight component generated based on the residual, the method further includes: The residuals are whitened to obtain the whitened residuals of each observation factor; At least one second weighted component is generated based on the whitening residual.
[0010] In one feasible implementation, updating the solver based on solver parameters includes: Obtain the historical solver parameters output by the adaptive control network, and filter them based on the historical solver parameters and the current solver parameters to obtain the filtered solver parameters. The filtered solver parameters are compared with the preset uplink trigger threshold and downlink reset threshold. If the filtered solver parameters are less than or equal to the downlink reset threshold, the solver parameters will be restored to the preset baseline parameters. If the filtered solver parameters are greater than the downlink reset threshold and less than or equal to the uplink trigger threshold, then the current solver parameters remain unchanged. If the filtered solver parameters are greater than the uplink trigger threshold, the solver parameters will be updated to the filtered solver parameters.
[0011] In one feasible implementation, it further includes: When the gating ratio in the telemetry data exceeds the preset first threshold, or the robust kernel function statistic exceeds the preset second threshold, the solution is switched to a simplified factor graph containing only some observation factors. The gating ratio refers to the ratio of the number of abnormal observation factors with gating channel weights below the preset confidence threshold to the total number of all valid observation factors.
[0012] Continuously monitor telemetry data. When the gating ratio drops below the third threshold and the robust kernel function statistic drops below the fourth threshold, switch from simplified factor graph to factor graph optimization model.
[0013] In one feasible implementation, it further includes: During the iterative solution process, when the length of the sliding window exceeds a preset threshold, the size of the sliding window is maintained at the preset sliding window size. Marginalize the historical state nodes and their associated observation factors that exceed the preset sliding window size at the earliest time. The marginalized information is transformed into prior factors and added to the current factor graph optimization model.
[0014] In one feasible implementation, the updated factor graph optimization model is solved until it converges, yielding the final localization result, including: A two-layer iterative structure of outer-layer iterative reweighted least squares and inner-layer optimization solver is used for iterative solution; the inner-layer optimization solver is at least one of Gauss-Newton, Levenberg-Marquardt, or incremental smoothing and mapping. In each iteration, the observation equation is linearized and the normal equation is assembled. The state increment is solved by the Schur complement elimination method and sparse matrix decomposition. Whether to accept the current status update is determined based on the model's descent ratio; The convergence condition is determined by the relative decrease of the objective function or the norm of the state update step size. If the convergence condition is met, the iteration stops and the final localization result is obtained.
[0015] In one feasible implementation, it further includes: Obtain the process log stored during multiple iterations of the solution process. The process log includes the observation data, quality characteristics, residuals, telemetry data and the corresponding final positioning results for each epoch. A deep learning model is trained based on the observation data, quality features, residuals, and corresponding final localization results in the process log. An adaptive control network is trained based on telemetry data from the process log and the corresponding final positioning results.
[0016] Secondly, embodiments of this application provide a positioning device based on factor graph optimization, the device comprising: The module is used to construct a factor graph optimization model by using multi-source positioning observation data as observation factors of the factor graph and the positioning results to be estimated as state nodes of the factor graph. The solver module is used to iteratively solve the factor graph optimization model based on the solver, and to collect telemetry data reflecting the operating status of the solver during the iterative solution process; The output module is used to input telemetry data into the adaptive control network, so that the adaptive control network outputs solver parameters based on the telemetry data to adjust the solver. The update module is used to update the solver based on the solver parameters. Based on the updated solver, it returns to perform the iterative solution of the factor graph optimization model based on the solver until the preset convergence condition is met, and obtains the final positioning result of the factor graph optimization model solved by the solver.
[0017] Thirdly, embodiments of this application provide an electronic device, the device including: a processor, and a memory storing computer program instructions; The processor reads and executes computer program instructions to implement a localization method based on factor graph optimization for any one of the first aspects.
[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement a factor graph-based localization method as described in any of the first aspects.
[0019] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a factor graph-based positioning method as described in the first aspect.
[0020] This application provides a positioning method, apparatus, device, medium, and product based on factor graph optimization. It can iteratively solve a factor graph optimization model using a solver. During the iterative solution process, telemetry data reflecting the solver's operating status is collected. This telemetry data is input into an adaptive control network, which outputs solver parameters based on the telemetry data. This allows the solver parameters to adaptively adjust according to the optimization difficulty and observation quality of the current scenario. Therefore, it effectively avoids the defects of fixed-parameter solvers, such as oscillation, divergence, and slow convergence in abrupt change scenarios. It adaptively adapts to changes in all scenario conditions, improving the stability, convergence efficiency, and positioning accuracy of factor graph iterative solutions. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic diagram of the first localization method based on factor graph optimization provided in this application is shown; Figure 2 A schematic diagram of the second factor graph-based localization method provided in this application is shown; Figure 3A schematic diagram of the third localization method based on factor graph optimization provided in this application is shown; Figure 4 A schematic diagram of the fourth localization method based on factor graph optimization provided in this application is shown; Figure 5 A schematic diagram of a positioning device structure based on factor graph optimization provided in this application is shown. Figure 6 A schematic diagram of the hardware structure of the electronic device provided in this application is shown. Detailed Implementation
[0023] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0024] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0025] It should be noted that the acquisition, storage, use, and processing of data in this application embodiment all comply with the relevant provisions of national laws and regulations.
[0026] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0027] In existing technologies, due to the influence of obstruction, multipath propagation, and non-line-of-sight (LOS) factors in complex urban environments, positioning errors are significant. Therefore, GNSS positioning is aided by fusing observation information from communication networks. For example, time of arrival (TOA) and angle of arrival (AOA) measurements from 5G technology can be used to assist GNSS positioning, thereby improving positioning accuracy and availability in complex urban environments. However, due to significant differences in signal propagation characteristics and base station distribution in different environments, existing technologies cannot dynamically adjust the fusion strategy based on real-time environmental and signal conditions when performing multi-source observation fusion, resulting in insufficient positioning accuracy in complex environments.
[0028] To address the problems in existing technologies, embodiments of this application provide a positioning method, apparatus, device, medium, and product based on factor graph optimization. This method can collect telemetry data reflecting the operating status of the solver during iterative solving. The telemetry data is input into an adaptive control network, which outputs solver parameters based on the telemetry data to adjust the solver parameters. This allows the solver parameters to be adaptively adjusted according to the optimization difficulty and observation quality of the current scene, reducing the problem of insufficient positioning accuracy caused by fixed solver parameters failing to adapt to changes in the fusion strategy.
[0029] The following section first introduces a localization method based on factor graph optimization provided in the embodiments of this application.
[0030] Figure 1 A schematic diagram of the first factor graph-based localization method provided in this application is shown. Figure 1 As shown, the method may include the following steps: S101: Construct observation factors for a factor graph based on multi-source heterogeneous positioning observation data, use the positioning results to be estimated as state nodes of the factor graph, and construct a factor graph optimization model.
[0031] In this embodiment, the factor graph optimization model is an undirected graph model composed of state nodes and observation factors. State nodes represent unknown quantities to be estimated, and observation factors represent the constraints of multi-source observation data on the state nodes. Optimal estimation of the unknown quantities is achieved by minimizing the sum of squared residuals between the observation factors and the state nodes. Multi-source heterogeneous positioning observation data refers to observation data generated by different positioning technologies, with different data types and measurement units.
[0032] It should be noted that state nodes are variable nodes in the factor graph optimization model, representing the physical quantity to be estimated. In one example, this application uses the positioning result to be estimated as the state node of the factor graph. To achieve co-estimation of the positioning result and various systematic errors, eliminate systematic biases in multi-source heterogeneous positioning observation data, and improve the positioning accuracy and robustness of the factor graph optimization model, key error parameters related to positioning are also used as error compensation extended state nodes. Therefore, in the sliding window... Internally, the set of state nodes is defined as follows: (1) Where X represents the set of state nodes within the sliding window; Indicates in Unknown quantities to be estimated in an epoch; Indicates in The position of the epoch; Indicates in The speed of an epoch; Indicates in The posture of the era; This indicates the zero bias of the inertial measurement unit (IMU) accelerometer; This indicates the zero bias of the IMU gyroscope; Represents gravitational acceleration; express Epoch-sharing time offset; This represents the station offset of the b-th base station; B represents the total number of base stations participating in the positioning process. This indicates the latency introduced by the 5G link or local oscillator. Indicates the affine scaling factor; Indicates the affine translation factor; The integer ambiguity of the carrier phase is represented; S represents the total number of GNSS satellites participating in the positioning. Let J represent the prior location of the j-th base station; J represents the total number of base stations participating in the positioning.
[0033] It should be noted that the observation factor is an edge connecting the state nodes, representing a specific observation constraint. In this embodiment, the observation factor is described by the residual function, which is the difference between the "theoretical observation based on the current state estimate" and the "actual observation".
[0034] The following describes the construction process of the observation factors in this application: This application uniformly adopts the East-North-Up (ENU) coordinate system as the position and velocity coordinate system. For ephemeris and Earth-fixed quantities, calculations are performed in the ECEF (Geocentric-Earth-Fixed) coordinate system, and then converted to the ENU coordinate system during assembly factor drawing. Attitude is denoted as... Angles are measured in radians. AOA is defined as follows: Two-dimensional plane angle, right-handed system, values The units for TOA are seconds, pseudorange is meters, carrier phase is cycles, Doppler is Hertz, and link / local oscillator delay is milliseconds.
[0035] Because GNSS, 5G, and IMU data are sampled at different times, it is necessary to ensure that the sampling times are the same when constructing observation factors. Therefore, the epoch sequence is constructed using the terminal's local clock. The pseudorange provided by the GNSS receiver carrier phase Doppler frequency shift (used to generate Time-Differenced Carrier Phase (TDCP) observations); TOA and AOA obtained from 5G base stations; triaxial acceleration provided by the IMU. Triaxial angular velocity Using the terminal's local clock as the primary time base, each sample is mapped to an epoch sequence. It should be noted that TOA and AOA are calculated by the 5G base station based on Positioning Reference Signal (PRS) or Channel State Information (CSI).
[0036] However, since IMU data frequency is much higher than GNSS and 5G data, adding each IMU sampling point as a factor to the factor graph would lead to an explosion of state variables and a surge in computational complexity. Conversely, using only epoch-level IMU data would result in the loss of a significant amount of IMU information. Therefore, pre-integrating the IMU data preserves motion information while reducing computational complexity. In one example, the IMU is in the interval... Pre-integration is performed using the Forster form to obtain the IMU pre-integrated observation factor. When IMU data is unavailable (e.g., due to sensor failure or signal blockage), the factor map loses its motion constraints and may become under-constrained. In this case, the second-order difference smoothing prior assumption is used to replace the IMU's motion constraints, i.e., the second-order smoothed observation factor.
[0037] There is a transmission delay between when a 5G signal is emitted from the base station and when it is received by the terminal. In dynamic scenarios, ignoring latency can lead to inaccurate calculation of geometric distance in the TOA residual, thus affecting positioning accuracy. Therefore, a latency parameter is introduced to address this issue. As the state variable to be estimated, first-order interpolation is used to correct the geometric distance calculation in the TOA residual, thereby improving the dynamic scene recognition and accuracy stability. The calculation formula is as follows: (2) in, Indicates the corrected position; express epochal position; Indicates in The speed of an epoch; This indicates the latency introduced by the 5G link or local oscillator. This indicates that the mean is 0 and the variance is 0. The normal distribution characterizes The randomness of the property; The standard deviation of time delay is represented, and its value range is 1. .
[0038] To adapt to state nodes, the observation factors in this application include: GNSS observation factors, 5G observation factors, IMU observation factors, and prior factors. Specifically, the GNSS observation factors include at least one of pseudorange observation factors, carrier phase observation factors, and TDCP observation factors; the 5G observation factors include at least one of TOA observation factors and AOA observation factors; the IMU observation factors include IMU pre-integration observation factors and second-order smoothing observation factors; and the prior factors include time offset factors, affine factors, and anchor factors. Their calculation formulas are as follows: Pseudorange observation factor: (3) in, Indicates the first Era, First Pseudorange observation factor of a satellite; Indicates the first The position of the epoch; Indicates satellite Location; Represents the speed of light; Indicates terminal clock bias; Indicates satellite clock bias; This represents the raw pseudorange observation value collected by the terminal.
[0039] Carrier phase observation factor: (4) in, Indicates the first Era, First Carrier phase observation factor of each satellite; Indicates the GNSS carrier wavelength; Indicates carrier phase integer ambiguity; This represents the raw carrier phase observation value collected by the terminal; Indicates the first The position of the epoch; Indicates satellite The location.
[0040] TDCP observation factors: (5) in, Indicates the first Era, First TDCP observation factors of one satellite; Indicates the first epoch carrier phase observations; Indicates the first epoch carrier phase observations; Indicates the GNSS carrier wavelength; Indicates the first The position of the epoch; Indicates the first The position of the epoch; Indicates satellite The location.
[0041] TOA observation factors: (6) in, express The predicted TOA value for the b-th base station in epoch; express TOA observation factor of the b-th base station in epoch; This represents the location vector of the b-th base station; This represents the TOA observation value of the b-th base station; Indicates the affine scaling factor; Indicates the affine translation factor; Indicates base station Station offset; Indicates 5G link / local oscillator latency; This indicates the corrected position.
[0042] AOA observation factors: (7) in, express The predicted AOA value of the b-th base station in epoch; express The north coordinates of the epoch terminal in the ENU coordinate system; express Eastward coordinates of the epoch terminal in the ENU coordinate system; This represents the north coordinates of the b-th base station in the ENU coordinate system; This represents the eastward coordinates of the b-th base station location in the ENU coordinate system; express The AOA observation factor of the b-th base station in epoch; This represents the AOA observation value of the b-th base station.
[0043] IMU pre-integrated observation factor: (8) in, express IMU pre-integrated observation factor of the epoch; express The attitude rotation matrix of the epoch. ; express The attitude rotation matrix of an epoch; express The transpose of the matrix; express The position vector of an epoch; express The position vector of an epoch; express The velocity vector of an epoch; express The velocity vector of an epoch; express arrive The time interval between epochs; Represents gravitational acceleration; express arrive The estimated position increment obtained by pre-integration of the epoch IMU; express arrive Estimated velocity increments obtained from epoch-time IMU pre-integration; express arrive The transpose of the estimated attitude increment matrix obtained by epoch IMU pre-integration.
[0044] Second-order smoothing observation factor: (9) in, express The second-order smoothing observation factor of the epoch; express The position vector of an epoch; express The position vector of an epoch; express The position vector of an epoch.
[0045] Time bias factor: (10) in, express AR(1) time bias factor of the epoch; express Epoch-sharing time offset; Represents the autoregressive coefficients of the AR(1) model. ; This represents the noise variance of the AR(1) model.
[0046] Affine factor and anchor factor: (11) in, Represents the affine scaling factor The prior variance; Denotes the affine translation factor The prior variance; Indicates the bias of the b-th base station. The prior variance; Let represent the mean of the prior locations of the j-th base station; Let represent the covariance matrix of the prior location of the j-th base station.
[0047] It should be noted that the Jacobian matrix is the first-order partial derivative matrix of the observation factors (residual functions) with respect to the state variables. In constructing the factor graph optimization model, the Jacobian matrix is the core mathematical foundation for linearizing the objective function, assembling the normal equations, and solving for the increments of the state variables. Therefore, based on the observation factors constructed above, their corresponding Jacobian matrices also need to be constructed to achieve gradient quantization of the residuals with respect to each state variable. For the Jacobian matrices of GNSS observation factors, IMU observation factors, and prior factors, this application adopts the standard derivation method and implementation form in the relevant technical field; since this application is the first to incorporate the Jacobian matrix into the factor graph... As a joint estimate of state variables, the Jacobian matrix corresponding to the TOA observation factors is therefore given here: (12) in, ; This represents the position difference vector of the b-th base station in the k-th epoch; Indicates the first The position of the epoch; Indicates in The speed of an epoch; This indicates the latency introduced by the 5G link or local oscillator. This represents the location vector of the b-th base station; express TOA observation factor of the b-th base station in epoch; Indicates the affine scaling factor; Represents the speed of light; Indicates the corrected terminal position; Indicates the affine translation factor; Indicates base station The station is biased.
[0048] The Jacobian matrix corresponding to the AOA observation factor is: (13) in, express The predicted AOA value of the b-th base station in epoch; Indicates the first The position of the epoch; This represents the location vector of the b-th base station; express The north coordinates of the epoch terminal in the ENU coordinate system; This represents the north coordinates of the b-th base station in the ENU coordinate system; express Eastward coordinates of the epoch terminal in the ENU coordinate system; This represents the eastward coordinates of the b-th base station location in the ENU coordinate system.
[0049] S102: The factor graph optimization model is iteratively solved based on the solver, and telemetry data reflecting the operating status of the solver is collected during the iterative solution process.
[0050] In the embodiments of this application, traditional solvers typically employ fixed strategies to adjust their internal parameters, failing to perceive the difficulty of the current optimization problem and the quality of the observation data. For example, in geometrically degenerate scenarios such as "urban canyons," the solver may converge slowly or even diverge; while in open scenarios with abundant observation data, the solver may be overly conservative, resulting in insufficient convergence speed. Therefore, we need to determine the current operating status of the solver through telemetry data. Telemetry data is a set of parameters generated in real time by the solver during the iterative solution process, reflecting the solver's operating status. In one example, the solver performs a solution once at each epoch to obtain the localization result; therefore, the solver generates telemetry data at each epoch, thus forming a telemetry data sequence.
[0051] In one example, telemetry data may include: damping factor Used to control the solver's step size and search direction; model descent ratio Hessian matrix condition number Residual P90; gating ratio; step norm Single calendar cycle time.
[0052] S103: Input telemetry data into the adaptive control network, so that the adaptive control network outputs solver parameters based on the telemetry data to adjust the solver.
[0053] In this embodiment, telemetry data refers to a series of quantitative indicators that reflect the solver's operating status and are collected in real time during the iterative solution process. Since single telemetry values may be distorted due to occasional fluctuations and cannot accurately reflect the long-term operating trend of the solver, the adaptive control network is input with a short-window telemetry sequence consisting of telemetry data from multiple consecutive epochs (e.g., the most recent 5-10 epochs), used to capture the changing trends of each indicator over time. Through the adaptive control network, the optimal solver parameters can be dynamically predicted based on the current operating status and changing trends of the solver, enabling the solver to adaptively balance convergence speed, numerical stability, and positioning accuracy in different scenarios.
[0054] In one example, the solver parameters include a damping coefficient and a sliding window length. The damping coefficient adjusts the trust region size of the Levenberg-Marquardt solver, balancing iterative convergence speed and solution stability. The sliding window length controls the number of historical epochs involved in the joint estimation in factor graph optimization, balancing positioning accuracy and computational complexity. In another example, the solver parameters can also be damping scaling and window increments, instead of directly outputting absolute parameter values; for example, the damping increment is the logarithmic domain damping adjustment step size, and the window increment is the integer increment / decrement step size.
[0055] In one example, the adaptive control network can be a lightweight deep learning model, such as one-dimensional convolutional neural networks, bidirectional long short-term memory networks, and fully connected layers.
[0056] In one example, to maintain consistency with the trust region update logic of the Levenberg-Marquardt (LM) algorithm, the damping coefficients are updated using a logarithmic-domain incremental approach: (14) in, This represents the damping factor at epoch k+1; This represents the limiting function, used to strictly constrain the logarithmic domain damping within a preset upper and lower limit range to prevent abnormal damping out of bounds; The damping factor represents the k-epoch. Represents the logarithmic field increment of epoch k; This represents the minimum value of the damping factor; This represents the maximum value of the damping factor; where: ; .
[0057] The sliding window uses an integer incremental limit update method: (15) in, This represents the length of the sliding window in epoch k+1; This represents the length of the sliding window in epoch k; Represents the floor function; This represents the increment of the sliding window length at epoch k; This represents the minimum value of the sliding window; This represents the maximum value of the sliding window; This represents a limiting function used to restrict the window from changing within a reasonable range; it can be: ; .
[0058] In one example, to avoid sudden changes in solution parameters due to adaptive control network failure or inference anomalies, the algorithm reverts to the classic LM trust region heuristic update rule when the adaptive control network detects failure or output anomalies: relying on the model descent ratio. Adaptive damping adjustment is performed; when the model descent ratio is less than 0, the damping coefficient is forcibly increased to shrink the trust region, ensuring safe iterative convergence. The condition number of the Hessian matrix... This is used to characterize the quality of geometric constraints and the degree of matrix anomaly in factor graph optimization. When the condition number exceeds a preset upper limit threshold, the matrix is determined to be anomaly. At this time, the damping coefficient is increased and the sliding window is lengthened to improve the robustness of the solution and the redundancy of constraints, and to avoid iterative divergence.
[0059] In another example, to avoid losing historical constraint information, when restricting the sliding window, the following is also included: During the iterative solution process, when the length of the sliding window exceeds a preset threshold, the size of the sliding window is maintained at the preset sliding window size.
[0060] In this embodiment, the sliding window determines the number of historical epochs participating in the joint estimation. A longer window allows for more state nodes to participate in the optimization, resulting in higher positioning accuracy. However, more state nodes also increase computational complexity. When the window length is too large, the computation time for a single epoch may exceed a preset threshold, affecting the real-time response capability of the positioning. Furthermore, an excessively long sliding window may contain outdated information inconsistent with the current scene (e.g., the terminal has moved from an open area to an urban canyon), negatively impacting the current state estimation.
[0061] The adaptive control network dynamically adjusts the window length based on the difficulty of the scene: in open scenes, the window length may be increased to improve accuracy, while in complex scenes, the window may be shortened to ensure stability. As the adaptive control network continuously outputs positive window increments, the window length may continue to grow. Therefore, it is necessary to set an upper limit for the window length. Once the window length reaches the upper limit, computational complexity can be controlled while retaining the constraint information contained in the removed historical states.
[0062] Marginalize the historical state nodes and their associated observation factors that exceed the preset sliding window size at the earliest time.
[0063] In this embodiment, when the window length needs to be maintained at the upper limit, the earliest historical state node must be removed to accommodate the new epoch. The traditional approach is to directly discard these historical states and their associated observation factors, but this results in the permanent loss of historical information. For example, information such as the position and velocity of the earliest epoch, as well as associated GNSS observations and IMU pre-integration constraints, would result in the loss of constraint information contributing to the current state estimation if directly deleted. This information may contain constraints valuable for the current state estimation, and directly discarding it would lead to a decrease in positioning accuracy. Therefore, the earliest historical state node and its associated observation factors that exceed the preset sliding window size are marginalized, transforming this historical information into prior constraints on the remaining states within the window. This achieves both window size control and avoids the complete loss of historical information.
[0064] In one example, the specific operation of edge detection is as follows: When the earliest historical state node needs to be removed, the system first identifies all constraints between the historical state node and the currently retained state node, including IMU pre-integration factors, GNSS observation factors, 5G observation factors, etc. Then, the information matrices and gradient vectors corresponding to these constraints are organized into blocks, with the historical state to be removed as one set of variables and the current state to be retained as another set. Next, using the Schur complement elimination technique, the information of the state variables to be removed is "projected" onto the retained state variables, that is, the state variables to be removed are eliminated from the original normal equations, while the information matrix and gradient vector of the retained state variables are updated, so that the updated information matrix and gradient vector can equivalently reflect the constraint influence of the removed state on the retained state.
[0065] The marginalized information is transformed into prior factors and added to the current factor graph optimization model.
[0066] In this embodiment, the prior factor is a special type of factor used to add prior constraints on state variables in the factor graph. It does not rely on observed data but is constructed based on historical information or known statistical properties of system parameters. In this embodiment, the prior factor generated by marginalization represents the constraint of the removed historical state on the retained state.
[0067] The specific operation of transforming the prior factor is as follows: the information matrix and gradient vector of the retained states obtained after marginalization are encapsulated into a prior factor. This prior factor has a Gaussian distribution, and its information matrix is the information matrix obtained after marginalization. Its mean vector can be obtained by solving a system of linear equations. This prior factor, as an additional factor node, is added to the new sliding window factor graph, connecting all retained state nodes within the current window. In the subsequent optimization process, this prior factor, together with the observation factor, IMU factor, etc., constitutes the objective function, ensuring that the constraint information contained in the removed historical states is not lost due to window sliding, thereby achieving effective transmission of historical information and long-term consistency.
[0068] In this embodiment, during the iterative solution process, when the length of the sliding window exceeds a preset threshold, the size of the sliding window is maintained at the preset sliding window size. The historical state nodes and their associated observation factors that exceed the preset sliding window size at the earliest moment are marginalized. The marginalized information is converted into prior factors and added to the current factor graph optimization model. This avoids the information loss caused by directly discarding historical state nodes and their associated observation factors, thereby effectively preserving the contribution of historical constraints to the current state estimation while controlling computational complexity.
[0069] S104: Update the solver based on the solver parameters, and return to execute the step of iteratively solving the factor graph optimization model based on the solver based on the updated solver until the preset convergence condition is met, and obtain the final positioning result of the factor graph optimization model solved by the solver.
[0070] In this embodiment, real-time updating of solver parameters allows the solver to always adapt to the current scenario conditions, continuously optimize iteration quality, and iteratively verify convergence conditions, ensuring that the final result is output after achieving the required positioning accuracy. The factor graph model is iteratively reweighted least squares (IRLS) and inner LM iterations are performed using the current solver parameters. After each inner iteration, telemetry data is collected and input into the adaptive control network to obtain new damping coefficients and sliding window lengths. The solver parameters are then updated based on these new damping coefficients and sliding window lengths. The system checks whether preset convergence conditions are met, including whether the relative decrease in the objective function or the norm of the state update increment meets the convergence conditions. If the convergence conditions are not met, the updated solver parameters are used to continue the next iteration.
[0071] In this embodiment, to obtain high-precision, highly reliable positioning results that meet real-time requirements under different environments, this application constructs observation factors of a factor graph based on multi-source positioning observation data. The positioning result to be estimated is used as the state node of the factor graph to construct a factor graph optimization model. Then, the factor graph optimization model is iteratively solved based on a solver. During the iterative solution process, telemetry data reflecting the operating state of the solver is collected. The telemetry data is input into an adaptive control network, which outputs solver parameters based on the telemetry data to adjust the solver parameters, thereby enabling the solver parameters to... The system can adaptively adjust based on the optimization difficulty and observation quality of the current scene. Therefore, it updates the solver based on the solver parameters, and returns to the step of iteratively solving the factor graph optimization model based on the solver until the preset convergence condition is met, thus obtaining the final positioning result of the factor graph optimization model solved by the solver. This effectively avoids the defects of fixed parameter solvers, such as easy oscillation, divergence, and slow convergence in complex occlusion, geometric degradation, and sudden change in observation noise. It adaptively adapts to changes in all scene conditions and significantly improves the stability, convergence efficiency, and positioning accuracy of factor graph iterative solution.
[0072] In one example, to quantify the evaluation of positioning accuracy, generate a reproducible verification data chain, and provide supervision signals and reward criteria for the training of the deep learning model and adaptive control network, after each epoch, the following is also included: Obtain the process log stored during multiple iterations of the solution process. The process log includes the observation data, quality characteristics, residuals, telemetry data and the corresponding final positioning results for each epoch.
[0073] In this embodiment, the solution process for each epoch in factor graph optimization localization generates a wealth of valuable information. This information is not only a product of real-time localization but also a data resource for offline training and model optimization. Traditional localization only outputs the final localization result without recording the intermediate process, making post-analysis, fault diagnosis, and model iteration impossible. By storing process logs, a traceable, reproducible, and evolving data foundation can be built, enabling continuous learning from actual operational data and constant performance improvement.
[0074] The process log is a complete set of runtime data recorded after each epoch's iterative solution, including: observation data, quality characteristics, residuals, telemetry data, and the corresponding final positioning results. In addition, to comprehensively evaluate system performance, the process log also records optimization process metrics, including average number of iterations, failure backoff rate, single epoch time consumption, time series of window length, and time series of damping factor.
[0075] In one example, all observation data, quality characteristics, residuals, telemetry data, and final positioning results for that epoch can be read from the solver memory. Then, the data is organized into structured records according to a preset field order and format. Key fields include epoch number, window length, damping factor, model descent ratio, Hessian condition number, gating ratio, residual P90, single epoch time consumption, and each component of the parallel five-channel weights. Next, the formatted records are appended to the process log file and simultaneously written to a compressed summary file: fused.csv stores the final positioning results for each epoch for trajectory comparison and accuracy evaluation, and summary_results.csv stores statistical indicators for the entire operation for rapid system performance evaluation. Finally, three core plots are optionally generated for visualization analysis: a trajectory comparison plot overlays the estimated trajectory with the reference true trajectory; a 5G residual histogram statistically analyzes the distribution of TOA residuals for multipath impact analysis; and a P90 and epoch shared bias time series plot shows the changes in residual P90 and receiver clock bias over time for diagnosing system stability.
[0076] In one example, in edge computing or cloud-coordinated deployment scenarios, process logs can be compressed and periodically reported to a cloud server. The cloud aggregates large amounts of log data from multiple terminals, forming a large-scale dataset for offline retraining of deep learning models and adaptive control networks.
[0077] In one example, to quantify the positioning accuracy and provide supervision signals and reward basis for the training of deep learning models and adaptive control networks, the following error indicators are defined based on reference ground truth (such as the trajectory provided by high-precision integrated navigation equipment or the LiDAR mapping results), and these indicators are integrated into the storage of process logs and the model training process.
[0078] After each epoch is solved, the system retrieves the final location result for that epoch from the process log. and in conjunction with the reference truth value Calculate the single-epoch positioning error modulus: (16) in, Indicates the first The positioning error modulus of each epoch; Indicates in The estimated position of the epoch output; Indicates the reference truth value position; Based on the single-epoch positioning error sequence, the following statistical indicators were further calculated: root mean square error. It reflects the overall level of positioning error; mean absolute error This reflects the average magnitude of the positioning error; the maximum error This reflects the average magnitude of the positioning error; the 90th percentile error. This indicates that 90% of the positioning errors are less than this value.
[0079] The deep learning model is trained based on the observation data, quality features, residuals, and corresponding final localization results in the process log.
[0080] In this embodiment, a deep learning model is used to generate the first weight component, and its accuracy directly affects the rationality of the observation weighting. The initial deep learning model may be trained based on simulation data or general scenario data, but in actual deployments, data distribution varies across different environments. By extracting real operational data from process logs and using the final localization result as a supervision signal, the deep learning model can be continuously optimized to better adapt to specific scenarios.
[0081] In one example, the single positioning error As the basis for back projection, a confidence label is constructed for each observed factor. Specifically, when the positioning error at a certain epoch... When the value is large, trace back the residuals of each observed factor in that epoch. If the residual direction of an observed factor is consistent with the error direction and the absolute value of the residual exceeds a preset threshold, the observed factor is marked as low confidence (label 0); otherwise, it is marked as high confidence (label 1). Simultaneously, during training, the RMSE and P90 metrics on the validation set are used to monitor model convergence. When the RMSE on the validation set stops decreasing or the P90 starts increasing, training is stopped early to prevent overfitting. After training, the RMSE and P90 of the new and old models on the test set are compared to quantitatively evaluate the model improvement effect and determine whether to deploy the new model.
[0082] The adaptive control network is trained based on the telemetry data in the process log and the corresponding final positioning results.
[0083] In this embodiment, the adaptive control network is used to output solver parameter adjustments. Its training objective is to learn what control inputs should be output under what telemetry states to optimize the final positioning result. Since control decisions affect the positioning performance of subsequent epochs, reinforcement learning is suitable. The process log provides a complete "state-action-reward" sequence, providing a data foundation for reinforcement learning. State-action-reward triplets are extracted from the process log. The state can be a short-window telemetry sequence of an epoch, such as the model descent ratio, Hessian condition number, residual P90, gating ratio, step norm, and single-epoch time consumption of the most recent five epochs. The action can be the actual solver parameter adjustments used in the epoch, which can be inferred from the changes in damping factor and window length in the log. The reward can be calculated based on the positioning error of the epoch.
[0084] In this embodiment, after each epoch is solved, the process log stored during multiple iterations is obtained, enabling the construction of a complete data traceability chain, making the solution process of each epoch reproducible and auditable. Based on the observation data, quality features, residuals, and corresponding final positioning results in the process log, the deep learning model is trained. Training samples are extracted from real operating data, and the final positioning error is used as a supervision signal. The deep learning model can continuously correct its confidence estimation, improving the accuracy of observation weight allocation. Based on the telemetry data and corresponding final positioning results in the process log, the adaptive control network is trained, enabling the adaptive control network to learn the optimal solver parameter adjustment strategy.
[0085] Figure 2 A schematic diagram of the second factor graph-based localization method provided in this application is shown. Figure 2 As shown, the method may include the following steps: S201: Obtain a first weight component generated by the deep learning model based on the quality features of the observed data, and at least one second weight component generated based on the residual; wherein the residual is determined based on the estimate of the current state node in each iteration solution.
[0086] In this embodiment, the first weight component is a confidence level generated by the deep learning model based on the quality characteristics of the observation data, used to determine the credibility of the observation factor itself without considering the current state estimate; the second weight component is at least one weight component generated based on the residual, used to dynamically adjust the credibility of the observation factor during the iterative solution process.
[0087] In one example, to avoid double scaling issues when calculating the first and second weight components, the calculation of the first and second weight components is performed before the following: The residuals are whitened to obtain the whitened residuals of each observation factor.
[0088] In the embodiments of this application, different observation factors have different dimensions and noise levels. If the observation factors are directly combined for optimization, the optimization process will be dominated by residuals with large dimensions, masking the observation factors with small dimensions but high information content. At the same time, the numerical scale difference between different dimensions may reach more than 10 orders of magnitude, leading to the deterioration of the Hessian matrix condition number and affecting the convergence stability of the solver.
[0089] Whitening, by multiplying each residual by the inverse square root of its covariance matrix, unifies all observations into the same metric space, making each component of the whitened residual have unit variance and be independent of each other, and making the whitened residuals of different observation factors numerically comparable.
[0090] The formula for calculating whitening treatment is: (17) in, This represents the whitened residual of the i-th observation factor (residual); Represents the inverse square root of the covariance matrix; This indicates the point at the previous linearization stage. The observed factors.
[0091] Whitening is performed during factor graph construction, and the whitening residuals are updated with the state estimate, but the covariance matrix remains unchanged throughout the optimization process (i.e., it is not dynamically scaled). The covariance matrix is used only for whitening, and its value is predetermined based on the observed nominal noise level. It is not modified in subsequent iterations, and all dynamic adjustments are achieved through weights.
[0092] At least one second weighted component is generated based on the whitened residual; In the embodiments of this application, at least one second weight component is generated by whitening the residual, thus enabling accurate quantification of the effectiveness of the observation factor based on the statistical, geometric, and anomaly characteristics of the residual under a unified metric space.
[0093] In this embodiment, by whitening the residuals before weight component fusion and factor graph update, and by fixing the covariance matrix and only using weights to weight the whitened residuals, the double scaling problem caused by "modifying the covariance first and then multiplying by the weights" or "weighting first and then modifying the covariance" is avoided. This eliminates the magnitude superposition error in numerical calculation, ensures the numerical stability of the factor graph optimization model, and allows the constraint strength adjustment of each observation factor to depend only on the weight allocation, thereby improving the accuracy of the positioning results.
[0094] The calculation process for the first weighted component will be explained next: In one example, the quality characteristics of the observed data include: signal quality characteristics, geometric characteristics, and residual statistical characteristics. Signal quality characteristics include: GNSS carrier-to-noise density ratio (C / N0), 5G CSI stability, AOA continuity, and occlusion / cycle slip flags; geometric characteristics include: Geometric Dilution of Precision (GDOP) and base station angle dispersion; residual statistical characteristics include: whitened coarse residuals, 90th percentile (P90) residuals, gating ratio, and robust scaling (e.g., Median Absolute Deviation (MAD) / P68).
[0095] The calculation formulas for each quality characteristic are as follows: The formula for calculating MAD is: (18) in, Let represent the MAD robust scaling estimate of the i-th observation factor; This represents the calibration coefficient for converting MAD to the standard deviation of a normal distribution; This represents the median function; Let represent the whitening residual of the i-th observation factor.
[0096] The formula for calculating P68 is: (19) in, This represents the P68 robust scaling estimate of the i-th observation factor; This represents the quantile function; This represents the whitening residual of the i-th observation factor; This indicates the 68th percentile.
[0097] The formula for calculating GDOP is: (20) in, Indicates the geometric precision factor; The positioning configuration matrix is extracted from the observation factor Jacobian matrix and represents the geometric relationship between the satellite / base station and the terminal. ( ) represents the trace of a matrix.
[0098] AOA continuity calculation formula: (twenty one) in, This represents the AOA continuity difference at epoch k; This represents the AOA composite observation value at epoch k; This represents the combined AOA observations at epoch k-1. In one example, AOA continuity can also be calculated based on single-base station AOA observations.
[0099] In one example, the deep learning model employs a lightweight network structure, specifically: 1D-CNN (One-Dimensional Convolutional Neural Network) + BiLSTM (Bidirectional Long Short-Term Memory Network) + FC (Fully Connected Layer), used to extract confidence scores from the quality features of the observed data. First, the quality features of the observed factors are concatenated into a temporal feature vector, resulting in a temporal feature vector for each epoch. This temporal feature vector is then input into the deep learning model. The 1D-CNN performs local feature extraction on the temporal features, capturing short-term dependencies between adjacent epochs. The BiLSTM performs bidirectional temporal modeling on the feature sequence output by the CNN, capturing long-term dependencies and outputting a hidden state vector. The FC maps the hidden state vector output by the BiLSTM to a scalar value, which, after passing through a sigmoid activation function, outputs the first weight component. .
[0100] It should be noted that: because this application adopts a factor graph optimization strategy of whitening first and then multiplying by weights, that is, all weights are applied to the whitened residuals, while the covariance matrix itself remains unchanged, the confidence level output by the deep learning model is only used as one of the multiplication factors in the parallel five-channel weights and does not rewrite the covariance.
[0101] In another example, considering potential anomalies in actual deployment, this embodiment provides a fault-tolerant mechanism. When the deep learning model is unavailable (e.g., the model has not been loaded during system startup, the inference engine malfunctions, or the model file is corrupted) or input features are missing (e.g., some sensor data is lost, or quality labels cannot be obtained), degradation processing is automatically performed: at this time, the first weight component... This means that the observed factors are not weighted by confidence based on deep learning; instead, they are weighted entirely by other second-weight components. Simultaneously, to prevent the observed factors from being completely suppressed due to excessively small weights, thus reducing usability, the system sets a lower bound clamp on the final fused weights. Even if the deep learning model becomes unavailable, the first weight component retains a lower bound value of at least 0.1, ensuring that each observed factor still retains a minimum contribution to the objective function. Therefore, it can switch to the traditional weighting mode when the deep learning model malfunctions, ensuring the continuous availability of the location service; at the same time, the lower bound clamp prevents the observed factors from being over-suppressed, maintaining the constraint integrity of the factor graph and preventing location divergence or a sudden drop in accuracy due to insufficient available observed factors.
[0102] The calculation process of the second weight component is described below. The second weight component includes at least one of the following: scale channel weight component, robust channel weight component, geometric channel weight component, and gated channel weight component.
[0103] The formula for calculating the scale channel weight components is: (twenty two) in, Represents the scale channel weight component of the i-th observation factor; Let represent the MAD robust scaling estimate of the i-th observation factor; Let represent the whitening residual of the i-th observation factor.
[0104] Robust channel weight components may include: robust weight components or Student-t weight components; The formula for calculating the robust weight components is: (twenty three) in, This shows the robust weight component of the i-th observation factor; Indicates the robustness threshold; Let represent the whitening residual of the i-th observation factor.
[0105] The formula for calculating the Student-t weighted components is: (twenty four) in, This represents the Student-t weight component of the i-th observation factor; , representing the degree of freedom parameter; This represents the MAD robust scalar estimate; Let represent the whitening residual of the i-th observation factor.
[0106] The formula for calculating the geometric channel weight components is: (25) in, Represents the geometric channel weight component of the i-th observation factor; Indicates the geometric weighting coefficient; Represents the minimum constant; This represents the geometric precision attenuation factor corresponding to the observation source to which the i-th observation factor belongs. Wherein, Based on Then, based on the observation source to which observation factor i belongs, the global GDOP is mapped to the observation factor using the source-specific GDOP method. .
[0107] Gated channel weight components may include: Switchable weight components or EM soft-attribution weight components of a line-of-sight / non-line-of-sight (LOS / NLOS) mixed Gaussian; The formula for calculating the switchable weight components is: (26) in, Represents the Switchable weight component of the i-th observation factor; Indicates the gating threshold coefficient; Let represent the whitening residual of the i-th observation factor.
[0108] The formula for calculating the EM soft-attribute weight component is as follows: (27) in, This represents the EM soft-attribution weight component of the i-th observation factor; Indicates the LOS observation prior mixing ratio; This represents the probability density function of a one-dimensional Gaussian distribution. This represents the residual noise variance of LOS line-of-sight observations; This represents the residual noise variance of NLOS line-of-sight observations; Let represent the whitening residual of the i-th observation factor.
[0109] S202: Multiply the first weight component and the second weight component to obtain the fused weight, and update the observed factors based on the fused weight to obtain the updated factor graph optimization model.
[0110] In the embodiments of this application, the weight components calculated above are the reliability of the observation factors evaluated from different perspectives. The use of multiplication fusion can ensure that the final weight is close to 1 only when all dimensions consider the observation to be reliable; if any dimension considers the observation to be unreliable, the final weight will be reduced accordingly.
[0111] The formula for calculating the fusion weight is: (28) in, This represents the fusion weight corresponding to the i-th observation factor; This represents the first weight component corresponding to the i-th observed factor, i.e., the confidence level; Represents the scale channel weight component of the i-th observation factor; The robust channel weight component represents the i-th observation factor, which can be either a robust weight component or a Student-t weight component. Represents the geometric channel weight component of the i-th observation factor; This represents the gated channel weight component corresponding to the i-th observation factor, which can be a Switchable weight component or an EM soft-attribution weight component.
[0112] S203: Solve the updated factor graph optimization model until the factor graph optimization model converges, and obtain the final positioning result.
[0113] In this embodiment of the application, the objective function of the updated factor graph optimization model is: (29) in, Indicates global state The objective function is a variable; The robust loss function for the i-th factor can be either Huber or Student-t loss; This represents the fusion weight corresponding to the i-th observation factor; Indicates global state The whitening residuals of the variables; Represents the global state The prior residuals; This represents the prior factor.
[0114] In one example, a specific solution method for step S203 is as follows: A two-layer iterative structure of outer-layer iterative reweighted least squares and inner-layer optimization solver is used for iterative solution; the inner-layer optimization solver is at least one of Gauss-Newton, Levenberg-Marquardt, or incremental smoothing and mapping. In this embodiment, as can be seen from the updated factor graph optimization model, there is a coupling relationship between the weights and the state to be estimated. Multiple components in the fused weights depend on the whitened residuals under the current state estimate; that is, the state influences the residuals, the residuals influence the weights, and the weights influence the state update. This coupling relationship creates a mutually dependent closed loop between the weights and the state. On the one hand, the calculation of the weights needs to be based on the current state estimate; on the other hand, the state update depends on the objective function determined by the weights.
[0115] Therefore, a two-layer iterative structure is needed to decouple the above-mentioned coupling relationship and realize the calculation of weights and states. Specifically, the inner layer iteration solves the nonlinear least squares problem under given weights to obtain the state update; the outer layer iteration recalculates the residuals based on the updated state, updates the weights, and then enters the next inner layer iteration, thereby realizing the iterative process of weighting, solving, and reweighting.
[0116] In one example, the outer iteration can be solved using Iteratively Reweighted Least Squares (IRLS) to update the weights based on the current residuals, thus realizing the calculation between weights and the solution. The core idea of IRLS is that in each outer iteration, the weights of each observation factor are recalculated based on the current state estimate, so that the weights can reflect the true situation of the current residual distribution, thereby more accurately suppressing the influence of outliers in the next inner solution.
[0117] Inner iterations can be solved based on optimizers, such as: Gauss-Newton (GN), Levenberg-Marquardt (LM), incremental smoothing and building... Figure 2 (Incremental Smoothing and Mapping 2, iSAM2). Among them, the Gauss-Newton method is suitable for problems with low nonlinearity and has a fast convergence speed; the Levenberg-Marquardt method dynamically balances the Gauss-Newton method and the gradient descent method, making it more robust and able to handle strongly nonlinear problems; iSAM2 supports incremental updates, is suitable for sliding window optimization scenarios, and can efficiently reuse historical calculation results, reducing the real-time computation burden.
[0118] In each iteration, the observation equation is linearized and the normal equation is assembled. The state increment is solved by the Schur complement elimination method and sparse matrix decomposition.
[0119] In the embodiments of this application, since the objective function of the factor graph optimization model is nonlinear, such as the nonlinear operations such as geometric distance and trigonometric functions contained in the residual, it cannot be solved directly. Therefore, it is necessary to linearize the nonlinear problem into a linear least squares problem, and solve a system of linear equations in each iteration to gradually approach the optimal solution.
[0120] In one example, the normal equation is constructed as follows: At the current linearization point At point i, performing a first-order Taylor expansion on the residual of the i-th observation factor yields a first-order approximation: (30) in, This represents the linearization point of the current iteration in factor graph optimization, which is the estimated state node value obtained in the previous iteration; Indicates the current linearization point The whitening residual of the i-th observation factor calculated at point ; The Jacobian matrix represents the whitening residual of the i-th observation factor relative to the state node; This represents the state increment.
[0121] Therefore, the normal equations are assembled based on the approximate results of the residuals: (31) in, The Hessian matrix represents the factor graph optimization. Indicates the state increment; This represents the gradient vector for factor graph optimization.
[0122] Specifically, the formula for calculating the Hessian matrix is: (32) in, The Hessian matrix represents the factor graph optimization. This represents the fusion weight corresponding to the i-th observation factor; The Jacobian matrix represents the whitening residual of the i-th observation factor relative to the state node; This represents the prior factor.
[0123] The formula for calculating the gradient vector is: (33) in, Represents the gradient vector for factor graph optimization; This represents the fusion weight corresponding to the i-th observation factor; The Jacobian matrix represents the whitening residual of the i-th observation factor relative to the state node; Indicates the current linearization point The whitening residual of the i-th observation factor calculated at point ; Indicates prior factors; This represents the linearization point in the current iteration of factor graph optimization; The prior mean vector representing the global state.
[0124] After assembling the normal equation, the LM step is further performed to solve the normal equation. The LM step solution formula is as follows: (34) in, The Hessian matrix represents the factor graph optimization. denoted as LM damping coefficient; I represents the identity matrix with the same dimension as the Hessian matrix H; Represents the gradient vector for factor graph optimization; This represents the state increment.
[0125] Because the state variables in factor graph optimization include core states and weakly coupled secondary states (such as base station bias), GNSS integer ambiguity In cases where the weakly coupled states have few intersections with the core states, and the overall state dimension is high with a large Hessian matrix, directly solving the complete normal equation would result in high computational complexity for matrix inversion, leading to significant computational overhead at the terminal and failing to meet real-time positioning requirements. Therefore, to improve positioning efficiency, this application employs the Schur complement elimination method to marginalize and eliminate the weakly coupled minor states from the normal equation, retaining only the low-dimensional sub-equations of the core states for solution, thereby reducing computational complexity and improving solution efficiency.
[0126] The block matrix expression for the Shure complement elimination method is: (35) in, This represents the Hessian submatrix corresponding to the core states, which include: , as well as ; The Hessian submatrix represents the weakly coupled secondary state, which includes all states to be solved except the core state. The first cross-coupling Hessian submatrix represents the relationship between the core state and the secondary state; The second cross-coupling Hessian submatrix represents the relationship between the core state and the secondary state; Indicates the core state increment; This represents the increment of a weakly coupled secondary state; This represents the gradient subvector corresponding to the core state; This represents the gradient sub-vector corresponding to the weakly coupled secondary state.
[0127] Using the Schur complement elimination method described above, it can be seen that the Hessian matrix corresponding to the weakly coupled secondary state is... Since it is a block diagonal matrix, inverting a block diagonal matrix only requires inverting each diagonal block individually, without needing to invert the entire matrix. This reduces the computational cost by an order of magnitude. Furthermore, the core state equation obtained after elimination has a lower dimension than the original normal equation. Therefore, the following sparse solution methods can be used to solve the core state equation after elimination: sparse Cholesky decomposition and PCG preconditioned conjugate gradient (PCG). Both methods have been optimized for sparse matrices, which can skip the invalid calculation of zero elements. While ensuring the accuracy of the solution, they can significantly improve the solution speed of the state increment and reduce the time consumption of solving a single epoch, thus meeting the computing power and latency constraints of real-time positioning of the terminal in complex urban environments.
[0128] Whether to accept the current state update is determined based on the model's descent ratio.
[0129] In this embodiment of the application, the LM algorithm introduces a damping factor. A trade-off is made between Gauss-Newton (fast but potentially unstable) and gradient descent (stable but slow). The model descent ratio is used to evaluate the accuracy of the linearized model, determine whether to accept the current update, and how to adjust the damping factor.
[0130] The formula for calculating the model descent ratio and the calculation logic for determining whether to accept the current state update based on the model descent ratio are as follows: (36) in, Indicates the model's descent ratio; This represents the actual decrease in the objective function; Represents the gradient vector for factor graph optimization; Indicates the state increment; The Hessian matrix represents the factor graph optimization. This represents the decrease in the objective function predicted by the linearized model. Damping factor; Represents the update coefficient of the damping coefficient; when When the linearized model has high prediction accuracy, the actual objective function decreases, so the current state update is accepted, and the damping factor is reduced to tilt towards the Gaussian-Newton direction, accelerating subsequent convergence; when When the linearized model fails and the actual objective function increases, it is necessary to reject the current state update, increase the damping factor, and switch to gradient descent to avoid divergence in the solution.
[0131] The convergence condition is determined by the relative decrease of the objective function or the norm of the state update step size. If the convergence condition is met, the iteration stops and the final localization result is obtained.
[0132] In this embodiment, IRLS optimizes the first and second weights in each iteration of the outer layer. Iterative optimization requires a reasonable termination criterion to avoid wasting computational resources due to infinite iteration or insufficient positioning accuracy due to premature termination. The convergence condition should strike a balance between accuracy and efficiency. Therefore, this application uses the relative decrease in the objective function and the norm of the state update step size to determine whether the convergence condition is met.
[0133] The relative decrease of the objective function refers to the ratio of the actual decrease of the objective function in the current iteration to the value of the objective function before the iteration. When it is less than a preset decrease threshold, it indicates that the objective function has stabilized and the iteration can be stopped. The calculation formula is as follows: (37) in, This represents the absolute decrease in the objective function; This represents the objective function value before iteration.
[0134] The state update step size norm refers to the infinity norm of the state increment obtained in this iteration. It is used to quantify the update magnitude of the state variable. When it is less than the preset state update step size norm threshold, it indicates that the state variable has converged to the optimum, and the iteration can be stopped. Its calculation formula is: (38) in, This represents the state increment obtained in this iteration; It represents the infinite norm.
[0135] In this embodiment, when solving the factor graph optimization model, a two-layer iterative structure of outer iterative reweighted least squares and inner optimization solver is adopted for iterative solution, thereby optimizing the solution process layer by layer, gradually correcting the observation weights and state estimation results, and improving the fitting accuracy of the nonlinear model. In each iteration, the observation equation is linearized and normal equations are assembled. The state increment is solved by Schur complement elimination method and sparse matrix decomposition, thereby reducing the matrix solution dimension, reducing computational redundancy, and improving the overall solution efficiency. At the same time, the model descent ratio is used to determine whether to accept the current state update, so as to screen effective iteration steps and avoid solution oscillations caused by invalid updates. Then, the convergence condition is determined by the relative descent of the objective function or the norm of the state update step size. If the condition is met, the iteration stops and the final positioning result is obtained. This approach can balance solution accuracy, computational efficiency, and iterative stability, effectively adapt to the factor graph optimization solution requirements in complex multi-source observation scenarios, and ensure that the positioning result is accurate and convergent reliably.
[0136] In this embodiment, a first weight component generated by a deep learning model based on the quality features of the observation data is obtained. This allows for nonlinear fusion and temporal modeling of multi-dimensional quality features using the deep learning model, thereby accurately assessing the reliability of each observation factor. Then, at least one second weight component generated based on the statistical characteristics of the residual distribution is obtained. This component can characterize the error level of the current epoch observation deviating from the theory in real time and dynamically capture abnormal observations. The first and second weight components are then multiplied to obtain a fusion weight. Based on the fusion weight, the observation factors are updated to obtain an updated factor graph optimization model. This model can simultaneously integrate deep quality priors and real-time residual verification constraints, achieving dual-dimensional joint weighting to suppress low-quality abnormal observations and strengthen the constraint ratio of high-reliability effective observations. Finally, the updated factor graph optimization model is solved until it converges, yielding the final positioning result. This significantly reduces the negative impact of interfering observations on iterative solutions, avoids solution oscillations and positioning drift caused by abnormal observations, and significantly improves the convergence stability and the accuracy and robustness of the final positioning result in complex occlusion and noise mutation scenarios.
[0137] Figure 3 A schematic diagram of the third factor graph-based localization method provided in this application is shown. Figure 3 As shown, the method may include the following steps: S301: Obtain the historical solver parameters output by the adaptive control network, and filter them based on the historical solver parameters and the current solver parameters to obtain the filtered solver parameters.
[0138] In this embodiment, the parameter values output by the adaptive control network based on solver telemetry data are easily affected by instantaneous scene disturbances, such as sudden occlusion or single-epoch residual anomalies, leading to instantaneous jitter in the solver parameters. If the solver is updated directly using parameters from a single output, it will cause frequent changes in the solver parameters, triggering solver oscillations and reducing positioning stability. By filtering the historical solver parameters with the current solver parameters, instantaneous jitter can be eliminated, resulting in smooth filtered parameters and allowing for more stable solver parameter adjustment. Here, the historical solver parameters refer to the damping coefficients and sliding windows output by the adaptive control network in the previous N epochs (e.g., 3 to 5 epochs).
[0139] In one example, an exponential moving average (EMA) can be used for filtering.
[0140] In another example, to make the filtered solver parameters more closely match the current scenario, a time decay weight can be used for filtering, that is, historical parameters that are closer to the present are given higher weights, and parameters that are farther away are given lower weights.
[0141] In another example, the filter coefficients can be dynamically adjusted based on the scene recognition results to achieve scene-adaptive filtering strength. Specifically, when the terminal is identified as being in a rapidly changing scene area (such as the boundary between an urban canyon and an open area), a larger filter coefficient is selected to enable the solver to respond quickly to scene changes; when the terminal is identified as being in a stable scene area (such as an open area or the interior of a deep urban canyon), a smaller filter coefficient is selected to enhance the filtering effect and suppress noise interference. Scene recognition can be comprehensively judged using indicators such as gating ratio, residual P90, and Hessian condition number from telemetry data.
[0142] S302: Compare the filtered solver parameters with the preset uplink trigger threshold and downlink reset threshold.
[0143] In this embodiment, even after filtering, the solver parameters may still drift slowly due to continuous changes in the scene. If the solver is updated immediately after each parameter change following filtering, frequent adjustments may still occur, affecting the solver's stability. Therefore, a hysteresis comparison mechanism needs to be introduced, using a hysteresis interval formed by an uplink trigger threshold and a downlink reset threshold to control the triggering conditions for parameter updates.
[0144] S303: If the filtered solver parameters are less than or equal to the downlink reset threshold, the solver parameters will be restored to the preset baseline parameters.
[0145] In this embodiment, when the filtered solver parameters are less than or equal to the downlink reset threshold, it indicates that the current positioning scenario has returned to normal, such as the sudden disappearance of obstructions, reduction of multipath interference, recovery of base station signals, or parameter output deviation caused by instantaneous abnormalities in telemetry data. If the solver parameters are adjusted to the filtered parameters at this time, they will not be suitable for the current scenario, resulting in inaccurate positioning. Therefore, restoring the solver parameters to the preset baseline parameters can avoid discrepancies in the filtered parameters caused by sudden changes in the scenario. In one example, the preset baseline parameters can be the parameters solved after the previous filtering.
[0146] S304: If the filtered solver parameters are greater than the downlink reset threshold and less than or equal to the uplink trigger threshold, then keep the current solver parameters unchanged.
[0147] In this embodiment, when the filtered parameters are within the hysteresis interval, that is, when the filtered solver parameters are greater than the downlink reset threshold and less than or equal to the uplink trigger threshold, it indicates that although the current scene has changed, the degree of change recovery is insufficient to trigger an update. Keeping the parameters unchanged can avoid frequent adjustments, maintain the stability of the solver, and prevent the positioning results from oscillating due to parameter jitter.
[0148] S305: If the filtered solver parameters are greater than the uplink trigger threshold, then update the solver parameters to the filtered solver parameters.
[0149] In this embodiment, when the filtered parameters are greater than the uplink trigger threshold, it indicates that the current scene has changed, such as moving from an open area into an urban canyon. At this time, it is necessary to adjust the solver parameters to adapt to the new environment. The filtered parameters are applied to the solver so that the solver can respond to scene changes in a timely manner.
[0150] In another example, to avoid convergence oscillations caused by expanding the sliding window, the number of the filtered sliding window is not updated immediately even if the filtered window parameter is greater than the uplink trigger threshold; the sliding window update operation is only performed when the model descent ratio of the most recent preset epoch is greater than 0 and all iteration updates are successfully accepted; if any iteration is rejected, the sliding window update operation is delayed to ensure that the sliding window update action is only performed when the optimization state is stable and reliable.
[0151] In this embodiment, when the solver parameters output by the adaptive control network are obtained, they are not updated immediately. Instead, they are filtered based on historical and current solver parameters to obtain filtered solver parameters. This effectively suppresses instantaneous parameter jitter caused by telemetry data noise and network output fluctuations, making the change of solver parameters smoother and more continuous. Furthermore, the filtered solver parameters are compared with preset uplink trigger thresholds and downlink reset thresholds. Only when the filtered parameters are greater than the uplink trigger threshold are the solver parameters updated to the filtered parameters. Alternatively, when the filtered parameters are less than the downlink reset threshold, the solver parameters are restored to the preset baseline parameters. When the filtered parameters are within the hysteresis interval, the current parameters remain unchanged, thereby avoiding frequent parameter switching near the threshold and preventing the solver from oscillating due to repeated parameter adjustments.
[0152] Figure 4 A schematic diagram of the fourth factor graph-based localization method provided in this application is shown. Figure 4 As shown, the method may include the following steps: S401: When the gating ratio in the telemetry data exceeds the preset first threshold, or the robust kernel function statistic exceeds the preset second threshold, switch to a simplified factor graph containing only some observation factors for solving; the gating ratio refers to the ratio of the number of abnormal observation factors with gating channel weights lower than the preset confidence threshold to the total number of all valid observation factors.
[0153] In this embodiment, real-world positioning scenarios frequently encounter occlusion and multipath interference, generating a large number of low-quality anomalous observation factors. These anomalous observation factors can lead to a significant increase in residuals, a severe deviation of the linearized model from reality, and consequently, problems such as solver iteration divergence, deterioration of the Hessian matrix condition number, and a sharp decrease in convergence speed. Therefore, it is necessary to determine whether a simplified factor graph should be used for solving the problem by judging whether the gating ratio and robust kernel function statistics exceed preset thresholds, in order to avoid the decrease in positioning accuracy or even positioning failure caused by anomalous observation factors.
[0154] It should be noted that the gating ratio refers to the ratio of the number of abnormal observation factors with gating channel weights lower than a preset confidence threshold among all valid observation factors participating in the solution at the current epoch to the total number of all valid observation factors. The larger the gating ratio, the more severe the current multipath and NLOS interference, and the fewer the available observation factors. The robust kernel function statistic refers to a quantitative indicator calculated based on the robust kernel function or residual distribution statistics to measure the degree of abnormality of the observation factors. It reflects the degree to which the overall observation residual deviates from the normal distribution.
[0155] In one example, there are several ways to calculate the robust kernel function statistic, such as: it can be calculated based on the 90th percentile (P90) of the whitened residuals; it can be calculated based on the average of the Huber robust weights; it can be calculated based on the average of the Student-t robust weights; it can be calculated based on the robust weighted sum of squared residuals; or it can be calculated based on the ratio of the root mean square (RMS) of the whitened residuals to the median absolute deviation (MAD).
[0156] In another example, a simplified factor graph refers to a factor graph model that retains only a subset of observation factors, such as 5G-only (retaining only 5G observation factors), GNSS-only (retaining only GNSS observation factors), or Smooth-only (retaining only IMU observation factors). Furthermore, simplified factor graphs can employ finer-grained degradation strategies, such as removing only one type of observation factor. The specific calculation process for switching to a simplified factor graph containing only a subset of observation factors is as follows: factors are grouped and categorized according to their observation source; the gating ratio and robust kernel function statistics for GNSS, 5G, and IMU observation factors are calculated separately; and observation factors exceeding a preset first or second threshold are deleted, thus obtaining the simplified factor graph.
[0157] S402: Continuously monitor the telemetry data. When the gating ratio drops below the third threshold and the robust kernel function statistic drops below the fourth threshold, switch the simplified factor graph to the factor graph optimization model.
[0158] In this embodiment, the simplified factor graph is used to eliminate abnormal observation factors in harsh scenarios with severe multipath interference and dense NLOS interference, thereby avoiding the decrease in positioning accuracy or even positioning failure caused by abnormal observation factors. However, once the obstruction disappears, multipath interference weakens, and the surrounding positioning environment returns to normal, the simplified factor graph, due to the removal of a large number of effective observation constraints, is prone to insufficient observation redundancy and limited positioning accuracy. To ensure positioning accuracy and fully utilize all observation factors, it is necessary to switch the simplified factor graph back to the complete factor graph optimization model promptly after the environment stabilizes.
[0159] It should be noted that this step only determines that the environment has continuously returned to normal when the gating ratio falls back to within the third threshold and the robust kernel function statistic falls back to within the fourth threshold. Compared with single index judgment, this can avoid the frequent switching of the model caused by instantaneous noise fluctuations and improve the stability of the solver operation.
[0160] In one example, the degree of environmental recovery can be divided into three levels—mild recovery, moderate recovery, and complete recovery—based on the decline of the gating ratio and robust kernel function statistics compared to the third or fourth threshold. Simultaneously, a fixed recovery priority is pre-set for various observation factors according to the degree of anomaly in observation quality (i.e., the extent to which it exceeds the first or second threshold). Specifically: when only a mild recovery level is reached, only the observation factors with the best quality are prioritized for recovery; when the indicators decline to the moderate recovery level, moderate-quality observation factors are gradually added; this avoids sudden changes in matrix dimensions and drastic fluctuations in residuals caused by a large number of observation factors being added instantaneously, effectively suppressing solution oscillations.
[0161] In this embodiment, to ensure the availability and stability of positioning in complex environments, when the gating ratio in the telemetry data exceeds a preset first threshold (indicating a severe shortage of available observations) or the robust kernel function statistic exceeds a preset second threshold (indicating a large number of abnormal observations), the system automatically switches to a simplified factor graph containing only some observation factors for solving. This allows for the rapid acquisition of stable and usable positioning results by simplifying constraints and reducing optimization complexity, avoiding positioning interruptions caused by solver failures, in cases where full factor graph optimization may diverge or time out. Furthermore, when the gating ratio drops below the third threshold and the robust kernel function statistic drops below the fourth threshold (indicating that the environment has recovered well), the simplified factor graph is smoothly switched back to the full factor graph optimization model. This allows for the reuse of multi-source heterogeneous observation information and the restoration of high-precision positioning capabilities when environmental conditions permit.
[0162] Figure 5 A schematic diagram of a positioning device based on factor graph optimization provided in this application is shown. Figure 5 As shown, the factor graph-based localization device 500 provided in this application includes: Module 501 is used to construct a factor graph optimization model by using multi-source positioning observation data as observation factors of the factor graph and positioning results to be estimated as state nodes of the factor graph. The solver module 502 is used to iteratively solve the factor graph optimization model based on the solver, and to collect telemetry data reflecting the operating status of the solver during the iterative solution process; Output module 503 is used to input telemetry data into an adaptive control network, so that the adaptive control network outputs solver parameters based on the telemetry data to adjust the solver. The update module 504 is used to update the solver based on the solver parameters, and return to execute the step of iteratively solving the factor graph optimization model based on the solver based on the updated solver until the preset convergence condition is met, so as to obtain the final positioning result of the factor graph optimization model solved by the solver.
[0163] In one example, the solver module 502 includes: The first acquisition submodule is used to acquire a first weight component generated by the deep learning model based on the quality features of the observed data, and at least one second weight component generated based on the residual; wherein the residual is determined based on the estimated value of the current state node in each iteration solution.
[0164] The calculation submodule is used to multiply the first weight component and the second weight component to obtain the fused weight, and update the observed factors based on the fused weight to obtain the updated factor graph optimization model; The solution submodule is used to solve the updated factor graph optimization model until the factor graph optimization model converges, and the final positioning result is obtained.
[0165] In one example, the solver module 502 includes: The whitening processing submodule is used to whiten the residuals to obtain the whitened residuals of each observation factor; A generation submodule is used to generate at least one second weight component based on the whitening residual.
[0166] In one example, update module 504 includes: The second acquisition submodule is used to acquire the historical solver parameters output by the adaptive control network, and to filter the historical solver parameters and the current solver parameters to obtain the filtered solver parameters. The comparison submodule is used to compare the filtered solver parameters with preset uplink trigger thresholds and downlink reset thresholds; The processing submodule is used to restore the solver parameters to the preset reference parameters if the filtered solver parameters are less than or equal to the downlink reset threshold. The processing submodule is also used to keep the current solver parameters unchanged if the filtered solver parameters are greater than the downlink reset threshold and less than or equal to the uplink trigger threshold. The processing submodule is also used to update the solver parameters to the filtered solver parameters if the filtered solver parameters are greater than the uplink trigger threshold.
[0167] In one example, the factor graph-based localization device 500 also includes: The switching module is used to switch to a simplified factor graph containing only some observation factors for solving when the gating ratio in the telemetry data exceeds a preset first threshold or the robust kernel function statistic exceeds a preset second threshold. The gating ratio refers to the ratio of the number of abnormal observation factors with gating channel weights lower than a preset confidence threshold to the total number of all valid observation factors.
[0168] The monitoring module is used to continuously monitor telemetry data. When the gating ratio drops below the third threshold and the robust kernel function statistic drops below the fourth threshold, the simplified factor graph is switched to the factor graph optimization model.
[0169] In one example, the factor graph-based localization device 500 also includes: The processing module is used to maintain the size of the sliding window at a preset sliding window size when the length of the sliding window is greater than a preset threshold during the iterative solution process. The edge module is used to edge-process the earliest historical state nodes and their associated observation factors that exceed the preset sliding window size; The transformation module is used to convert marginalized information into prior factors and add them to the current factor graph optimization model.
[0170] In one example, the solution submodule is also used for: iterative solution using a two-layer iterative structure of outer iterative reweighted least squares and inner optimization solver; the inner optimization solver is at least one of Gauss-Newton, Levenberg-Marquardt, or incremental smoothing and mapping; in each iteration, the observation equation is linearized and the normal equation is assembled, and the state increment is solved by Schur complement elimination and sparse matrix decomposition; whether to accept the current state update is determined based on the model descent ratio; whether the convergence condition is met is determined based on the relative descent of the objective function or the norm of the state update step size, and if the condition is met, the iteration is stopped and the final localization result is obtained.
[0171] In one example, the factor graph-based localization device 500 also includes: The third acquisition module is used to acquire the process log stored during the multiple iterations of the solution process. The process log includes the observation data, quality characteristics, residuals, telemetry data and the corresponding final positioning results for each epoch. The first training module is used to train the deep learning model based on the observation data, quality features, residuals and corresponding final positioning results in the process log. The second training module is used to train the adaptive control network based on the telemetry data in the process log and the corresponding final positioning results.
[0172] Figure 6 A schematic diagram of the hardware structure of the electronic device provided in this application is shown. The electronic device 600 includes a processor 601 and a memory 602 storing computer program instructions.
[0173] Specifically, the processor 601 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0174] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 602 may include removable or non-removable (or fixed) media, or memory 602 may be a non-volatile solid-state memory.
[0175] In one instance, memory 602 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0176] Memory 602 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.
[0177] The processor 601 reads and executes computer program instructions stored in the memory 602 to implement a localization method based on factor graph optimization in the above embodiment.
[0178] In one example, the electronic device may also include a communication interface 603 and a bus 604. Wherein, as... Figure 6 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 604 and complete communication with each other.
[0179] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0180] Bus 604 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 604 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0181] Furthermore, in conjunction with the factor graph-based localization method described in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the factor graph-based localization methods described in the above embodiments.
[0182] This application also provides a computer program product, including a computer program, which, when executed, implements any of the factor graph-based localization methods described in the above embodiments.
[0183] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0184] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0185] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0186] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0187] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and servers described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A localization method based on factor graph optimization, characterized in that, include: The observed factors are constructed based on multi-source positioning observation data to form a factor graph. The positioning results to be estimated are used as state nodes of the factor graph to construct a factor graph optimization model. The factor graph optimization model is iteratively solved based on the solver, and telemetry data reflecting the operating status of the solver is collected during the iterative solution process. The telemetry data is input into the adaptive control network, which then outputs solver parameters based on the telemetry data to adjust the solver. The solver is updated based on the solver parameters, and the step of iteratively solving the factor graph optimization model based on the solver is returned based on the updated solver until the preset convergence condition is met, so as to obtain the final positioning result of the factor graph optimization model solved by the solver.
2. The method according to claim 1, characterized in that, The iterative solution of the factor graph optimization model based on the solver includes: Obtain a first weight component generated by a deep learning model based on the quality features of the observed data, and at least one second weight component generated based on the residual; wherein the residual is determined based on the estimated value of the current state node in each iteration solution; The first weight component and the second weight component are multiplied to obtain the fused weight, and the observed factors are updated based on the fused weight to obtain the updated factor graph optimization model; The updated factor graph optimization model is solved until it converges, and the final localization result is obtained.
3. The method according to claim 2, characterized in that, Before obtaining the first weight component generated by the deep learning model based on the quality features of the observed data, and at least one second weight component generated based on the residual, the process further includes: The residuals are whitened to obtain the whitened residuals of each observation factor; At least one second weighting component is generated based on the whitening residual.
4. The method according to claim 1, characterized in that, The step of updating the solver based on the solver parameters includes: Obtain the historical solver parameters output by the adaptive control network, and filter them based on the historical solver parameters and the current solver parameters to obtain the filtered solver parameters. The filtered solver parameters are compared with preset uplink trigger thresholds and downlink reset thresholds; If the filtered solver parameters are less than or equal to the downlink reset threshold, the solver parameters are restored to the preset baseline parameters. If the filtered solver parameters are greater than the downlink reset threshold and less than or equal to the uplink trigger threshold, then the current solver parameters remain unchanged. If the filtered solver parameters are greater than the uplink trigger threshold, then the solver parameters are updated to the filtered solver parameters.
5. The method according to claim 1, characterized in that, Also includes: When the gating ratio in the telemetry data exceeds the preset first threshold, or the robust kernel function statistic exceeds the preset second threshold, the solution is switched to a simplified factor graph containing only some observation factors; the gating ratio refers to the ratio of the number of abnormal observation factors with gating channel weights lower than the preset confidence threshold to the total number of all valid observation factors. The telemetry data is continuously monitored. When the gating ratio drops below the third threshold and the robust kernel function statistic drops below the fourth threshold, the simplified factor graph is switched to the factor graph optimization model.
6. The method according to claim 1 or 2, characterized in that, Also includes: During the iterative solution process, when the length of the sliding window exceeds a preset threshold, the size of the sliding window is maintained at the preset sliding window size. Marginalize the historical state nodes and their associated observation factors that exceed the preset sliding window size at the earliest time. The marginalized information is transformed into prior factors and added to the current factor graph optimization model.
7. The method according to claim 2, characterized in that, The process of solving the updated factor graph optimization model until it converges and obtaining the final localization result includes: A two-layer iterative structure of outer-layer iterative reweighted least squares and inner-layer optimization solver is used for iterative solution; the inner-layer optimization solver is at least one of Gauss-Newton, Levenberg-Marquardt, or incremental smoothing and mapping. In each iteration, the observation equation is linearized and the normal equation is assembled. The state increment is solved by the Schur complement elimination method and sparse matrix decomposition. Whether to accept the current status update is determined based on the model's descent ratio; The convergence condition is determined by the relative decrease of the objective function or the norm of the state update step size. If the convergence condition is met, the iteration stops and the final localization result is obtained.
8. The method according to claim 2, characterized in that, Also includes: Obtain the process log stored during multiple iterations of the solution process. The process log includes the observation data, quality characteristics, residuals, telemetry data and the corresponding final positioning results for each epoch. The deep learning model is trained based on the observation data, quality features, residuals, and corresponding final localization results in the process log. The adaptive control network is trained based on the telemetry data in the process log and the corresponding final positioning results.
9. A positioning device based on factor graph optimization, characterized in that, The device includes: The module is used to construct a factor graph optimization model by using multi-source positioning observation data as observation factors of the factor graph and the positioning results to be estimated as state nodes of the factor graph. The solution module is used to iteratively solve the factor graph optimization model based on the solver, and to collect telemetry data reflecting the operating status of the solver during the iterative solution process; The output module is used to input the telemetry data into the adaptive control network, so that the adaptive control network outputs solver parameters for adjusting the solver based on the telemetry data. The update module is used to update the solver based on the solver parameters, and return to execute the step of iteratively solving the factor graph optimization model based on the solver based on the updated solver until a preset convergence condition is met, so as to obtain the final positioning result of the factor graph optimization model solved by the solver.
10. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement a localization method based on factor graph optimization as described in any one of claims 1-9.
11. A computer-readable storage medium, characterized in that, The computer storage medium stores computer program instructions, which, when executed by a processor, implement a localization method based on factor graph optimization as described in any one of claims 1-10.
12. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs a localization method based on factor graph optimization as described in any one of claims 1-11.