Indoor positioning method and system based on outlier compensation, medium and equipment

By identifying and removing outliers caused by beacon position changes and signal abnormalities in indoor positioning, and inserting new coordinates between the positioning points for compensation, the problem of low indoor positioning accuracy is solved, and high-accuracy positioning is achieved in complex indoor environments.

CN119922505APending Publication Date: 2025-05-02WUXI ZHENYUAN TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510201898.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The indoor positioning method has low accuracy in complex indoor environments, and is affected by factors such as beacon position changes and abnormal signal propagation.

Method used

By obtaining the signal strength sequence of the to-local point and the beacon position coordinates, determining the positioning information of the to-local point, analyzing the positioning information to identify outliers, removing outliers, and determining the adjacent maximum distance coordinate pair in the remaining positioning points, inserting new coordinates for compensation to improve positioning accuracy.

Benefits of technology

Effectively identify and eliminate abnormal positioning data, maintain the spatial distribution continuity of positioning points through compensation mechanisms, and improve the accuracy of indoor positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922505A_ABST
    Figure CN119922505A_ABST
Patent Text Reader

Abstract

The invention provides an indoor positioning method and system based on outlier compensation, a medium and equipment, and relates to the technical field of indoor positioning. The method comprises the following steps: acquiring a signal strength sequence received by each to-be-positioned point, wherein the signal strength sequence is generated when the to-be-positioned point receives a signal sent by each beacon at an original position; the position coordinates corresponding to the current beacons are obtained, and the position coordinates are the position coordinates corresponding to the beacons at the original positions or the position coordinates of the beacons subjected to simulation movement at the original positions; determining the positioning information of each point to be positioned based on the signal intensity sequence and the current position coordinates corresponding to each beacon; determining an outlier based on the positioning information of each to-be-positioned point, and obtaining each positioning point after the outlier is removed; and determining an adjacent maximum distance coordinate pair based on the distance between the positioning points, and inserting a new coordinate in the adjacent maximum distance coordinate pair to obtain a target positioning result. By implementing the technical scheme provided by the invention, the accuracy of indoor positioning can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of indoor positioning technology, and in particular to an indoor positioning method, system, medium and device based on outlier compensation. Background Art

[0002] With the rapid development of Internet of Things technology, indoor positioning technology has been widely used in smart buildings, shopping mall navigation, warehousing and logistics, etc. Among the many indoor positioning technologies, the positioning method based on received signal strength (RSSI) has attracted much attention due to its advantages such as low implementation cost and convenient deployment. This method mainly deploys beacon nodes in indoor spaces and measures the signal strength received by the terminal to be located to achieve position estimation.

[0003] At present, the common indoor positioning method is to arrange multiple beacons in the indoor environment, collect the signal strength data received by the point to be positioned, and determine the specific location of the point to be positioned in combination with the location information of the beacon. However, in practical applications, due to the complex and changeable indoor environment, the actual deployment environment of the beacon node is often highly uncertain. For example, in the indoor environment, signal propagation is easily affected by factors such as multipath effects, occlusion, and reflection. In addition, the beacon node may also be moved or adjusted due to maintenance, operational errors, or even malicious interference, which further affects signal propagation, resulting in low accuracy of indoor positioning. Summary of the invention

[0004] The present application provides an indoor positioning method, system, medium and device based on outlier compensation, which can improve the accuracy of indoor positioning.

[0005] In a first aspect, the present application provides an indoor positioning method based on outlier compensation, the method comprising: Acquire a signal strength sequence received by each point to be located, where the signal strength sequence is generated by the point to be located receiving a signal emitted by each beacon at the original position; Obtaining the position coordinates corresponding to each of the current beacons, wherein the position coordinates are the position coordinates corresponding to the beacon at the original position, or the position coordinates of the beacon after simulated movement at the original position; Determine the positioning information of each of the points to be positioned based on the signal strength sequence and the current position coordinates corresponding to each of the beacons; Determine outliers based on the positioning information of each of the points to be positioned, and obtain each positioning point after removing the outliers; Based on the distance between each of the positioning points, a neighboring maximum distance coordinate pair is determined, and a new coordinate is inserted into the neighboring maximum distance coordinate pair to obtain a target positioning result.

