An indoor Bluetooth positioning method, a positioning system, a storage medium and a program product

By combining particle filtering with adaptive parameter optimization, an independent noise parameter is assigned to each particle, and the noise parameter is dynamically optimized to adapt to environmental changes. This solves the problem of decreased positioning accuracy in traditional methods and achieves high-precision indoor Bluetooth positioning.

CN122179736APending Publication Date: 2026-06-09WUXI ZHENYUAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI ZHENYUAN TECH CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing particle filtering methods based on Bluetooth Received Signal Strength Indication (RSSI) are difficult to adapt to environmental changes in indoor positioning, resulting in a decrease in positioning accuracy.

Method used

A framework combining particle filtering and adaptive parameter optimization is adopted. By assigning independent noise parameters to each particle and evaluating the fitness of the parameters based on the positioning error, the noise parameters are optimized using an iterative evolution algorithm, enabling the signal propagation model to dynamically adapt to environmental changes.

Benefits of technology

It achieves high-precision Bluetooth positioning in complex and ever-changing indoor environments, ensuring the accuracy and stability of positioning results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179736A_ABST
    Figure CN122179736A_ABST
Patent Text Reader

Abstract

An indoor Bluetooth positioning method, positioning system, storage medium, and program product are disclosed, relating to the field of computer systems based on a specific computational model. The method includes: generating multiple initial particles, assigning initial noise parameters, and forming an initial particle set; calculating the predicted position of each initial particle and determining the predicted signal strength; calculating the signal likelihood, updating the initial weights of the initial particles, and obtaining updated weights and an updated particle set; calculating the number of effective particles, and when the number of effective particles is lower than a preset threshold, resampling to obtain an optimized particle set; calculating the positioning error and determining the parameter fitness of the optimized particles; determining the optimal noise parameters and guiding directional evolution to generate an optimized parameter set; after reaching a preset iteration condition, determining the globally optimal noise parameters; and determining the position calculation result based on the globally optimal noise parameters. Implementing this application can maintain Bluetooth positioning accuracy under changing indoor environmental conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer systems based on specific computational models, and more particularly to an indoor Bluetooth positioning method, positioning system, storage medium, and program product. Background Technology

[0002] With the development of wireless communication technology, the demand for location-based services is increasing. In indoor environments such as shopping malls and hospitals, satellite signals are often blocked, necessitating the use of wireless technologies such as Bluetooth for positioning. Therefore, developing high-precision and highly adaptable indoor positioning technologies has become a current research focus to meet the needs of applications such as indoor navigation and asset tracking.

[0003] In related technologies, a particle filtering method based on Bluetooth Received Signal Strength Indication (RSSI) is employed for positioning. This scheme involves deploying Bluetooth beacons in the environment and manually measuring and calibrating a fixed set of signal propagation model parameters beforehand. During positioning, the terminal receives RSSI values ​​and uses the fixed model parameters and a particle filtering algorithm to estimate the target position. The algorithm predicts the target position using a motion model, updates the particle weights by combining RSSI ranging information, and finally obtains the positioning result through a weighted average.

[0004] However, when the indoor environment changes, such as the movement of people or the placement of items, the actual signal propagation characteristics will deviate from the original model. The parameters of the original model are difficult to adapt to this change, which will lead to deviations in the particle weights calculated based on these parameters, and thus reduce the accuracy of the particle filtering positioning results. Summary of the Invention

[0005] This application provides an indoor Bluetooth positioning method, positioning system, storage medium, and program product for maintaining Bluetooth positioning accuracy under changing indoor environmental conditions.

[0006] Firstly, this application provides an indoor Bluetooth positioning method for use in a positioning system. The method includes: generating multiple initial particles containing initial location information, initial motion state, and initial weights, and assigning initial noise parameters to each initial particle to form an initial particle set; calculating the predicted position of each initial particle in the initial particle set at the next moment according to a motion model defined by the initial motion state and initial noise parameters, and substituting the predicted position into a signal propagation model to obtain the predicted signal strength; calculating the signal likelihood of the predicted signal strength and the observed signal strength in the calibration dataset, updating the initial weights of the initial particles according to the signal likelihood, and obtaining updated weights and an updated particle set; and calculating the effective particle count of the updated particle set. The number of particles is increased, and when the number of effective particles is lower than a preset threshold, the updated particle set is resampled to obtain an optimized particle set. The positioning error between the estimated trajectory of each optimized particle in the optimized particle set and the real trajectory in the calibration dataset is calculated, and the parameter fitness of the noise parameter corresponding to the optimized particle is determined based on the positioning error. The optimal noise parameter is determined based on the parameter fitness, and other noise parameters are guided to evolve towards the optimal noise parameter to generate an optimized parameter set. The steps of generating the optimized particle set and the optimized parameter set are repeated until the preset iteration condition is reached. Then, the global optimal noise parameter is determined based on the corresponding optimized parameter set. Particle filtering positioning is performed based on the global optimal noise parameter to obtain the position calculation result.

[0007] In the above embodiments, the positioning system uses positioning error as feedback and continuously optimizes noise parameters through iterative evolution, enabling the signal propagation model and motion model to dynamically adapt to environmental changes. This solves the problem of decreased positioning accuracy when fixed parameters change in traditional methods, ensuring the accuracy of positioning results.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating the effective number of particles in the updated particle set and resampling the updated particle set to obtain an optimized particle set when the effective number of particles is lower than a preset threshold specifically includes: calculating the effective number of particles in the updated particle set; when the effective number of particles is lower than the preset threshold, multiplying the update weight of each updated particle by the total number of particles in the updated particle set to obtain the expected replication number corresponding to the updated particle; rounding down each expected replication number to obtain the deterministic replication number, and replicating each updated particle according to the deterministic replication number to form a first optimized particle; subtracting the corresponding deterministic replication number from each expected replication number to obtain the residual weight; normalizing all residual weights to obtain a normalized residual weight distribution; using the total number of particles minus the number of first optimized particles as the difference number, randomly selecting particles with the difference number from the unreplicated updated particles according to the normalized residual weight distribution to form a second optimized particle; merging the first optimized particle and the second optimized particle to form an optimized particle set.

[0009] In the above embodiments, the positioning system employs residual resampling technology, dividing the resampling process into two parts: deterministic replication and random sampling. That is, high-weight particles are deterministically retained, effectively avoiding the loss of high-quality particles due to random fluctuations. Meanwhile, random sampling of residual weights ensures the diversity of the particle set, reduces sampling variance, alleviates particle degradation problems, improves the overall quality and representativeness of the particle set, and makes the positioning results more accurate.

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating the positioning error between the estimated trajectory of each optimized particle in the optimized particle set and the real trajectory in the calibration dataset, and determining the parameter fitness of the noise parameter corresponding to the optimized particle based on the positioning error, specifically includes: performing particle filtering positioning on multiple optimized particles corresponding to the optimized particle set based on the noise parameter to obtain an estimated trajectory containing multiple position estimation points; comparing each position estimation point on the estimated trajectory with the corresponding real position point on the preset real trajectory in the calibration dataset to calculate multiple positioning error values; performing an arithmetic mean on the multiple positioning error values ​​to obtain the average positioning error; taking the reciprocal of the average positioning error and determining the corresponding reciprocal value as the parameter fitness corresponding to the noise parameter.

[0011] In the above embodiments, the positioning system closely links the quality of parameters with the final positioning accuracy. The smaller the average positioning error, the higher the parameter adaptability, ensuring that the optimization process proceeds in the direction of improving the actual positioning accuracy, enhancing the goal orientation of the adaptive framework, and making the results more accurate.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, before generating multiple initial particles containing initial position information, initial motion state, and initial weights, and assigning initial noise parameters to each initial particle to form an initial particle set, the method further includes: presetting a baseline value range for the noise parameters and a planned total number of initial particles; dividing the baseline value range into multiple equidistant parameter sub-intervals according to the planned total number of particles, so as to ensure that each parameter sub-interval corresponds to at least one initial particle to be assigned; and performing random sampling within each parameter sub-interval to generate initial noise parameters for the corresponding initial particles.

[0013] In the above embodiments, the positioning system ensures the uniform distribution of the initial noise parameter set in the entire search space by performing hierarchical random sampling in the parameter space. This avoids the initial parameters from being overly concentrated in certain areas due to random generation, ensuring the initial diversity of the parameter population, increasing the possibility of discovering high-quality solution regions in the early stages of optimization, facilitating efficient convergence to the globally optimal parameters, and improving positioning efficiency.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, before the steps of setting a reference range for the noise parameters and the planned total number of initial particles, the method further includes: acquiring a calibration dataset containing signal strength data and corresponding real position coordinates; traversing preset candidate noise parameters, calculating the positioning deviation of the calibration dataset under the corresponding parameters based on each candidate noise parameter, and generating a deviation set; extracting the minimum deviation value from the deviation set, and using the candidate noise parameter associated with the minimum deviation value as a reference parameter, and generating a reference range based on the reference parameter.

