Fusion positioning method, system and device based on bee colony algorithm and medium
By using a swarm algorithm in indoor positioning iteratively optimizes the initial candidate solutions of the Bluetooth beacon network, and combining geometric mean calculations, the problem of difficult balance between calculation complexity and positioning accuracy in the prior art is solved, and fast and accurate indoor positioning is achieved.
Patent Information
- Application Number
- CN202510812493.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-07-22
AI Technical Summary
Existing indoor positioning technologies are difficult to balance the computational complexity and the accuracy requirements of real-time calculations, resulting in the inability to quickly and accurately realize indoor positioning.
The swarm algorithm is used to iteratively optimize the initial candidate solutions of the indoor Bluetooth beacon network. Combined with the geometric mean calculation method, the initial candidate solutions are generated by deploying the indoor Bluetooth beacon network, and the swarm intelligence characteristics and fitness-oriented iterative optimization of the swarm algorithm are used to reduce the computational complexity and improve the positioning accuracy.
It realizes fast and accurate indoor positioning, reduces the computational complexity, and improves positioning accuracy and anti-interference ability, so as to effectively position in complex environments.
Smart Images

Figure CN120358458A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of indoor positioning technology, and particularly to a fusion positioning method, system, medium and device based on a bee colony algorithm. Background Art
[0002] With the rapid development of mobile Internet technology, people's demand for indoor positioning services is increasing day by day. Indoor positioning technology has broad application prospects in many fields such as intelligent buildings, shopping mall navigation, industrial production, and emergency rescue. Different from outdoor positioning, the signal propagation in the indoor environment is affected by factors such as wall occlusion and multipath effect, making the positioning process more complex and requiring special positioning methods to ensure positioning accuracy.
[0003] In related indoor positioning technologies, a positioning method based on particle filtering is mostly adopted. The advantage of this method lies in its strong global convergence ability and adaptability to nonlinear problems, so that it can effectively overcome the positioning deviation caused by multipath interference or non-line-of-sight propagation (NLOS) in complex environments. However, in actual application, in order to obtain high positioning accuracy, a large number of particle samples need to be maintained, which leads to a significant increase in computational complexity; and if the number of particles is reduced to reduce the computational burden, it will cause a decrease in positioning accuracy. Therefore, it is difficult to balance the computational complexity and the accuracy requirements of real-time calculation by using this method, resulting in the inability to quickly and accurately achieve indoor positioning. Summary of the Invention
[0004] This application provides a fusion positioning method, system, medium and device based on a bee colony algorithm, which can quickly and accurately achieve indoor positioning.
[0005] In the first aspect, this application provides a fusion positioning method based on a bee colony algorithm, and the method includes: Deploy an indoor Bluetooth beacon network, and generate initial candidate solutions corresponding to multiple initial candidate points in the initial search area according to the Bluetooth beacon network; Use the bee colony algorithm to calculate the fitness of each of the initial candidate solutions, and update and iterate each of the initial candidate solutions according to the fitness to obtain a target candidate solution set; Determine the target candidate solution set that meets the iteration termination condition as the final candidate solution set, and determine the final candidate solution with the best fitness in the final candidate solution set; Take the geometric mean of the final candidate solutions as the final position estimate in the initial search area.
[0006] By adopting the above technical solution, an indoor Bluetooth beacon network is deployed and an initial candidate solution is generated. The bee colony algorithm is used to iteratively optimize the initial candidate solution. Its unique swarm intelligence characteristics enable the search process to maintain a relatively fast convergence speed and effectively avoid falling into local optima. When the iteration termination condition is reached, the solution with the optimal fitness in the final candidate solution set is selected, and the final position estimate is obtained by combining the geometric mean calculation method. This processing method not only ensures the accuracy of the result but also has good anti-interference ability. Compared with the related technology, the technical solution provided by this application reduces the computational complexity through the parallel computing characteristics of the bee colony algorithm, and at the same time improves the positioning accuracy by using fitness-guided iterative optimization and geometric mean fusion, so as to balance the computational complexity and the accuracy requirements of real-time calculation, and quickly and accurately achieve indoor positioning.
[0007] Optionally, the method of using the bee colony algorithm to calculate the fitness of each of the initial candidate solutions and updating and iterating each of the initial candidate solutions according to the fitness to obtain a target candidate solution set includes: In the employed bee stage of the bee colony algorithm, the fitness calculation formula is used to calculate the fitness corresponding to each of the initial candidate solutions; In the onlooker bee stage of the bee colony algorithm, elite candidate solutions are selected from the initial candidate solutions according to the fitness, and the elite candidate solutions are adjusted to obtain a first target candidate solution set corresponding to each of the initial candidate points; Each of the initial candidate solutions is updated and iterated according to the fitness of the first target candidate solution set to obtain a second target candidate solution set; In the scout bee stage of the bee colony algorithm, stagnant solutions with the same iteration results for 3 times in the second target candidate solution set are removed to obtain a target candidate solution set.
[0008] By adopting the above technical solution, the bee colony algorithm is divided into three stages: employed bees, onlooker bees, and scout bees, and an efficient iterative optimization mechanism is constructed. In the employed bee stage, the initial candidate solutions are evaluated through the fitness calculation formula, providing an accurate index basis for subsequent optimization. The onlooker bee stage introduces a screening and adjustment mechanism for elite candidate solutions, enabling the algorithm to quickly converge to the central region of the high-quality solution set and improving the search efficiency. The first target candidate solution set is obtained by adjusting the elite candidate solutions, and the second target candidate solution set is obtained based on this for update and iteration. This double-layer iterative structure not only ensures the diversity of solutions but also speeds up the convergence speed. In the scout bee stage, by identifying and removing stagnant solutions with the same iteration results for 3 consecutive times, the algorithm is effectively prevented from falling into local optima, enhancing the global search ability of the algorithm.
[0009] Optionally, the step of using the fitness calculation formula to calculate the fitness corresponding to each of the initial candidate solutions in the employed bee stage of the bee colony algorithm includes: Calculate the positioning error and azimuth error of the initial candidate points according to the TDOA error function and the AOA error function respectively; Perform normalization and weighting on the positioning error and the azimuth error to obtain the fitness of the initial candidate solution.
[0010] By adopting the above technical solution, the TDOA error function is used to evaluate the accuracy of the time difference of arrival of signals, while the AOA error function evaluates the deviation degree of the arrival angle of signals. This dual evaluation mechanism can more comprehensively reflect the quality of candidate solutions. Normalizing and weighting the positioning error and the azimuth error enables the comprehensive consideration of two errors with different dimensions on the same scale. The obtained fitness value not only reflects the performance of the candidate solution in terms of position accuracy but also reflects its quality in terms of angle accuracy, providing a more accurate evaluation criterion for subsequent iterative optimization.
[0011] Optionally, the calculating the positioning error and azimuth error of the initial candidate points according to the TDOA error function and the AOA error function respectively includes: Substitute the position coordinates of the initial candidate point and the observation parameters of the Bluetooth beacon into the TDOA error function to obtain the positioning error of the initial candidate point; The TDOA error function is: ; where TDOA represents the positioning error of the initial candidate point, N represents the number of pairs of Bluetooth beacons for TDOA measurement, i represents the i-th pair of Bluetooth beacons for TDOA measurement, represents the TDOA observation parameter obtained according to the Bluetooth beacon and x and y respectively represent the abscissa and ordinate of the initial candidate point, and c represents the electromagnetic wave propagation speed; Substitute the position coordinates of the initial candidate point and the observation parameters of the Bluetooth beacon into the AOA error function to obtain the azimuth error of the initial candidate point; The AOA error function is: ; where AOA represents the azimuth error of the initial candidate point, N represents the total number of Bluetooth beacons for AOA measurement, i represents the i-th Bluetooth beacon for AOA measurement, represents the AOA observation parameter of the i-th Bluetooth beacon, x and y respectively represent the abscissa and ordinate of the initial candidate point, , respectively represent the abscissa and ordinate of the i-th Bluetooth beacon.
[0012] By adopting the above technical solution, the position coordinates of the initial candidate point and the actual observation parameters of the Bluetooth beacon are substituted into the corresponding error functions for calculation. Among them, the TDOA error function accurately evaluates the accuracy of the candidate point in the time difference measurement dimension by calculating the square error between the geometric distance difference between the initial candidate point and different Bluetooth beacon pairs and the actual TDOA observation parameters. At the same time, the AOA error function effectively evaluates the accuracy of the candidate point in the angle measurement dimension by calculating the square error between the theoretical azimuth angle of the initial candidate point and each Bluetooth beacon and the actual AOA observation parameter. The design of these two error functions fully considers the electromagnetic wave propagation speed and geometric relationship, so that the error calculation result can accurately reflect the deviation between the candidate point and the actual position.
[0013] Optionally, the normalizing and weighting the positioning error and the azimuth error to obtain the fitness of the initial candidate solution includes: Substituting the positioning error, the azimuth error, and the initial search area into the fitness calculation formula to obtain the fitness of the initial candidate solution; The fitness calculation formula is: ; Wherein, represents the fitness of the initial candidate solution, represents the initial weight, TDOA represents the positioning error, AOA represents the positioning angle error, represents the boundary penalty term of the initial search area; The constraint formula of the boundary penalty term is: ; Wherein, is the penalty coefficient, represents the parameter of the k-th boundary of the initial search area, and n represents the number of boundaries of the initial search area.
[0014] By adopting the above technical solution, by introducing the initial weight to weighted balance the TDOA positioning error and the AOA azimuth error, the two different types of measurement errors can reasonably affect the fitness value according to their importance. At the same time, by normalizing the TDOA and AOA errors by dividing them by their maximum values respectively, it is ensured that the error terms with different dimensions can be compared and fused on the same scale. In particular, by introducing the boundary penalty term, using the penalty coefficient and the boundary parameter to punish the candidate solutions that exceed the initial search area, the search range is effectively constrained. This multi-dimensional fitness calculation method can not only accurately evaluate the position accuracy and angle accuracy of the candidate solution, but also ensure the effectiveness of the search process through the boundary penalty mechanism, thereby improving the convergence efficiency and positioning accuracy of the algorithm.
[0015] Optionally, the method further includes: Calculate the signal-to-noise ratio of the received Bluetooth beacon signal; If the number of low-quality Bluetooth beacons with the signal-to-noise ratio lower than the first threshold exceeds the first quantity threshold, reduce the initial weight according to a preset step size; Count the ratio of Bluetooth beacons with valid AOA parameters to the total number of Bluetooth beacons; If the ratio is less than a preset ratio threshold, increase the initial weight according to a preset step size.
[0016] By adopting the above technical solution, calculating the signal-to-noise ratio of the received signal and comparing it with the first threshold can identify low-quality Bluetooth beacons; when the number of low-quality beacons exceeds the first quantity threshold, reducing the initial weight can reduce the influence of TDOA measurement in fitness calculation and avoid the interference of low-quality signals on the positioning result. At the same time, by counting the proportion of Bluetooth beacons with valid AOA parameters and comparing it with the preset ratio threshold, increasing the initial weight when the ratio is low can increase the weight ratio of TDOA measurement, so as to rely more on the TDOA measurement result when the AOA measurement quality is poor. This two-way weight adjustment mechanism based on signal quality and parameter validity can automatically balance the influence degree of TDOA and AOA measurements according to the actual environmental conditions, improving the adaptability of the positioning algorithm to complex environments and the stability of positioning accuracy.
[0017] Optionally, the iteration termination condition is that the fitness standard deviation converges or the number of iterations reaches a preset number threshold. Determining the target candidate solution set that meets the iteration termination condition as the final candidate solution set includes: When the fitness standard deviation converges or the number of iterations reaches the preset number threshold, stop the iteration and determine the target candidate solution set obtained in this round of iteration as the final candidate solution set.
[0018] By adopting the above technical solution, the termination time of the algorithm is judged by monitoring two dimensions: the convergence of the fitness standard deviation and the number of iterations. When calculating the fitness standard deviation of the current round and comparing it with the previous round, if the change of the standard deviation tends to be stable, it indicates that the quality of the candidate solution has converged to a better level. Stopping the iteration at this time can ensure obtaining a high-quality solution set; at the same time, setting a preset number threshold as the upper limit of the number of iterations ensures that the algorithm can complete the calculation within a limited time. This dual termination judgment mechanism based on solution set quality and calculation efficiency not only avoids the problem of insufficient solution set quality caused by premature termination, but also prevents waste of computing resources caused by excessive iteration, improving the execution efficiency of the algorithm while ensuring positioning accuracy.
[0019] Optionally, in the observation bee stage of the bee colony algorithm, elite candidate solutions are selected from the initial candidate solutions according to the fitness, and the elite candidate solutions are adjusted to obtain a first target candidate solution set corresponding to each of the initial candidate points, including: Selecting elite candidate solutions from the initial candidate solutions according to the fitness; Generating neighborhood candidate solutions corresponding to the elite candidate solutions, where the neighborhood candidate solutions are: ; where, ( , ) represents the neighborhood candidate solution, ( , ) represents the elite candidate solution, represents a normally distributed random variable with a mean of 0 and a variance of ; Comparing the first fitness of the elite candidate solution with the second fitness of the neighborhood candidate solution; If the second fitness is better than the first fitness, updating the elite candidate solution to the corresponding neighborhood candidate solution to obtain a first target candidate solution set corresponding to each of the initial candidate points.
[0020] By adopting the above technical solution, the perturbation method based on the Gaussian distribution not only ensures the continuity of the search but also provides appropriate randomness. By comparing the fitness of the elite candidate solution and the corresponding neighborhood candidate solution and updating the solution when the neighborhood candidate solution performs better, this update mechanism ensures that the search process always develops in a better direction. Such a local search strategy not only makes full use of the information of the discovered high-quality solutions but also explores new regions in the solution space through random perturbations, improving the local fine search ability of the algorithm while maintaining the search diversity, thereby accelerating the convergence speed of the algorithm and improving the accuracy of the final positioning result.
[0021] Optionally, substituting the geometric mean of the final candidate solutions into the weighted fusion formula to obtain the final position estimate within the initial search region; The weighted fusion formula is: ; where, ( , ) represents the final position estimate, is the reciprocal of the fitness, , represent the abscissa and ordinate of the final candidate solution.
[0022] By adopting the above technical solution, the geometric information of the final candidate solution and its fitness information are comprehensively processed, achieving more accurate position estimation. This method uses the reciprocal of the fitness as the weight. This design enables candidate solutions with smaller fitness values (i.e., better quality) to have a greater influence on the final position estimation. By calculating the weighted average of the abscissa and ordinate respectively, the obtained final position estimation takes into account both the spatial distribution information of all final candidate solutions and reasonably allocates weights according to their quality. This weighted fusion mechanism can not only make full use of the information of multiple candidate solutions to reduce the influence of individual outliers, but also ensure the dominant role of high-quality candidate solutions in the final result through the introduction of fitness weights, thereby improving the accuracy and reliability of the positioning result.
[0023] In a second aspect, the present application provides a fusion positioning system based on a bee colony algorithm, the system comprising: An initialization module, configured to deploy an indoor Bluetooth beacon network and generate initial candidate solutions corresponding to multiple initial candidate points within an initial search area according to the Bluetooth beacon network; An iteration module, configured to calculate the fitness of each of the initial candidate solutions by using a bee colony algorithm and update and iterate each of the initial candidate solutions according to the fitness to obtain a target candidate solution set; A processing module, configured to determine the target candidate solution set that meets the iteration termination condition as the final candidate solution set and determine the final candidate solution with the optimal fitness in the final candidate solution set; An output module, configured to use the geometric mean of the final candidate solutions as the final position estimation within the initial search area.
[0024] In a third aspect, the present application provides a computer storage medium storing multiple instructions, the instructions being suitable for being loaded and executed by a processor to perform any one of the above methods.
[0025] In a fourth aspect, the present application provides an electronic device comprising a processor, a memory, and a transceiver, the memory being configured to store instructions, the transceiver being configured to communicate with other devices, and the processor being configured to execute the instructions stored in the memory to enable the electronic device to perform any one of the above methods.
[0026] In summary, the beneficial effects brought by the technical solution of the present application include: By adopting the above technical solutions, an indoor Bluetooth beacon network is deployed and an initial candidate solution is generated. The bee colony algorithm is used to iteratively optimize the initial candidate solution. Its unique swarm intelligence characteristics enable the search process to not only maintain a fast convergence speed but also effectively avoid falling into local optima. When the iteration termination condition is reached, the solution with the optimal fitness in the final candidate solution set is selected, and the final position estimate is obtained by combining the geometric mean calculation method. This processing method not only ensures the accuracy of the result but also has good anti-interference ability. Compared with the related technologies, the technical solution provided by this application reduces the computational complexity through the parallel computing characteristics of the bee colony algorithm, and at the same time improves the positioning accuracy by using fitness-guided iterative optimization and geometric mean fusion, so as to balance the computational complexity and the accuracy requirements of real-time calculation, and achieve indoor positioning quickly and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a schematic flowchart of a fusion positioning method based on the bee colony algorithm according to an embodiment of this application; Figure 2 is a schematic structural diagram of a fusion positioning system based on the bee colony algorithm according to an embodiment of this application; Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of this application.
[0028] Description of the reference numerals: 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments.
[0030] In the description of the embodiments of this application, words such as "exemplary", "for example" or "for illustration" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary", "for example" or "for illustration" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example" or "for illustration" is intended to present related concepts in a specific manner.
[0031] In the description of the embodiments of the present application, the term "plurality" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0032] Please refer to Figure 1 , which is a schematic flowchart of a fusion positioning method based on a bee colony algorithm provided by an embodiment of the present application. This method can be implemented depending on a computer program, can be implemented depending on a single-chip microcomputer, or can run on a fusion positioning system based on the von Neumann architecture and based on the bee colony algorithm. This computer program can be integrated in an application or can run as an independent tool class application. The following will elaborate on the specific steps of the fusion positioning method based on the bee colony algorithm.
[0033] S101: Deploy an indoor Bluetooth beacon network and generate initial candidate solutions corresponding to multiple initial candidate points within the initial search area according to the Bluetooth beacon network; Among them, the Bluetooth beacon network is an infrastructure for indoor positioning, which consists of multiple Bluetooth beacons deployed in the indoor space according to a preset layout. These beacons continuously broadcast signals based on the low-power Bluetooth technology, and each beacon serves as a reference point with a known position. When a mobile terminal enters the coverage area of the beacon network, it can receive signals emitted by multiple beacons and measure parameters such as signal strength, time difference of arrival, and angle of arrival. Through these measurement data, combined with the positioning algorithm, the position of the mobile terminal can be calculated. The Bluetooth beacon network has advantages such as low deployment cost, low power consumption, stable signal, and controllable coverage range, and is suitable for indoor scenarios such as shopping malls, office buildings, and hospitals.
[0034] Regarding the setting of Bluetooth beacons, in the embodiments of the present application, the minimum distance between any two Bluetooth beacons is not less than 2 meters. When the Bluetooth beacons are deployed too densely, the overlapping area of signals will increase significantly, and the receiving end may receive multiple signals with similar intensities at the same time. In this case, it is difficult to accurately distinguish the signal sources, which is likely to cause signal interference and positioning errors. The minimum distance of 2 meters can reduce the confusion risk caused by signal overlap while maintaining the continuity of signal coverage. At the same time, in the positioning based on TDOA (time difference of arrival), it is necessary to calculate the time difference of signals arriving at different beacons. If the beacon spacing is too small, the resolution of time difference measurement will decrease, affecting the positioning accuracy.
[0035] Among them, the initial search area refers to a specific spatial range delimited in advance during indoor positioning. In the embodiments of the present application, it can be understood as a closed polygon area where the target to be located may appear. This area is usually determined by the coverage range of the Bluetooth beacon network.
[0036] Among them, the initial candidate points refer to multiple possible position points generated in a uniform distribution manner within the initial search area. In the embodiments of the present application, it can be understood as N position points distributed within the map range according to certain uniform interval or grid division rules. Each position point is represented by its two-dimensional coordinates (x, y), and the distribution of these position points needs to cover the entire initial search area as evenly as possible.
[0037] Among them, the initial candidate solution refers to a set of complete position information and its related parameters corresponding to each initial candidate point. In the embodiments of the present application, it can be understood as a solution vector containing the two-dimensional coordinates (x, y) of the candidate point and various observation parameters obtained through TDOA and AOA measurements at this point position. These parameters include the time difference of arrival and arrival angle information between each Bluetooth beacon. It is used as the initial search solution of the swarm algorithm, and each initial candidate solution represents a possible target position solution.
[0038] In the embodiments of the present application, in this embodiment, first, a Bluetooth beacon network needs to be deployed in the indoor space. These beacons, as reference points with known positions, are responsible for sending signals and performing TDOA and AOA measurements. Based on the coverage range of the deployed Bluetooth beacon network, a closed polygon area is determined as the initial search area, which represents the spatial range where the target to be located may appear. Then, within this initial search area, N initial candidate points are generated in a uniform distribution manner, and the positions of these candidate points need to evenly cover the entire search area to ensure that potential target positions are not missed. For each initial candidate point, the TDOA and AOA observation parameters between it and each Bluetooth beacon are calculated based on its position coordinates, and these parameters and the position coordinates together form a complete initial candidate solution.
[0039] Specifically, the following method is adopted to generate the initial candidate solutions corresponding to multiple initial candidate points within the initial search area. ; Among them, represents the set of generated initial candidate solutions, represents the position vector of the k-th initial candidate point, 、 respectively represent the abscissa and ordinate of the k-th initial candidate point, 、 represent the minimum and maximum values of the initial search area on the x-axis, 、 It represents the minimum and maximum values of the initial search area on the y-axis, and N represents the total number of initial candidate points.
[0040] In an optional real-time manner, according to the map features of the initial search area in the actual situation, a limiting constraint can be added to the search radius to improve the efficiency of subsequent calculation and positioning.
[0041] The set of initial candidate solutions generated by the above method ensures that the initial candidate points are uniformly and randomly distributed within the given rectangular search area. The coordinates of each point are independently randomly generated from their respective intervals, and a total of N such candidate points are generated to form the initial candidate solution set.
[0042] S102: Calculate the fitness of each initial candidate solution using the bee colony algorithm, and update and iterate each initial candidate solution according to the fitness to obtain the target candidate solution set; The bee colony algorithm is an optimization algorithm based on group cooperation. Its principle is to simulate the information sharing and cooperation mechanism between individuals, guiding the population to efficiently search for the global optimal solution in the solution space. In indoor positioning, the bee colony algorithm is often used to optimize multi-source positioning parameters (such as signal strength weights, sensor fusion coefficients, etc.). Especially in complex environments, it can effectively overcome the positioning deviation caused by multipath interference or non-line-of-sight propagation (NLOS). Its advantage lies in its strong global convergence ability and adaptability to nonlinear problems.
[0043] Among them, the fitness of the initial candidate solution refers to a metric value used to evaluate the proximity of each initial candidate solution to the actual target position. In the embodiments of this application, it can be understood as an error function between the TDOA and AOA observation values calculated based on the candidate point positions and the actual measurement values. This error function comprehensively considers the weighted sum of the time difference of arrival error and the angle of arrival error.
[0044] The target candidate solution set refers to the solution set composed of candidate solutions with better fitness values after each employed bee search stage. In the embodiments of this application, it can be understood as the set formed by selecting the first several candidate solutions with the smallest fitness values from all current candidate solutions. The TDOA and AOA observation values corresponding to these candidate solutions have smaller errors compared to the actual measurement values. It is used to narrow the search range of the subsequent follower bees, enabling the algorithm to perform more refined searches in the neighborhood of these better solutions.
[0045] In this embodiment, the bee colony algorithm is used to optimize and calculate the initial candidate solutions. First, calculate the fitness value of each initial candidate solution, which reflects the error between the TDOA and AOA observation values calculated at the candidate solution position and the actual measured values. In the employed bee stage, local search is performed on each initial candidate solution, new candidate solutions are randomly generated within its neighborhood and their fitness values are calculated. If the fitness value of the new solution is better than that of the original solution, it is updated as the new solution. When a certain candidate solution cannot find a better solution after multiple local searches, this solution is considered to have reached the limit number of times, and the scout bee stage is triggered to randomly generate new candidate solutions again. In the follower bee stage, calculate the probability of being selected according to the fitness value of the candidate solution. The smaller the fitness value of the solution, the greater the probability of being selected. After being selected, more refined local search is performed within the neighborhood of this solution. In this way, the algorithm continuously iterates and updates the candidate solutions, and gradually converges to the vicinity of the solution with the smallest fitness value. Finally, select the first several solutions with the smallest fitness values from all candidate solutions to form the target candidate solution set.
[0046] Based on the above embodiment, as an alternative implementation manner, the steps of using the bee colony algorithm to update and iterate in S102 specifically further include S201 - S204.
[0047] S201: In the employed bee stage of the bee colony algorithm, use the fitness calculation formula to calculate the fitness corresponding to each initial candidate solution; In this embodiment, in the employed bee stage, it is first necessary to calculate the fitness value of each initial candidate solution, which is used to evaluate the closeness of the candidate solution to the actual target position. For each initial candidate solution, calculate the theoretical values of TDOA and AOA between it and each Bluetooth beacon based on its position coordinates, compare these theoretical values with the actual measured values, and calculate the error magnitude. Specifically, the fitness calculation formula comprehensively considers the weighted sum of the TDOA error term and the AOA error term. The TDOA error term reflects the deviation degree between the time difference of arrival between the candidate point and each pair of beacons and the actual measured value, and the AOA error term reflects the deviation degree between the arrival angle between the candidate point and each beacon and the actual measured value. The importance of the two types of error terms is adjusted through the weight coefficient.
[0048] Specifically, the steps of calculating the fitness in step S201 specifically include S301 - S302.
[0049] S301: According to the TDOA error function and the AOA error function, calculate the positioning error and the azimuth error of the initial candidate point respectively; Substitute the position coordinates of the initial candidate point and the observation parameters of the Bluetooth beacon into the TDOA error function to obtain the positioning error of the initial candidate point; The TDOA error function is: ; Among them, TDOA represents the positioning error of the initial candidate point, N represents the number of Bluetooth beacons for TDOA measurement, and i represents the i-th pair of Bluetooth beacons for TDOA measurement. represents the TDOA observation parameter obtained according to the Bluetooth beacon and x and y respectively represent the abscissa and ordinate of the initial candidate point, and c represents the electromagnetic wave propagation speed. TDOA (Time Difference of Arrival) is a commonly used ranging and positioning technology. Its basic principle is to use the time difference of the signal arriving at different receiving devices for positioning. In this embodiment, the position information of the target is calculated by measuring the time difference of the signal arriving at different Bluetooth beacons.
[0050] The TDOA error function is used to calculate the TDOA positioning error of the initial candidate point. The working principle of TDOA (Time Difference of Arrival) is to determine the position of the signal source based on the time difference of the signal arriving at different receiving devices. In practical applications, when the target emits a signal, the signal will be received by multiple receiving devices with fixed positions (Bluetooth beacons in this application). Since the distances from the target to each receiving device are different, the arrival times of the signal at each receiving device are also different. By measuring the time difference of the signal arriving at any two receiving devices, the target position can be determined to be on a hyperbola. When multiple pairs of receiving devices measure the time difference simultaneously, multiple hyperbolas will be formed, and the intersection point of these hyperbolas is the possible position of the target.
[0051] In this embodiment, this formula is used to calculate the TDOA positioning error of the initial candidate point. The TDOA error function calculates the sum of the squared errors between the time difference measured by each pair of beacons and the theoretical time difference by traversing and summing all the Bluetooth beacon pairs participating in the TDOA measurement. The theoretical time difference is obtained by dividing the distance difference between the candidate point and the two beacons by the electromagnetic wave propagation speed. This distance difference is calculated by the Euclidean distance formula, that is, substituting the candidate point coordinates and each beacon coordinate to calculate the straight-line distance between them. The actually measured time difference is the observation parameter directly obtained by the Bluetooth beacon device. The summation term in the TDOA error function reflects the accumulation of the measurement errors of all beacon pairs to obtain the overall error, and the squared term ensures that the error is always positive and gives a greater penalty to larger errors. The purpose of using this formula in this application is to construct a reliable error metric standard to evaluate the reliability of each candidate point position by comparing the difference between the theoretical calculated value and the actual measured value.
[0052] Substitute the position coordinates of the initial candidate point and the observation parameters of the Bluetooth beacon into the AOA error function to obtain the azimuth error of the initial candidate point. The AOA error function is: ; Among them, AOA represents the azimuth error of the initial candidate point, N represents the total number of Bluetooth beacons for AOA measurement, i represents the i-th Bluetooth beacon for AOA measurement, represents the AOA observation parameter of the i-th Bluetooth beacon, and x and y respectively represent the abscissa and ordinate of the initial candidate point, 、 respectively represent the abscissa and ordinate of the i-th Bluetooth beacon.
[0053] The working principle of AOA (Angle of Arrival) is to determine the position of the signal source by measuring the incident angle of the signal arriving at the receiving device. In practical applications, the receiving device (a Bluetooth beacon in this application) is usually equipped with an antenna array. By analyzing the phase difference of the signal arriving at each element of the antenna array, the incident angle of the signal can be calculated. When a receiving device measures the incident angle of the signal, it can be determined that the target is located on the ray starting from this receiving device and in the direction of the measured angle. When multiple receiving devices measure the incident angle simultaneously, the intersection of these rays is the possible position of the target.
[0054] The AOA error function is used to calculate the AOA azimuth error of the initial candidate point. The principle of the AOA error function is to compare the difference between the theoretically calculated azimuth angle and the actually measured azimuth angle. Among them, the theoretical azimuth angle is calculated based on the position coordinates of the initial candidate point and the Bluetooth beacon. The arctangent function arctant is used to calculate the coordinate difference to obtain the angle value, and this angle reflects the theoretical azimuth angle from the Bluetooth beacon to the candidate point. The actual azimuth angle is the AOA observation parameter directly measured by the antenna array of the Bluetooth beacon. The AOA error function traverses all the Bluetooth beacons participating in the AOA measurement, calculates the square of the difference between the theoretical azimuth angle and the actually measured azimuth angle for each beacon, and sums up all the squared errors to obtain the total AOA azimuth error. The purpose of adopting this formula in this application is to construct an error evaluation mechanism based on azimuth angle measurement, and to evaluate the accuracy of the candidate point position by calculating the deviation between the theoretical azimuth angle and the actual measurement value at the candidate point position.
[0055] S302: Normalize and weight the positioning error and the azimuth error to obtain the fitness of the initial candidate solution.
[0056] Specifically, substitute the positioning error, the azimuth error, and the initial search area into the fitness calculation formula to obtain the fitness of the initial candidate solution; The fitness calculation formula is: ; Among them, represents the fitness of the initial candidate solution, denotes the initial weight, TDOA denotes the positioning error, and AOA denotes the positioning angle error. denotes the boundary penalty term of the initial search area; The constraint formula of the boundary penalty term is: ; where is the penalty coefficient, denotes the parameter of the k-th boundary of the initial search area, and n denotes the number of boundaries of the initial search area.
[0057] Optionally, the penalty coefficient is set to 10.
[0058] In this embodiment, the fitness calculation formula comprehensively considers the constraints of three aspects: TDOA positioning error, AOA azimuth error, and search area boundary constraint. First, the formula normalizes the TDOA error and AOA error by dividing them by their respective maximum values, so that the two errors can be compared on the same scale. The initial weight coefficient is used to balance the importance of these two errors, and the weight coefficient controls the influence degree of TDOA and AOA measurements in the final fitness evaluation.
[0059] The boundary penalty term describes the boundary constraint of the search area through multiple linear equations. Each boundary is described by three parameters, and these parameters and the coordinates of the candidate solution together form a linear expression. The boundary penalty term takes the maximum value, squares the sum of the values of all boundary constraint expressions, and adjusts the influence degree of the boundary constraint through the penalty coefficient. This processing method ensures that the search process will impose appropriate binding force on the boundary area.
[0060] Based on the above embodiment, as an optional implementation manner, for the determination and update of the initial weight, the following method can be adopted: calculate the signal-to-noise ratio of the received Bluetooth beacon signal; Optionally, the signal-to-noise ratio can be calculated in the following manner: ; If the number of low-quality Bluetooth beacons with a signal-to-noise ratio lower than the first threshold exceeds the first quantity threshold, the initial weight is reduced according to a preset step size; Optionally, the first threshold can be set to 15 dB, and the first quantity threshold can be set to 30% of the total number of Bluetooth beacons, that is, .
[0061] The preset step size can be set to 0.1, and the adjustment method is expressed by the formula as .
[0062] Count the ratio of Bluetooth beacons with valid AOA parameters to the total number of Bluetooth beacons; First, count the number of valid AOA measurements , in the embodiment of the present application, the preset viewing rate threshold can be set to 0.7.
[0063] If the viewing rate is less than the preset viewing rate threshold, the initial weight is increased according to the preset step size.
[0064] When the viewing rate M / N is less than 0.7, the initial weight is increased according to the preset step size, and the adjustment method is expressed by the formula .
[0065] Based on the above embodiments, as an optional implementation manner, the iteration termination condition in the embodiment of the present application is that the fitness standard deviation converges or the number of iterations reaches the preset number threshold.
[0066] When the fitness standard deviation converges or the number of iterations reaches the preset number threshold, the iteration is stopped, and the target candidate solution set obtained in this round of iteration is determined as the final candidate solution set.
[0067] The judgment formula for the convergence of the fitness standard deviation is: ; Among them, represents the fitness standard deviation, which is used to measure the dispersion degree of the fitness distribution of all candidate solutions and reflects whether the search has converged to a certain area; represents the fitness value of the i-th candidate solution, which reflects the positioning error at this position, represents the mean value of the fitness of all candidate solutions, represents the convergence threshold, which is usually set to 0.01. When the standard deviation is less than the threshold, it is determined that the population has converged and the iteration is no longer continued.
[0068] During the iteration process of the bee colony algorithm, in order to avoid endless calculations and ensure that the algorithm can obtain an effective solution within a reasonable time, it is necessary to set appropriate iteration termination conditions. This embodiment adopts two termination conditions: the convergence of the fitness standard deviation and the number of iterations reaching the preset number threshold. The fitness standard deviation reflects the fitness distribution of each solution in the current candidate solution set. When the standard deviation tends to converge, it indicates that the solutions in the candidate solution set have tended to be stable, and continuing the iteration may not bring significant improvement. And setting the number threshold of iterations is to ensure that the algorithm ends within a limited time and prevent excessive iteration caused by falling into a local optimum.
[0069] In the specific implementation process, after each round of iteration is completed, first calculate the fitness standard deviation of all solutions in the current candidate solution set, and compare it with the standard deviation of the previous round of iteration to determine whether the convergence condition is reached. At the same time, record the number of completed iterations and compare it with the preset number threshold. When any one of these two conditions is met, the iteration process is stopped, and the target candidate solution set obtained at this time is used as the final candidate solution set.
[0070] S202: In the observation bee stage of the bee colony algorithm, elite candidate solutions are selected from the initial candidate solutions according to fitness, and the elite candidate solutions are adjusted to obtain the first target candidate solution set corresponding to each initial candidate point; In this embodiment, first, all initial candidate solutions are sorted according to the previously calculated fitness values, and the solutions with better fitness values are selected as elite candidate solutions. The purpose of selecting elite candidate solutions is to concentrate computing resources on the most potential solutions and avoid wasting computing resources on poorer solutions.
[0071] For each selected elite candidate solution, the observing bee will perform local search around it. The specific search process is to add a random perturbation to the position of the elite candidate solution to generate a new candidate position. The size and direction of this random perturbation will be dynamically adjusted according to the current iteration stage, so that a larger range of exploration can be carried out in the initial stage of the search, while more attention is paid to local fine search in the later stage. For each newly generated candidate position, its fitness value needs to be recalculated. If the fitness of the new position is better than the original position, the new position replaces the original elite candidate solution, thus ensuring the continuous improvement of the solution quality.
[0072] Based on the above embodiment, as an alternative implementation manner, step S202 specifically includes S401 - S404.
[0073] S401: Select elite candidate solutions from the initial candidate solutions according to fitness; S402: Generate neighborhood candidate solutions corresponding to the elite candidate solutions, where the neighborhood candidate solutions are: ; where, ( , ) represents the neighborhood candidate solution, ( , ) represents the elite candidate solution, represents a normal distribution random variable with a mean of 0 and a variance of ; The basic principle of the neighborhood candidate solution is to add a random perturbation subject to a normal distribution to the abscissa and ordinate of the elite candidate solution respectively, thereby forming new search points around the elite candidate solution. The mean of the normal distribution perturbation is set to zero, which means that the expected position of the perturbation is the position of the elite candidate solution, and the variance controls the amplitude range of the perturbation. By adjusting the size of the variance, the size of the search range can be controlled. A larger variance will generate a larger range of perturbations, which is beneficial to global search; a smaller variance will generate a smaller range of perturbations, which is beneficial to local fine search. The purpose of adopting this formula in this application is to effectively explore the area around the elite candidate solution. The characteristics of the normal distribution make the sampling probability higher in the area near the elite candidate solution and lower in the areas farther away.
[0074] S403: Compare the first fitness of the elite candidate solution with the second fitness of the neighborhood candidate solution; In the observing bee stage of the bee colony algorithm, in order to determine whether the newly generated neighborhood candidate solution is better than the original elite candidate solution, it is necessary to compare the fitness of the two. This comparison process first calculates the fitness value of the neighborhood candidate solution, that is, the second fitness. The calculation method is the same as that for calculating the first fitness of the elite candidate solution before. In the specific implementation process, the second fitness of the neighborhood candidate solution is directly compared with the first fitness of the corresponding elite candidate solution. Since the fitness value reflects the comprehensive performance of the candidate solution and includes evaluations in multiple aspects such as positioning accuracy and boundary constraints, the smaller the fitness value, the better the quality of the candidate solution.
[0075] S404: If the second fitness is better than the first fitness, update the elite candidate solution to the corresponding neighborhood candidate solution to obtain the first target candidate solution set corresponding to each initial candidate point.
[0076] When the second fitness of the neighborhood candidate solution is less than the first fitness of the elite candidate solution, it indicates that a better solution has been found around the elite candidate solution. At this time, it is necessary to replace the original elite candidate solution with the neighborhood candidate solution to complete the solution update process. Such an update operation is performed for each initial candidate point, and finally the first target candidate solution set is formed. The specific update process is that after comparing the fitness, if the neighborhood candidate solution performs better, its coordinate information and the corresponding fitness value are respectively replaced with the corresponding information of the elite candidate solution. By maintaining the parallel optimization of multiple candidate solutions, the possibility of the algorithm finding the global optimal solution is improved.
[0077] S203: Update and iterate each initial candidate solution according to the fitness of the first target candidate solution set to obtain the second target candidate solution set; In specific implementation, all solutions in the first target candidate solution set are sorted according to their fitness values. The smaller the fitness value, the better the quality of the solution. Based on the sorting result, the algorithm retains the solutions with better fitness for subsequent optimization, while the solutions with poor fitness need to be updated or re-initialized. During the update process, the algorithm selects different update strategies according to the fitness of each solution. For solutions with better fitness, a small-scale search is performed around them in order to find better solutions; for solutions with poor fitness, it may be necessary to search again in a larger range, or even re-initialize to jump out of the possible local optimal area.
[0078] S204: In the scout bee stage of the bee colony algorithm, stagnant solutions with the same iteration results in the second target candidate solution set are removed to obtain the target candidate solution set.
[0079] Among them, in the scout bee stage of the bee colony algorithm, in order to avoid the algorithm falling into local optimal solutions and improve the search efficiency, it is necessary to identify and process those stagnant solutions that have not been improved in multiple iterations. These stagnant solutions usually indicate that the search of the algorithm in a specific area has reached saturation, and continuing to search in these areas may not bring better results. In the specific implementation process, it is necessary to record and track the changes of each solution in the second target candidate solution set during consecutive iterations. By comparing the position coordinates and fitness values of the solutions in three consecutive iterations, if it is found that a certain solution has not changed in these three iterations, it is marked as a stagnant solution and removed from the candidate solution set.
[0080] S103: Determine the target candidate solution set that meets the iteration termination condition as the final candidate solution set, and determine the final candidate solution with the best fitness in the final candidate solution set; Among them, the final candidate solution set refers to the set of high-quality candidate solutions finally retained after the complete optimization process of the bee colony algorithm, including the elite solution optimization in the observer bee stage and the removal of stagnant solutions in the scout bee stage. In the embodiments of the present application, it can be understood as the set of candidate solutions with better fitness values remaining after multiple rounds of iterative optimization and the removal of stagnant solutions with the same iteration results in three consecutive iterations. These solutions comprehensively consider multiple evaluation indicators such as positioning error, azimuth error, and search area boundary constraints.
[0081] In this embodiment, when the algorithm reaches the iteration termination condition, it indicates that the current target candidate solution set already has good convergence. At this time, it is appropriate to determine it as the final candidate solution set. The satisfaction of the iteration termination condition means that either the fitness standard deviation has converged below the preset threshold, indicating that the quality of the candidate solutions tends to be stable; or the preset maximum number of iterations has been reached, ensuring that the algorithm ends within a limited time.
[0082] After the final candidate solution set is determined, it is necessary to select the solution with the optimal fitness as the final candidate solution from it. This process is completed by comparing the fitness values of all solutions in the final candidate solution set. Since the fitness value comprehensively considers multiple aspects such as positioning error, azimuth error, and boundary constraints, the solution with the smallest fitness value is the solution with the optimal comprehensive performance.
[0083] S104: Use the geometric mean of the final candidate solution as the final position estimate within the initial search area.
[0084] In this embodiment, the geometric mean calculation method is used to reduce the influence of individual extreme values on the final result and provide a more stable position estimate. Specifically, when calculating, the abscissa and ordinate of the final candidate solution are calculated separately. Multiply all the abscissa values of the final candidate solutions and then take the corresponding root to obtain the geometric mean of the abscissa. Calculate the geometric mean of the ordinate in the same way. The coordinate point composed of these two geometric means is the final position estimate within the initial search area.
[0085] Optionally, substitute the geometric mean of the final candidate solution into the weighted fusion formula to obtain the final position estimate within the initial search area; The weighted fusion formula is: ; where, ( , ) represents the final position estimate, is the reciprocal of the fitness, , represent the abscissa and ordinate of the final candidate solution.
[0086] The specific implementation process is to calculate the weighted average of the abscissa and ordinate respectively through the weighted fusion formula. The weight value is calculated based on the reciprocal of the fitness. In this way, the smaller the fitness value of the candidate solution, the greater the weight it obtains, which is in line with the characteristic that the smaller the fitness value, the better the quality of the solution. When calculating, multiply the abscissa of each final candidate solution by its corresponding weight and sum them, and then divide by the sum of all weights to obtain the weighted abscissa estimate value; calculate the weighted ordinate estimate value in the same way. The coordinate pair obtained in this way is the final position estimate within the initial search area.
[0087] The following is the system embodiment of the present application, which can be used to execute the method embodiment of the present application. For the details not disclosed in the system embodiment of the present application, please refer to the method embodiment of the application.
[0088] Please refer to Figure 2, which shows a schematic structural diagram of a fusion positioning system based on a bee colony algorithm provided by an exemplary embodiment of the present application. This system can be implemented as all or part of the system through software, hardware, or a combination of both. The fusion positioning system based on the bee colony algorithm includes: An initialization module, configured to deploy an indoor Bluetooth beacon network and generate initial candidate solutions corresponding to multiple initial candidate points within an initial search area according to the Bluetooth beacon network; An iteration module, configured to calculate the fitness of each initial candidate solution using a bee colony algorithm and update and iterate each initial candidate solution according to the fitness to obtain a target candidate solution set; A processing module, configured to determine the target candidate solution set that meets the iteration termination condition as the final candidate solution set and determine the final candidate solution with the optimal fitness in the final candidate solution set; An output module, configured to use the geometric mean of the final candidate solutions as the final position estimate within the initial search area.
[0089] Based on the above embodiment, as an alternative embodiment, the iteration module is further configured to, in the employed bee stage of the bee colony algorithm, calculate the fitness corresponding to each initial candidate solution using a fitness calculation formula; in the observing bee stage of the bee colony algorithm, screen out the elite candidate solutions from the initial candidate solutions according to the fitness, and adjust the elite candidate solutions to obtain a first target candidate solution set corresponding to each initial candidate point; update and iterate each initial candidate solution according to the fitness of the first target candidate solution set to obtain a second target candidate solution set; in the scout bee stage of the bee colony algorithm, remove the stagnant solutions with the same iteration results three times in the second target candidate solution set to obtain the target candidate solution set.
[0090] Based on the above embodiment, as an alternative embodiment, the iteration module is further configured to calculate the positioning error and azimuth error of the initial candidate points according to the TDOA error function and the AOA error function respectively; perform normalization and weighted processing on the positioning error and the azimuth error to obtain the fitness of the initial candidate solution.
[0091] Based on the above embodiment, as an alternative embodiment, the iteration module is further configured to substitute the position coordinates of the initial candidate points and the observation parameters of the Bluetooth beacon into the TDOA error function to obtain the positioning error of the initial candidate points; the TDOA error function is: ; where TDOA represents the positioning error of the initial candidate point, N represents the number of pairs of Bluetooth beacons for TDOA measurement, i represents the i-th pair of Bluetooth beacons for TDOA measurement, represents according to the Bluetooth beacon and The obtained TDOA observation parameters, where x and y respectively represent the abscissa and ordinate of the initial candidate point, and c represents the electromagnetic wave propagation speed; Substitute the position coordinates of the initial candidate point and the observation parameters of the Bluetooth beacon into the AOA error function to obtain the azimuth error of the initial candidate point; The AOA error function is: ; where AOA represents the azimuth error of the initial candidate point, N represents the total number of Bluetooth beacons for AOA measurement, i represents the i-th Bluetooth beacon for AOA measurement, represents the AOA observation parameter of the i-th Bluetooth beacon, x and y respectively represent the abscissa and ordinate of the initial candidate point, , respectively represent the abscissa and ordinate of the i-th Bluetooth beacon.
[0092] Based on the above embodiments, as an alternative embodiment, the iteration module is further configured to substitute the positioning error, azimuth error, and initial search area into the fitness calculation formula to obtain the fitness of the initial candidate solution; the fitness calculation formula is: ; where, represents the fitness of the initial candidate solution, represents the initial weight, TDOA represents the positioning error, AOA represents the positioning angle error, represents the boundary penalty term of the initial search area; The constraint formula for the boundary penalty term is: ; where, is the penalty coefficient, represents the parameter of the k-th boundary of the initial search area, and n represents the number of boundaries of the initial search area.
[0093] Based on the above embodiments, as an alternative embodiment, the iteration module is further configured to calculate the signal-to-noise ratio of the received Bluetooth beacon; if the number of low-quality Bluetooth beacons with a signal-to-noise ratio lower than the first threshold exceeds the first quantity threshold, the initial weight is decreased according to a preset step size; count the ratio of the number of Bluetooth beacons with valid AOA parameters to the total number of Bluetooth beacons; if the ratio is less than the preset ratio threshold, the initial weight is increased according to a preset step size.
[0094] Based on the above embodiments, as an alternative embodiment, the iteration module is further configured to stop iterating when the fitness standard deviation converges or the number of iterations reaches a preset number threshold, and determine the target candidate solution set obtained in this round of iteration as the final candidate solution set.
[0095] Based on the above embodiments, as an alternative embodiment, the iteration module is further configured to screen out elite candidate solutions from the initial candidate solutions according to fitness; generate domain candidate solutions corresponding to the elite candidate solutions, where the domain candidate solutions are: ; wherein, ( , ) represents the domain candidate solution, ( , ) represents the elite candidate solution, represents a normal distribution random variable with a mean of 0 and a variance of ; Compare the first fitness of the elite candidate solution with the second fitness of the domain candidate solution; If the second fitness is better than the first fitness, update the elite candidate solution to the corresponding domain candidate solution to obtain the first target candidate solution set corresponding to each of the initial candidate points.
[0096] Based on the above embodiments, as an alternative embodiment, the output module is further configured to substitute the geometric mean of the final candidate solutions into the weighted fusion formula to obtain the final position estimate within the initial search region; the weighted fusion formula is: ; wherein, ( , ) represents the final position estimate, is the reciprocal of the fitness, , represent the abscissa and ordinate of the final candidate solution.
[0097] Based on the above embodiments, as an alternative embodiment, the priority calculation module is further configured to The embodiments of the present application further provide a computer storage medium, which can store multiple instructions. The instructions are suitable for being loaded and executed by a processor to perform the fusion positioning method based on the bee colony algorithm as described in the above embodiments. The specific execution process can refer to the specific description of the embodiments and will not be elaborated here.
[0098] Please refer to Figure 3 , which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 3 shown, the electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0099] Among them, the communication bus 302 is used to realize the connection and communication between these components.
[0100] Among them, the user interface 303 may include a standard wired interface and a wireless interface.
[0101] Among them, the network interface 304 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0102] Among them, the processor 301 may include one or more processing cores. The processor 301 connects various parts within the entire server using various interfaces and lines, and by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, as well as calling data stored in the memory 305, it performs various functions of the server and processes data. Optionally, the processor 301 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 301 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 301 and may be implemented separately by a single chip.
[0103] Among them, the memory 305 may include random access memory (RAM) and may also include read-only memory. Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. The memory 305 may optionally also be at least one storage device located far from the aforementioned processor 301. Such asFigure 3 As shown in Figure 3 , the memory 305, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program of a fusion positioning method based on a swarm algorithm.
[0104] In Figure 3 In the electronic device 300 shown in Figure 3 , the user interface 303 is mainly used to provide an interface for the user to input and obtain the data input by the user; and the processor 301 can be used to call the application program of a fusion positioning method stored in the memory 305. When executed by one or more processors, the electronic device executes the methods in one or more of the above embodiments.
[0105] An electronic device-readable storage medium stores instructions. When executed by one or more processors, the electronic device executes the methods in one or more of the above embodiments.
[0106] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be adopted in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0107] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0108] In the several embodiments provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some service interfaces. The indirect couplings or communication connections of the devices or units can be in electrical or other forms.
[0109] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0110] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0111] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present application. The aforementioned memory includes various media that can store program codes, such as USB flash drives, mobile hard disks, magnetic disks, or optical discs.
[0112] The above are only exemplary embodiments of the present disclosure, and the scope of the present disclosure cannot be limited thereby. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. After considering the specification and the practice of the present disclosure, those skilled in the art will easily think of other implementation schemes of the present disclosure. The present application aims to cover any variations, uses, or adaptive changes of the present disclosure, and these variations, uses, or adaptive changes follow the general principles of the present disclosure and include the common general knowledge or conventional technical means in the technical field not recorded in the present disclosure.
Claims
1. A fusion positioning method based on the bee colony algorithm, characterized in that, The method includes: Deploy an indoor Bluetooth beacon network, and generate initial candidate solutions corresponding to multiple initial candidate points within an initial search area according to the Bluetooth beacon network; Use a bee colony algorithm to calculate the fitness of each of the initial candidate solutions, and update and iterate each of the initial candidate solutions according to the fitness to obtain a target candidate solution set; Determine the target candidate solution set that meets the iteration termination condition as the final candidate solution set, and determine the final candidate solution with the optimal fitness in the final candidate solution set; Take the geometric mean of the final candidate solutions as the final position estimate within the initial search area.
2. The method according to claim 1, characterized in that, The step of using a bee colony algorithm to calculate the fitness of each of the initial candidate solutions, and updating and iterating each of the initial candidate solutions according to the fitness to obtain a target candidate solution set includes: In the employed bee stage of the bee colony algorithm, use a fitness calculation formula to calculate the fitness corresponding to each of the initial candidate solutions; In the observing bee stage of the bee colony algorithm, screen out elite candidate solutions from the initial candidate solutions according to the fitness, and adjust the elite candidate solutions to obtain a first target candidate solution set corresponding to each of the initial candidate points; Update and iterate each of the initial candidate solutions according to the fitness of the first target candidate solution set to obtain a second target candidate solution set; In the scout bee stage of the bee colony algorithm, remove stagnant solutions with the same iteration results three times in the second target candidate solution set to obtain a target candidate solution set.
3. The method according to claim 2, characterized in that, The step of using a fitness calculation formula to calculate the fitness corresponding to each of the initial candidate solutions in the employed bee stage of the bee colony algorithm includes: Calculate the positioning error and azimuth error of the initial candidate points respectively according to the TDOA error function and the AOA error function; Perform normalized weighted processing on the positioning error and the azimuth error to obtain the fitness of the initial candidate solution.
4. The method according to claim 3, characterized in that, The step of calculating the positioning error and azimuth error of the initial candidate points respectively according to the TDOA error function and the AOA error function includes: Substitute the position coordinates of the initial candidate points and the observation parameters of the Bluetooth beacons into the TDOA error function to obtain the positioning error of the initial candidate points; The TDOA error function is: ; Among them, TDOA represents the positioning error of the initial candidate point, N represents the number of pairs of Bluetooth beacons for TDOA measurement, and i represents the i-th pair of Bluetooth beacons for TDOA measurement. represents according to the Bluetooth beacon and obtained TDOA observation parameters, x and y respectively represent the abscissa and ordinate of the initial candidate point, and c represents the electromagnetic wave propagation speed. Substitute the position coordinates of the initial candidate points and the observation parameters of the Bluetooth beacons into the AOA error function to obtain the azimuth error of the initial candidate points; The AOA error function is as follows: ; Among them, AOA represents the azimuth error of the initial candidate point, N represents the total number of Bluetooth beacons for AOA measurement, i represents the i-th Bluetooth beacon for AOA measurement, represents the AOA observation parameter of the i-th Bluetooth beacon, x and y respectively represent the abscissa and ordinate of the initial candidate point, 、 respectively represent the abscissa and ordinate of the i-th Bluetooth beacon.
5. The method according to claim 3, wherein The step of performing normalized weighted processing on the positioning error and the azimuth error to obtain the fitness of the initial candidate solution includes: Substitute the positioning error, the azimuth error, and the initial search area into the fitness calculation formula to obtain the fitness of the initial candidate solution; The fitness calculation formula is: ; Among them, represents the fitness of the initial candidate solution, represents the initial weight, TDOA represents the positioning error, and AOA represents the positioning angle error, represents the boundary penalty term of the initial search region; The constraint formula of the boundary penalty term is: ; where is the penalty coefficient, represents the parameter of the k-th boundary of the initial search area, and n represents the number of boundaries of the initial search area.
6. The method according to claim 5, wherein The method further includes: Calculate the signal-to-noise ratio of the received Bluetooth beacons; If the number of low-quality Bluetooth beacons with a signal-to-noise ratio lower than a first threshold exceeds a first quantity threshold, reduce the initial weight according to a preset step size; Statistically calculate the ratio of Bluetooth beacons with valid AOA parameters to the total number of Bluetooth beacons; If the ratio is less than a preset ratio threshold, increase the initial weight according to a preset step size.
7. The method according to claim 5, characterized in that, The iteration termination condition is that the fitness standard deviation converges or the number of iterations reaches a preset number threshold. Determining the target candidate solution set that meets the iteration termination condition as the final candidate solution set includes: When the fitness standard deviation converges or the number of iterations reaches the preset number threshold, stop the iteration and determine the target candidate solution set obtained in this round of iteration as the final candidate solution set.
8. The method according to claim 2, wherein In the observing bee stage of the bee colony algorithm, screening out the elite candidate solutions from the initial candidate solutions according to the fitness and adjusting the elite candidate solutions to obtain the first target candidate solution set corresponding to each initial candidate point includes: Screening out the elite candidate solutions from the initial candidate solutions according to the fitness; Generating neighborhood candidate solutions corresponding to the elite candidate solutions, where the neighborhood candidate solutions are: ; Among them, ( , ) represents the candidate solution in the said field, and ( , ) represents the elite candidate solution. represents a normal distribution random variable with a mean of 0 and a variance of ; Comparing the first fitness of the elite candidate solution with the second fitness of the neighborhood candidate solution; If the second fitness is better than the first fitness, update the elite candidate solution to the corresponding neighborhood candidate solution to obtain the first target candidate solution set corresponding to each initial candidate point.
9. The method according to claim 1, characterized in that Taking the geometric mean of the final candidate solutions as the final position estimate within the initial search area includes: Substituting the geometric mean of the final candidate solutions into the weighted fusion formula to obtain the final position estimate within the initial search area; The weighted fusion formula is as follows: ; Among them, ( , ) represents the final position estimate, is the reciprocal of the fitness, , represent the abscissa and ordinate of the final candidate solution.
10. A fusion positioning system based on a bee colony algorithm, characterized in that, The system includes: An initialization module for deploying an indoor Bluetooth beacon network and generating initial candidate solutions corresponding to multiple initial candidate points within the initial search area according to the Bluetooth beacon network; An iteration module for calculating the fitness of each initial candidate solution using the bee colony algorithm and updating and iterating each initial candidate solution according to the fitness to obtain a target candidate solution set; A processing module for determining the target candidate solution set that meets the iteration termination condition as the final candidate solution set and determining the final candidate solution with the optimal fitness in the final candidate solution set; An output module for taking the geometric mean of the final candidate solutions as the final position estimate within the initial search area.