[0006] By adopting the above technical solution, after obtaining the signal strength sequence and beacon position coordinates of the point to be located, the positioning information of the point to be located is determined based on the signal strength sequence and the beacon position coordinates, and the outliers are determined by analyzing the positioning information, which can effectively identify abnormal positioning data caused by factors such as beacon position changes and signal propagation anomalies. Furthermore, by eliminating outliers and determining the adjacent maximum distance coordinate pairs among the remaining positioning points, and inserting new coordinates between the coordinate pairs for compensation, it is possible to avoid the interference of abnormal data on the positioning results, and maintain the continuity of the spatial distribution of the positioning points through the compensation mechanism, so that a high positioning accuracy can still be guaranteed in the case of complex and changeable indoor environments and possible changes in the beacon positions.

[0007] In a second aspect of the present application, an indoor positioning system based on outlier compensation is provided, the system comprising: A signal sequence acquisition module, used to acquire a signal strength sequence received by each point to be located, wherein the signal strength sequence is generated by the point to be located receiving a signal emitted by each beacon at an original position; A beacon coordinate acquisition module, used to acquire the position coordinates corresponding to each of the current beacons, wherein the position coordinates are the position coordinates corresponding to the beacon at the original position, or the position coordinates of the beacon after simulated movement at the original position; A positioning information determination module, used to determine the positioning information of each of the points to be located based on the signal strength sequence and the position coordinates corresponding to each of the current beacons; An outlier determination module is used to determine outliers based on the positioning information of each of the points to be positioned, and obtain each positioning point after removing the outliers; The coordinate compensation module is used to determine the adjacent maximum distance coordinate pair based on the distance between each of the positioning points, insert the new coordinates into the adjacent maximum distance coordinate pair, and obtain the target positioning result.