[0015] In the above embodiments, the positioning system pre-screens benchmark parameters using a calibration dataset to determine a more promising initial search range. Based on preliminary experimental data, it centers the search near parameters that are known to perform well, providing a high-quality starting point. This reduces the search time of the algorithm in invalid regions, accelerates the convergence speed, and improves the overall efficiency of the parameter optimization process.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, the step of determining the optimal noise parameter based on parameter fitness and guiding other noise parameters to evolve towards the optimal noise parameter, thereby generating an optimized parameter set, specifically includes: sorting the noise parameters in descending order according to their respective parameter fitness to generate an ordered parameter list; truncating a preset number of noise parameters from the top of the ordered parameter list to form an elite parameter subset; for non-elite noise parameters outside the elite parameter subset, randomly selecting one elite parameter from the elite parameter subset as the corresponding evolution target; calculating the update vector of each non-elite noise parameter pointing to the corresponding evolution target, and updating the non-elite noise parameters; and constructing an optimized parameter set based on all updated non-elite noise parameters and the elite parameter subset.

[0017] In the above embodiments, the positioning system retains elite parameters to ensure that the algorithm does not lose the discovered optimal solution, thus guaranteeing convergence. While guiding the population to move towards a better region, the random selection also introduces perturbations, which helps to escape local optima and enables the parameter population to evolve efficiently towards the global optimal solution, thereby improving the performance of the optimization algorithm.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, before the step of performing particle filtering localization based on globally optimal noise parameters to obtain the location calculation result, the method further includes: after reaching a preset number of iterations, determining the latest subset of elite parameters as the global elite parameter set; at each moment of performing particle filtering localization, calculating the spatial distribution gradient of the Bluetooth beacon signal strength within a preset range of the target optimized particle; the target optimized particle is a particle in the latest optimized particle set; matching the spatial distribution gradient with the environmental gradient features associated with each elite parameter in the global elite parameter set during the training phase to obtain the elite parameter with the highest matching degree; assigning the elite parameter with the highest matching degree to the target optimized particle to calculate the target signal strength and target weight of the target optimized particle.

[0019] In the above embodiments, the positioning system no longer uses a single globally optimal parameter, but selects the most matching parameter from the global elite parameter set based on the signal gradient characteristics of the particle's current location. This allows it to adapt to the changing signal propagation environment in real time, such as using different model parameters in open areas and narrow corridors, thus achieving more refined environmental adaptation and improving positioning accuracy.

[0020] In a second aspect, embodiments of this application provide a positioning system comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the positioning system to perform the method described in the first aspect and any possible implementation thereof.

[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a positioning system, cause the positioning system to perform the method described in the first aspect and any possible implementation thereof.

[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a positioning system, cause the positioning system to perform the method described in the first aspect and any possible implementation thereof.

[0023] Understandably, the positioning system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0025] 1. By employing a framework that combines particle filtering with adaptive parameter optimization—that is, assigning independent noise parameters to each particle, evaluating the fitness of the parameters based on the positioning error generated by that particle, and then guiding the parameters to converge towards the optimal direction through an evolutionary algorithm—this method enables the positioning model to dynamically adapt to environmental changes. In indoor environments, changes in the movement of people or the placement of objects can alter the propagation characteristics of Bluetooth signals, effectively solving the technical problem of fixed positioning model parameters and difficulty in adapting to dynamic environments in existing technologies. This allows for maintaining high-precision Bluetooth positioning in complex and ever-changing indoor environments.

[0026] 2. Because the method of quantifying parameter fitness is based on the positioning error between the estimated trajectory and the true trajectory using particle filter localization, that is, for each noise parameter, the complete particle filter process is run using that parameter to generate an estimated trajectory, and then the average positioning error between the estimated trajectory and the true trajectory in the calibration data is calculated, and the reciprocal of the error is used as the parameter fitness, this method provides a direct and reliable quantitative evaluation standard for the quality of noise parameters, realizes precise guidance for the parameter optimization process, and ensures the correctness and efficiency of the optimization direction.

[0027] 3. The parameter evolution mechanism employs an elitist retention strategy. In each generation of parameter optimization, all noisy parameters are sorted according to fitness, and the parameters with the highest fitness are defined as an elite subset and directly retained for the next generation. Simultaneously, non-elite parameters are guided to update towards randomly selected elite parameters. This ensures that the currently found optimal solution is not lost during iterations, guaranteeing the algorithm's convergence. The random evolution of non-elite parameters towards elite parameters introduces diversity, preventing premature entrapment in local optima. This achieves faster and more reliable convergence to the globally optimal noisy parameters within a limited number of iterations, improving the overall performance and efficiency of the adaptive localization method. Attached Figure Description

[0028] Figure 1 This is a flowchart illustrating an indoor Bluetooth positioning method in an embodiment of this application.

[0029] Figure 2 This is another flowchart illustrating the indoor Bluetooth positioning method in this application embodiment;

[0030] Figure 3 This is a schematic diagram of the physical device structure of a positioning system in an embodiment of this application. Detailed Implementation

[0031] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0032] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0033] In this method, the particle is the core computational unit. Each particle represents an assumption about the target's position and state, containing a set of state vectors such as two-dimensional coordinates (x, y), velocity, and direction. The initial particle set is a set of random assumptions generated within the possible region at the start of localization. Noise parameters are key variables describing the uncertainties in signal propagation and target motion, such as the path loss exponent and Gaussian noise variance in the signal propagation model.

[0034] In traditional methods, these parameters are fixed. However, this application associates a set of independent noise parameters with each particle or group of particles, making these noise parameters optimizable variables. Parameter fitness is a quantitative indicator used to evaluate the quality of a set of noise parameters. Its value is determined by the localization error generated after particle filtering using these parameters; the smaller the error, the higher the fitness. Evolutionary operation is an optimization process inspired by biological evolution. By simulating survival of the fittest, parameter combinations with low fitness are gradually eliminated, while parameter combinations with high fitness are retained and used to generate new, potentially better parameter combinations. Resampling is a crucial step in particle filtering, used to address particle degradation. After multiple iterations, the weights of most particles become extremely small, with only a few particles having relatively large weights. Resampling replicates high-weight particles and eliminates low-weight particles, concentrating computational resources on more likely regions.

[0035] The implementation logic of this scheme lies in establishing a two-layer optimization loop. The inner loop is a standard particle filtering process used to estimate the target position based on the current noise parameters. The outer loop is a parameter optimization process that takes the output of the inner particle filter (i.e., the positioning error) as input, calculates the fitness of the parameters, and performs an evolution operation to update the noise parameters. This process iterates continuously until a set of globally optimal noise parameters that minimizes the positioning error is found. This set of parameters best reflects the true signal propagation characteristics of the current indoor environment. Finally, the positioning system uses this set of optimal parameters to perform real-time particle filter positioning. Even when the environment changes due to personnel movement, changes in the placement of objects, etc., it can still output high-precision position results, ensuring the reliability and stability of the positioning service.

[0036] The following describes the process of the method provided in this implementation. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating an indoor Bluetooth positioning method in an embodiment of this application.

[0037] S101. Generate multiple initial particles containing initial position information, initial motion state and initial weights, and assign initial noise parameters to each initial particle to form an initial particle set.

[0038] Among them, the initial position information represents the coordinate assumption of the particle in two-dimensional or three-dimensional space; the initial motion state refers to the initial velocity and direction of the particle; the initial weight is usually set to equal, i.e., 1 / N, where N is the total number of particles; the initial noise parameter is the uncertainty parameter related to the signal propagation model and motion model, such as the path loss exponent and process noise variance; the initial particle set is the total number of particles carrying the above information.

[0039] Specifically, at the start of the localization task, the localization system first generates N initial particles within the localization area based on a preset total number of particles, N. The initial position information of each particle can be generated uniformly and randomly across the entire map, or generated within a specific area based on prior information (such as the entrance location). Simultaneously, each particle is assigned an initial motion state, such as being stationary or having a random velocity vector. Crucially, the localization system assigns each particle or group of particles a set of initial noise parameters randomly selected from a preset range. These noise parameters are used for subsequent prediction and update calculations; different parameters represent different assumptions about the physical characteristics of the environment. All generated particles collectively constitute the initial particle set, serving as the starting point for particle filtering iterations.

[0040] In some embodiments, the initial noise parameters can be allocated in several ways: Optionally, the positioning system divides a preset noise parameter range (such as the path loss exponent range [1.5, 4.0]) into N sub-intervals, and then randomly samples a value in each sub-interval and assigns it to a particle to ensure uniform coverage of the initial parameters; Optionally, the positioning system uses the Latin hypercube sampling method to generate initial sample points in the multidimensional parameter space. This method can ensure good uniformity of projection in each parameter dimension, achieving more efficient spatial exploration. It is understood that other methods can also be used to generate and allocate the initial noise parameters, such as probabilistic sampling based on historical data, which is not limited here.

[0041] In some embodiments, if the search range of the initial noise parameters is set improperly (too large or too small), it may cause the optimization algorithm to converge slowly or make it difficult to find the global optimum. To address this, the positioning system can perform a pre-search process before formal optimization: randomly select several groups of candidate noise parameters with large differences, run a simplified particle filter positioning once for each group and calculate the positioning error, select the parameter with the smallest error as the reference center, and set a reasonable initial search range around this center.

