Indoor positioning Bluetooth beacon outlier detection method, system, medium and equipment
By calculating beacon density scores and adjusting density thresholds in Bluetooth indoor positioning system, accurately detecting beacon outliers, the problem of low positioning accuracy in existing systems in complex environments is solved, and higher positioning accuracy is achieved.
Patent Information
- Application Number
- CN202510016940.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing Bluetooth indoor positioning system is difficult to accurately detect beacon outliers in complex environments, resulting in a decrease in positioning accuracy.
By obtaining the actual Bluetooth positioning map of the target area, the distance between each Bluetooth beacon is calculated and the density score is calculated. The density threshold is calculated based on the statistical information of the density score, the mark outliers are determined, and the density threshold is adjusted by the misscaling rate to improve the Detection accuracy.
The detection accuracy of Bluetooth beacon outliers is improved, thereby improving the positioning accuracy of the indoor positioning system and adapting to complex and changeable indoor environments.
Smart Images

Figure CN119475188A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of indoor positioning technology, and in particular to a method, system, medium and device for detecting outliers of indoor positioning Bluetooth beacons. Background Art
[0002] With the rapid development of Internet of Things technology, indoor positioning systems are increasingly used in logistics, retail, smart home and other fields. Among them, Bluetooth technology has become a widely used wireless communication technology for indoor positioning due to its low power consumption, low cost and good device penetration rate. In the Bluetooth indoor positioning system, multiple Bluetooth beacons are deployed in the building to form a positioning beacon network, and then the received signal strength indicator value is used to determine the location of the mobile terminal.
[0003] At present, the deployment of Bluetooth beacons usually adopts a grid layout, that is, they are evenly distributed in the target area according to the preset spacing. However, in actual applications, due to the complex internal structure of the building, the presence of various obstacles, and electromagnetic environment interference, some Bluetooth beacons may deviate from their optimal positions. These beacon points with deviations in position will cause uneven distribution of received signal strength, thus affecting positioning accuracy. At present, the determination of Bluetooth beacon outliers mainly relies on manual inspections or single signal strength threshold judgments. However, due to the dynamic changes in the indoor environment, it is difficult to adapt to the complex and changing positioning needs by relying on a single static evaluation standard, and it is easy to miss or misjudge, resulting in inaccurate positioning. Summary of the invention
[0004] The present application provides a method, system, medium and device for detecting outliers of indoor positioning Bluetooth beacons, which can improve the detection accuracy of Bluetooth beacon outliers, thereby improving the accuracy of positioning.
[0005] In a first aspect, the present application provides a method for detecting an outlier point of an indoor positioning Bluetooth beacon, the method comprising: Acquire an actual Bluetooth positioning map corresponding to the target area, wherein the Bluetooth positioning map includes a plurality of actual outliers; Obtaining the distance between each Bluetooth beacon in the target area in the actual Bluetooth positioning map, and calculating the density score of each Bluetooth beacon based on the distance; Calculating a density threshold based on statistical information of each of the density scores; Determine a marked outlier based on the density score of each of the Bluetooth beacons and the density threshold; The mislabeling rate is calculated based on each of the marked outliers and each of the actual outliers, and the density threshold is adjusted based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold.
[0006] By adopting the above technical solution, by obtaining the actual Bluetooth positioning map corresponding to the target area, the positioning map contains multiple actual outliers, which provides basic data for the subsequent outlier detection. In the actual Bluetooth positioning map, by obtaining the distance between each Bluetooth beacon in the target area and calculating the density score, the density of each Bluetooth beacon in spatial distribution can be effectively reflected. Further, based on the statistical information of the density score, the density threshold can be calculated, and a dynamic evaluation standard can be established, which can adapt to the environmental characteristics of different regions. Then, by comparing the density score of each Bluetooth beacon with the density threshold to determine the marked outlier, this method based on density analysis can more accurately identify abnormal beacon points. Finally, by calculating the mislabeling rate between the marked outlier and the actual outlier, and dynamically adjusting the density threshold until the mislabeling rate is less than the mislabeling threshold, the adaptive optimization of the detection standard is realized, thereby improving the accuracy of outlier detection in a complex and changeable indoor environment, thereby improving the positioning accuracy of the entire indoor positioning system.
[0007] In a second aspect of the present application, a detection system for an indoor positioning Bluetooth beacon outlier is provided, the system comprising: A positioning map acquisition module, used to acquire an actual Bluetooth positioning map corresponding to a target area, wherein the Bluetooth positioning map includes a plurality of actual outliers; A density score calculation module, used to obtain the distance between each Bluetooth beacon in the target area in the actual Bluetooth positioning map, and calculate the density score of each Bluetooth beacon based on the distance; A density threshold calculation module, used to calculate a density threshold based on statistical information of each density score; An outlier determination module, configured to determine and mark outliers based on the density score of each of the Bluetooth beacons and the density threshold; The density threshold adjustment module is used to calculate the mislabeling rate based on each of the marked outliers and each of the actual outliers, and adjust the density threshold based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold.
[0008] In a third aspect of the present application, a computer storage medium is provided, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above method steps.
[0009] In a fourth aspect of the present application, an electronic device is provided, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0010] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: This application obtains the actual Bluetooth positioning map corresponding to the target area, which contains multiple actual outliers, and provides basic data for the subsequent outlier detection. In the actual Bluetooth positioning map, by obtaining the distance between each Bluetooth beacon in the target area and calculating the density score, the density of each Bluetooth beacon in spatial distribution can be effectively reflected. Further, based on the statistical information of the density score, the density threshold is calculated, and a dynamic evaluation standard can be established, which can adapt to the environmental characteristics of different regions. Then, by comparing the density score of each Bluetooth beacon with the density threshold to determine the marked outlier, this density analysis-based method can more accurately identify abnormal beacon points. Finally, by calculating the mislabeling rate between the marked outlier and the actual outlier, and dynamically adjusting the density threshold until the mislabeling rate is less than the mislabeling threshold, the adaptive optimization of the detection standard is achieved, thereby improving the accuracy of outlier detection in a complex and changeable indoor environment, thereby improving the positioning accuracy of the entire indoor positioning system. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a flow chart of a method for detecting an indoor positioning Bluetooth beacon outlier provided in an embodiment of the present application; Figure 2 is an example diagram of an actual Bluetooth positioning diagram provided in an embodiment of the present application; Figure 3 It is a module schematic diagram of a detection system for indoor positioning Bluetooth beacon outliers provided in an embodiment of the present application; Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0012] Description of reference numerals: 400, electronic device; 401, processor; 402, communication bus; 403, user interface; 404, network interface; 405, memory. DETAILED DESCRIPTION
[0013] In order to enable technicians in this field 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 drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0014] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0015] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0016] The following will provide a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0017] Please refer to Figure 1 , a flowchart of a method for detecting an indoor positioning Bluetooth beacon outlier is proposed. The method can be implemented by a computer program, a single-chip microcomputer, or run on an indoor positioning Bluetooth beacon outlier detection system. The computer program can be integrated into a computer device or run as an independent tool application. Specifically, the method includes steps 10 to 50, and the steps are as follows: Step 10: Obtain an actual Bluetooth positioning map corresponding to the target area, wherein the Bluetooth positioning map includes multiple actual outliers.
[0018] In the embodiment of the present application, the target area refers to the area where indoor positioning is required, such as certain floor areas of a building.
[0019] In the embodiment of the present application, the actual Bluetooth positioning map refers to the actual distribution map of the Bluetooth beacons deployed in the target area, reflecting the actual location of each Bluetooth beacon.
[0020] In the embodiment of the present application, the actual outliers refer to the Bluetooth beacon points whose positions deviate from the ideal state in the actual Bluetooth positioning map. These deviated beacon points may be offset due to factors such as obstacles and electromagnetic interference, which will affect the accuracy of positioning.
[0021] Specifically, first determine the target area that needs to be positioned, such as a specific floor area of a building. Then obtain the actual position distribution of all Bluetooth beacons deployed in the target area, and draw these position distributions into an actual Bluetooth positioning map. In the embodiment of the present application, a simulation experiment can be performed to obtain, for example, the target area is a beacon arrangement area on both sides of a rectangular corridor channel with a length of 50 meters on all four sides in a 70-meter * 70-meter plane, and the corridor width is 2 meters. 25 Bluetooth beacons are randomly and evenly placed on both sides of the channel on each side, and each Bluetooth beacon takes itself as the origin and transmits its own number information and position-related signals that can be used to calculate the received signal strength indicator value. In the target area, randomly select the 4 Bluetooth beacons originally arranged in the beacon arrangement area on both sides of the rectangular corridor channel to exchange positions in pairs, and move 2 Bluetooth beacons individually to a position of 5 to 10 meters offset from the original position. These Bluetooth beacon points with position exchange or offset positions are actual outliers.
[0022] like Figure 2 As shown, Figure 2 This is an example diagram of an actual Bluetooth positioning map provided in an embodiment of the present application, wherein the green dots in the diagram represent normally arranged Bluetooth beacons, the blue dots represent Bluetooth beacons that are incorrectly swapped, and the red dots represent Bluetooth beacons that are offset. The blue dots and the red dots are the actual outliers in the embodiment of the present application, and the points framed by black rectangles are marked outliers detected by the algorithm provided in the embodiment of the present application.
[0023] Step 20: Obtain the distance between each Bluetooth beacon in the target area in the actual Bluetooth positioning map, and calculate the density score of each Bluetooth beacon based on the distance.
[0024] Specifically, in an indoor positioning system, accurately obtaining the distance between Bluetooth beacons is the key basis for outlier detection. Due to the complex indoor environment, directly using physical coordinates to calculate the distance is easily affected by factors such as wall obstruction and multipath effect, resulting in a large deviation between the calculation result and the actual situation. Therefore, this embodiment adopts a signal strength-based method to obtain the distance between beacons. First, the signal strength sent and the received signal strength of each Bluetooth beacon in the target area are obtained. In actual applications, Bluetooth beacons broadcast signals periodically, and the signal strength they send is usually a pre-configured fixed value, for example, it can be set to -50dBm; the received signal strength can be obtained by real-time acquisition through the beacon receiving module. In order to improve the measurement accuracy, the system will perform multiple sampling within a certain time window and average the sampling results to reduce the impact of instantaneous fluctuations.
[0025] After acquiring the signal strength data, the transmitted signal strength and the received signal strength are substituted into the preset signal propagation formula to calculate the distance between each Bluetooth beacon. The preset signal propagation formula is: RSSI=RSSI0-10×n×lg(d)+X, in which RSSI is the received signal strength, RSSI0 is the transmitted signal strength, the path loss index n is used to characterize the attenuation characteristics of the signal during propagation, and its value is related to the environment. In the embodiment of the present application, it can be taken as 5, d is the actual distance between Bluetooth beacons, and X is a random variable that obeys a normal distribution with a mean of 0 and a standard deviation of 2, which is used to simulate the impact of environmental noise on signal propagation. Through this formula, the corresponding relationship between signal strength and distance can be established, and then the actual distance d between beacons can be solved, which can effectively convert signal strength into distance information and reduce the impact of environmental factors.
[0026] After obtaining the distance between beacons, determine the N neighboring beacon points adjacent to each Bluetooth beacon in the actual Bluetooth positioning map, then calculate the distance between each Bluetooth beacon and its corresponding N neighboring beacon points, and use the minimum value of these distances as the density score of the Bluetooth beacon. The principle of selecting the minimum distance value as the density score is that the normally deployed beacons are usually small and relatively uniformly distant from their neighboring beacons, while the distances between outliers and surrounding beacons are often significantly larger. Therefore, the density score can effectively quantify the degree of abnormality of the beacon.
[0027] Based on the above embodiment, as an optional embodiment, the step of calculating the density score of each Bluetooth beacon based on the distance may further include the following steps: Step 201: Determine N neighboring beacon points adjacent to each Bluetooth beacon in the actual Bluetooth positioning map.
[0028] Specifically, in order to accurately identify outliers, it is necessary to analyze the spatial distribution relationship between each Bluetooth beacon and its surrounding beacons. Since normally deployed beacons usually present relatively uniform distribution characteristics, and outliers are characterized by a distance from the surrounding beacons that significantly deviates from the normal range, this embodiment quantifies the abnormality of the beacon by calculating the density score.
[0029] In the actual Bluetooth positioning map, N neighboring beacon points adjacent to each Bluetooth beacon are determined. The selection of the N value here is very critical. A too large N value will cause interference with distant beacons, and a too small N value may miss important spatial distribution information. Based on actual deployment experience, it is more appropriate to select an N value between 3 and 5. In the embodiment of the present application, N is 4. The process of determining the neighboring beacon point adopts the nearest neighbor search algorithm. First, the current Bluetooth beacon to be analyzed is taken as the center, and its distance to all other beacons in the target area is calculated; then these distances are sorted, and the N beacons with the smallest distance are selected as neighboring beacon points. In order to improve computational efficiency, a spatial index structure such as a KD tree can be used to accelerate the nearest neighbor search process.
[0030] Step 202: Calculate the distance between each Bluetooth beacon and the corresponding N neighboring beacon points.
[0031] Specifically, after determining the neighboring beacon points, it is necessary to calculate the distance between each Bluetooth beacon and its corresponding N neighboring beacon points. The distance calculation here adopts the aforementioned signal strength-based method and is obtained through the signal propagation formula. In order to improve the calculation accuracy, the system will collect signal strength data multiple times within a certain time window and perform median filtering on the calculated distance value to eliminate the influence of outliers.
[0032] Step 203: The minimum distance between each Bluetooth beacon and the corresponding N neighboring beacon points is used as the density score of the Bluetooth beacon.
[0033] Specifically, after obtaining N distance values, the minimum value is selected as the density score of the Bluetooth beacon. The reason for selecting the minimum distance value instead of the average value or other statistics is that the minimum distance value can more sensitively reflect the local distribution characteristics of the beacon. For a normally deployed beacon, the distance between it and the nearest neighbor beacon should meet the expected deployment interval; for outliers, even if the minimum distance value is selected, it will be significantly larger than the normal value, which is convenient for subsequent threshold judgment.
[0034] By calculating the density score, the degree of abnormality of each beacon can be effectively quantified. For example, in an office building experimental environment, the normally deployed beacon interval is about 3 meters. At this time, the density score (minimum distance value) calculated by the above method is usually in the range of 2.5-3.5 meters. For outliers caused by installation errors or equipment failures, their density scores may reach more than 6 meters. This significant numerical difference provides a reliable basis for subsequent outlier identification.
[0035] Step 30: Calculate the density threshold based on the statistical information of each density score.
[0036] Specifically, in an indoor positioning system, in order to accurately distinguish normal beacons from outliers, a reasonable density threshold needs to be set. Since the deployment density and distribution characteristics of beacons in different environments are different, the fixed threshold method is often difficult to adapt to complex and changeable actual scenarios. Therefore, this embodiment proposes an adaptive threshold calculation method based on statistical characteristics and environmental information.
[0037] Perform statistical analysis on the obtained beacon density scores and calculate their mean μ and standard deviation σ. The mean μ reflects the overall density of the beacon distribution, while the standard deviation σ represents the dispersion of the distribution. The specific calculation formula for the mean μ of the density score is: , where is the outlier density score of the i-th beacon point, n is the total number of beacon points, and n=200 is taken in the embodiment of the present application. The standard deviation σ is equal to the arithmetic square root of the sum of the squares of the differences between each density score and the mean. The specific calculation formula of the standard deviation σ is: ,In order to reduce the impact of outliers, the density scores can be preprocessed before calculating ,these statistics, for example, removing several of the largest and smallest extreme values.
[0038] Furthermore, the environmental information of the target area is obtained, and the fusion ratio m of the mean and standard deviation is determined based on the environmental information. Environmental information includes but is not limited to: site type (such as office, shopping mall, parking lot, etc.), obstacle distribution (such as walls, pillars, etc.), beacon installation height, crowd density, etc. These factors will affect the signal propagation characteristics and the uniformity of beacon distribution, and thus affect the appropriate threshold setting. For example, in an open venue, the distribution of beacons is usually more regular, and a smaller fusion ratio (such as m=2) can be selected at this time; in an environment with more obstacles, the distribution of beacons may be more uneven, and a larger fusion ratio (such as m=3) needs to be selected to improve the fault tolerance of the system.
[0039] Substituting the mean, standard deviation and fusion ratio into the preset density threshold calculation formula, the density threshold can be obtained. The density threshold calculation formula is: θ=μ+m∙σ, where θ is the density threshold, μ is the mean, σ is the standard deviation, and m is the fusion ratio. This formula is based on the statistical characteristics of the normal distribution and determines the threshold boundary through a linear combination of the mean and standard deviation. Among them, the mean term μ determines the reference position, the standard deviation term σ is used to adjust the allowable fluctuation range, and the fusion ratio m further adjusts the strictness of the judgment. This adaptive threshold calculation method can automatically adjust the threshold according to the actual environment without manual intervention; by adjusting the fusion ratio, the accuracy and robustness of the detection can be flexibly balanced.
[0040] Based on the above embodiment, as an optional embodiment, obtaining environmental information of the target area and determining the fusion ratio of the mean and the standard deviation based on the environmental information may include the following steps: Step 301: Obtain obstacle distribution information in a target area, and divide the target area into grids based on the obstacle distribution information to obtain multiple sub-areas.
[0041] Specifically, in an indoor Bluetooth positioning system, the complexity of the environment directly affects the uniformity of beacon distribution, thereby affecting the setting of the density threshold. In order to more accurately determine the fusion ratio of the mean and the standard deviation, this embodiment proposes an adaptive fusion ratio calculation method based on environmental information.
[0042] First, obtain the obstacle distribution information in the target area, including the location and size of fixed facilities such as walls, partitions, and equipment cabinets. Based on this obstacle distribution information, an adaptive grid division algorithm is used to divide the target area. A larger grid size (such as 4 meters × 4 meters) is used in open areas with fewer obstacles, while a smaller grid size (such as 2 meters × 2 meters) is used in areas with dense obstacles. This adaptive division method can better reflect the local characteristics of the environment. Through grid division, the entire target area is divided into multiple sub-areas, each of which has relatively independent spatial characteristics.
[0043] Step 302: Calculate the beacon point density in each sub-area, and perform cluster analysis on the beacon point density to obtain the density cluster center.
[0044] Specifically, for the divided sub-areas, it is necessary to calculate the beacon point density in each sub-area. The beacon point density is defined as the number of beacons per unit area, and the calculation formula is: ρ i =n i / S i , where ρ i is the beacon point density of the ith sub-area, n i is the number of beacons in the sub-area, S i is the effective area of the sub-region (minus the area occupied by obstacles). In order to improve the accuracy of density calculation, for beacons that cross the boundaries of multiple sub-regions, their contributions are allocated to the relevant sub-regions in an area-weighted manner. After obtaining the beacon point density of each sub-region, a density clustering algorithm (such as the DBSCAN algorithm) is used to perform cluster analysis on these density values. The purpose of cluster analysis is to find groups of regions with similar density characteristics and reflect the main density distribution pattern of the system through cluster centers. In the clustering process, parameters such as the neighborhood radius and the minimum number of samples need to be reasonably set to balance the accuracy and robustness of clustering.
[0045] Step 303: Calculate the degree of deviation between the density cluster center and the theoretical optimal density.
[0046] Specifically, the degree of deviation between the density cluster center and the theoretical optimal density is calculated. The theoretical optimal density is the ideal deployment density pre-set based on the signal coverage requirements and positioning accuracy requirements. The degree of deviation can be calculated by the following formula: δ=|ρ c -ρ t | / ρ t , where δ is the degree of deviation, ρ c is the actual density cluster center, ρ t This is the theoretical optimal density. The degree of deviation reflects the difference between the actual deployment and the ideal state and is an important basis for determining the fusion ratio.
[0047] Step 304: Perform segmented mapping within a preset fusion ratio range based on the degree of deviation to obtain a fusion ratio.
[0048] Specifically, the calculated deviation degree δ is mapped to the preset fusion ratio interval [m min, m max ] In the embodiment of the present application, the value range of the fusion ratio is between 2 and 4. The specific mapping relationship can adopt a piecewise function: for example, when δ≤0.1, m=2 (indicating that the deployment is relatively ideal); when 0.1<δ≤0.3, m=2+5δ; when δ>0.3, m=4 (indicating that the deployment seriously deviates from the ideal state). This segmented mapping method can adaptively adjust the fusion ratio according to the actual deployment situation.
[0049] Step 40: Mark outliers based on the density score of each Bluetooth beacon and the density threshold.
[0050] Specifically, the density score of each Bluetooth beacon is evaluated. The density score is an important indicator for measuring the spatial distribution characteristics of beacons, reflecting the distance relationship between the beacon and its neighboring beacons. A larger density score usually means that the distance between the beacon and the surrounding beacons is significantly greater than the normal deployment interval. This abnormal spatial distribution characteristic often indicates a potential outlier.
[0051] When making outlier judgments, compare the density score of each Bluetooth beacon with the density threshold calculated above. Determine whether the density score of each Bluetooth beacon is greater than the density threshold. If the density score of a Bluetooth beacon is greater than the density threshold, it indicates that the spatial distribution characteristics of the beacon deviate significantly from the normal range, and the system marks it as an outlier. On the contrary, if the density score is not greater than the density threshold, it indicates that the spatial distribution of the beacon meets the expected characteristics, and the system marks it as a normal point. By converting outlier detection into a simple numerical comparison operation, the system can quickly process the status judgment of a large number of beacons to meet real-time requirements. At the same time, since the calculation of the density threshold has taken into account environmental characteristics and statistical laws, this judgment method has strong adaptability and reliability. It can be combined with Figure 2 , Figure 2 The green points are normal points, and the blue and red points are marked outliers.
[0052] Step 50: Calculate the mislabeling rate based on each marked outlier point and each actual outlier point, and adjust the density threshold based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold.
[0053] Specifically, the accurate identification of outliers directly affects the reliability of positioning. In order to further improve the accuracy of outlier detection, this embodiment proposes a density threshold optimization method based on the mislabeling rate, and the optimal threshold is determined by iterative adjustment. The mislabeling rate is a key indicator for evaluating the effect of outlier detection, which reflects the degree of deviation between the system marking result and the actual situation. The calculation of the mislabeling rate needs to consider both the misjudgment rate (mislabeling normal points as outliers) and the missed judgment rate (mislabeling outliers as normal points). The specific calculation formula is: E=(Nfp+Nfn) / (Np+Nn), where E is the mislabeling rate, Nfp is the number of misjudgments, Nfn is the number of missed judgments, Np is the actual total number of outliers, and Nn is the actual total number of normal points. In order to obtain the actual outlier information, the system adopts a combination of multiple verification methods. First, the physical installation status of the beacon is confirmed through on-site manual inspection; second, the signal characteristics of the beacon are measured using professional test equipment, including parameters such as signal strength and stability; finally, the long-term performance of the beacon is analyzed in combination with historical operation data. Together, this information forms the basis for determining actual outliers.
[0054] After obtaining the mislabeling rate, compare it with the preset mislabeling threshold. The setting of the mislabeling threshold needs to balance the detection accuracy and system practicality, and can be set between 2% and 5%. If the current mislabeling rate exceeds the mislabeling threshold, the density threshold needs to be adjusted. The adjustment process adopts a dichotomy strategy: if the misjudgment rate is dominant, it means that the current density threshold is too small and needs to be appropriately increased; if the missed judgment rate is dominant, it means that the current density threshold is too large and needs to be appropriately reduced.
[0055] Based on the above embodiment, as another optional embodiment, the step of calculating the mislabeling rate based on each marked outlier point and each actual outlier point, and adjusting the density threshold based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold may further include the following steps: Step 501: construct a confusion matrix of labeled outliers and actual outliers, and calculate the mislabeling rate based on the confusion matrix.
[0056] Specifically, the accuracy of outlier detection can be comprehensively evaluated by constructing a confusion matrix. The confusion matrix is a 2×2 matrix containing four elements: true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN). Among them, TP represents the number of correctly marked outliers, FP represents the number of normal points mistakenly marked as outliers, TN represents the number of correctly marked normal points, and FN represents the number of outliers mistakenly marked as normal points. The calculation formula for the mislabeling rate can also be: E=(FP+FN) / (TP+TN+FP+FN), which comprehensively considers the two error situations of misjudgment and missed judgment.
[0057] Step 502: When the mislabeling rate is less than the mislabeling threshold, the current density threshold is used as the final density threshold.
[0058] Specifically, when the calculated mislabeling rate is less than the preset mislabeling threshold (such as 25%), it means that the current density threshold can meet the system's requirements for outlier detection accuracy. At this time, the currently used density threshold is determined as the final density threshold. This direct confirmation method can avoid unnecessary iterative optimization and improve the system's operating efficiency.
[0059] Step 503: When the mislabeling rate is not less than the mislabeling threshold, the fusion ratio is adjusted, and a new density threshold is calculated based on the adjusted fusion ratio, until the mislabeling rate for a preset number of consecutive iterations is less than the mislabeling threshold. The density threshold recorded last in the iterative process is determined as the final density threshold, where the iteration step decays exponentially with the number of iterations.
[0060] Specifically, when the mislabeling rate is not less than the mislabeling threshold, the iterative optimization process needs to be started. During the optimization process, the fusion ratio is adjusted first. The adjustment of the fusion ratio needs to comprehensively consider the gap between the current mislabeling rate and the target threshold, as well as the convergence speed of the optimization process. The specific adjustment formula is: m1=m0±Δm×exp(-k×i), where m1 is the adjusted fusion ratio, m0 is the current fusion ratio, Δm is the basic iteration step (the initial value is usually set to 0.5), k is the attenuation coefficient (usually 0.2), and i is the current iteration number. The choice of "±" depends on the comparison result between the mislabeling rate and the mislabeling threshold: when the mislabeling rate is higher than the mislabeling threshold, it indicates that the current density threshold is too small and the fusion ratio needs to be increased, so "+" is selected; conversely, when the mislabeling rate is lower than the mislabeling threshold but does not meet the continuous stability requirements, "-" is selected.
[0061] In another optional embodiment, in order to improve the accuracy of adjustment, an adaptive factor β is introduced to adjust the step size change. The modified adjustment formula is m1=m0±Δm×exp(-k×i)×β, where β=|E-Et| / Et, E is the current mislabeling rate, and Et is the mislabeling threshold. This adaptive mechanism can automatically adjust the step size according to the degree of deviation between the mislabeling rate and the target value, making the optimization process more flexible and efficient.
[0062] Based on the adjusted fusion ratio, the system recalculates the density threshold. The new density threshold calculation formula is: θnew=μ+m1×σ, where θnew is the new density threshold, μ is the mean of the density score, σ is the standard deviation, and m1 is the adjusted fusion ratio. After each calculation of a new density threshold, the system will re-mark the outliers and calculate the mislabeling rate. In order to ensure the stability of the optimization results, the mislabeling rate of the consecutive preset number of iterations (such as 3 times) is required to be less than the mislabeling threshold before the optimization is considered to have achieved the goal. This continuous judgment mechanism can prevent the optimization process from falling into a local optimal solution and improve the reliability of the results. When the continuous stability condition is met, the density threshold recorded for the last time is determined as the final density threshold.
[0063] For example, in the actual application of an office park, outlier detection optimization was performed on 500 Bluetooth beacons. The initial fusion ratio was set to 2.0, and the corresponding density threshold was 3.8. The mislabeling rate was 7.2%, which was significantly higher than the mislabeling threshold of 5%. The iterative optimization process was then started: the first iteration (i=1), the basic step size Δm=0.5, the exponential decay factor exp(-0.2×1)=0.818, the adaptive factor β=|7.2%-5%| / 5%=0.44, the fusion ratio adjustment: 0.5×0.818×0.44=0.180, the new fusion ratio: 2.0+0.180=2.180, the corresponding density threshold was updated to 4.1, and the mislabeling rate was reduced to 6.5%.
[0064] In the second iteration (i=2), the exponential decay factor exp(-0.2×2)=0.670, the adaptive factor β=|6.5%-5%| / 5%=0.30, the fusion ratio adjustment: 0.5×0.670×0.30=0.101, the new fusion ratio: 2.180+0.101=2.281, the corresponding density threshold is updated to 4.3 meters, and the mislabeling rate is reduced to 5.8%.
[0065] The third iteration (i=3): exponential decay factor exp(-0.2×3)=0.549, adaptive factor β=|5.8%-5%| / 5%=0.16, fusion ratio adjustment: 0.5×0.549×0.16=0.044, new fusion ratio: 2.281+0.044=2.325, the corresponding density threshold is updated to 4.4 meters, and the mislabeling rate is reduced to 4.8%.
[0066] The fourth iteration (i=4): exponential decay factor exp(-0.2×4)=0.449, adaptive factor β=|4.8%-5%| / 5%=0.04, fusion ratio adjustment: 0.5×0.449×0.04=0.009, new fusion ratio: 2.325-0.009=2.316, the corresponding density threshold is updated to 4.4 meters, and the mislabeling rate remains at 4.7%.
[0067] Fifth iteration (i=5): The extremely small adjustment resulted in a basically stable fusion ratio and a mislabeling rate of 4.7%. This optimization process demonstrates the synergy between the exponential decay step size and the adaptive factor. In the early stages of optimization, the larger step size and adaptive factor ensure fast convergence; as the number of iterations increases, the exponential decay of the step size and the smaller adaptive factor ensure the accuracy of fine-tuning. In the end, the system's mislabeling rate remained below 5% in three consecutive iterations, and the density threshold of 4.4 obtained in the fifth iteration was determined as the final density threshold.
[0068] See also Figure 3 , is a module diagram of a detection system for indoor positioning Bluetooth beacon outliers provided in an embodiment of the present application. The detection system for indoor positioning Bluetooth beacon outliers may include: a positioning map acquisition module, a density score calculation module, a density threshold calculation module, an outlier determination module, and a density threshold adjustment module, wherein: A positioning map acquisition module, used to acquire an actual Bluetooth positioning map corresponding to a target area, wherein the actual Bluetooth positioning map includes a plurality of actual outliers; A density score calculation module, used to obtain the distance between each Bluetooth beacon in the target area in the actual Bluetooth positioning map, and calculate the density score of each Bluetooth beacon based on the distance; A density threshold calculation module, used to calculate a density threshold based on statistical information of each density score; An outlier determination module, configured to determine and mark outliers based on the density score of each of the Bluetooth beacons and the density threshold; The density threshold adjustment module is used to calculate the mislabeling rate based on each of the marked outliers and each of the actual outliers, and adjust the density threshold based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold.
[0069] Optionally, the density score calculation module is further used to obtain the signal strength sent and the signal strength received by each Bluetooth beacon in the target area; Calculate the distance between each of the Bluetooth beacons according to the transmitted signal strength, the received signal strength and a preset signal propagation formula; The signal propagation formula is: RSSI=RSSI0-10×n×lg(d)+X; Where RSSI is the received signal strength, RSSI0 is the transmitted signal strength, n is the path loss index, d is the distance between Bluetooth beacons, and X is a random variable that follows a normal distribution with a mean of 0 and a standard deviation of 2.
[0070] Optionally, the density score calculation module is further used to determine N neighboring beacon points adjacent to each of the Bluetooth beacons in the actual Bluetooth positioning map; Calculating the distance between each of the Bluetooth beacons and the corresponding N neighboring beacon points; The minimum value of the distance between each Bluetooth beacon and the corresponding N neighboring beacon points is used as the density score of the Bluetooth beacon.
[0071] Optionally, the density threshold calculation module is further used to calculate the mean and standard deviation of each density score; Acquiring environmental information of the target area, and determining a fusion ratio of the mean and the standard deviation based on the environmental information; Substituting the mean, the standard deviation and the fusion ratio into a preset density threshold calculation formula to obtain a density threshold; The density threshold calculation formula is: ,in, is the density threshold, is the mean, is the standard deviation, and m is the fusion ratio.
[0072] Optionally, the density threshold calculation module is further used to obtain obstacle distribution information in the target area, and divide the target area into grids based on the obstacle distribution information to obtain multiple sub-areas; Calculating the beacon point density in each of the sub-areas, and performing cluster analysis on the beacon point density to obtain a density cluster center; Calculating the degree of deviation between the density cluster center and the theoretical optimal density; Based on the degree of deviation, segmented mapping is performed within a preset fusion ratio interval to obtain the fusion ratio.
[0073] Optionally, the outlier determination module is further used to determine whether the density score of each of the Bluetooth beacons is greater than the density threshold; The Bluetooth beacons whose density scores are greater than the density threshold are determined as marked outliers, and the Bluetooth beacons whose density scores are not greater than the density threshold are determined as normal points.
[0074] Optionally, the density threshold adjustment module is further used to construct a confusion matrix of marked outliers and actual outliers, and calculate the mislabeling rate based on the confusion matrix; When the mislabeling rate is less than the mislabeling threshold, the current density threshold is used as the final density threshold; When the mislabeling rate is not less than the mislabeling threshold, the fusion ratio is adjusted, and a new density threshold is calculated based on the adjusted fusion ratio, until the mislabeling rate for a preset number of consecutive iterations is less than the mislabeling threshold. The density threshold recorded last in the iterative process is then determined as the final density threshold, where the iteration step decays exponentially with the number of iterations.
[0075] It should be noted that: when the system provided in the above embodiment realizes its functions, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0076] An embodiment of the present application also provides a computer storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing a method for detecting an indoor positioning Bluetooth beacon outlier in the above embodiment. The specific execution process can be found in the specific description of the above embodiment, which will not be repeated here.
[0077] Please refer to Figure 4 The application also discloses an electronic device. Figure 4 The electronic device 400 may include: at least one processor 401 , at least one network interface 404 , a user interface 403 , a memory 405 , and at least one communication bus 402 .
[0078] The communication bus 402 is used to realize the connection and communication between these components.
[0079] The user interface 403 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
[0080] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0081] Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and calling data stored in the memory 405. Optionally, the processor 401 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 401 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 401, and it can be implemented separately through a chip.
[0082] Among them, the memory 405 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 405 may optionally be at least one storage device located away from the aforementioned processor 401. Refer to Figure 4 The memory 405 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for a method for detecting an outlier of an indoor positioning Bluetooth beacon.
[0083] exist Figure 4In the electronic device 400 shown, the user interface 403 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 401 can be used to call the application program stored in the memory 405 for a method for detecting an indoor positioning Bluetooth beacon outlier point. When executed by one or more processors 401, the electronic device 400 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0084] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0086] 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 may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0087] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0088] 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 this understanding, the technical solution of the present application, 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, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0089] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0090] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for detecting outliers of indoor positioning Bluetooth beacons, characterized in that: The method comprises: Acquire an actual Bluetooth positioning map corresponding to the target area, wherein the actual Bluetooth positioning map includes a plurality of actual outliers; Obtaining the distance between each Bluetooth beacon in the target area in the actual Bluetooth positioning map, and calculating the density score of each Bluetooth beacon based on the distance; Calculating a density threshold based on statistical information of each of the density scores; Determine a marked outlier based on the density score of each of the Bluetooth beacons and the density threshold; The mislabeling rate is calculated based on each of the marked outliers and each of the actual outliers, and the density threshold is adjusted based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold.
2. The method for detecting an indoor positioning Bluetooth beacon outlier according to claim 1, characterized in that: The obtaining of the distance between each Bluetooth beacon in the target area in the actual Bluetooth positioning map includes: Obtain the signal strength sent and received by each Bluetooth beacon in the target area; Calculate the distance between each of the Bluetooth beacons according to the transmitted signal strength, the received signal strength and a preset signal propagation formula; The signal propagation formula is: RSSI=RSSI0-10×n×lg(d)+X; Where RSSI is the received signal strength, RSSI0 is the transmitted signal strength, n is the path loss index, d is the distance between Bluetooth beacons, and X is a random variable that follows a normal distribution with a mean of 0 and a standard deviation of 2.
3. The method for detecting outliers of indoor positioning Bluetooth beacons according to claim 1, characterized in that: The calculating the density score of each of the Bluetooth beacons based on the distance includes: Determine N neighboring beacon points adjacent to each of the Bluetooth beacons in the actual Bluetooth positioning map; Calculating the distance between each of the Bluetooth beacons and the corresponding N neighboring beacon points; The minimum value of the distance between each Bluetooth beacon and the corresponding N neighboring beacon points is used as the density score of the Bluetooth beacon.
4. The method for detecting an indoor positioning Bluetooth beacon outlier according to claim 1, characterized in that: The calculating of the density threshold based on the statistical information of each density score comprises: Calculate the mean and standard deviation of each of the density scores; Acquiring environmental information of the target area, and determining a fusion ratio of the mean and the standard deviation based on the environmental information; Substituting the mean, the standard deviation and the fusion ratio into a preset density threshold calculation formula to obtain a density threshold; The density threshold calculation formula is: ,in, is the density threshold, is the mean, is the standard deviation, and m is the fusion ratio.
5. The method for detecting an indoor positioning Bluetooth beacon outlier according to claim 4, characterized in that: The acquiring the environmental information of the target area and determining the fusion ratio of the mean and the standard deviation based on the environmental information includes: Obtaining obstacle distribution information in the target area, and dividing the target area into grids based on the obstacle distribution information to obtain a plurality of sub-areas; Calculating the beacon point density in each of the sub-areas, and performing cluster analysis on the beacon point density to obtain a density cluster center; Calculating the degree of deviation between the density cluster center and the theoretical optimal density; Based on the degree of deviation, segmented mapping is performed within a preset fusion ratio interval to obtain the fusion ratio.
6. The method for detecting outliers of indoor positioning Bluetooth beacons according to claim 1, characterized in that: The determining and marking outliers based on the density score of each Bluetooth beacon and the density threshold comprises: Determining whether the density score of each of the Bluetooth beacons is greater than the density threshold; The Bluetooth beacons whose density scores are greater than the density threshold are determined as marked outliers, and the Bluetooth beacons whose density scores are not greater than the density threshold are determined as normal points.
7. The method for detecting outliers of indoor positioning Bluetooth beacons according to claim 4, characterized in that: The calculating the mislabeling rate based on each of the marked outliers and each of the actual outliers, and adjusting the density threshold based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold, comprises: Constructing a confusion matrix of labeled outliers and actual outliers, and calculating the mislabeling rate based on the confusion matrix; When the mislabeling rate is less than the mislabeling threshold, the current density threshold is used as the final density threshold; When the mislabeling rate is not less than the mislabeling threshold, the fusion ratio is adjusted, and a new density threshold is calculated based on the adjusted fusion ratio, until the mislabeling rate for a preset number of consecutive iterations is less than the mislabeling threshold. The density threshold recorded last in the iterative process is then determined as the final density threshold, where the iteration step decays exponentially with the number of iterations.
8. A detection system for indoor positioning Bluetooth beacon outliers, characterized in that: The system comprises: A positioning map acquisition module, used to acquire an actual Bluetooth positioning map corresponding to a target area, wherein the actual Bluetooth positioning map includes a plurality of actual outliers; A density score calculation module, used to obtain the distance between each Bluetooth beacon in the target area in the actual Bluetooth positioning map, and calculate the density score of each Bluetooth beacon based on the distance; A density threshold calculation module, used for calculating a density threshold based on statistical information of each density score; An outlier determination module, configured to determine and mark outliers based on the density score of each of the Bluetooth beacons and the density threshold; The density threshold adjustment module is used to calculate the mislabeling rate based on each of the marked outliers and each of the actual outliers, and adjust the density threshold based on the mislabeling rate until the mislabeling rate is less than the mislabeling threshold.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method as described in any one of claims 1-7.