[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: After obtaining the signal strength sequence and beacon position coordinates of the point to be located, the present application determines the positioning information of the point to be located based on the signal strength sequence and the beacon position coordinates, and determines the outliers by analyzing the positioning information, which can effectively identify abnormal positioning data caused by factors such as beacon position changes and signal propagation anomalies. Furthermore, by eliminating outliers and determining adjacent maximum distance coordinate pairs among the remaining positioning points, and inserting new coordinates between the coordinate pairs for compensation, it not only avoids the interference of abnormal data on the positioning results, but also maintains the continuity of the spatial distribution of the positioning points through the compensation mechanism, so that in the case of complex and changeable indoor environments and possible changes in beacon positions, it can still ensure a high positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flowchart of an indoor positioning method based on outlier compensation provided in an embodiment of the present application; Figure 2 is an example diagram of outlier compensation provided by an embodiment of the present application; Figure 3 It is a module schematic diagram of an indoor positioning system based on outlier compensation 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 an indoor positioning method based on outlier compensation is proposed, the method can be implemented by a computer program, can be implemented by a single-chip microcomputer, or can be run on an indoor positioning system based on outlier compensation, the computer program can be integrated in a computer device, or can be run as an independent tool application, specifically, the method includes steps 10 to 50, the above steps are as follows: Step 10: Obtain a signal strength sequence received by each point to be located. The signal strength sequence is generated by the point to be located receiving the signal emitted by each beacon at the original position.

[0018] In the embodiment of the present application, the point to be located refers to a target terminal device whose spatial position needs to be determined. The terminal device can receive wireless signals emitted by various indoor beacons, for example, it can be a mobile terminal device with wireless signal receiving function such as a mobile phone, tablet computer, smart bracelet, etc.

[0019] In the embodiment of the present application, the signal strength sequence refers to a data sequence consisting of the signal strength values ​​received by the point to be located at a certain moment from each beacon. Each element in the sequence contains the identification information of the beacon and the corresponding received signal strength value (RSSI value), and is arranged in descending order according to the size of the signal strength value.

[0020] Specifically, in an embodiment of the present application, 100 beacons are evenly deployed on both sides of an L-shaped corridor with a length of 50 meters and a width of 5 meters in an indoor plane of 100 meters × 100 meters. Each beacon acts as a signal source to transmit a wireless signal containing its own number information and location information to the surrounding area. When the point to be located (such as a mobile terminal device) enters the corridor area, its receiving module will receive signals from each beacon in real time and measure the strength value (RSSI value) of each received signal. These RSSI values ​​and corresponding beacon identification information are collected and formed into a signal strength sequence in order from large to small signal strength. For example, if a certain point to be located receives a signal strength of -60dBm from beacon A, a signal strength of -65dBm from beacon B, and a signal strength of -70dBm from beacon C at a certain moment, the signal strength sequence formed is {(A, -60dBm), (B, -65dBm), (C, -70dBm)}. Obtaining the signal strength sequence in this way can, on the one hand, reflect the relative distance relationship between the point to be located and each beacon, because the signal strength usually decays with the increase of the propagation distance; on the other hand, sorting by signal strength can give priority to selecting beacons with better signal quality for subsequent positioning calculations, which helps to improve positioning accuracy.

[0021] Step 20: Obtain the position coordinates corresponding to each current beacon, where the position coordinates are the position coordinates corresponding to the beacon at the original position, or the position coordinates of the beacon after simulated movement at the original position.

[0022] Specifically, the system needs to obtain the current position coordinate information of each beacon. Considering that the position of the beacon in the actual application environment may change due to maintenance, operational errors or other factors, the embodiment of the present application obtains the position coordinates of the current beacon in two ways: one is to directly use the coordinate information of the beacon at the original deployment position, that is, the initial coordinates of 100 beacons evenly distributed on both sides of the L-shaped corridor; the second is to simulate the coordinate information after the beacon position changes, which can be achieved by randomly selecting some beacons for position exchange or position shift. For example, two beacons can be randomly selected for position exchange, or the coordinates of a beacon can be randomly offset within a certain range based on its original position. In this embodiment, 10% of the beacons are selected for random exchange in pairs, and another 10% of the beacons are selected to generate random offsets within 1 meter of their original positions to simulate the beacon position changes that may occur in the actual environment. The setting of this simulation mechanism can help the system evaluate the impact of beacon position changes on positioning results in the subsequent positioning process, and provide a basis for the identification and processing of abnormal data.

[0023] Step 30: Based on the signal strength sequence and the position coordinates corresponding to each current beacon, determine the positioning information of each point to be positioned.

[0024] Specifically, the beacons corresponding to the four RSSI values ​​with the strongest signals are selected as the first beacons from the signal strength sequence arranged in descending order of signal strength. The reason for selecting stronger signals is that these signals are usually subject to less environmental interference on the transmission path and can provide a more reliable distance reference. Then the system obtains the current position coordinates of the four first beacons, which may be the original deployment coordinates of the beacons or the actual coordinates after the position change. Subsequently, the RSSI path loss model is used to calculate the distance from each first beacon to the point to be located. Finally, the obtained first beacon position coordinates and the corresponding distance estimate are substituted into the least squares equation group, and the coordinates of the point to be located are solved by matrix operation. This positioning method based on multiple high-quality signal sources can not only reduce the impact of a single beacon positioning error, but also improve the positioning accuracy by selecting beacons with better signal quality. It is particularly suitable for use in complex indoor environments where the beacon position may change.

[0025] Based on the above embodiment, as another optional embodiment, the step of determining the positioning information of each point to be positioned based on the signal strength sequence and the position coordinates corresponding to each current beacon may further include the following steps: Step 301: Select first beacons corresponding to the first several signal strengths in the signal strength sequence, and obtain the current position coordinates corresponding to each first beacon.

[0026] Specifically, in order to obtain high-quality positioning reference data, first select the beacons with the first four signal strengths from the signal strength sequence arranged in descending order as the first beacon. The beacon with stronger signal strength is selected because the stronger the signal strength, the smaller the attenuation and interference on the signal transmission path, and the higher the reliability of the measurement value.

[0027] Step 302: Calculate the distance from each first beacon to the point to be located.

[0028] Specifically, for each beacon selected as the first beacon, the system will obtain its current position coordinates (x i ,y i ). Then the distance d between the point to be located and the beacon is obtained by inverse calculation using the RSSI formula, where the RSSI formula is: ; Where d represents the distance between the point to be located and the beacon, F RSSI (d0) represents the RSSI value of the known reference distance. In this embodiment, F RSSI(d0) = -40dBm, which is the standard signal strength value measured at a distance of 1 meter from the beacon; η represents the path loss factor. In this embodiment, the path loss factor η of each beacon is set to a value in a random distribution with a mean of 2 and a standard deviation of 0.2. Such a setting can better reflect the signal attenuation characteristics in the indoor environment; Xs represents occlusion attenuation, which represents the change in signal strength caused by obstacles in the environment. In this embodiment, the occlusion attenuation Xs is set to a Gaussian distribution with a mean of 0 and a standard deviation of 0.5. Through the above calculation method, 4 groups of coordinates of the first beacon position (x i ,y i ) and the corresponding distance d i The positioning reference data composed of

[0029] Step 303: Determine the positioning information of each point to be positioned based on the current position coordinates corresponding to each first beacon and the distance from each first beacon to the point to be positioned.

[0030] Specifically, after obtaining the position coordinates (x i ,y i ) and the corresponding distance d i After that, the least square method is used to determine the specific positioning information of the point to be positioned. The specific calculation formula is: ; where (x i ,y i ) represents the beacon coordinates corresponding to the i-th RSSI value, i∈(1,2,3,4), d i Indicates the distance from the beacon to the point to be located corresponding to the i-th RSSI value; the coordinates of the point to be located are written in matrix form and transformed as follows, that is, by solving , the coordinates of the point to be located can be obtained.

[0031] in: , , .

[0032] Step 40: Determine outliers based on the positioning information of each point to be positioned, and obtain each positioning point after removing the outliers.

[0033] Specifically, in order to more accurately identify abnormal positioning points in the trajectory, the embodiment of the present application adopts a histogram-based outlier score (HBOS) algorithm for outlier detection. The two-dimensional coordinates of the points to be located are respectively constructed into histograms in the x-axis and y-axis directions. The number of bins of the histogram is determined by the Freedman-Diaconis rule, that is, the bin width is equal to 2×IQR×n^(-1 / 3), where IQR is the interquartile range and n is the number of samples. For each coordinate axis, the system counts the frequency of the positioning points in each bin, and normalizes the frequency by dividing it by the maximum frequency to obtain the height value of each bin. Then, for each point to be located, the natural logarithm of the reciprocal of the height value of the bin it falls into in the x-axis and y-axis directions is calculated, and the logarithmic values ​​of the two directions are added to obtain the HBOS score of the point. Then, the mean μ and standard deviation σ of the HBOS scores of all the points to be located are calculated, and the score threshold is determined based on the mean and standard deviation. Finally, the points to be located whose HBOS scores exceed the threshold are marked as outliers. These outliers are removed from the points to be located, so as to obtain the positioning points after removing the outliers.

[0034] Based on the above embodiment, as another optional embodiment, the step of determining the outlier based on the positioning information of each point to be positioned may further include the following steps: Step 401: Analyze the positioning information of each point to be positioned based on the HBOS algorithm to obtain a score of each point to be positioned.

[0035] Specifically, in the embodiment of the present application, a histogram is constructed based on the two-dimensional coordinate information (x, y) of the points to be located, and the value range of each dimension is determined. For example, among the 160 points to be located collected, the value range of the x coordinate is [0, 100] meters, and the value range of the y coordinate is [0, 80] meters. The maximum and minimum values ​​corresponding to these dimensions define the spatial range of the data distribution. After determining the data distribution range, each dimension is divided into equal widths according to a preset width interval (set to 3 meters). The calculation formula for the number of divided intervals is: , where floor is the rounding function, max i and min i are the maximum and minimum values ​​of the i-th dimension data, respectively. Taking the x-axis as an example, the number of intervals I=floor((100-0) / 3)+1=34 intervals, namely [0,3), [3,6), ..., [99,100]. Similarly, the y-axis is divided into 27 intervals. This fixed-width division method can ensure the uniformity and comparability of statistical analysis.

[0036] Furthermore, the number of points to be located in each interval is counted, and the statistical scores of each dimension are calculated. The statistical score of the Lth point to be located in the i-th dimension is calculated using the following formula: , is the statistical score of each dimension, Indicates the number of points to be located in the interval of the i-th dimension of the L-th location point, and 160 is the total number of samples. For example, if the x-coordinate of a location point falls within a certain interval, and the interval contains 16 points, then the statistical score of this dimension is -log(16 / 160)=2.30.

[0037] Finally, the statistical scores of each point to be located are accumulated to obtain the total HBOS score of the point to be located. The calculation formula is: ,in, Indicates the statistical score of the i-th dimension of the L-th positioning point. For example, if the score of a point in the x-dimension is 2.30 and the score in the y-dimension is 1.85, the total score of the point is 4.15. This multi-dimensional accumulation method comprehensively considers the degree of abnormality of the point in all directions and can more comprehensively evaluate the abnormality of the positioning point.

[0038] Step 402: Calculate a score threshold based on the mean and standard deviation of the scores of each point to be located.

[0039] Specifically, the score threshold is determined by calculating the mean and standard deviation of the scores of all the points to be located and combining them according to a preset ratio. First, the system calculates the mean μ of the HBOS scores of the 160 points to be located. The calculation formula for the mean μ is: , and then calculate the standard deviation σ of the HBOS scores of the 160 points to be located. The calculation formula of the standard deviation is: , is the total statistical score of the Lth point to be located. Then the score threshold θ is calculated based on the mean and standard deviation. The calculation formula is: ; Wherein m is the fusion ratio of the mean and the standard deviation, and in this embodiment, the value is 2.

[0040] Step 403: Determine the points to be located whose scores exceed the score threshold as outliers.

[0041] Specifically, in order to accurately screen out abnormal positioning points, the HBOS score of each point to be positioned is compared with the calculated score threshold in the embodiment of the present application. If the score of a point to be positioned exceeds the score threshold, it is marked as an outlier and its index number and coordinate value are recorded.

[0042] Step 50: Determine the adjacent maximum distance coordinate pair based on the distance between each positioning point, insert the new coordinate into the adjacent maximum distance coordinate pair, and obtain the target positioning result.

[0043] Specifically, after removing the outliers and obtaining the positioning points, the Euclidean distances between the remaining N' positioning points are calculated, and a symmetric distance matrix D' of N'×N' is constructed: , where each element value of the symmetric distance matrix D' Represents the distance between the two positioning points corresponding to the i-th row and the j-th column, which is the total number of positioning points after removing outliers. Determine the nearest neighbor distance to each positioning point in the distance matrix. Specifically, for the i-th positioning point, the system searches for the minimum value except the diagonal elements (value is 0) in the i-th row of the distance matrix, which is the distance from the i-th point to other positioning points. For example, if the row vector of the distance matrix of the k-th positioning point is [0,5.6,3.8,7.2,4.5], then its nearest neighbor distance is 3.8, which corresponds to the positioning point closest to the k-th point. This search method based on the minimum value of the matrix row vector can quickly find the nearest neighbor point of each point, providing a basis for subsequent analysis. For all positioning points, the two positioning points corresponding to the maximum value of the neighbor distance are selected as the neighbor maximum distance coordinate pair. For example, if the calculated proximity distances of the positioning points are [3.92, 4.15, 6.83, 4.56, 5.21], where the maximum value is 6.83, corresponding to the third point and its nearest neighbor, then this pair of coordinate points is determined as the coordinate pair with the maximum proximity distance.

[0044] Furthermore, according to the number of outliers removed before, the same number of new coordinate points are uniformly inserted between the maximum distance coordinate pairs. For example, if three outliers were removed before, the coordinates of three points are uniformly inserted in the x-direction and y-direction between the adjacent maximum distance coordinate pairs. This linear interpolation method ensures the uniform distribution of the inserted points in space, making the trajectory transition smoother.

[0045] Based on the above embodiment, as another optional embodiment, the step of inserting new coordinates into the adjacent maximum distance coordinate pair to obtain the target positioning result may also include the following steps: Step 501: Acquire coordinate data of a neighboring maximum distance coordinate pair, the neighboring maximum distance coordinate pair comprising a first coordinate and a second coordinate, the coordinate data comprising a first path from the first coordinate to the second coordinate on the horizontal coordinate, and a second path from the first coordinate to the second coordinate on the vertical coordinate; Specifically, first obtain the specific coordinate data of the adjacent maximum distance coordinate pair obtained by distance matrix analysis. The adjacent maximum distance coordinate pair includes a first coordinate and a second coordinate. For example, in the adjacent maximum distance coordinate pair, the first coordinate is (35.6, 42.8) and the second coordinate is (48.2, 55.4). The system performs path analysis on these two coordinate points in the horizontal and vertical directions respectively. In the horizontal coordinate direction, the horizontal coordinate value x1=35.6 of the first coordinate and the horizontal coordinate value x2=48.2 of the second coordinate are obtained. Then, the first path from the first coordinate to the second coordinate on the horizontal coordinate indicates that it is necessary to transition from 35.6 meters to 48.2 meters in the x-axis direction, and the total horizontal distance is 12.6 meters. Similarly, in the vertical coordinate direction, the second path from the first coordinate to the second coordinate on the vertical coordinate indicates that it is necessary to transition from 42.8 meters to 55.4 meters in the y-axis direction, and the total vertical distance is 12.6 meters. This path extraction method ensures that the system can accurately grasp the specific range of interpolation compensation required in the horizontal direction.

[0046] Step 502: Obtain the number of outliers, and uniformly insert new coordinates equal to the number of outliers on the first path and the second path to compensate for the missing of each outlier point.

[0047] Specifically, the number of outliers identified during the outlier detection process is obtained. Assume that the number of outliers is 3. Perform uniform interpolation on the first path. For example, if the starting horizontal coordinate of the first path is x1=35.6 meters, the ending horizontal coordinate is x2=48.2 meters, and the number of outliers is 3, the system uses the equidistant interpolation method to calculate the horizontal coordinate value of the new coordinate. The horizontal coordinate calculation formula of the newly inserted point is x new =x1+k*(x2-x1) / (n+1), where k is the number of the insertion point (k=1,2,3), and n is the number of outliers. In this way, the horizontal coordinates of the three new coordinate points are 39.8 meters, 44.0 meters, and 48.2 meters respectively. Similarly, the same uniform interpolation is performed on the second path. For example, the starting vertical coordinate of the second path is y1=42.8 meters, and the ending vertical coordinate is y2=55.4 meters. The same calculation formula is used: y new =y1+k*(y2-y1) / (n+1), the vertical coordinates of the three new coordinate points are 47.0 meters, 51.2 meters and 55.4 meters respectively. After completing the interpolation calculation of the horizontal and vertical coordinates, these newly generated coordinate points are merged with the original positioning points to form a complete positioning trajectory. For example, the three newly inserted complete coordinate points are (39.8, 47.0), (44.0, 51.2) and (48.2, 55.4). These compensation points fill the track gaps originally formed by removing outliers, making the overall trajectory more continuous and complete.

[0048] like Figure 2 As shown, Figure 2This is an example diagram of outlier compensation provided in an embodiment of the present application. Figure 2 In the figure, the blue hollow points represent normal points to be positioned, the red solid points represent detected outliers, and the green solid points represent compensated new positioning points.

[0049] Step 503: Output the target positioning result based on the new coordinates and the coordinates of each positioning point.

[0050] Specifically, in order to obtain complete and continuous positioning trajectory data, the inserted new coordinates are reasonably combined with the original positioning points and the target positioning result is output. The target positioning result refers to the complete trajectory coordinate sequence after outlier removal and new coordinate insertion. The sequence contains the location information of all valid positioning points and maintains the temporal and spatial continuity of the data.

[0051] Based on the above embodiment, as another optional embodiment, an indoor positioning method based on outlier compensation may further include the following process: Specifically, in order to ensure the real-time accuracy and reliability of the positioning results, the system needs to continuously monitor the signal status of the beacon and respond to abnormal situations in a timely manner. By collecting the wireless signals sent by each beacon in real time, the signal quality parameters are obtained, including indicators such as signal strength (RSSI), signal-to-noise ratio (SNR) and data packet reception rate. For example, the system collects the signal parameters of each beacon every 100 milliseconds. If the RSSI value of a beacon is lower than -85dBm, or the SNR is lower than 10dB, or the data packet reception rate is lower than 85%, the signal quality of the beacon is determined to be abnormal. When the system detects abnormal signal quality, the relocation process will be triggered immediately. The relocation process first temporarily blocks the abnormal beacon and quickly scans other available beacon signals in the surrounding area. For example, if the signal quality of the beacon numbered B1 drops to an RSSI value of -90dBm, the system will temporarily stop using the data of the beacon and instead look for a backup beacon B4 with good signal quality for alternative positioning. The system recalculates the target position based on the new beacon combination, using the same algorithm process as conventional positioning, including steps such as signal strength measurement, distance estimation and coordinate calculation. After obtaining the relocation result, it will be updated with the original target positioning result. For example, if the new coordinates obtained by relocation are (45.6, 58.2), and the coordinates of the corresponding time in the original target positioning result are (44.8, 57.6), the system will use the new coordinate values ​​to replace the original coordinates, and adjust the trajectory points at adjacent times accordingly to ensure a smooth transition of the trajectory. The updated positioning result will continue to be output as a new valid positioning data for subsequent position tracking and application.

[0052] See also Figure 3, is a module diagram of an indoor positioning system based on outlier compensation provided in an embodiment of the present application. The indoor positioning system based on outlier compensation may include: a signal sequence acquisition module, a beacon coordinate acquisition module, a positioning information determination module, an outlier determination module and a coordinate compensation module, wherein: A signal sequence acquisition module, used to acquire a signal strength sequence received by each point to be located, wherein the signal strength sequence is generated by the point to be located receiving a signal emitted by each beacon at an original position; A beacon coordinate acquisition module, used to acquire the position coordinates corresponding to each of the current beacons, wherein the position coordinates are the position coordinates corresponding to the beacon at the original position, or the position coordinates of the beacon after simulated movement at the original position; A positioning information determination module, used to determine the positioning information of each of the points to be located based on the signal strength sequence and the position coordinates corresponding to each of the current beacons; An outlier determination module is used to determine outliers based on the positioning information of each of the points to be positioned, and obtain each positioning point after removing the outliers; The coordinate compensation module is used to determine the adjacent maximum distance coordinate pair based on the distance between each of the positioning points, insert the new coordinates into the adjacent maximum distance coordinate pair, and obtain the target positioning result.

[0053] Optionally, the positioning information determination module is further used to select first beacons corresponding to the first several signal strengths in the signal strength sequence, and obtain the position coordinates currently corresponding to each of the first beacons; Calculating the distance from each of the first beacons to the point to be located; The positioning information of each of the points to be located is determined based on the current position coordinates corresponding to each of the first beacons and the distances from each of the first beacons to the points to be located.

[0054] Optionally, the outlier determination module is further used to analyze the positioning information of each of the points to be located based on the HBOS algorithm to obtain a score of each of the points to be located; Calculate the score threshold based on the mean and standard deviation of each of the points to be located; The points to be located whose scores exceed the score threshold are determined as outliers.

[0055] Optionally, the outlier determination module is further used to construct a corresponding histogram based on the positioning information of each of the points to be located, wherein the histogram includes multiple dimensions and a maximum value and a minimum value corresponding to each of the dimensions; Based on the maximum value and the minimum value corresponding to each dimension and the preset width interval of the histogram, each dimension is divided into a plurality of intervals; Counting the amount of data in each of the intervals, and obtaining a statistical score for each of the dimensions based on the amount of data; The statistical scores of each dimension are accumulated to obtain a score corresponding to each point to be located.

[0056] Optionally, the coordinate compensation module is further used to calculate the distance between each of the positioning points and construct a distance matrix based on the distance; Determine the nearest neighbor distance to each of the positioning points in the distance matrix; The coordinates of the two positioning points corresponding to the largest proximity distance are selected as the maximum proximity distance coordinate pair.

[0057] Optionally, the coordinate compensation module is further used to obtain coordinate data of the adjacent maximum distance coordinate pair, the adjacent maximum distance coordinate pair includes a first coordinate and a second coordinate, and the coordinate data includes a first path from the first coordinate to the second coordinate on the horizontal coordinate, and a second path from the first coordinate to the second coordinate on the vertical coordinate; Acquire the number of the outliers, and uniformly insert new coordinates equal to the number of the outliers on the first path and the second path to compensate for the missing of each of the outliers; Based on the new coordinates and the coordinates of the positioning points, the target positioning result is output.

[0058] Optionally, the coordinate compensation module is further used to obtain the signal quality of each beacon in real time; When the signal quality is abnormal, a relocation process is triggered, and the target positioning result is updated based on the relocation result, and the updated target positioning result is output.

[0059] 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.

[0060] 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 an indoor positioning method based on outlier compensation of the above embodiment. The specific execution process can be found in the specific description of the above embodiment, which will not be repeated here.

[0061] Please refer to Figure 4 The application also discloses an electronic device. Figure 4The 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 .

[0062] The communication bus 402 is used to realize the connection and communication between these components.

[0063] 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.

[0064] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0065] 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 processing unit (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.

[0066] 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 various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 405 may optionally also 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 of an indoor positioning method based on outlier compensation.

[0067] exist Figure 4 In 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 an indoor positioning method based on outlier compensation. 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 know that the present application is not limited to 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 know 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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.

[0073] 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 the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.

[0074] 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. An indoor positioning method based on outlier compensation, characterized in that: The method comprises: Acquire a signal strength sequence received by each point to be located, where the signal strength sequence is generated by the point to be located receiving a signal emitted by each beacon at the original position; Obtaining the position coordinates corresponding to each of the current beacons, wherein the position coordinates are the position coordinates corresponding to the beacon at the original position, or the position coordinates of the beacon after simulated movement at the original position; Determine the positioning information of each of the points to be positioned based on the signal strength sequence and the current position coordinates corresponding to each of the beacons; Determine outliers based on the positioning information of each of the points to be positioned, and obtain each positioning point after removing the outliers; Based on the distance between each of the positioning points, a neighboring maximum distance coordinate pair is determined, and a new coordinate is inserted into the neighboring maximum distance coordinate pair to obtain a target positioning result.

2. The indoor positioning method based on outlier compensation according to claim 1, characterized in that: The determining the positioning information of each of the points to be positioned based on the signal strength sequence and the current position coordinates corresponding to each of the beacons includes: Selecting first beacons corresponding to first several signal strengths in the signal strength sequence, and obtaining the current position coordinates corresponding to each of the first beacons; Calculating the distance from each of the first beacons to the point to be located; The positioning information of each of the points to be located is determined based on the current position coordinates corresponding to each of the first beacons and the distances from each of the first beacons to the points to be located.

3. The indoor positioning method based on outlier compensation according to claim 1, characterized in that: The determining of the outlier point based on the positioning information of the point to be positioned includes: Analyze the positioning information of each of the points to be positioned based on the HBOS algorithm to obtain a score for each of the points to be positioned; Calculating a score threshold based on the mean and standard deviation of the scores of each of the points to be located; The points to be located whose scores exceed the score threshold are determined as outliers.

4. The indoor positioning method based on outlier compensation according to claim 3, characterized in that: The analyzing the positioning information of each of the points to be positioned based on the HBOS algorithm to obtain a score of each of the points to be positioned includes: Constructing a corresponding histogram based on the positioning information of each of the points to be positioned, wherein the histogram includes multiple dimensions and a maximum value and a minimum value corresponding to each of the dimensions; Based on the maximum value and the minimum value corresponding to each dimension and the preset width interval of the histogram, each dimension is divided into a plurality of intervals; Counting the amount of data in each of the intervals, and obtaining a statistical score for each of the dimensions based on the amount of data; The statistical scores of each dimension are accumulated to obtain a score corresponding to each point to be located.

5. The indoor positioning method based on outlier compensation according to claim 1, characterized in that: The step of determining the adjacent maximum distance coordinate pair based on the distance between each of the positioning points comprises: Calculating the distances between the positioning points, and constructing a distance matrix based on the distances; Determine the nearest neighbor distance to each of the positioning points in the distance matrix; The coordinates of the two positioning points corresponding to the largest proximity distance are selected as the maximum proximity distance coordinate pair.

6. The indoor positioning method based on outlier compensation according to claim 1, characterized in that: Inserting the new coordinates into the adjacent maximum distance coordinate pair to obtain the target positioning result includes: Acquire coordinate data of the adjacent maximum distance coordinate pair, the adjacent maximum distance coordinate pair comprising a first coordinate and a second coordinate, the coordinate data comprising a first path from the first coordinate to the second coordinate on the horizontal coordinate, and a second path from the first coordinate to the second coordinate on the vertical coordinate; Acquire the number of the outliers, and uniformly insert new coordinates equal to the number of the outliers on the first path and the second path to compensate for the missing of each of the outliers; Based on the new coordinates and the coordinates of the positioning points, the target positioning result is output.

7. The indoor positioning method based on outlier compensation according to claim 1, characterized in that: The method further comprises: Acquire the signal quality of each beacon in real time; When the signal quality is abnormal, a relocation process is triggered, and the target positioning result is updated based on the relocation result, and the updated target positioning result is output.

8. An indoor positioning system based on outlier compensation, characterized in that: The system comprises: A signal sequence acquisition module is used to acquire a signal strength sequence received by each point to be located, wherein the signal strength sequence is generated by the point to be located receiving a signal emitted by each beacon at an original position; A beacon coordinate acquisition module, used to acquire the position coordinates corresponding to each of the current beacons, wherein the position coordinates are the position coordinates corresponding to the beacon at the original position, or the position coordinates of the beacon after simulated movement at the original position; A positioning information determination module, used to determine the positioning information of each of the points to be located based on the signal strength sequence and the position coordinates corresponding to each of the current beacons; An outlier determination module is used to determine outliers based on the positioning information of each of the points to be positioned, and obtain each positioning point after removing the outliers; The coordinate compensation module is used to determine the adjacent maximum distance coordinate pair based on the distance between each of the positioning points, insert the new coordinates into the adjacent maximum distance coordinate pair, and obtain the target positioning result.

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.