[0042] S102. Based on the motion model defined by the initial motion state and initial noise parameters, calculate the predicted position of each initial particle in the initial particle set at the next moment, and substitute the predicted position into the signal propagation model to obtain the predicted signal strength.

[0043] Among them, the motion model is a mathematical formula used to describe the change of target position over time, and usually includes velocity, direction and random perturbation terms; the predicted position is the possible position of the particle at the next moment calculated based on the motion model; the signal propagation model is a mathematical model describing the attenuation of Bluetooth signal strength (RSSI) with distance, such as the logarithmic path loss model; the predicted signal strength is the theoretical RSSI value calculated based on the distance between the predicted position of the particle and each Bluetooth beacon according to the signal propagation model.

[0044] Specifically, for each particle in the initial particle set, the localization system applies a motion model to predict its state at the next time step. For example, a two-dimensional motion model could be:

[0045]

[0046] .

[0047] in( , () represents the predicted location. and It's speed and direction. It is a time interval. and This is process noise, the magnitude of which is determined by the noise parameters carried by the particle. After obtaining the predicted location, the positioning system calculates the distance between the predicted location and all known Bluetooth beacons in the environment, and substitutes these distances into the signal propagation model to calculate the predicted signal strength received from each beacon.

[0048] In some embodiments, the motion model can be constructed in several ways: Optionally, a first-order Gauss-Markov model can be used, assuming that the velocity is approximately constant but has random perturbations in a short time, which is suitable for pedestrian uniform motion scenarios; alternatively, a map-constrained motion model can be constructed by combining map information, for example, the predicted position of the particle cannot pass through walls, or when in a corridor area, its motion direction is constrained to the orientation of the corridor. It is understood that other more complex motion models can also be used, such as models that combine accelerometer data, which are not limited here.

[0049] In some embodiments, standard motion models struggle to accurately describe complex user behaviors, such as sudden turns or starts and stops. To address this, the positioning system can incorporate a maneuver detection module. This module determines whether the target is maneuvering by analyzing drastic changes in continuous RSSI readings or data from the inertial measurement unit (IMU). Upon detecting a maneuver, the system can temporarily increase the process noise parameter in the motion model, allowing for greater particle diffusion and improving the ability to track sudden changes in the target's state.

[0050] S103. Calculate the signal likelihood of the predicted signal strength and the observed signal strength in the calibration dataset. Update the initial weights of the initial particles based on the signal likelihood to obtain the updated weights and the updated particle set.

[0051] Among them, the observed signal strength refers to the set of RSSI values ​​actually received by the positioning terminal from each Bluetooth beacon at the current moment; the signal likelihood is used to measure the degree of matching between the predicted state of the particle and the actual observation, that is, how similar the predicted signal strength is to the actual observed signal strength; the updated weight is the particle weight adjusted according to the signal likelihood, and the higher the likelihood of the particle, the higher its weight; the updated particle set refers to the set of particles whose state has not changed, but whose weight has been updated.

[0052] Specifically, the positioning system acquires the terminal's actual RSSI observation value at the current moment. For each particle in the particle set, the positioning system compares the predicted signal intensity vector calculated in step S102 with the actual observed signal intensity vector. This comparison is performed using a likelihood function, typically assuming the observed noise follows a Gaussian distribution; the likelihood can be expressed as the value of a multidimensional Gaussian probability density function. The calculated likelihood value is multiplied by the particle's weight at the previous moment to obtain the particle's updated weight at the current moment. After this process is performed on all particles, an updated particle set containing the new weights is obtained.

[0053] S104. Calculate the number of effective particles in the updated particle set, and when the number of effective particles is lower than a preset threshold, resample the updated particle set to obtain an optimized particle set.

[0054] Among them, the number of effective particles ( The particle weight degeneracy index is used to measure the degree of particle weight degeneracy. Its value is between 1 and N. The smaller the value, the more concentrated the weight is on a few particles. The preset number threshold is a critical value used to trigger resampling. It is usually set as a proportion of the total number of particles, such as N / 2. Resampling is a process of re-extracting particles according to particle weights. The optimized particle set is a new particle set obtained after resampling, with the weights re-equalized.

[0055] Specifically, after updating the weights in step S103, the positioning system uses the formula:

[0056] To calculate the effective number of particles, where This is the normalized weight of the i-th particle. Then, the calculated... Compare with a preset quantity threshold (e.g., 0.7*N). If If the particle size falls below this threshold, it indicates severe particle degradation, requiring resampling. The resampling process involves selecting N particles with replacement from the updated particle set, based on their respective weights, to form an optimized particle set. Particles with higher weights have a higher probability of being selected multiple times, while particles with lower weights may be eliminated. After resampling, the weights of all newly selected particles are reset to 1 / N.

[0057] S105. Calculate the estimated trajectory of each optimized particle in the optimized particle set and the positioning error of the real trajectory in the calibration dataset, and determine the parameter fitness of the noise parameter corresponding to the optimized particle based on the positioning error.

[0058] The estimated trajectory is a path consisting of a series of consecutive position estimation points output by the particle filter algorithm over a period of time; the calibration dataset contains the coordinates of the true trajectory of a known path and synchronous RSSI data collected along the way; the positioning error is the Euclidean distance between the estimated position point and the true position point at the corresponding time point on the true trajectory; and the parameter fitness is a quantitative indicator used to evaluate the quality of a set of noise parameters.

[0059] Specifically, for all particles associated with a specific set of noise parameters, the localization system uses the RSSI sequence from the calibration dataset as the observation input and runs a complete particle filtering process (including prediction, updating, and resampling steps). At each time step, a weighted average position is calculated as the estimated position for that moment. The estimated positions at all times are connected to form an estimated trajectory. Subsequently, each point on this estimated trajectory is compared with the point on the actual trajectory recorded in the calibration dataset at the same time, and the Euclidean distance between the two is calculated as the instantaneous localization error. Finally, the arithmetic mean of the instantaneous localization errors at all times is calculated to obtain the average localization error. Taking the reciprocal of this average localization error, the resulting value is determined as the parameter fitness for that set of noise parameters.

[0060] In some embodiments, the positioning error can be calculated in several ways: Optionally, Dynamic Time Warping (DTW) distance can be used instead of point-by-point Euclidean distance. DTW can better handle the scaling and offset that may exist on the time axis between the estimated trajectory and the true trajectory, and more robustly measure the similarity between the two trajectories; Optionally, in addition to the average error, the maximum error or the 90th percentile of the error can also be calculated, and these metrics can be combined to generate a more comprehensive fitness score. It is understood that other error measures can also be used, and no limitation is made here.

[0061] S106. Determine the optimal noise parameters based on parameter fitness, and guide other noise parameters to evolve towards the optimal noise parameters, thereby generating an optimized parameter set.

[0062] Among them, the optimal noise parameters refer to the set of parameters with the highest fitness among all current parameter sets; evolution refers to an update mechanism that mimics the biological evolution process, through which parameter sets with poor performance will learn from parameter sets with better performance; the optimized parameter set is a new generation of parameter set with better overall performance generated after a round of evolution operation.

[0063] Specifically, the localization system first iterates through all noise parameter sets and their fitness calculated in step S105, finding the parameter set with the highest fitness and marking it as the optimal noise parameter set for the current generation. Then, for other non-optimal parameter sets, the system applies an evolution operator to update these parameter sets. For example, an update rule could be:

[0064] ,in These are the updated parameters. These are old parameters. These are the optimal parameters. It is a learning factor. Z is the perturbation factor and Z is a random vector. This process guides all parameters to move towards the current optimal solution while retaining some randomness to explore new spaces. After all parameter sets have been updated, they constitute a new generation of optimization parameter sets.

[0065] In some embodiments, parameter evolution can be achieved in several ways: Optionally, the update rule of Particle Swarm Optimization (PSO) can be adopted, where each parameter group (particle) considers both its own historical best position and the global best position of the population when updating, effectively balancing individual exploration and group information sharing; Optionally, crossover and mutation operations in genetic algorithms can be used, randomly selecting parameter groups for crossover to combine high-quality genes, and performing small mutations on some parameters to increase diversity. It is understood that other heuristic or metaheuristic optimization algorithms can also be used to drive parameter evolution, and this is not limited here.

[0066] In some embodiments, the algorithm may prematurely converge to a local optimum, where all parameters quickly cluster into a region that is not globally optimal. To address this, during the evolution process, the degree of clustering of the parameter population (e.g., the average distance of all parameters to their centroids) can be calculated periodically. If the clustering is too high, the system can trigger enhancement operations, such as temporarily increasing the random perturbation term β in the update formula, or randomly resetting some parameters (i.e., resampling across the entire search space), to help the algorithm escape the local optimum trap and continue the global search.

[0067] S107. Repeat the steps of generating the optimized particle set and the optimized parameter set until the preset iteration conditions are met, and then determine the global optimal noise parameters based on the corresponding optimized parameter set.

[0068] Among them, the preset iteration condition is the rule for terminating the parameter optimization loop, which can be reaching the maximum number of iterations or the fitness of the optimal parameter not improving for multiple consecutive generations; the global optimal noise parameter is the noise parameter set with the highest historical fitness found in the entire iterative optimization process.

[0069] Specifically, the localization system treats steps S104 to S106 (or more subdivided steps) as a complete iteration cycle. At the end of each cycle, the system checks whether preset iteration conditions are met. For example, the maximum number of iterations is set to 20. If the current iteration count is less than 20, the system returns to step S104 and begins a new round of particle filtering, fitness calculation, and parameter evolution using the newly generated optimized parameter set. This loop repeats continuously. Throughout the process, the system continuously records the parameter set with the highest fitness that has appeared in history. When the number of iterations reaches 20, the loop terminates. At this point, the system determines the recorded historical optimal parameter set as the final globally optimal noise parameters.

[0070] In some embodiments, the iteration termination condition can be set in several ways: Optionally, a fitness threshold can be set, and when the fitness of the optimal parameter exceeds the threshold, it is considered that a sufficiently good solution has been found, and the iteration is terminated early; Optionally, the convergence of the parameter population can be monitored, for example, when all parameters are clustered in a very small neighborhood, it is considered that convergence has been achieved, and the iteration can be terminated. It is understood that multiple termination conditions can also be used in combination, such as "reaching the maximum number of iterations or the fitness not improving for 5 consecutive generations," to achieve more flexible control, which is not limited here.

[0071] In some embodiments, if the number of iterations is set too low, the algorithm may not converge sufficiently, resulting in the found globally optimal parameters not being the true optimal solution. Conversely, setting too many iterations will waste a significant amount of computational resources. To address this, an adaptive iteration count strategy can be employed. The system monitors the improvement rate of the optimal fitness in real time during the iteration process. If the fitness value improvement over several consecutive generations (e.g., 5 generations) is less than a small threshold (e.g., 0.1%), the system determines that the optimization process has entered a plateau and can terminate the iteration early. This approach can ensure the quality of the solution while avoiding unnecessary computational overhead.

[0072] S108. Perform particle filtering localization based on the globally optimal noise parameters to obtain the position calculation results.

[0073] The location calculation result is the final real-time location coordinates of the user or asset output by the positioning system.

[0074] Specifically, after determining the globally optimal noise parameters through iterative optimization in step S107, the positioning system enters the formal online positioning phase. In this phase, the system no longer performs parameter optimization but uses this fixed set of globally optimal noise parameters to configure the particle filter's motion and observation models. Then, for each received real-time RSSI observation data, the system executes a standard particle filtering process (prediction, update, resampling) and calculates the weighted average position of all particles. This weighted average position is the final output position calculation result for that moment, provided to upper-layer applications (such as navigation and tracking). Because the parameters are adaptively optimized for the environment, the positioning results at this stage have higher accuracy and robustness compared to methods using fixed parameters.

[0075] In some embodiments, the final position can be calculated in several ways: Optionally, instead of using a weighted average, the position of the particle with the highest weight can be selected as the final output, which may be more accurate when the particle distribution is highly concentrated; alternatively, before outputting the final position, a smoothing filter (such as a Kalman smoother or a moving average filter) can be applied to post-process the continuous position calculation results to eliminate small jitters and make the output trajectory smoother and more natural. It is understood that other estimation methods can also be used, such as cluster-based position estimation, which is not limited here.

[0076] In some embodiments, even if a globally optimal parameter is found, it is only the average optimal parameter for the entire calibration environment. Positioning accuracy may still decrease when the user moves to a local area where the signal characteristics differ significantly from the average. To address this, the parameter obtained in step S107 can be not just a single globally optimal parameter, but a global elite parameter set (such as the top 5 parameter groups based on fitness). During the online positioning phase, the system can run multiple particle filters using different elite parameters in parallel and dynamically select or fuse their positioning results based on the likelihood or consistency of each filter's output.

[0077] The following is a more detailed description of the process provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the indoor Bluetooth positioning method in this application.

[0078] S201. Generate multiple initial particles containing initial position information, initial motion state and initial weights, and assign initial noise parameters to each initial particle to form an initial particle set.

[0079] Refer to step S101, which will not be repeated here.

[0080] In some embodiments, the positioning system presets a baseline range of noise parameters and performs stratified sampling based on the planned total number of particles. That is, the positioning system presets a baseline range of noise parameters and the planned total number of initial particles; divides the baseline range of noise parameters into multiple equidistant parameter sub-intervals based on the planned total number of particles, so as to ensure that each parameter sub-interval corresponds to at least one initial particle to be assigned; and performs random sampling within each parameter sub-interval to generate initial noise parameters for the corresponding initial particles.

[0081] Among them, the baseline range refers to a reasonable upper and lower bound set for each noise parameter to be optimized (such as path loss index, process noise variance, etc.), which defines the search space for parameter optimization; the total number of planning parameters refers to the total number of particles (or individual parameters) used in the parameter optimization process; the parameter sub-interval is the basic unit obtained after dividing the entire multidimensional parameter space into grids; stratified sampling is a sampling technique that ensures that the samples are evenly distributed in all subspaces, and it has better coverage compared with pure random sampling.

[0082] Specifically, this step is performed during the initialization phase of the entire adaptive localization method. Its purpose is to generate an initial parameter population with good spatial coverage, laying the foundation for subsequent evolutionary searches. Taking the optimization of two-dimensional noise parameters (parameter 1, parameter 2) as an example, the total number of parameters planned is N. The localization system first sets the range of parameter 1 to [...]. , The range of parameter 2 is []. , To uniformly distribute N particles in the two-dimensional space, the system divides the range of parameter 1 into M equidistant sub-intervals and the range of parameter 2 into K equidistant sub-intervals, where M*K≈N. For example, we can take:

[0083] Here, `floor` is the floor function. This divides the entire parameter space into M*K rectangular sub-regions. Then, the system generates a particle for each sub-region. For the (i, j)th sub-region (i=1, ..., M, j=1, ..., K), the system randomly samples a value from the corresponding parameter 1 sub-interval as the parameter 1 component of the particle, and randomly samples a value from the corresponding parameter 2 sub-interval as the parameter 2 component. This process iterates through all sub-regions, generating M*K initial particles, each carrying a unique set of initial noise parameters, which are uniformly distributed throughout the search space.

[0084] In some embodiments, this hierarchical sampling can be implemented in several ways to adapt to different situations: Optionally, Latin Hypercube Sampling (LHS) can be used instead of simple grid hierarchical sampling. LHS is a more advanced hierarchical sampling technique, and its implementation steps are as follows: First, the normalized range of each parameter dimension [0, 1] is divided into N equally probable sub-intervals; then, a point is randomly selected in each sub-interval of each dimension; finally, the points selected in different dimensions are randomly combined to form N N-dimensional sample points. LHS can ensure perfect uniform hierarchical stratification on the projection of each parameter dimension, and its space-filling performance is better than grid hierarchical stratification for high-dimensional parameter spaces. Optionally, non-equidistant partitioning can be used when dividing the parameter sub-intervals. The specific steps are as follows: Based on prior knowledge or pre-experiment results, the regions in the parameter space that are more likely to have the optimal solution are more finely divided, i.e., the sub-intervals are smaller; while the regions with lower probability are coarser divided, i.e., the sub-intervals are larger. Then, random sampling is performed in each sub-interval to ensure that each sub-interval has at least one sample. This method results in a higher density of the initial population in key regions, which helps to accelerate convergence. Understandably, other sampling strategies, such as orthogonal sampling, can also be used to further optimize the distribution characteristics of the initial population; this is not limited here.

[0085] In some embodiments, the positioning system intelligently determines the initial search range of noise parameters through pre-experiments. Specifically, the positioning system acquires a calibration dataset containing signal strength data and corresponding real location coordinates; it iterates through preset candidate noise parameters, calculates the positioning deviation of the calibration dataset under the corresponding parameters based on each candidate noise parameter, and generates a deviation set; it extracts the minimum deviation value from the deviation set, and uses the candidate noise parameter associated with the minimum deviation value as a reference parameter, and generates a reference value range based on the reference parameter.

[0086] Among them, candidate noise parameters are a set of pre-defined discrete parameter combinations used for preliminary testing, usually covering a wide range; positioning deviation refers to the average error between the estimated trajectory and the true trajectory after positioning using specific parameters; deviation set is the set of key-value pairs of all candidate noise parameters and their corresponding positioning deviations; benchmark parameter is the parameter combination that performs best (i.e., has the smallest positioning deviation) among all candidate parameters; the benchmark value range is the initial search space of the subsequent formal optimization algorithm, which is constructed around the benchmark parameter.

[0087] Specifically, this step is performed before the formal parameter optimization begins. It is an initialization or preprocessing stage, aiming to quickly locate a high-potential search region using limited computational resources, avoiding wasting iterations in a vast but ineffective parameter space. During execution, the localization system first defines a sparse, wide-coverage grid of candidate parameters. For example, if optimizing the path loss exponent n and the process noise standard deviation... The candidate grid can be set as n∈{1.5, 2.5, 3.5}. ∈{2, 5, 8}, forming 9 candidate parameter combinations. For each combination, the system uses these parameters to run a simplified particle filter localization process once, with the RSSI sequence from the calibration dataset as input and an estimated trajectory as output. Then, the average localization deviation between this estimated trajectory and the true trajectory in the calibration dataset is calculated. After iterating through all 9 combinations, a deviation set containing 9 deviation values ​​is obtained. The system finds the smallest deviation value from this set, assuming that the parameter combination corresponding to this value is (n=2.5, ...). =5). This combination is then determined as the baseline parameter. Finally, the system sets a narrower baseline value range around this baseline parameter; for example, the search range of n is set to [2.5-0.5, 2.5+0.5] = [2.0, 3.0]. The range is set to [5-2, 5+2] = [3, 7]. This range will serve as the actual search space for subsequent evolutionary algorithms.

[0088] In some embodiments, the pre-search process can be implemented in several ways to improve efficiency and accuracy: Optionally, a sequential optimization approach can be used for pre-search. The specific steps are: first, evaluation is performed on a very sparse grid; then, based on the evaluation results, a finer sub-grid is constructed around the best-performing parameter point, and a second round of evaluation is performed only on this sub-grid; this process can be repeated several times, gradually focusing on the optimal region. This method is more computationally efficient than evaluating a large grid all at once. Optionally, an early stopping mechanism can be used when calculating the positioning deviation. The specific steps are: the calibration trajectory is divided into multiple segments; when evaluating a candidate parameter, its positioning deviation is calculated segment by segment; if the cumulative average deviation in the first few segments is already much greater than the currently known minimum deviation, the evaluation of that parameter is terminated early, and a larger deviation value is assigned to it. This mechanism can quickly eliminate parameters with extremely poor performance, saving computation time. It is understood that other search strategies, such as random search instead of grid search, can also be used to find benchmark parameters; this is not limited here.

[0089] In some embodiments, the calibration dataset may be very limited, insufficient to reliably evaluate multiple candidate parameters. To address this, a model-based approach can be used to help determine the initial range. Specifically, the following steps are taken: First, a small subset of RSSI data points and their corresponding ground truth locations are randomly selected from the calibration dataset. Then, for each data point, the path loss exponent *n* is inversely solved using a signal propagation model. All inversely solved *n* values ​​are collected, and their mean and standard deviation are calculated. Based on this statistical result, the initial search range for *n* can be set within a certain confidence interval of the mean (e.g., mean ± two standard deviations). A similar method can be used for rough estimation of other noise parameters. This method reduces reliance on full trajectory simulation evaluation by directly extracting model information from the data, making it suitable for scenarios with sparse data.

[0090] S202. Based on the motion model defined by the initial motion state and initial noise parameters, calculate the predicted position of each initial particle in the initial particle set at the next moment, and substitute the predicted position into the signal propagation model to obtain the predicted signal strength.

[0091] Refer to step S102, which will not be repeated here.

[0092] S203. Calculate the signal likelihood of the predicted signal strength and the observed signal strength in the calibration dataset. Update the initial weights of the initial particles based on the signal likelihood to obtain the updated weights and the updated particle set.

[0093] Refer to step S103, which will not be repeated here.

[0094] S204. Calculate the number of effective particles in the updated particle set, and when the number of effective particles is lower than a preset threshold, resample the updated particle set to obtain an optimized particle set.

[0095] Refer to step S104, which will not be repeated here.

[0096] In some embodiments, the positioning system executes a resampling strategy based on deterministic replication and residual random sampling. Specifically, the positioning system calculates the effective number of updated particles in the updated particle set. When the effective number of particles is lower than a preset threshold, the update weight of each updated particle is multiplied by the total number of particles in the updated particle set to obtain the expected replication number of the updated particle. Each expected replication number is rounded down to obtain the deterministic replication count, and each updated particle is replicated according to the deterministic replication count to form the first optimized particle. Each expected replication number is subtracted from its corresponding deterministic replication count to obtain the residual weight. All residual weights are normalized to obtain a normalized residual weight distribution. Using the total number of particles minus the number of first optimized particles as the difference, particles with the number of differences are randomly selected from the unreplicated updated particles according to the normalized residual weight distribution to form the second optimized particle. The first and second optimized particles are merged to form an optimized particle set.

[0097] Here, the expected replication number refers to the number of times a particle is expected to be replicated due to its weight in an ideal resampling process; this value is a floating-point number. The deterministic replication number is the integer part of the expected replication number, representing the number of times the particle will be replicated deterministically and without randomness. The residual weight is the decimal part of the expected replication number, representing the remaining probability of the particle being selected. The normalized residual weight distribution is a new probability distribution formed by normalizing the residual weights of all particles, used for subsequent random sampling. The first optimized particle is a set of high-weight particles generated through deterministic replication. The second optimized particle is a supplementary set of particles generated by randomly sampling the residual weights.

[0098] Specifically, this resampling step is performed after the particle filter weights are updated and before state prediction. It is triggered when the number of effective particles falls below a preset threshold, indicating severe degeneracy in the particle weight distribution. During execution, the localization system calculates the expected number of copies for each particle i in the updated particle set. , As the weight. Then, for each Decompose to obtain the integer part and the residual (decimal part)

[0099] The system first iterates through all particles, copying each particle i. This process forms the first optimized particle set. This step ensures that the particles have sufficiently large weights ( Particles >= 1 / N will be retained at least once, and their replication count is proportional to their weight, thus preserving high-quality solutions without loss. Then, the total number of replicated particles is calculated. And determine the number of particles that still need to be added. The system collects the residual weights of all particles. The new weight distribution is obtained by normalization.

[0100] Finally, based on the normalized residual weight distribution... From the original N particles, a random sample with replacement is drawn. These particles form the second optimized particle set. Finally, the first and second optimized particles are merged to form a new generation of optimized particle sets with a total of N particles and all weights reset to 1 / N.

[0101] In some embodiments, the residual resampling process can be implemented in several ways to improve performance: optionally, a system resampling method can be used when randomly selecting the second optimized particle. The specific steps are as follows: First, calculate the cumulative distribution function (CDF) of the normalized residual weights; then, generate a [0, 1 / Using a random number within a certain range as the starting point, and generating a list containing... A sequence of points is formed using arithmetic progressions. Finally, each point in this sequence is mapped to a CDF (Constant Difference of Force) to determine the index of the selected particle. This method further reduces sampling variance compared to standard polynomial sampling. Optionally, after the deterministic replication stage, particles with excessively small residual weights can be filtered out. The specific steps are: setting a very small residual weight threshold. Before normalization and random sampling, all residual weights are... Less than particles The residual weights are set to 0; then normalization and random sampling are performed only on the remaining particles with larger residual weights. This operation avoids wasting computational resources on particles that are almost impossible to select and slightly improves sampling efficiency. Understandably, other methods can also be used to implement this step, such as combining the idea of ​​partial resampling, performing residual resampling only on a portion of the particles while leaving another portion unchanged to maintain diversity; this is not limited here.

[0102] S205. Based on the noise parameters, perform particle filtering localization on multiple optimized particles in the optimized particle set to obtain an estimated trajectory containing multiple position estimation points.

[0103] Among them, noise parameters refer to a set of numerical values ​​associated with a specific optimized particle that describe the uncertainty of the model; particle filter localization refers to the Monte Carlo method of estimating the target state by iteratively performing prediction and update steps; the position estimation point is the best guess of the target position output by the particle filter at each time step; the estimated trajectory is a path formed by connecting a series of consecutive position estimation points.

[0104] Specifically, the localization system initializes a particle set for a specific set of noise parameters. Then, along the time series recorded in the calibration dataset, the localization system performs a complete particle filtering iteration at each time step t. First, a motion model defined using this set of noise parameters is used for prediction; then, the likelihood is calculated using the RSSI observations at time t in the calibration dataset, and the particle weights are updated; next, the weighted average position at that time is calculated as the estimated position point at time t; finally, it is determined whether resampling is needed and is performed accordingly. This process continues from the initial time until the end of the trajectory, and the set of estimated position points at all times constitutes the estimated trajectory corresponding to that set of noise parameters.

[0105] In some embodiments, this step can be implemented in several ways: Optionally, to improve computational efficiency, particle filtering localization can be performed in parallel on multiple sets of noise parameters, with each set of parameters running in an independent computation thread, significantly reducing the total time required to compute all estimated trajectories; alternatively, when performing particle filtering localization, auxiliary variables can be introduced, such as recording the parent index of each particle, so that the historical trajectory of each particle can be fully traced back after localization, rather than just the final weighted average trajectory. It is understood that other variants of particle filtering, such as unscented particle filters, can also be used to handle highly nonlinear models, and this is not limited here.

[0106] S206. Compare the estimated points of each position on the estimated trajectory with the corresponding real position points on the preset real trajectory in the calibration dataset, and calculate multiple positioning error values.

[0107] Among them, the true trajectory is the path that the target actually moves on during the calibration period, which is precisely measured or planned in advance; the true location point is the coordinate of the true trajectory at a specific time; comparison refers to comparing the estimated position and the true position at the same timestamp; the positioning error value is the geometric distance between the estimated position and the true position at a single time point, usually the Euclidean distance.

[0108] Specifically, the positioning system obtains the estimated trajectory from step S205, which is a series of location points with timestamps. Simultaneously, real trajectory points with the same timestamps are obtained from the calibration dataset. For each time step i, the positioning system calculates the estimated location point. and actual location point The Euclidean distance between them is:

[0109] The calculation process iterates through all time steps, ultimately generating a sequence containing multiple positioning error values. , , ...}.

[0110] In some embodiments, this step can be implemented in several ways: Optionally, if the timestamps of the estimated trajectory and the true trajectory are not perfectly aligned, linear interpolation can be performed on the trajectory with sparser timestamps to generate position points that perfectly correspond to the timestamps of the other trajectory, and then the comparison calculation can be performed; Optionally, before calculating the error, both the estimated trajectory and the true trajectory can be transformed to a common reference coordinate system to eliminate systematic biases introduced by the inconsistency in coordinate systems. It is understood that errors in other dimensions can also be calculated as needed, for example, if the positioning system outputs height information, then the three-dimensional Euclidean distance can be calculated, which is not limited here.

[0111] In some embodiments, at certain time points, due to severe signal interference, the particle filter estimation results may contain outliers far from the true location. A single large error value can severely impact subsequent average error calculations. To address this, the positioning error value sequence can be preprocessed before calculating the average error. For example, a threshold can be used to remove extreme outliers, or a more robust statistic, such as the median error or truncated mean, can be used instead of the arithmetic mean to reduce the impact of outliers on the overall evaluation results.

[0112] S207. The average positioning error is obtained by averaging the multiple positioning error values.

[0113] Among them, the arithmetic mean is a measure of central tendency, which is obtained by adding all the values ​​and then dividing by the number of values; the average positioning error measures the average degree to which the estimated position of the positioning algorithm deviates from the true position over the entire trajectory, and is a key indicator for evaluating the overall performance of the algorithm.

[0114] Specifically, the positioning system will calculate all the instantaneous positioning error values ​​in step S206. , ,..., The sum of the steps (T being the total step size) is then divided by the total step size T. This result, the average positioning error, is used as the final quantitative evaluation of the positioning performance produced by the current set of noise parameters. A lower average positioning error means that the set of noise parameters enables the particle filter algorithm to produce positioning results closer to reality.

[0115] In some embodiments, this step can be implemented in several ways: Optionally, the root mean square error (RMSE) can be calculated, and the calculation method is as follows: Compared to the arithmetic mean error, RMSE is more sensitive to larger error values ​​and better reflects the dispersion of the positioning results. Optionally, a weighted average positioning error can be calculated. For example, higher weights can be assigned to road segments with more complex motion states or more challenging signal environments in the trajectory, making the evaluation more focused on the algorithm's performance in difficult scenarios. Understandably, other statistical indicators, such as the variance or standard deviation of the error, can also be calculated to assess the stability of the positioning results; this is not limited here.

[0116] In some embodiments, if the initial positioning error of the calibration trajectory is large (because particles need time to converge), this initial error can raise the overall average positioning error, potentially making it difficult to fairly evaluate the performance of the parameters. To address this, a small portion of the data from the initial stage of the trajectory can be ignored when calculating the average positioning error. For example, with a total step size of T, the average error from step k (where k is a small positive integer, such as 5 or 10) to step T can be calculated. This method is equivalent to giving the particle filter an adaptation period, allowing the evaluation results to better reflect its performance under stable tracking conditions.

[0117] S208. Take the reciprocal of the average positioning error and determine the corresponding reciprocal value as the parameter fitness of the noise parameter.

[0118] Taking the reciprocal is a mathematical transformation used to convert a minimization problem (minimizing error) into a maximization problem (maximizing fitness); parameter fitness is a core concept in optimization algorithms, which quantifies the quality of each solution (in this case, each set of noise parameters).

[0119] Specifically, the positioning system substitutes the average positioning error (AverageError) calculated in step S207 into the formula: Fitness = 1 / AverageError. If the average positioning error is 0, to avoid division by zero errors, it can be processed into a very small positive number, or a very large fitness value can be directly assigned. Through this transformation, the parameter group with the smaller the average positioning error, the higher its corresponding parameter fitness value. This fitness value will then be used in step S209 and subsequent parameter evolution processes as the basis for sorting, selecting, and updating parameters.

[0120] In some embodiments, fitness can be calculated in several ways: Optionally, a more complex mapping function can be used, such as Fitness = 1 / (1 + AverageError), which can avoid the explosive growth of fitness values ​​when the error approaches 0, resulting in greater numerical stability; alternatively, a penalty term can be added to the fitness function. For example, if a set of parameters causes the particle filter to take too long to compute, a penalty factor less than 1 can be multiplied by its fitness, balancing accuracy and efficiency during optimization. It is understood that the design of the fitness function can be adjusted according to the specific optimization objective, and is not limited here.

[0121] In some embodiments, when the average localization errors generated by multiple sets of different parameters are very similar, their reciprocal fitness values ​​are also very similar, which may lead to insufficient selection pressure and slower convergence in the optimization algorithm. To address this, a fitness scaling transformation can be introduced. For example, after sorting, a nonlinear transformation can be applied to the original fitness values ​​to widen the fitness gap between high-quality solutions and ordinary solutions. A common method is ranking scaling transformation, where an individual's fitness is determined by its rank in the population, rather than by its original fitness value, to dynamically adjust the selection pressure and maintain the algorithm's search momentum.

[0122] S209. Sort the parameters in descending order according to their fitness for each noise parameter to generate an ordered parameter list.

[0123] Among them, descending order sorting refers to arranging a set of data in descending order; the ordered parameter list is a data structure in which the noise parameter sets are arranged in descending order of their fitness values.

[0124] Specifically, this step is a refinement of step S106. The localization system collects all candidate noise parameter sets and their corresponding parameter fitness calculated in step S208. Then, the system calls a sorting algorithm (such as quicksort, mergesort, etc.) to sort all noise parameter sets in descending order using parameter fitness as the key. The sorted result is a list where the first element is the noise parameter set with the highest fitness in the current generation (i.e., the current optimal solution), the second element is the next highest fitness, and so on, with the parameter set with the lowest fitness at the end of the list. This ordered list provides the foundation for subsequent elite selection and evolution operations.

[0125] In some embodiments, this step can be implemented in several ways: Optionally, if the number of parameter groups is huge, a partial sorting algorithm can be used. For example, if only the top K elite parameters need to be selected, then only the K parameters with the highest fitness need to be found, without completely sorting the entire list, thus saving computation time. Optionally, during sorting, if multiple parameter groups have the same fitness, their relative order can be determined based on a minor criterion (such as parameter sparsity or computational complexity), or their original relative order can simply be maintained. It is understood that any algorithm capable of sorting by fitness in descending order is suitable for this step, and no limitation is made here.

[0126] In some embodiments, in the later stages of optimization, the fitness of most parameters may become very similar, with negligible differences in fitness between adjacent parameters in the sorted list. This can reduce the efficiency of ranking-based selection (such as roulette wheel selection). To address this, a combination of ranking and fitness values ​​can be used. For example, during the selection operation, initial screening can be performed based on ranking, followed by fine-grained probabilistic selection based on the small differences in fitness among the top-ranked parameter groups. This hybrid strategy ensures both selection pressure and utilization of subtle performance differences.

[0127] S210. Extract a preset number of noise parameters from the top of the ordered parameter list to form an elite parameter subset.

[0128] Among them, the preset quantity is an integer that defines the number of more precise individuals in each generation; the elite parameter subset is the set of noisy parameter groups that perform best in the current generation and will be unconditionally retained in the next generation, which is the core operation of the elite retention strategy.

[0129] Specifically, the localization system, based on a pre-defined elite number K (for example, K can be set to 5% or 10% of the total number of parameter sets), extracts the first K elements from the beginning of the ordered parameter list generated in step S209. These K elements are precisely the K noisy parameter sets with the highest fitness in the current generation. These K parameter sets together constitute the elite parameter subset. In subsequent evolution processes, all members in this subset will be directly copied to the parameter set of the next generation without any modification, ensuring that the algorithm does not lose the optimal solution it has already discovered during iteration.

[0130] In some embodiments, this step can be implemented in several ways: Optionally, a dynamic elite number strategy can be adopted, using a smaller number of elites in the early stages of optimization to encourage broader exploration; as optimization progresses, the number of elites is gradually increased to enhance the utilization and convergence of the high-quality solution region. Optionally, when forming the elite subset, in addition to the parameter with the highest fitness, additional parameters can be added, even if their fitness is not top-tier. For example, a parameter farthest from the current optimal solution can be added to the elite set to maintain population diversity. It is understood that the setting of the elite number is a hyperparameter that needs to be weighed according to the characteristics of the problem, and is not limited here.

[0131] In some embodiments, if the number of elites K is set too large, the population may be prematurely dominated by elite parameters, leading to a rapid loss of diversity and the entire population quickly converging to a solution that may only be locally optimal. To address this, an elite replacement mechanism can be introduced. That is, in each generation, if a newly generated parameter set has a fitness higher than the worst elite parameter in the elite subset, then the new parameter can replace that worst elite and become a new elite member. This mechanism gives the elite subset itself a certain degree of metabolic capacity, rather than being completely static, helping to absorb new, better solutions while maintaining its advantages.

[0132] S211. For non-elite noise parameters outside the elite parameter subset, randomly select one elite parameter from the elite parameter subset as the corresponding evolution target.

[0133] Among them, non-elite noise parameters refer to all parameter groups ranked after the number of elites K in the ordered parameter list; the evolution goal is a direction specified for the update evolution of non-elite parameters in the current generation.

[0134] Specifically, the localization system traverses all non-elite noise parameters that do not belong to the elite parameter subset. For each non-elite parameter, the system selects an elite parameter from the elite parameter subset formed in step S210 using uniform random sampling. This selected elite parameter will serve as the target for the non-elite parameter in this round of evolution. This means that the update of the non-elite parameter will proceed in the direction of the selected elite parameter. Since the evolution target of each non-elite parameter is independently and randomly selected, this mechanism allows different non-elite parameters to explore different high-quality regions, guiding convergence while maintaining a certain degree of exploration diversity.

[0135] In some embodiments, the selection of the evolution target can be achieved in several ways: Optionally, a tournament selection method can be used instead of uniform random sampling, that is, two elites are randomly selected from the elite subset, their fitness is compared, and the one with higher fitness is selected as the evolution target. This operation increases the probability of learning from the better elite. Optionally, a distance-based selection method can be used, that is, an elite with a suitable distance in the parameter space is selected as the target for the non-elite parameter, avoiding insufficient exploration due to the target being too close, or excessive step size due to the target being too far. It is understood that other selection strategies can also be designed to balance convergence speed and exploration ability, which are not limited here.

[0136] In some embodiments, if all non-elite parameters are geared toward the same optimal elite (i.e., Evolutionary targeting accelerates convergence but is also prone to getting trapped in local optima. The random selection in this step alleviates this problem but can still be optimized. To enhance exploration capabilities, a hybrid evolutionary target strategy can be designed. For example, for a non-elite parameter, there is a probability p of selecting an elite parameter as the target (exploitation), and a probability of 1-p of selecting another random non-elite parameter as the target (exploration). The probability p can be dynamically adjusted with the number of iterations; initially, p is smaller to encourage exploration, and later p is larger to accelerate convergence.

[0137] S212. Calculate the update vector pointing to the corresponding evolution target for each non-elite noise parameter, and update the non-elite noise parameters.

[0138] The update vector is a vector representing direction and magnitude in a multidimensional parameter space, which defines how the parameter values ​​should change; the update operation is to actually modify the values ​​of the non-elite noise parameters based on the update vector.

[0139] Specifically, for each non-elite noise parameter and the evolution target determined in step S211. (An elite parameter) The positioning system first calculates the difference vector between the two:

[0140] - Then, an update vector is constructed based on this difference vector, for example:

[0141] ,in This is a learning rate or step size factor between 0 and 1, controlling the speed at which the target is moved. Finally, this update vector is added to the original non-elite parameters to obtain the updated parameters:

[0142] To increase randomness and avoid getting trapped in local optima, a small random perturbation term is usually added to the update.

[0143] In some embodiments, the update operation can be implemented in several ways: optionally, a differential evolution update strategy can be used, where the update vector is constructed from the differences between three other individuals (parameter sets) randomly selected from the population, for example:

[0144] This method does not directly rely on the optimal solution and has strong global exploration capabilities. Optionally, boundary checks and processing can be performed on the updated parameters. If a parameter component exceeds a preset reasonable range, it can be reset to the boundary value or pulled back into the range through reflection, loops, or other methods. It is understandable that the update rule is the core of various evolutionary algorithms and can be flexibly selected; no restrictions are imposed here.

[0145] In some embodiments, a fixed learning rate α is difficult to adapt to different stages of optimization. In the early stages, a larger α facilitates rapid exploration; in later stages, a smaller α is needed for finer searching. To address this, an adaptive learning rate strategy can be employed. For example, the learning rate α can be correlated with the fitness of the parameter or its distance from the target. Parameters with lower fitness or greater distance from the target can use a larger learning rate, and vice versa. Alternatively, the learning rate can be globally decayed as the number of iterations increases.

[0146] S213. Based on all updated non-elite noise parameters and elite parameter subsets, construct an optimized parameter set.

[0147] Among them, the updated non-elite noise parameters are the new parameters after the evolution operation in step S212; the elite parameter subset is the optimal parameters directly retained from the previous generation; and the optimized parameter set is the set of all parameters that constitute the next generation population.

[0148] Specifically, the localization system merges the two sets of parameters to form a new generation of complete parameter set for the next iteration. The first part is the subset of elite parameters determined in step S210 without any modifications. The second part is all the updated non-elite noise parameters calculated in step S212. Merging these two parts yields a new parameter set of the same size as the previous generation, but with an expected improvement in overall fitness. This set, called the optimized parameter set, will serve as input for the next iteration (returning to step S205 or a related step) to begin a new round of fitness evaluation and evolution.

[0149] In some embodiments, this step can be implemented in several ways: Optionally, a diversity check can be performed after constructing the optimized parameter set. If the diversity of the new set (e.g., the average distance between all parameter pairs) is below a certain threshold, a diversity injection operation can be triggered, such as randomly resetting a small subset of non-elite parameters to prevent premature homogenization of the population; alternatively, newly generated individuals can replace only the old individuals most similar to them, which helps maintain population diversity among multiple optimal peaks. It is understood that population generation and replacement strategies are an important part of evolutionary algorithms, and are not limited here.

[0150] In some embodiments, the evolution operation may produce duplicate parameter sets, especially in the later stages of optimization, which wastes computational resources. To address this, a deduplication step can be added after constructing the optimized parameter set. The system iterates through all parameter sets in the new set; if two or more identical parameter sets are found, only one is retained, and the extra positions are filled with randomly generated new parameters or parameters with slight mutations of existing parameters. This operation ensures that each member of the population is unique, maximizing computational efficiency and population diversity.

[0151] S214. Repeat the steps of generating the optimized particle set and the optimized parameter set until the preset iteration conditions are met, and then determine the global optimal noise parameters based on the corresponding optimized parameter set.

[0152] Refer to step S107, which will not be repeated here.

[0153] S215. Perform particle filtering localization based on the globally optimal noise parameters to obtain the position calculation results.

[0154] Refer to step S108, which will not be repeated here.

[0155] In some embodiments, the positioning system performs real-time dynamic selection of parameters during the final positioning stage. That is, after reaching a preset number of iterations, the positioning system determines the latest subset of elite parameters as the global elite parameter set. At each moment of particle filter positioning, the spatial distribution gradient of the Bluetooth beacon signal strength within a preset range of the target optimized particle is calculated. The target optimized particle is a particle in the latest optimized particle set. The spatial distribution gradient is matched with the environmental gradient features associated with each elite parameter in the global elite parameter set during the training stage to obtain the elite parameter with the highest matching degree. The elite parameter with the highest matching degree is assigned to the target optimized particle to calculate the target signal strength and target weight of the target optimized particle.

[0156] Among them, the global elite parameter set refers to the set of noise parameters that perform best after the training (parameter optimization) phase is completed, and each parameter represents a specific environmental adaptability; the spatial distribution gradient refers to the rate and direction of change of Bluetooth signal strength with spatial location around a certain location point, which is a quantitative description of the signal characteristics of that local environment; the environmental gradient feature is a representative spatial distribution gradient pattern extracted from the calibration data during the training phase and associated with each elite parameter; the matching degree calculation is the process of measuring the similarity between the real-time calculated gradient and the pre-stored gradient features.

[0157] Specifically, this method is executed during the standard online localization phase, aiming to apply multiple high-quality parameter models trained to real-time localization to cope with spatially heterogeneous signal propagation environments. First, after the training phase, the system saves a global elite parameter set consisting of K elite parameters. For each elite parameter, the system also stores the average spatial distribution gradients corresponding to the road segments that performed best during training, as its associated environmental gradient features. Upon entering the online localization phase, at each time step, for each particle i in the particle set, the system assumes (the particle's current position is assumed to be...) This involves calculating the spatial distribution gradient of the signal within a small neighborhood around the particle. For example, by virtually sampling the theoretical RSSI values ​​at four points (top, bottom, left, and right) around the particle, the rate of change of RSSI in the x and y directions is calculated, forming a gradient vector. Then, the system will use this real-time gradient vector. The system performs similarity matching with the environmental gradient feature vector associated with each elite parameter in the global elite parameter set, for example, by calculating cosine similarity. The system then selects the elite parameter with the highest similarity for particle i. Finally, the matched parameters are used when calculating the weight of particle i. To define the observation model.

[0158] In some embodiments, this dynamic parameter selection process can be implemented in several ways to achieve better results: Optionally, soft allocation can be used instead of hard allocation. The specific steps are as follows: after calculating the matching degree (similarity) between the real-time gradient and the gradient features of all elite parameters, instead of simply selecting the highest one, all matching degrees are used as weights to perform a weighted average of all elite parameters, resulting in a hybrid parameter customized for the current particle. This hybrid parameter is used to calculate the particle weight. This method makes parameter switching smoother and avoids the jumps in positioning results that may be caused by hard switching. Optionally, when calculating the spatial distribution gradient, not only theoretical RSSI values ​​are considered, but also actual observation values ​​are combined. The specific steps are as follows: within the neighborhood around the particle, not only is the theoretical RSSI gradient calculated, but also an observed RSSI gradient is estimated using the most recent real RSSI observations through interpolation or local regression. The theoretical gradient and the observed gradient are fused to obtain a more reliable real-time environmental gradient estimate for subsequent matching. It is understood that more complex machine learning models, such as small neural networks, can also be used to learn the mapping relationship from real-time signal features to optimal parameters; this is not limited here.

[0159] In some embodiments, the target may remain in one area for an extended period, leading to a high degree of clustering of positional assumptions among all particles. Consequently, all particles calculate similar spatial gradients and match the same elite parameter. If the environment changes abruptly, this parameter may become inapplicable, and the system, lacking diversity, cannot quickly switch. To address this, parameter perturbation can be introduced. When the system detects a high degree of consistency in parameter selection among all particles (e.g., over 95% of particles choosing the same elite parameter) for a sustained period, it can proactively assign a different elite parameter to a small subset of particles (e.g., 5%). This operation forcibly introduces parameter diversity, ensuring that sentinel particles always exist in the system exploring using other models. When environmental changes render the current dominant parameter ineffective, the weights of these sentinel particles rapidly increase, guiding the entire particle swarm to quickly switch to a more suitable parameter model, thereby enhancing the system's robustness to environmental changes.

[0160] In this embodiment, by employing a technical solution that deeply integrates adaptive optimization of noise parameters with the particle filter positioning process, and constructing an evolutionary computational closed loop based on positioning error feedback, the core parameters of the positioning model can be dynamically adjusted and optimized according to actual environmental changes. This solution effectively solves the technical problem in traditional particle filter positioning methods where model parameters remain fixed once calibrated, making it difficult to adapt to dynamic indoor environments such as personnel movement and changes in object placement, leading to a decrease in positioning accuracy. Furthermore, it achieves the continuous maintenance of high accuracy and robustness of the Bluetooth positioning system in complex and time-varying indoor environments, improving the reliability of positioning services and user experience.

[0161] The positioning system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 3 This is a schematic diagram of the physical device structure of a positioning system in an embodiment of this application.

[0162] It should be noted that, Figure 3 The structure of the positioning system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0163] like Figure 3 As shown, the positioning system includes a CPU 301, which can perform various appropriate actions and processes according to a program stored in ROM 302 or a program loaded into RAM 303 from storage section 308, such as performing the methods described in the above embodiments. RAM 303 also stores various programs and data required for system operation. CPU 301, ROM 302, and RAM 303 are interconnected via bus 304. I / O interface 305 is also connected to bus 304.

[0164] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including hard disks, etc.; and communication section 309 including network interface cards such as LAN (Local Area Network) cards, modems, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.

[0165] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by CPU 301, it performs the various functions defined in the present invention.

[0166] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.

[0167] Specifically, the positioning system in this embodiment includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the indoor Bluetooth positioning method provided in the above embodiment.

[0168] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the positioning system described in the above embodiments; or it may exist independently and not assembled into the positioning system. The storage medium carries one or more computer programs that, when executed by a processor of the positioning system, cause the positioning system to implement the indoor Bluetooth positioning method provided in the above embodiments.

[0169] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0170] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

Claims

1. An indoor Bluetooth positioning method, characterized in that, Applied to a positioning system, the method includes: Multiple initial particles containing initial position information, initial motion state, and initial weights are generated, and initial noise parameters are assigned to each initial particle to form an initial particle set; Based on the motion model defined by the initial motion state and the initial noise parameters, the predicted position of each initial particle in the initial particle set at the next moment is calculated, and the predicted position is substituted into the signal propagation model to obtain the predicted signal strength. Calculate the signal likelihood of the predicted signal strength and the observed signal strength in the calibration dataset, update the initial weights of the initial particles based on the signal likelihood, and obtain the updated weights and the updated particle set; Calculate the effective number of particles in the updated particle set, and when the effective number of particles is lower than a preset threshold, resample the updated particle set to obtain an optimized particle set; Calculate the positioning error between the estimated trajectory of each optimized particle in the optimized particle set and the real trajectory in the calibration dataset, and determine the parameter fitness of the noise parameter corresponding to the optimized particle based on the positioning error; The optimal noise parameter is determined based on the parameter fitness, and other noise parameters are guided to evolve towards the direction of the optimal noise parameter to generate an optimized parameter set; Repeat the steps of generating the optimized particle set and the optimized parameter set until the preset iteration condition is met, and then determine the global optimal noise parameter based on the corresponding optimized parameter set. Based on the globally optimal noise parameters, particle filtering localization is performed to obtain the location calculation result.

2. The method according to claim 1, characterized in that, The step of calculating the effective number of particles in the updated particle set, and resampling the updated particle set when the effective number of particles is lower than a preset threshold to obtain an optimized particle set, specifically includes: Calculate the number of valid particles in the updated particle set; When the number of effective particles is lower than a preset threshold, the update weight of each updated particle is multiplied by the total number of particles in the updated particle set to obtain the expected number of copies of the updated particle. The desired replication number is rounded down to obtain the deterministic replication number, and each of the updated particles is replicated according to the deterministic replication number to form the first optimized particle. Subtract the corresponding deterministic replication number from each of the expected replication numbers to obtain the residual weights; Normalize all the residual weights to obtain the normalized residual weight distribution; The difference between the total number of particles and the number of the first optimized particles is used as the difference number. According to the normalized residual weight distribution, particles with the difference number are randomly selected from the unreplicated update particles to form the second optimized particles. The first optimized particle and the second optimized particle are merged to form the optimized particle set.

3. The method according to claim 1, characterized in that, The step of calculating the positioning error between the estimated trajectory of each optimized particle in the optimized particle set and the true trajectory in the calibration dataset, and determining the parameter fitness of the noise parameter corresponding to the optimized particle based on the positioning error, specifically includes: Based on the noise parameters, particle filtering localization is performed on multiple optimized particles in the optimized particle set to obtain an estimated trajectory containing multiple position estimation points; Each estimated position point on the estimated trajectory is compared with the corresponding real position point on the preset real trajectory in the calibration dataset to calculate multiple positioning error values; The average positioning error is obtained by averaging the multiple positioning error values. The reciprocal of the average positioning error is taken, and the corresponding reciprocal value is determined as the parameter fitness corresponding to the noise parameter.

4. The method according to claim 1, characterized in that, Before the step of generating multiple initial particles containing initial position information, initial motion state, and initial weights, and assigning initial noise parameters to each initial particle to form an initial particle set, the method further includes: The baseline range of the noise parameters and the planned total number of initial particles are preset; The baseline value range is divided into multiple equally spaced parameter sub-intervals based on the total number of plans, to ensure that each parameter sub-interval corresponds to at least one initial particle to be assigned. Random sampling is performed within each parameter sub-interval to generate initial noise parameters for the corresponding initial particles.

5. The method according to claim 4, characterized in that, Before the steps of setting the baseline range of the noise parameters and the planned total number of initial particles, the method further includes: Obtain a calibration dataset containing signal strength data and corresponding real-world location coordinates; Iterate through the preset candidate noise parameters, calculate the positioning deviation of the calibration dataset under the corresponding parameters based on each candidate noise parameter, and generate a deviation set; Extract the minimum deviation value from the deviation set, and use the candidate noise parameter associated with the minimum deviation value as the benchmark parameter to generate a benchmark value range based on the benchmark parameter.

6. The method according to claim 1, characterized in that, The step of determining the optimal noise parameter based on the parameter fitness and guiding other noise parameters to evolve towards the optimal noise parameter to generate an optimized parameter set specifically includes: Sort the parameters in descending order according to their fitness to generate an ordered list of parameters. A predetermined number of noise parameters are truncated from the top of the ordered parameter list to form an elite parameter subset; For non-elite noise parameters outside the elite parameter subset, one elite parameter is randomly selected from the elite parameter subset as the corresponding evolution target. Calculate the update vector for each of the non-elite noise parameters pointing to the corresponding evolution target, and update the non-elite noise parameters accordingly; The optimized parameter set is constructed based on all updated non-elite noise parameters and the elite parameter subset.

7. The method according to claim 6, characterized in that, Before the step of performing particle filtering localization based on the globally optimal noise parameters to obtain the position calculation result, the method further includes: After reaching the preset number of iterations, the latest subset of elite parameters is determined as the global elite parameter set; At each moment of performing particle filtering localization, the spatial distribution gradient of the Bluetooth beacon signal strength within a preset range of the target optimized particle is calculated; the target optimized particle is a particle in the latest set of optimized particles; The spatial distribution gradient is matched with the environmental gradient features associated with each elite parameter in the global elite parameter set during the training phase to obtain the elite parameter with the highest matching degree. The elite parameters with the highest matching degree are assigned to the target optimized particle to calculate the target signal strength and target weight of the target optimized particle.

8. A positioning system, characterized in that, The positioning system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors invoke the computer instructions to cause the positioning system to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the positioning system, the positioning system performs the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on the positioning system, it causes the positioning system to perform the method as described in any one of claims 1-7.