Vision Transform-based difference degree feedback closed-loop optimization cooperative positioning method
By using waveform difference calculation based on Vision Transformer and optimization using the alternating direction multiplier method, the problem of insufficient wireless positioning accuracy in complex indoor environments was solved, and efficient and stable multi-node collaborative positioning was achieved.
Patent Information
- Application Number
- CN202511618853.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-02-13
AI Technical Summary
Existing wireless positioning technologies lack sufficient positioning accuracy in complex indoor environments, especially when GNSS signals are weak or malfunctioning, making it difficult to meet practical application requirements. Furthermore, cooperative positioning methods suffer from high computational complexity and slow convergence speed when the number of nodes is large.
A waveform difference calculation mechanism based on Vision Transformer is adopted. The time-frequency features of the signal are extracted by short-time Fourier transform, and global semantic features are extracted by ViT model to construct a difference index. A dynamic cooperative message function is introduced into the Bayesian posterior estimation framework and optimized by the alternating direction multiplier method to achieve efficient multi-node cooperative localization.
It improves positioning accuracy and stability in complex channel environments, reduces computational complexity, and enhances system real-time performance and engineering feasibility.
Smart Images

Figure BDA0005675176970000041 
Figure BDA0005675176970000045 
Figure BDA0005675176970000046
Abstract
Description
Technical Field
[0001] This invention relates to the field of ubiquitous wireless positioning technology, specifically to a VisionTransformer-based differential feedback closed-loop optimization positioning method for indoor environments, and particularly to the extension of cooperative positioning based on non-cooperative closed-loop positioning. Background Technology
[0002] Indoor positioning, as a core supporting technology for the development of the Internet of Things and smart cities, has received widespread attention in recent years. In complex indoor environments, Global Navigation Satellite System (GNSS) signals are easily blocked or attenuated inside buildings, resulting in weak or even completely ineffective GNSS signals, making it difficult to meet practical application requirements. Therefore, developing wireless positioning technologies suitable for complex indoor environments has become a research hotspot.
[0003] In recent years, the concept of Digital Twin (DT) has been introduced into wireless positioning systems. Previous research has proposed a closed-loop optimization positioning method based on DT. Wireless signal digital twins reproduce complex physical spaces, simulating the electromagnetic signal transmission paths of the node to be located at different locations in the digital space. These paths are then compared with the received waveforms of the signal receiver in the physical space, selecting the optimal location consistent with the received signal in the physical world as the positioning result. This type of method is no longer limited to extracting specific parameters but starts from the perspective of "waveform matching," utilizing the overall structural characteristics of the signal for positioning, thus possessing stronger anti-interference capabilities and higher accuracy. However, the calculation of waveform difference relies on Euclidean distance and cross-correlation coefficients, limiting its ability to model global semantic features in the time-frequency domain. It struggles to capture subtle yet crucial local changes and long-range dependencies in complex channel environments, thus restricting the improvement of positioning accuracy.
[0004] Furthermore, cooperative positioning technology, as an important means to improve the positioning performance of wireless networks, has gained widespread attention in indoor positioning scenarios. Its core idea is to achieve cooperative estimation of the location of unknown nodes through information sharing and joint optimization among nodes, thereby maintaining high positioning stability even in environments with high measurement noise or sparse reference nodes. Early research mainly focused on explicit physical parameter modeling, using measurements such as received signal strength, time of arrival, time difference of arrival, or angle of arrival to construct geometric constraints, and employing methods such as least squares, maximum likelihood, or Bayesian inference for joint location estimation. To enhance the robustness of the algorithm, some studies further integrate multi-source measurement information, introducing weighted least squares or Kalman filtering frameworks for dynamic state estimation to alleviate the instability of single parameters in complex environments. With the increase in network scale and system complexity, distributed and graph optimization methods have gradually become research focuses. Graph optimization frameworks model the relationship between node locations and measurements as a factor graph and use nonlinear optimization algorithms such as the Gauss-Newton method and the Levenberg-Marquardt method to solve for the global optimum. Meanwhile, message-passing algorithms, by passing local confidence information within graph structures, achieve decentralized inference and asymptotic convergence, providing a scalable solution approach for large-scale cooperative localization systems. In recent years, learning-based methods have been introduced into cooperative localization tasks, automatically modeling node topology and measurement dependencies in a data-driven manner, directly regressing positions from raw signal data, significantly reducing reliance on explicit physical models. Overall, cooperative localization technology is evolving towards a fusion of model-driven and data-driven approaches, and centralized and distributed cooperative optimization. However, these methods remain susceptible to accumulated errors when the number of nodes is large. Furthermore, the coupling of position variables introduced by the cooperative mechanism makes the optimization problem indivisible, resulting in high computational complexity and slow convergence.
[0005] To address the aforementioned problems, this invention proposes a collaborative localization method based on Vision Transformer (ViT) with differential feedback closed-loop optimization. First, a ViT-based waveform differential calculation mechanism is designed. This involves generating a logarithmic amplitude spectrum by performing a short-time Fourier transform (STFT) on the physically received signal and the twin simulation signal. The global semantic features are then extracted using ViT's self-attention mechanism. A highly representative differential index is constructed using cosine similarity to achieve high-precision waveform differential calculation. Based on this, a collaborative localization model based on differential feedback is built. The twin waveforms generated by each neighbor node at its estimated location are compared with the local measured signal to form a dynamic collaborative message function. This function is then integrated into the Bayesian posterior estimation framework as an auxiliary likelihood term, achieving multi-source information fusion. Finally, consensus variables and Lagrange multipliers are introduced, and the Alternating Direction Method of Multipliers (ADMM) optimization framework is used to decouple the originally coupled joint estimation problem into parallel solvable local optimization subproblems, achieving efficient convergence of the entire network's location estimation. Summary of the Invention
[0006] This invention provides a collaborative localization method based on Vision Transformer's difference feedback closed-loop optimization, comprising the following steps:
[0007] Step 1: Calculation of waveform difference based on Vision Transformer
[0008] This invention proposes a waveform difference calculation method based on Vision Transformer. Compared to existing research that relies on waveform sampling to calculate difference, this method possesses stronger global modeling capabilities and the ability to perceive local feature changes. Specifically, existing research deploys multiple base stations in the physical world and maps them to the virtual world to construct a multi-dimensional joint closed-loop optimized positioning model. Building upon this, this invention synchronously samples the physical received signal and the twin received signal, extracts their time-frequency features through short-time Fourier transform, and constructs a two-dimensional logarithmic amplitude spectrum. Subsequently, the ViT model is used to divide the time-frequency spectrum into fixed-size patches, and these patches are combined with position encoding input into a deep Transformer network to extract the global semantic feature representation of the waveform. Finally, a difference index is constructed by calculating the cosine similarity between the two waveforms in the feature space.
[0009] Step 2: Construction of a Cooperative Localization Model Based on Waveform Difference Feedback
[0010] This invention, based on multi-base station waveform difference feedback modeling, introduces a cooperative positioning mechanism to construct a node cooperative positioning mathematical model based on difference feedback. By treating neighboring nodes as dynamic auxiliary positioning sources, each node exchanges twin waveforms generated from its estimated location in each iteration, compares them with the received real signal, calculates the difference, and forms a message function. Each node integrates observation information from the base station, cooperative messages from neighboring nodes, and prior location distribution to update its posterior location estimate, and further generates new twin waveforms to feed back to neighboring nodes, achieving difference-driven cooperative optimization. Through multiple iterations, the system gradually converges to a consistent location estimation result across the entire network under the difference feedback mechanism.
[0011] Step 3: A joint optimization method for posterior estimation based on the alternating direction multiplier method
[0012] This invention introduces consensus variables and Lagrange multipliers, transforming the originally coupled cooperative localization optimization problem into a structurally decoupled distributed optimization framework. It employs ADMM to implement an efficient cooperative update mechanism between nodes based on difference feedback. While preserving local independent computational capabilities, it iteratively coordinates node estimation results with the network consensus state, gradually approximating the jointly optimal posterior position estimation solution. Compared with global optimization methods such as Newton's method, this method possesses advantages such as strong numerical stability, low computational overhead, good parallelism, and ease of deployment, making it suitable for cooperative localization scenarios with frequent inter-node interactions and high real-time requirements.
[0013] Compared with the prior art, the advantages of the present invention are:
[0014] (1) This invention introduces Vision Transformer to perform time-frequency diagram processing and global feature extraction on the physical received signal and twin simulation signal, comprehensively characterizes the global semantic structure and key local changes of the signal, and realizes high-precision measurement of waveform differences in complex channel environments.
[0015] (2) Based on the difference feedback, the present invention constructs a multi-node cooperative positioning model. Each node generates a twin waveform at its estimated position and compares it with the local measured signal to form a dynamic cooperative message function. Through the information interaction between neighboring nodes, multi-source information fusion and joint optimization are realized, so that the system can still maintain high positioning accuracy and stability when the node distribution is sparse or the channel conditions are complex.
[0016] (3) To address the problem of high coupling of location variables among multiple nodes and high computational complexity in collaborative positioning, this invention introduces consensus variables and Lagrange multipliers, and uses the alternating direction multiplier method to decompose the coupled multi-node joint optimization problem into local subproblems that can be solved in parallel, thereby improving the real-time performance and engineering feasibility of the positioning system. Attached Figure Description
[0017] Figure 1 This is a framework diagram of the implementation of the Vision Transformer-based differential feedback closed-loop optimization collaborative localization method of this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0019] This invention provides a collaborative localization method based on Vision Transformer's difference feedback closed-loop optimization, as shown in the attached figure. Figure 1 As shown, this method designs a waveform difference calculation mechanism for ViT, generates a logarithmic amplitude spectrum of the physically received signal and the twin simulation signal using STFT, and extracts its global semantic features using ViT's self-attention mechanism. Then, it constructs a highly representative difference index through cosine similarity to achieve high-precision waveform difference calculation. Furthermore, it designs a collaborative message passing mechanism based on difference feedback, constructing a joint posterior estimation model using the difference between the twin waveforms generated by neighboring nodes and the locally measured signal, achieving dynamic information sharing and joint optimization among multiple nodes. Finally, it introduces ADMM to structurally decouple the coupled optimization problem, achieving efficient and stable full-network position convergence through an iterative process of local update, consensus synchronization, and multiplier correction.
[0020] The implementation of the system of the present invention is described in the following three parts.
[0021] Step 1: Waveform Difference Calculation Method Based on Vision Transformer
[0022] In the positioning system, the node X to be located sends signals to multiple base stations R1, R2, ..., R... m The signal received by the base station may include direct paths as well as multiple reflections and scattering paths. The i-th base station R i The received signal can be represented as
[0023]
[0024] in, It is base station R i The signal received at time t, s(t) is the transmitted signal, L is the number of paths, l∈L, a l θ is the path attenuation coefficient. l It is phase information, ω l For the Doppler frequency shift, τ i The path propagation delay is used. Ray tracing simulation generates simulated waveforms by calculating the signal characteristics of different paths. In the twin world, let the virtual node to be located be X. * and corresponding virtual base stations The received simulation signal is represented as
[0025]
[0026] By comparing the received signals from the physical world and the twin world at the same base station, the waveform difference is calculated, and this difference is used to iteratively optimize X. * The position is gradually brought closer to the actual position of the node to be located, X.
[0027] To quantify the differences in waveform reception between the virtual and real worlds, this paper proposes a waveform difference calculation method based on ViT. First, both types of signals are sampled synchronously to construct time-domain vector sequences.
[0028]
[0029] Among them, t k = kΔt, where Δt is the sampling interval, K is the total number of sampling points, and i represents the i-th base station (i = 1, 2, ..., M, where M is the total number of base stations). Next, a short-time Fourier transform is used to map the signal from the time domain to the time-frequency joint space, capturing the local temporal spectral variation characteristics of the signal. Taking a physical waveform as an example, its time-frequency expression is:
[0030]
[0031] Where N is the window length, ω[·] is the window function, H is the frame shift length, t is the time frame index, and k is the frequency index. The resulting spectrum... It is a two-dimensional complex matrix representing the complex-valued spectral intensity at F frequency points and T time frames. To better represent the energy distribution of the signal, the spectrum is transformed into a logarithmic magnitude spectrum.
[0032]
[0033] Where |S p | indicates a complex magnitude. It is a minimal constant to prevent underflow (e.g., 10). -6 Similarly, processing the simulated waveform s v Amplitude spectrum A is obtained v Both amplitude spectra are considered as time-frequency images.
[0034] Input the time-frequency image into ViT. ViT first processes the image... Divided into several non-overlapping patch blocks
[0035]
[0036] Each patch is flattened into a vector. Where D = P 2 After concatenating all patches into a sequence, learnable classification labels are added to form the input tensor of the Transformer.
[0037]
[0038] Further positional encoding is added to preserve the patch order relationship. The positional encoding is constructed using a sine-cosine function.
[0039]
[0040] Add the position code to the input sequence
[0041] Z (0) =V+E pos (9)
[0042] The sequence is input to an L-layer Transformer encoder, each layer containing a multi-head self-attention module (MSA), residual connections, and a feedforward network (FFN). In the l-th layer, the encoding is updated as follows:
[0043] Z (l) =FFN(LayerNorm(Z) (l-1) +MSA(LayerNorm(Z (l+1) )))) (10)
[0044] After L layers of processing, the [CLS] token at position 0 in the output sequence is extracted as the global feature representation.
[0045]
[0046] Let D represent the global encoding representations of the physical waveform and the twin waveform in a high-dimensional space. To measure their similarity, a cosine similarity is defined.
[0047]
[0048] Its value range is [0,1], with values closer to 1 indicating greater similarity between the two waveforms. Therefore, the waveform difference index is defined as...
[0049]
[0050] Difference The smaller the value, the better the virtual node X. * The closer the waveform features are to the real node X, the better they guide the optimization of the twin world, allowing the virtual node to continuously approach the real position.
[0051] Step 2: Construction of a Cooperative Localization Model Based on Waveform Difference Feedback
[0052] To further improve the robustness and accuracy of multi-node wireless positioning systems in complex environments, this invention proposes a collaborative positioning mathematical model based on virtual and real waveform difference feedback, building upon the existing multi-base station waveform difference feedback model. This method fully utilizes the communication capabilities between nodes, treating neighboring nodes as dynamic auxiliary observation sources. A collaborative observation model is established through waveform feature differences, and a message passing mechanism between nodes is designed to achieve joint iterative optimization of multi-node locations.
[0053] Specifically, the positioning network contains multiple nodes to be located, denoted as set A. Node j∈A can receive waveforms from two types of signal sources at a certain moment: one is base stations deployed in the physical space, denoted as set M, M={R1,R2,...,R... m}, node j can obtain data from each base station R i ∈M receives the actual observed waveform The second group consists of neighboring nodes that can communicate directly with node j, denoted as set B, k∈B. The signal received by node j from each neighboring node k is represented as follows: In the digital twin space, the estimated position of node j It can generate corresponding virtual waveforms By comparing with the actual waveform, a waveform difference function is constructed.
[0054]
[0055] Where D(·,·) is the difference function between waveform features extracted by ViT.
[0056] For neighbor node k, its current estimated location It can be used to generate twin signals and the physical signal received by node j Compare and calculate the degree of synergy.
[0057] This dissimilarity reflects the consistency between the signal generated by neighboring node k and the signal actually received by node j under the current location assumption, and can be regarded as auxiliary observation information of k to j. Under the Gaussian error modeling assumption, the dissimilarity can be transformed into a waveform matching likelihood function in a probabilistic sense.
[0058] For the base station, the likelihood is constructed as follows:
[0059]
[0060] For neighbor node k, construct the collaborative likelihood term.
[0061]
[0062] Based on the above model, the joint likelihood function of node j consists of two parts: one is the base station difference term based on its own location, and the other is the waveform difference term generated by neighboring nodes based on its current location.
[0063]
[0064] To achieve joint estimation, a prior probability distribution of node positions is further introduced, denoted as a Gaussian distribution.
[0065]
[0066] Construct the posterior estimated distribution of node j using Bayes' theorem.
[0067]
[0068] To achieve joint optimization of location estimation in a multi-node system, this invention further constructs a message passing mechanism based on difference feedback. In a multi-node positioning system, each node must complete two key operations in each iteration: receive difference feedback messages from neighboring nodes; and update its own location estimation.
[0069] Initially, all nodes obtain their initial position predictions by communicating with the base station.
[0070] In round t-1, all neighboring nodes k∈B have completed their own position estimates and obtained... Each neighbor node k estimates its position. Generate virtual waveforms In the physical world, node j has already received a physical signal from k. Calculate the difference between the two waveforms.
[0071]
[0072] Transform the difference into a collaborative message The message indicates that neighbor k made a judgment about j's current location based on its own location estimate.
[0073] This is considered a fixed value or constant, which will be used as a weighting coefficient in this round to guide the position correction of node j.
[0074] Node j updates by fusing signals from both information sources, and the posterior estimate of node j in round t is updated as follows:
[0075]
[0076] By maximizing this posterior distribution, a new location estimate is obtained.
[0077]
[0078] After node j obtains a new position estimate, it updates its estimated position. Used to generate new twin waveforms It is then transmitted to neighboring node k∈B, and neighboring node k will also compare the latest twin waveform from node j with the signal it received. Calculate the difference and construct the collaborative message function. This updates its posterior estimate, leading to a new round of location estimates.
[0079] This process is performed synchronously across the entire network. In each iteration, all nodes correct their positions based on the difference feedback from their neighbors and broadcast the latest twin waveforms to their neighbors for the next round of estimation updates. Through this collaborative mechanism of mutual information sources, the system constructs a factor graph structure based on waveform difference, where each node performs joint optimization based on local computation. The iterative process continues until the position estimates of all nodes meet the convergence condition.
[0080] Step 3: A joint optimization method for posterior estimation based on the alternating direction multiplier method
[0081] To efficiently solve the posterior position estimation problem of nodes in a cooperative localization model, this invention proposes a distributed optimization method based on the alternating direction multiplier method. While Newton's method theoretically has a relatively fast local convergence speed, in this invention, the node loss function involves complex waveform difference calculations and neighbor cooperation terms, making it difficult to accurately construct its second derivative (Hessian matrix). Furthermore, in practical systems, it may exhibit non-positive definiteness, huge computational overhead, or numerical instability. Moreover, Newton's method relies on globally synchronized computation, which is not conducive to parallel optimization in distributed networks. Therefore, this invention proposes a structural decoupling and parallel solution strategy based on ADMM. This method introduces a consensus variable mechanism to separate the local optimization problem of each node from the network-wide consistency constraint, achieving structural relaxation and distributed solvability of the cooperative localization problem.
[0082] The position of node j is estimated as follows Its optimization objective is to minimize the loss function corresponding to the following posterior estimate.
[0083]
[0084] The first term is the waveform difference feedback with the base station, the second term is the collaborative feedback term of neighboring nodes, and the third term is the prior distribution constraint.
[0085] Because this function includes neighbor node location estimation. The variables and loss function are coupled across multiple nodes. To address this issue, this invention introduces a consensus variable Z for each node. j And add consistency constraints consensus variable Z j This is a "replication location variable" for node j. It does not directly participate in the waveform difference calculation, but rather is a consistency variable reached between it and its neighboring nodes. Construct the following constrained optimization problem.
[0086]
[0087] In the cooperative localization problem, since each node independently optimizes its own position, this constraint cannot always be satisfied immediately. Therefore, we want to "penalize" its deviation, and thus introduce the Lagrange multiplier λ. j And construct the enhanced Lagrange function
[0088]
[0089] Where, λ j Let j be the Lagrange multiplier of node j. These are penalties, working together to drive [the process]. and Z j The convergence to uniformity is achieved, where ρ is the weight of the regularization term. Within the ADMM framework, the objective function is broken down into the following three iterative steps:
[0090] (1) Step X: Local Node Optimization
[0091] Each node is fixed. and Under the given conditions, minimize the following subproblems
[0092]
[0093] This subproblem can be executed locally on each node, utilizing existing difference feedback and neighbor waveforms, combined with lightweight algorithms such as first-order gradient descent to optimize and update.
[0094] (2) Z-step: Consensus variables are updated synchronously
[0095] Collect local estimates for all nodes Update consensus variables
[0096]
[0097] This involves weighting the position of itself and its neighbors to form a globally consistent position estimate.
[0098] (3) λ-step: Lagrange multiplier update
[0099] Each node updates its own multiplier variable.
[0100]
[0101] This term is used to measure the deviation between the local estimate and the network consensus, and to progressively estimate the entire network through feedback constraints.
[0102] The above three steps constitute an ADMM optimization process, which can be executed in parallel by all nodes. After each round completes the position update, consensus synchronization and consistency correction, the system gradually promotes the convergence of the entire network position.
[0103] As the number of iterations increases, node position estimation In consensus variable Z j Under coordination, the system gradually stabilizes. The overall system termination condition is set to satisfy the following constraints.
[0104]
[0105] Where δ1 and δ2 are the set convergence tolerance thresholds. Finally, each node outputs a stable estimation result. Complete the high-precision collaborative positioning task driven by multi-node difference feedback.
Claims
1. A collaborative localization method based on Vision Transformer's difference feedback closed-loop optimization, characterized in that, Includes the following steps: Step 1: Calculation of waveform difference based on Vision Transformer This paper proposes a waveform difference calculation method based on Vision Transformer. Compared with existing research that relies on waveform sampling to calculate the difference, this method has stronger global modeling capabilities and local feature change perception capabilities. Specifically, existing research constructs a multi-dimensional joint closed-loop optimized positioning model by deploying multiple base stations in the physical world and mapping them to the virtual world. Building upon this, this invention synchronously samples the physical received signal and the twin received signal, and extracts their time-frequency features through short-time Fourier transform. A two-dimensional logarithmic amplitude spectrum is constructed. Subsequently, the time-frequency graph is divided into fixed-size patches using the ViT model, and the positional encoding is input into a deep Transformer network to extract the global semantic feature representation of the waveform. Finally, the difference index is constructed by calculating the cosine similarity between the two sets of waveforms in the feature space. Step 2: Construction of a Cooperative Localization Model Based on Waveform Difference Feedback Based on multi-base station waveform difference feedback modeling, a cooperative localization mechanism is introduced to construct a node cooperative localization mathematical model based on difference feedback. By treating neighboring nodes as dynamic auxiliary localization sources, each node exchanges twin waveforms generated from its estimated location in each iteration, compares them with the received real signal, calculates the difference, and forms a message function. Each node integrates observation information from the base station, cooperative messages from neighboring nodes, and prior location distribution to update its posterior location estimate, and further generates new twin waveforms to feed back to neighboring nodes, achieving difference-driven cooperative optimization. Through multiple iterations, the system gradually converges to a consistent location estimation result across the entire network under the difference feedback mechanism. Step 3: A joint optimization method for posterior estimation based on the alternating direction multiplier method By introducing consensus variables and Lagrange multipliers, the original coupled cooperative localization optimization problem is transformed into a structurally decoupled distributed optimization framework. An efficient cooperative update mechanism based on difference feedback between nodes is implemented using ADMM. While preserving local independent computational capabilities, the joint optimal posterior position estimation solution is gradually approximated by iteratively coordinating node estimation results with the network consensus state. Compared with global optimization methods such as Newton's method, this method has advantages such as strong numerical stability, low computational overhead, good parallelism, and ease of deployment, making it suitable for cooperative localization scenarios with frequent inter-node interactions and high real-time requirements.
2. The method according to claim 1, characterized in that, In step one, the waveform difference calculation method based on ViT is used. First, the two types of signals are sampled synchronously to construct a time-domain vector sequence. Among them, t k = kΔt, where Δt is the sampling interval, K is the total number of sampling points, and i represents the i-th base station (i = 1, 2, ..., M, where M is the total number of base stations). Next, a short-time Fourier transform is used to map the signal from the time domain to the time-frequency joint space, capturing the local temporal spectral variation characteristics of the signal. Taking a physical waveform as an example, its time-frequency expression is: Where N is the window length, ω[·] is the window function, H is the frame shift length, t is the time frame index, and k is the frequency index. The resulting spectrum... It is a two-dimensional complex matrix representing the complex-valued spectral intensity at F frequency points and T time frames. To better represent the energy distribution of the signal, the spectrum is transformed into a logarithmic magnitude spectrum. Where |S p | indicates a complex magnitude. It is a minimal constant to prevent underflow (e.g., 10). -6 Similarly, processing the simulated waveform s v Amplitude spectrum A is obtained v Both amplitude spectra are considered as time-frequency images. Input the time-frequency image into ViT. ViT first processes the image... Divided into several non-overlapping patch blocks Each patch is flattened into a vector. Where D = P 2 After concatenating all patches into a sequence, learnable classification labels are added to form the input tensor of the Transformer. Further positional encoding is added to preserve the patch order relationship. The positional encoding is constructed using a sine-cosine function. Add the position code to the input sequence With (0) =V+E pos The sequence is input to an L-layer Transformer encoder, each layer containing a multi-head self-attention module (MSA), residual connections, and a feedforward network (FFN). In the l-th layer, the encoding is updated as follows: Z (l) =FFN(LayerNorm(Z (l-1) +MSA(LayerNorm(Z (l+1) )))) After L layers of processing, the [CLS] token at position 0 in the output sequence is extracted as the global feature representation. Let D represent the global encoding representations of the physical waveform and the twin waveform in a high-dimensional space. To measure their similarity, a cosine similarity is defined. Its value range is [0,1], with values closer to 1 indicating greater similarity between the two waveforms. Therefore, the waveform difference index is defined as... Difference The smaller the value, the better the virtual node X. * The closer the waveform features are to the real node X, the better they guide the optimization of the twin world, allowing the virtual node to continuously approach the real position.
3. The method according to claim 1, characterized in that, In step two, the positioning network contains multiple nodes to be located, denoted as set A. Node j∈A can receive waveforms from two types of signal sources at a certain moment: one is base stations deployed in the physical space, denoted as set M, M={R1,R2,...,R... m }, node j can obtain data from each base station R i ∈M receives the actual observed waveform The second group consists of neighboring nodes that can communicate directly with node j, denoted as set B, k∈B. The signal received by node j from each neighboring node k is represented as follows: In the digital twin space, the estimated position of node j It can generate corresponding virtual waveforms By comparing with the actual waveform, a waveform difference function is constructed. Where D(·,·) is the difference function between waveform features extracted by ViT. For neighbor node k, its current estimated location It can be used to generate twin signals and the physical signal received by node j Compare and calculate the degree of synergy. This dissimilarity reflects the consistency between the signal generated by neighboring node k and the signal actually received by node j under the current location assumption, and can be regarded as auxiliary observation information of k to j. Under the Gaussian error modeling assumption, the dissimilarity can be transformed into a waveform matching likelihood function in a probabilistic sense. For the base station, the likelihood is constructed as follows: For neighbor node k, construct the collaborative likelihood term. Based on the above model, the joint likelihood function of node j consists of two parts: one is the base station difference term based on its own location, and the other is the waveform difference term generated by neighboring nodes based on its current location. To achieve joint estimation, a prior probability distribution of node positions is further introduced, denoted as a Gaussian distribution. Construct the posterior estimated distribution of node j using Bayes' theorem. To achieve joint optimization of location estimation in a multi-node system, this invention further constructs a message passing mechanism based on difference feedback. In a multi-node positioning system, each node must complete two key operations in each iteration: receive difference feedback messages from neighboring nodes; and update its own location estimation. Initially, all nodes obtain their initial position predictions by communicating with the base station. In round t-1, all neighboring nodes k∈B have completed their own position estimates and obtained... Each neighbor node k estimates its position. Generate virtual waveforms In the physical world, node j has already received a physical signal from k. Calculate the difference between the two waveforms. Transform the difference into a collaborative message The message indicates that neighbor k made a judgment about j's current location based on its own location estimate. This is considered a fixed value or constant, which will be used as a weighting coefficient in this round to guide the position correction of node j. Node j updates by fusing signals from both information sources, and the posterior estimate of node j in round t is updated as follows: By maximizing this posterior distribution, a new location estimate is obtained. After node j obtains a new position estimate, it updates its estimated position. Used to generate new twin waveforms It is then transmitted to neighboring node k∈B, and neighboring node k will also compare the latest twin waveform from node j with the signal it received. Calculate the difference and construct the collaborative message function. This updates its posterior estimate, leading to a new round of location estimates. This process is performed synchronously across the entire network. In each iteration, all nodes correct their positions based on the difference feedback from their neighbors and broadcast the latest twin waveforms to their neighbors for the next round of estimation updates. Through this collaborative mechanism of mutual information sources, the system constructs a factor graph structure based on waveform difference, where each node performs joint optimization based on local computation. The iterative process continues until the position estimates of all nodes meet the convergence condition.
4. The method according to claim 1, characterized in that, In step three, by introducing a consensus variable mechanism, the local optimization problem of each node is separated from the network-wide consistency constraint, thereby achieving structural relaxation and distributed solvability of the collaborative positioning problem. The position of node j is estimated as follows Its optimization objective is to minimize the loss function corresponding to the following posterior estimate. The first term is the waveform difference feedback with the base station, the second term is the collaborative feedback term of neighboring nodes, and the third term is the prior distribution constraint. Because this function includes neighbor node location estimation. The variables and loss function are coupled across multiple nodes. To address this issue, this invention introduces a consensus variable Z for each node. j And add consistency constraints consensus variable Z j This is a "replication location variable" for node j. It does not directly participate in the waveform difference calculation, but rather is a consistency variable reached between it and its neighboring nodes. Construct the following constrained optimization problem. In the cooperative localization problem, since each node independently optimizes its own position, this constraint cannot always be satisfied immediately. Therefore, we want to "penalize" its deviation, and thus introduce the Lagrange multiplier λ. j And construct the enhanced Lagrange function Where, λ j Let j be the Lagrange multiplier of node j. These are penalties, working together to drive [the process]. and Z j The convergence to uniformity is achieved, where ρ is the weight of the regularization term. Within the ADMM framework, the objective function is broken down into the following three iterative steps: (1) Step X: Local Node Optimization Each node is fixed. and Under the given conditions, minimize the following subproblems This subproblem can be executed locally on each node, utilizing existing difference feedback and neighbor waveforms, combined with lightweight algorithms such as first-order gradient descent to optimize and update. (2) Z-step: Consensus variables are updated synchronously Collect local estimates for all nodes Update consensus variables This involves weighting the position of itself and its neighbors to form a globally consistent position estimate. (3) λ-step: Lagrange multiplier update Each node updates its own multiplier variable. This term is used to measure the deviation between the local estimate and the network consensus, and to progressively estimate the entire network through feedback constraints. The above three steps constitute an ADMM optimization process, which can be executed in parallel by all nodes. After each round completes the position update, consensus synchronization and consistency correction, the system gradually promotes the convergence of the entire network position. As the number of iterations increases, node position estimation In consensus variable Z j Under coordination, the system gradually stabilizes. The overall system termination condition is set to satisfy the following constraints. Where δ1 and δ2 are the set convergence tolerance thresholds. Finally, each node outputs a stable estimation result. Complete the high-precision collaborative positioning task driven by multi-node difference feedback.