Positioning methods, devices, equipment, media and products
By optimizing the low-power Bluetooth positioning technology using weighted hybrid filtering and multinomial regression models, the reliability and real-time performance of positioning results are solved, hardware costs and computational complexity are reduced, and positioning accuracy and real-time performance are improved.
Patent Information
- Application Number
- CN202411801276.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-09
AI Technical Summary
Existing low-power Bluetooth positioning technology suffers from issues affecting the reliability and real-time performance of positioning results in complex environments. It also suffers from high hardware costs, high computational complexity, and complex device installation and maintenance. Furthermore, the non-linear relationship between RSSI signal values and distance leads to large positioning errors, and computational delays are severe in dynamic environments.
A weighted hybrid filtering model is used to process the received signal strength indication value. By combining ridge regression and multinomial regression models, the nonlinear equation system is solved using the quasi-Newton method to optimize the positioning algorithm and improve positioning accuracy and real-time performance.
By reducing noise and errors in the received signal strength indication data, the accuracy and real-time performance of positioning results are improved, hardware costs and computational latency are reduced, and the system's adaptability and user experience are enhanced.
Smart Images

Figure CN119584284B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a positioning method, apparatus, device, medium, and product. Background Technology
[0002] In the construction of smart cities, smart parks are an important component, dedicated to improving park management efficiency and residents' quality of life. Positioning technology plays a crucial role in smart parks, providing precise location and tracking services to support applications such as personnel and equipment management, logistics management, asset tracking, and navigation security within the park.
[0003] Currently, there are various device-based positioning technologies on the market. Among them, Bluetooth Low Energy technology is widely used due to its advantages such as low cost, high anti-interference ability, low deployment cost, and easy integration and promotion. However, due to environmental limitations and computational complexity, it can easily affect the reliability and real-time performance of positioning results.
[0004] Therefore, it is necessary to propose a solution to improve the reliability and real-time performance of positioning results.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main objective of this application is to provide a positioning method, apparatus, device, medium, and product, which aims to improve the reliability and real-time performance of positioning results.
[0007] To achieve the above objectives, this application provides a positioning method, the method comprising:
[0008] Obtain the received signal strength indication value of the node to be located;
[0009] The received signal strength indication value is processed based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value.
[0010] The distance information is calculated based on the corrected received signal strength indication value, and the positioning result corresponding to the node to be located is determined based on the distance information.
[0011] In one embodiment, before the step of processing the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value, the method further includes:
[0012] Obtain a sample dataset of received signal strength indication values, wherein the sample dataset of received signal strength indication values includes sample data of received signal strength indication values corresponding to different fixed distances;
[0013] The mean filtering, median filtering, Kalman filtering, and Gaussian filtering operations are performed on the received signal strength indication value sample dataset to obtain the received signal strength indication data after each filtering.
[0014] Based on the received signal strength indication data after filtering, a multiple linear regression model based on ridge regression is established. Hyperparameters are tuned using grid search, and the optimal parameters are found using five-fold cross-validation to obtain the weighted hybrid filtering model.
[0015] In one embodiment, the step of obtaining a sample dataset of received signal strength indication values includes:
[0016] Collect sample data of received signal strength indication values corresponding to different fixed distances;
[0017] The interference outliers in the received signal strength indication value sample data are removed to obtain the received signal strength indication value sample dataset.
[0018] In one embodiment, the step of calculating distance information based on the corrected received signal strength indication value and determining the positioning result corresponding to the node to be located based on the distance information includes:
[0019] The distance information is determined by predicting the corrected received signal strength indication value based on a preset ranging model.
[0020] Based on the distance information and the coordinates of at least three reference nodes, a positioning calculation is performed to obtain the positioning result corresponding to the node to be located.
[0021] In one embodiment, before the step of predicting the corrected received signal strength indication value based on a preset ranging model to determine the distance information, the method further includes:
[0022] The received signal strength indication value sample dataset is processed by the weighted hybrid filtering model to obtain a corrected received signal strength indication value sample dataset.
[0023] A positive transformation is performed on the corrected received signal strength indication value sample dataset to obtain transformed received signal strength indication value sample data, and a logarithmic transformation is performed on the fixed distance of the received signal strength indication value sample data to obtain the logarithmic distance;
[0024] The received signal strength indication sample data of the transformation and the logarithmic distance are linearly fitted by the constructed polynomial regression model to obtain the linear fitting result;
[0025] Based on the linear fitting results, cross-validation and grid search are used to select model hyperparameters, and the model is trained based on the model hyperparameters to obtain the ranging model.
[0026] In one embodiment, the step of performing positioning calculations based on the distance information and the coordinates of at least three reference nodes to obtain the positioning result corresponding to the node to be located includes:
[0027] A system of nonlinear equations is established based on the distance information and the coordinates of the at least three reference nodes;
[0028] The nonlinear equations are solved by the quasi-Newton method, and the sum of squared residuals is calculated. The positioning result of the node to be located is obtained by iterative calculation based on the sum of squared residuals.
[0029] Furthermore, to achieve the above objectives, this application also proposes a positioning device, the positioning device comprising:
[0030] The acquisition module is used to acquire the received signal strength indication value of the node to be located;
[0031] The processing module is used to process the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value.
[0032] The determination module is used to calculate distance information based on the corrected received signal strength indication value, and determine the positioning result corresponding to the node to be located based on the distance information.
[0033] In addition, to achieve the above objectives, this application also proposes a positioning device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the positioning method as described above.
[0034] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the positioning method described above.
[0035] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the positioning method described above.
[0036] One or more technical solutions proposed in this application have at least the following technical effects:
[0037] By acquiring the received signal strength indication value of the node to be located; processing the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value; calculating distance information based on the corrected received signal strength indication value; and determining the positioning result corresponding to the node to be located based on the distance information, the processing of the received signal strength indication value using the weighted hybrid filtering model can reduce random noise and errors in the received signal strength indication value data. This improves the accuracy of the distance information and enhances the reliability and real-time performance of the positioning results. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram illustrating the Bluetooth AOA ranging and positioning principle based on existing technology;
[0041] Figure 2 This is a flowchart illustrating the first embodiment of the positioning method of this application;
[0042] Figure 3 This is a flowchart illustrating the second embodiment of the positioning method of this application;
[0043] Figure 4 This is a schematic diagram illustrating the design process of a weighted hybrid filtering algorithm according to the second embodiment of this application;
[0044] Figure 5 This is a flowchart illustrating the third embodiment of the positioning method of this application;
[0045] Figure 6 This is a schematic diagram illustrating the design process of the RSSI ranging algorithm according to the third embodiment of this application;
[0046] Figure 7 This is a schematic diagram of the RSSI positioning algorithm according to the third embodiment of this application;
[0047] Figure 8 This is a schematic diagram of the module structure of the positioning device according to an embodiment of this application;
[0048] Figure 9 This is a schematic diagram of the overall process of the positioning method in the embodiments of this application;
[0049] Figure 10 This is a schematic diagram of the device structure of the hardware operating environment involved in the positioning method in the embodiments of this application.
[0050] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0051] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0052] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0053] The main solution of this application embodiment is as follows: The received signal strength indication value of the node to be located is obtained; the received signal strength indication value is processed based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value; distance information is calculated based on the corrected received signal strength indication value; and the positioning result corresponding to the node to be located is determined based on the distance information. Processing the received signal strength indication value using the weighted hybrid filtering model reduces random noise and errors in the received signal strength indication value data. Furthermore, distance information is calculated based on the corrected received signal strength indication value, and the positioning result corresponding to the node to be located is determined based on the distance information, thus improving the accuracy of the distance information and thereby enhancing the reliability and real-time performance of the positioning result.
[0054] In this embodiment, for ease of description, the positioning device will be used as the execution subject in the following description.
[0055] In the construction of smart cities, smart parks are an important component, dedicated to improving park management efficiency and residents' quality of life. Positioning technology plays a crucial role in smart parks, providing precise location and tracking services to support applications such as personnel and equipment management, logistics management, asset tracking, and navigation security within the park.
[0056] In most outdoor positioning systems, GPS (Global Positioning System) is widely used due to its ease of implementation and accuracy up to 5 meters. However, GPS is not suitable for indoor positioning due to limited space and numerous obstacles. Solutions based on the Internet of Things (IoT) and wireless technologies can achieve accurate and efficient positioning in indoor environments.
[0057] Currently, the main device-based positioning technologies on the market include Wi-Fi, Zigbee wireless network, Bluetooth Low Energy (BLE), and Ultra Wideband (UWB). Among them, Bluetooth Low Energy (BLE) technology is widely used due to its advantages such as low cost, high anti-interference capability, low deployment cost, and ease of integration and promotion. Bluetooth Low Energy includes Bluetooth AOA (Angle of Arrival) positioning technology and Bluetooth RSSI (Received Signal Strength Indicator) positioning technology.
[0058] Bluetooth AOA (Angle of Arrival) is a positioning technology that uses the angle of arrival of a signal. It primarily uses multiple receivers to determine the direction of signal arrival, thereby achieving precise positioning. (See reference...) Figure 1 , Figure 1 The diagram illustrates the Bluetooth AOA ranging and positioning principle based on existing technology, as follows: Figure 1 As shown, the transmitting device (such as a Bluetooth tag MS) emits a signal, and the receiving device (such as a Bluetooth base station) receives the signal through multiple antennas (BS1, BS2). Based on the time difference and phase difference of the signal arriving at each antenna, the angle of arrival of the signal can be calculated, and then a triangulation algorithm can be used to determine the tag's specific location. The disadvantages of Bluetooth AOA positioning technology include:
[0059] (1) Environmental limitations: Bluetooth AOA positioning accuracy will be significantly reduced in complex environments or under severe signal interference. Buildings, furniture and other obstacles may cause signal reflection and attenuation, thus affecting the positioning results;
[0060] (2) Power consumption issues: Although Bluetooth itself is a low-power technology, when performing high-frequency signal analysis and processing, it may lead to a decrease in the device's battery life and affect the user experience;
[0061] (3) Antenna Arrangement Requirements: Effective AOA positioning requires multiple directional antennas to provide accurate directional information. However, the arrangement and configuration of antennas may be limited by space in practical applications, leading to complexity in equipment installation and maintenance;
[0062] (4) Computational complexity: The process of signal processing and calculating the positioning results is relatively complex, especially in dynamic environments, which may lead to high computational delays and affect real-time performance;
[0063] (5) Cost issues: Achieving a high-precision Bluetooth AOA positioning system requires more hardware investment (such as multi-antenna systems and high-performance processors), which increases the overall cost of the system.
[0064] RSSI (Received Signal Strength Indicator) is a metric used to measure the strength of received wireless signals, typically for evaluating the quality of communication signals between devices and for distance estimation. Indoor ranging methods based on Bluetooth RSSI require acquiring the signal strength of the transmitting node. The receiving node collects the RSSI and calculates the propagation loss based on it. Then, a series of propagation attenuation models are used to convert the wireless signal loss into distance. The disadvantages of Bluetooth RSSI positioning technology include:
[0065] (1) Environmental limitations: RSSI positioning technology performs poorly in complex environments. Obstacles such as buildings and furniture can cause signal attenuation and multipath effects, thus affecting positioning accuracy. The unstable propagation path of the signal leads to large fluctuations in RSSI values at the same location, which in turn affects the reliability of the positioning results;
[0066] (2) Nonlinear distance relationship: The relationship between RSSI and actual distance is not nonlinear, which makes it difficult to accurately calculate the true distance from the RSSI values measured in different environments, thus increasing the positioning error;
[0067] (3) Computational complexity: Although RSSI measurement is relatively simple, real-time positioning in dynamic environments, especially the processing and filtering of a large amount of data, may lead to computational delays and affect real-time performance.
[0068] This application provides a novel positioning technology that combines multiple signal processing methods to improve positioning accuracy and environmental adaptability, reduce computational latency, and enhance user experience and broad applicability, thereby achieving a more accurate and real-time indoor positioning solution. The main problems it addresses are as follows:
[0069] (1) Consideration should be given to addressing the cost issues related to hardware investment in positioning systems, as well as the complexity of equipment installation and maintenance;
[0070] (2) Solve the positioning error caused by multipath effect, signal attenuation, environmental factors and other factors during RSSI acquisition, and improve positioning accuracy;
[0071] (3) Solve the problem of adaptive ranging model in indoor environment, and consider the calibration of nonlinear conversion relationship between RSSI signal value and distance;
[0072] (4) Solve the real-time processing of positioning coordinate calculation in dynamic environments, optimize the algorithm and data processing flow to reduce latency, improve the system's response speed, and meet the requirements of real-time applications.
[0073] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or positioning device capable of performing the above functions. The following description uses a positioning device as an example to illustrate this embodiment and the subsequent embodiments.
[0074] Based on this, embodiments of this application provide a positioning method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the positioning method of this application.
[0075] In this embodiment, the positioning method includes steps S10 to S30:
[0076] Step S10: Obtain the received signal strength indication value of the node to be located;
[0077] Specifically, in this application embodiment, the node to be located can be the location of the device to be located. Bluetooth RSSI (Received Signal Strength Indicator) is a method for measuring the strength of radio signals. It represents the received signal power level, usually measured in dBm (decibels per milliwatt). The RSSI value can be used to estimate the relative distance between two Bluetooth devices. Generally, RSSI signals are affected by multiple factors during propagation, such as multipath effects caused by obstacles, reflection, and refraction, as well as electromagnetic interference and power supply noise generated by other irrelevant interference signals received by the receiver. This results in the RSSI being directly acquired not being able to directly reproduce the true distance, affecting the ranging accuracy and stability. In this application embodiment, after obtaining the Received Signal Strength Indicator (RSSI) value of the node to be located, a weighted hybrid filtering model is used to correct the RSSI to reduce noise and other interference in the RSSI data.
[0078] Step S20: The received signal strength indication value is processed based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value.
[0079] Furthermore, after obtaining the received signal strength indication value of the node to be located, the received signal strength indication value can be processed based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value.
[0080] For example, traditional filtering algorithms often have limitations when processing RSSI data. For instance, while the mean filtering algorithm is simple, it is ineffective for processing abrupt changes in data; the median filtering algorithm has good suppression of impulse noise, but it is less adaptable to continuously changing data. Furthermore, a single filtering algorithm is not effective for RSSI processing. To address these issues, this application presents a weighted hybrid filtering algorithm integrating median filtering, mean filtering, Kalman filtering, and Gaussian filtering. By combining the advantages of multiple filtering algorithms, it smooths RSSI measurement data, removes noise, improves data accuracy, and provides accurate data support for subsequent ranging models.
[0081] Step S30: Calculate distance information based on the corrected received signal strength indication value, and determine the positioning result corresponding to the node to be located based on the distance information.
[0082] Furthermore, the received signal strength indication value is processed based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value. Then, distance information can be calculated based on the corrected received signal strength indication value, and the positioning result corresponding to the node to be located can be determined based on the distance information.
[0083] For example, the relationship between RSSI and distance is usually non-linear. A commonly used indoor ranging model based on RSSI is the attenuation factor model, expressed by the following formula:
[0084]
[0085] Where n represents the path attenuation factor and A represents the RSSI value measured at 1 meter. This model is usually determined based on experimental data, empirical formulas, simple free space, or obstacle-laden models, but it cannot handle complex indoor environments, thus affecting the accuracy and precision of distance measurement. Furthermore, the attenuation factor model typically requires a pre-established signal attenuation model and the determination of model parameters based on experimental data, necessitating analysis in different indoor environments and application scenarios.
[0086] For example, this application proposes an adaptive multinomial regression model to fit the relationship between RSSI and distance. By collecting RSSI values from multiple devices at various distance ranges, the model adapts to the indoor environment, avoiding the impact on distance measurement accuracy caused by manually selecting indoor ranging models and setting parameters. Furthermore, by training and calculating the multinomial regression model, and increasing the degree of the multinomial, the data fitting accuracy can be further improved, thereby predicting distance more accurately.
[0087] For example, in practical applications, determining the location of a node often requires the use of distance information between multiple reference nodes and the node to be located. After obtaining the distances between the reference nodes and the node to be located, a positioning algorithm is needed to calculate the coordinates of the node. However, traditional positioning algorithms often exhibit significant limitations when dealing with nonlinear problems. For instance, trilateration may produce large errors when facing complex environments or nonlinear relationships, making it difficult to accurately determine the coordinates of the node. While maximum likelihood estimation can handle some uncertainties to a certain extent, its computational complexity is high and its accuracy is difficult to guarantee in nonlinear cases. To overcome these challenges, this embodiment employs a nonlinear least squares method to solve for the positioning coordinates. This method can more flexibly address nonlinear problems and more accurately determine the location of the node to be located.
[0088] This embodiment, through the above-described scheme, specifically obtains the received signal strength indication value of the node to be located; processes the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value; calculates distance information based on the corrected received signal strength indication value; and determines the positioning result corresponding to the node to be located based on the distance information. By processing the received signal strength indication value through the weighted hybrid filtering model, random noise and errors in the received signal strength indication value data can be reduced. Furthermore, by calculating distance information based on the corrected received signal strength indication value and determining the positioning result corresponding to the node to be located based on the distance information, the accuracy of the distance information is improved, thereby enhancing the reliability and real-time performance of the positioning result.
[0089] Based on the first embodiment of this application, a second embodiment of this application is proposed. In the second embodiment of this application, the contents that are the same as or similar to those in the first embodiment can be referred to the above description, and will not be repeated hereafter.
[0090] Based on this, please refer to Figure 3 Before step S20, the positioning method further includes steps S01 to S02:
[0091] Step S01: Obtain a sample dataset of received signal strength indication values, wherein the sample dataset of received signal strength indication values includes sample data of received signal strength indication values corresponding to different fixed distances;
[0092] Step S02: Perform mean filtering, median filtering, Kalman filtering and Gaussian filtering operations on the received signal strength indication value sample dataset respectively to obtain the received signal strength indication data after each filtering.
[0093] Step S03: Based on the filtered received signal strength indication data, establish a ridge regression-based multiple linear regression model, use grid search for hyperparameter tuning, and use five-fold cross-validation to find the optimal parameters to obtain the weighted hybrid filtering model.
[0094] For example, the step of obtaining a sample dataset of received signal strength indication values includes:
[0095] Collect sample data of received signal strength indication values corresponding to different fixed distances;
[0096] The interference outliers in the received signal strength indication value sample data are removed to obtain the received signal strength indication value sample dataset.
[0097] Reference Figure 4 , Figure 4 This is a schematic diagram illustrating the design process of a weighted hybrid filtering algorithm according to the second embodiment of this application, as shown below. Figure 4 As shown, firstly, the original RSSI data is preprocessed to remove outliers; secondly, various filtering processes under a sliding window are applied to the RSSI data to obtain multiple filtering results; then, a ridge regression-based multiple linear regression model is constructed based on the filtered data and measurements, the model is trained, and the optimal parameters are searched through cross-validation and assigned different weights; finally, the weighted filtering results are fused to obtain the final corrected RSSI weighted mixed filtered dataset.
[0098] For example, in mean filtering, suppose the input data is a sequence of RSSI values. By setting the window size, the average value of the data within the window is calculated to obtain the mean-filtered result. Let the input signal be {x1, x2, ..., x...} n After mean filtering, the output signal is:
[0099]
[0100] Where y n This is the filtered RSSI value, x n Here, M represents the original signal value, and M represents the sliding window size. Using a sliding window can effectively filter outliers and random noise, reduce data fluctuations, capture dynamic changes in the data, and improve signal quality.
[0101] For example, for median filtering, a sliding window approach is used to perform median filtering on RSSI data. Let the input signal be {x1, x2, ..., x...} n Median filtering sorts the data sampled by the sliding window in ascending order and selects the median value of the window as the filtered result, effectively removing impulse noise.
[0102] The output signal after median filtering is
[0103] yi = Mid{sort{x i-k ,x i-k+1 ,…,x i+k-1 ,x i+k}}
[0104] Where k represents the radius of the sliding window, and generally k = M / 2, where M represents the size of the sliding window.
[0105] For example, in Kalman filtering, the state variable estimate is updated using the RSSI estimate from the previous time step and the RSSI measurement from the current time step to obtain the best estimate for the current time step. This can dynamically update the state estimate and the error covariance matrix, and has high real-time performance and computational efficiency, as well as good robustness to noise and uncertainty.
[0106] The formula for calculating the state prediction value is as follows:
[0107]
[0108] Wherein: F k is the state transition matrix, describing the state changes from time k-1 to time k, mapping the state of the previous time step to the current time step. k For control input, let k represent the external influence acting on the system at time k. k To control the input matrix, the control input μ k Transform into an effect on the state.
[0109] Formula for calculating error covariance prediction:
[0110]
[0111] Q k This represents the process noise covariance matrix.
[0112] Kalman gain calculation formula:
[0113]
[0114] Wherein: H k For the measurement matrix, the state vector is mapped to the measurement space so that the state can be compared with the actual measured value. k|k R represents the error covariance matrix at the previous time point k-1, and represents the confidence level of the state estimate; smaller values indicate higher confidence. k K represents the measurement noise covariance, indicating the uncertainty of the data. k This represents the Kalman gain, used to balance the weights of prediction and measurement, and to update the state estimate.
[0115] Status Update:
[0116]
[0117] Where: z avg This represents the average of the measurements within the sliding window.
[0118] Error covariance update:
[0119] P k|k =(IK k H k )P k|k-1
[0120] Where: I is the identity matrix, P k|k This represents the error covariance matrix at the current time point k.
[0121] For example, in Gaussian filtering, the collected RSSI data generally follows a normal distribution. The next RSSI value collected by the receiving node will vary within a reasonable range, and the probability of outlier data is relatively small. Based on the concept of the Gaussian function, high-probability data can be filtered out, low-probability data can be removed, and high-frequency noise can be effectively removed through weighted averaging to retain the main features of the data and make the data smoother. The calculation steps are as follows:
[0122]
[0123] Among them G norm(k) The normalized Gaussian weights are calculated using the following formula:
[0124]
[0125] in This represents the total weight of all items. σ represents the Gaussian weights, and σ represents the standard deviation.
[0126] For example, in this embodiment of the application, based on the four RSSI datasets after the above filtering process and the RSSI measurements at different fixed distances, a ridge regression-based multiple linear regression model is established. Grid search is used for hyperparameter tuning, and five-fold cross-validation is used to find the optimal parameters. The optimal model is trained, and the weights of the weighted hybrid filter are derived, thereby combining the advantages of various filters to improve the accuracy of distance measurement to a greater extent.
[0127] The constructed multiple linear regression model is shown below:
[0128] Y=β0+β1X1+β2X2+β3X3+β4X4+ε
[0129] Where: X1 is the mean-filtered value, X2 is the median-filtered value, X3 is the Kalman-filtered value, X4 is the Gaussian-filtered value, ε is the error term, and Y is the actual RSSI measurement value at different fixed distances, represented in matrix form as follows:
[0130] Y = βX + E
[0131] Where: Y is the dependent variable, X is the matrix of independent variables (containing X1, X2, X3, X4), β is the regression coefficient vector, and E is the error term.
[0132] For example, the ridge regression model, while minimizing the loss function, adds a regularization term to control the magnitude of the regression coefficients. Its objective function is expressed as:
[0133] min(||Y-Xβ|| 2 +θ||β|| 2 )
[0134] Where, ||Y-Xβ|| 2 Let ||β|| be the sum of squared residuals. 2 Let θ be the L2 norm of the regression coefficients, and θ be the regularization parameter that controls the strength of the penalty term.
[0135] For example, since the features collected in RSSI data are much smaller than the number of samples, and the model's input features are mainly four types of filtered inputs, using L1 regularization (i.e., LASSO regression) would compress some important feature coefficients to 0, failing to fully utilize the information from all four filtered inputs and increasing the model's bias. Therefore, the main feature of L2 regularization is to prevent overfitting, better handling the features composed of the four filtered inputs without eliminating eigenvalues, thus improving the model's stability and predictive ability.
[0136] For example, using real-world measured RSSI values allows the model to better adapt to factors such as multipath effects and signal attenuation in real-world environments. At the same time, data that includes real-world environmental noise enhances the model's robustness and enables it to better handle various situations in real-world use.
[0137] Based on any of the above embodiments of this application, a third embodiment of this application is proposed. In this third embodiment, content that is the same as or similar to any of the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 5 Step S30 also includes steps S301 to S302:
[0138] Step S301: Based on a preset ranging model, predict the corrected received signal strength indication value to determine the distance information;
[0139] For example, before the step of predicting the corrected received signal strength indication value based on a preset ranging model to determine the distance information, the method further includes:
[0140] The received signal strength indication value sample dataset is processed by the weighted hybrid filtering model to obtain a corrected received signal strength indication value sample dataset.
[0141] A positive transformation is performed on the corrected received signal strength indication value sample dataset to obtain transformed received signal strength indication value sample data, and a logarithmic transformation is performed on the fixed distance of the received signal strength indication value sample data to obtain the logarithmic distance;
[0142] The received signal strength indication sample data of the transformation and the logarithmic distance are linearly fitted by the constructed polynomial regression model to obtain the linear fitting result;
[0143] Based on the linear fitting results, cross-validation and grid search are used to select model hyperparameters, and the model is trained based on the model hyperparameters to obtain the ranging model.
[0144] Reference Figure 6 , Figure 6 This is a schematic diagram of the RSSI ranging algorithm design process according to the third embodiment of this application, as shown below. Figure 6 As shown, firstly, the corrected RSSI dataset obtained by processing the original RSSI data through a weighted hybrid filtering model is used as input. Secondly, the corrected RSSI data is transformed into positive numbers, and the fixed sampling distance of the RSSI data is transformed into logarithms to linearize the relationship between RSSI values and logarithmic distance, so that the multinomial regression model can effectively fit the data. A multinomial regression model is constructed to fit the relationship between RSSI values and logarithmic distance. Methods such as cross-validation and grid search are used to select the optimal model hyperparameters to ensure the model's adaptability on different datasets. Based on the optimal parameters, the RSSI ranging model is trained to predict the logarithmic distance and convert it back to the actual distance.
[0145] For example, RSSI refers to the received signal strength, which is generally a negative number, therefore it needs to be converted to a positive number. The formula is as follows:
[0146] R = -RSSI
[0147] The actual RSSI sampling distance is logarithmically transformed to linearize the relationship between RSSI and distance, as shown in the following formula:
[0148] D = log(sampling distance)
[0149] For example, a multinomial regression model is used to fit the nonlinear relationship between RSSI values and logarithmic distance. The model formula can be expressed as:
[0150] D = β0 + β1R + β2R 2 +∈
[0151] Where: D represents the logarithmic distance, R represents the processed RSSI value, β0, β1, β2 are model parameters, and ∈ represents the error term.
[0152] For example, after obtaining a multinomial regression model with optimal parameters based on cross-validation and grid search, the logarithmic distance is predicted by the model, and then converted back to calculate the distance d using an exponential function:
[0153] d = e D
[0154] For example, based on the model training process described above, this application further proposes an adaptive dynamic model update strategy based on incremental learning. By comparing the model's mean squared error (MSE) with a set error threshold, it determines whether the model performance has degraded, thereby deciding whether to update the model. Furthermore, when the model acquires new data, it does not need to retrain the entire model each time; instead, the existing model is updated after acquiring new data, greatly saving computational resources and time. In addition, it can quickly adapt to new data and maintain the model's accuracy.
[0155] Step S302: Based on the distance information and the coordinates of at least three reference nodes, perform positioning calculations to obtain the positioning result corresponding to the node to be located.
[0156] For example, the step of performing positioning calculations based on the distance information and the coordinates of at least three reference nodes to obtain the positioning result corresponding to the node to be located includes:
[0157] A system of nonlinear equations is established based on the distance information and the coordinates of the at least three reference nodes;
[0158] The nonlinear equations are solved by the quasi-Newton method, and the sum of squared residuals is calculated. The positioning result of the node to be located is obtained by iterative calculation based on the sum of squared residuals.
[0159] Reference Figure 7 , Figure 7 This is a schematic diagram of the RSSI positioning algorithm flow according to the third embodiment of this application, as shown below. Figure 7As shown, firstly, based on the obtained RSSI value, a weighted hybrid filtering algorithm is used to correct the distance between the node to be located and the reference node, and an adaptive multinomial regression model is used to predict the distance. Based on the known coordinates of the reference node and the predicted distance, a nonlinear equation system is established. The equation system is solved by an optimization algorithm, and the coordinates of the node to be located are continuously adjusted during the solution process to minimize the sum of squared residuals of the equation system, thereby improving the positioning accuracy and stability. Through continuous iteration and optimization, the precise coordinates of the node to be located are obtained.
[0160] For example, in the process of establishing a system of nonlinear equations, the coordinates of three known reference nodes (x, y, y) are used. i ,y i Given a reference node (i = 1, 2, 3) and a node to be located (x, y), the distance d between the node to be located and the reference node is predicted using an adaptive model. i The following relationship is obtained:
[0161]
[0162] To transform the above relationship into a system of nonlinear equations, a residual r is introduced. i This represents the difference between the predicted distance and the distance calculated based on the coordinates of the node to be located:
[0163]
[0164] At this point, to ensure positioning accuracy, the calculation of positioning coordinates needs to minimize the sum of squared residuals. Therefore, the following objective function is established:
[0165]
[0166] For example, solving nonlinear equation systems generally employs Newton's method or gradient descent. Newton's method features fast convergence, but it is highly sensitive to the choice of initial values and involves significant computation; improper initial values may lead to non-convergence. While gradient descent is relatively simple to compute, its convergence speed can be slower. Considering the need to continuously adjust the coordinates of the nodes to be located during the solution process, and taking into account real-time performance, a quasi-Newton method is chosen.
[0167] For example, the quasi-Newton method does not require calculating the Jacobian matrix, has a relatively small computational cost, and exhibits good convergence. The core idea of the quasi-Newton method is to update the approximate Jacobian matrix based on the information of the current iteration point in each iteration, thereby determining the next iteration point. Its core objective is to minimize the sum of squared residuals of the equation system. By continuously adjusting and optimizing the solution process, it effectively handles nonlinear problems, thus significantly improving the accuracy and stability of positioning. Its calculation process is as follows:
[0168] Based on the objective function of the above nonlinear equation system, its gradient is calculated as follows:
[0169]
[0170] Represented as a vector:
[0171]
[0172] Update rules:
[0173] In each iteration, adjust the coordinates (x) of the node to be located. i ,y i The formula is as follows:
[0174]
[0175] And update the approximate Hessian matrix, as follows:
[0176]
[0177] Among them, H k It is the current approximate Hessian matrix. Represents the current step size vector. This represents the gradient change vector.
[0178] For example, by applying the quasi-Newton method and continuously iterating and optimizing, the coordinates of the node to be located can be effectively solved, improving the accuracy and stability of the positioning. Each iteration utilizes current information to optimize the Hessian matrix, thereby accelerating the convergence process.
[0179] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the positioning method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0180] This application also provides a positioning device, please refer to... Figure 8 The positioning device includes:
[0181] The acquisition module is used to acquire the received signal strength indication value of the node to be located;
[0182] The processing module is used to process the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value.
[0183] The determination module is used to calculate distance information based on the corrected received signal strength indication value, and determine the positioning result corresponding to the node to be located based on the distance information.
[0184] Reference Figure 9 , Figure 9 This is a schematic diagram of the overall flow of the positioning method in the embodiments of this application, such as... Figure 9As shown in the embodiments of this application, an indoor positioning method based on RSSI is provided to improve the accuracy and stability of indoor positioning. The method mainly includes three parts: RSSI weighted hybrid filtering algorithm design, RSSI ranging algorithm design, and RSSI positioning algorithm design. The basic steps include:
[0185] 1: Design a weighted hybrid filtering algorithm and train a regression model based on the measured data. This model contains weighting coefficients for multiple filtering algorithms.
[0186] 2: The RSSI measurement data set is processed through a weighted hybrid filtering algorithm to obtain a corrected RSSI dataset, thereby reducing random noise and error in RSSI.
[0187] 3: Using the corrected RSSI dataset as input, an adaptive ranging model is established for model training to reduce the nonlinear error of RSSI-path distance;
[0188] 4: The three RSSI values collected by the device to be positioned are input into the ranging model to obtain the predicted distances d1, d2, and d3.
[0189] 5: Using three distances and the known device location, the coordinates (x, y) of the device to be located are calculated by combining the three-point positioning algorithm.
[0190] For example, the key technical points involved in the positioning method in the embodiments of this application include:
[0191] (1) Design a weighted hybrid filtering algorithm and a ridge regression model to solve the positioning error caused by multipath effect, signal attenuation, environmental factors and other factors during RSSI acquisition, and improve positioning accuracy.
[0192] (2) Considering the nonlinear transformation relationship between RSSI signal value and distance, a multinomial regression model is designed to solve the adaptation of the distance measurement model in indoor environment.
[0193] (3) In order to solve the real-time processing of positioning coordinate calculation in dynamic environment, optimize the algorithm and data processing flow to reduce delay, improve the system's response speed and meet the requirements of real-time application, an adaptive dynamic model update strategy based on incremental learning is further proposed for updating the adaptive multinomial regression ranging model.
[0194] (4) To solve the problem that the accuracy of traditional calculation methods is difficult to guarantee under nonlinear calculation, the idea of nonlinear least squares method is innovatively adopted and the quasi-Newton method is used to accurately determine the position of the node to be located.
[0195] This embodiment, through the aforementioned scheme, specifically employs techniques such as weighted hybrid filtering algorithms, adaptive multinomial regression models, and nonlinear least squares methods, effectively improves indoor positioning accuracy, meeting the needs of practical applications. The positioning method in this embodiment exhibits strong adaptability to changes in the indoor environment, maintaining high positioning stability under varying signal propagation conditions. Based on existing wireless communication technologies and equipment, the positioning method requires no additional hardware investment, making it easy to implement and widely apply. Compared to other indoor positioning technologies, the positioning method in this embodiment has lower costs and higher cost-effectiveness.
[0196] The positioning device provided in this application, employing the positioning method described in the above embodiments, can solve the technical problem of positioning. Compared with the prior art, the beneficial effects of the positioning device provided in this application are the same as those of the positioning method provided in the above embodiments, and other technical features of the positioning device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0197] This application provides a positioning device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the positioning method in Embodiment 1 above.
[0198] The following is for reference. Figure 10 The diagram illustrates a structural schematic of a positioning device suitable for implementing embodiments of this application. The positioning device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The positioning device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0199] like Figure 10As shown, the positioning device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the positioning device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the positioning device to communicate wirelessly or wiredly with other devices to exchange data. Although positioning devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0200] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0201] The positioning device provided in this application, employing the positioning method described in the above embodiments, can solve the technical problem of positioning. Compared with the prior art, the beneficial effects of the positioning device provided in this application are the same as those of the positioning method provided in the above embodiments, and other technical features of the positioning device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0202] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0203] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0204] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the positioning method in the above embodiments.
[0205] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0206] The aforementioned computer-readable storage medium may be included in the positioning device; or it may exist independently and not assembled into the positioning device.
[0207] The aforementioned computer-readable storage medium carries one or more programs. When the positioning device executes the aforementioned one or more programs, the positioning device: acquires the received signal strength indication value of the node to be positioned; processes the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value; calculates distance information based on the corrected received signal strength indication value; and determines the positioning result corresponding to the node to be positioned based on the distance information. By processing the received signal strength indication value through the weighted hybrid filtering model, random noise and errors in the received signal strength indication value data can be reduced. Furthermore, distance information can be calculated based on the corrected received signal strength indication value, and the positioning result corresponding to the node to be positioned can be determined based on the distance information, thereby improving the accuracy of the distance information and thus improving the reliability and real-time performance of the positioning result.
[0208] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0209] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0210] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0211] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described positioning method, thereby solving the technical problem of positioning. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the positioning method provided in the above embodiments, and will not be repeated here.
[0212] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the positioning method described above.
[0213] The computer program product provided in this application can solve the technical problem of positioning. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the positioning method provided in the above embodiments, and will not be repeated here.
[0214] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A positioning method, characterized in that, The method comprises: Obtain the received signal strength indication value of the node to be located; The received signal strength indication value is processed based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value. The distance information is calculated based on the corrected received signal strength indication value, and the positioning result corresponding to the node to be located is determined based on the distance information. The step of calculating distance information based on the corrected received signal strength indication value includes: predicting the corrected received signal strength indication value based on a preset ranging model to determine the distance information, wherein the method for determining the ranging model includes: The received signal strength indication value sample dataset is processed by the weighted hybrid filtering model to obtain a corrected received signal strength indication value sample dataset. A positive transformation is performed on the corrected received signal strength indication value sample dataset to obtain transformed received signal strength indication value sample data, and a logarithmic transformation is performed on the fixed distance of the received signal strength indication value sample data to obtain the logarithmic distance; The received signal strength indication sample data of the transformation and the logarithmic distance are linearly fitted by the constructed polynomial regression model to obtain the linear fitting result; Based on the linear fitting results, cross-validation and grid search are used to select model hyperparameters, and the model is trained based on the model hyperparameters to obtain the ranging model.
2. The method as described in claim 1, characterized in that, Before the step of processing the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value, the method further includes: Obtain the received signal strength indication value sample dataset, wherein the received signal strength indication value sample dataset includes received signal strength indication value sample data corresponding to different fixed distances; The mean filtering, median filtering, Kalman filtering, and Gaussian filtering operations are performed on the received signal strength indication value sample dataset to obtain the received signal strength indication data after each filtering. Based on the received signal strength indication data after filtering, a multiple linear regression model based on ridge regression is established. Hyperparameters are tuned using grid search, and the optimal parameters are found using five-fold cross-validation to obtain the weighted hybrid filtering model.
3. The method as described in claim 2, characterized in that, The step of obtaining the sample dataset of received signal strength indication values includes: Collect sample data of received signal strength indication values corresponding to different fixed distances; The interference outliers in the received signal strength indication value sample data are removed to obtain the received signal strength indication value sample dataset.
4. The method as described in claim 2, characterized in that, The step of determining the positioning result corresponding to the node to be located based on the distance information includes: Based on the distance information and the coordinates of at least three reference nodes, a positioning calculation is performed to obtain the positioning result corresponding to the node to be located.
5. The method as described in claim 4, characterized in that, The step of performing positioning calculations based on the distance information and the coordinates of at least three reference nodes to obtain the positioning result corresponding to the node to be located includes: A system of nonlinear equations is established based on the distance information and the coordinates of the at least three reference nodes; The nonlinear equations are solved by the quasi-Newton method, and the sum of squared residuals is calculated. The positioning result of the node to be located is obtained by iterative calculation based on the sum of squared residuals.
6. A positioning device, characterized in that, The device comprises: The acquisition module is used to acquire the received signal strength indication value of the node to be located; The processing module is used to process the received signal strength indication value based on a preset weighted hybrid filtering model to obtain a corrected received signal strength indication value. The determination module is used to calculate distance information based on the corrected received signal strength indication value, and determine the positioning result corresponding to the node to be located based on the distance information; The step of calculating distance information based on the corrected received signal strength indication value includes: predicting the corrected received signal strength indication value based on a preset ranging model to determine the distance information, wherein the method for determining the ranging model includes: The received signal strength indication value sample dataset is processed by the weighted hybrid filtering model to obtain a corrected received signal strength indication value sample dataset. A positive transformation is performed on the corrected received signal strength indication value sample dataset to obtain transformed received signal strength indication value sample data, and a logarithmic transformation is performed on the fixed distance of the received signal strength indication value sample data to obtain the logarithmic distance; The received signal strength indication sample data of the transformation and the logarithmic distance are linearly fitted by the constructed polynomial regression model to obtain the linear fitting result; Based on the linear fitting results, cross-validation and grid search are used to select model hyperparameters, and the model is trained based on the model hyperparameters to obtain the ranging model.
7. A positioning device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the positioning method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the positioning method as described in any one of claims 1 to 5.
9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the positioning method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Hybrid location method and system for wireless signal attenuation model based on intelligent space
CN104469936A
Distance correction weighted centroid localization method based on reception signal intensity optimization
CN105828435A