Positioning method and system based on RSSI fingerprint database and generalized regression neural network
By combining the global optimization capability of the quantum particle swarm algorithm and the local optimization characteristics of the simulated annealing algorithm, the problem that parameter optimization in generalized regression neural networks is easily trapped in local optimization in indoor positioning, and the positioning accuracy is significantly improved.
Patent Information
- Application Number
- CN202510589410.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional generalized regression neural networks are prone to local optimization in indoor positioning, resulting in low positioning accuracy.
The quantum particle swarm algorithm is used for global optimization to obtain preliminary model parameters, and then the simulated annealing algorithm is used for local optimization to obtain the target model parameters, which are used to train the target generalized regression neural network prediction model.
It effectively avoids the problem of local optimality of parameter optimization, improves the performance of generalized regression neural network model, and significantly improves the accuracy of indoor positioning.
Smart Images

Figure CN120105932A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of indoor positioning technology, and in particular to a positioning method and system based on an RSSI fingerprint library and a generalized regression neural network. Background Art
[0002] With the rapid development of positioning and navigation technology, indoor positioning technology has attracted much attention due to its wide application prospects in intelligent buildings, industrial production, logistics and warehousing, etc. Indoor positioning technology based on received signal strength (RSSI) has become a hot topic in current research due to its advantages such as low implementation cost and convenient deployment.
[0003] At present, the positioning algorithm based on RSSI fingerprint library and generalized regression neural network has important research value and application prospects in the field of positioning. By constructing the RSSI fingerprint library, using the mapping relationship between Bluetooth signal strength information and location, and combining the powerful nonlinear mapping ability of generalized regression neural network, it can effectively solve the positioning problem in complex indoor environments. However, the performance of generalized regression neural network is highly dependent on the selection of model parameters. Traditional parameter optimization methods are prone to fall into local optimality, resulting in low positioning accuracy. Summary of the invention
[0004] The present application provides a positioning method, system, device and medium based on RSSI fingerprint library and generalized regression neural network, which can avoid parameter optimization from falling into local optimal solution and improve positioning accuracy.
[0005] In a first aspect, the present application provides a positioning method based on an RSSI fingerprint library and a generalized regression neural network, the method comprising: Obtain RSSI values and corresponding location information of multiple sampling points in the target space, and build a fingerprint database based on the RSSI values and the location information; Establishing a generalized regression neural network prediction model based on the fingerprint database, wherein the input of the generalized regression neural network prediction model is the RSSI value and the output is the location information; The quantum particle swarm algorithm is used to globally optimize the model parameters of the generalized regression neural network prediction model to obtain preliminary model parameters; Using a simulated annealing algorithm to locally optimize the preliminary model parameters to obtain target model parameters, and training a target generalized regression neural network prediction model based on the target model parameters; The real-time RSSI value of the target to be located is collected in the target space, the real-time RSSI value is input into the target generalized regression neural network prediction model, and the target position coordinates of the target to be located are output.
[0006] By adopting the above technical scheme, the RSSI values of multiple sampling points and their corresponding location information are obtained in the target space to build a fingerprint database, which provides a data basis for the subsequent establishment of a generalized regression neural network prediction model; secondly, the quantum particle swarm algorithm is used to globally optimize the parameters of the generalized regression neural network prediction model, which can effectively avoid the parameter optimization from falling into the local optimal solution and obtain preliminary model parameters with better global search capabilities; then, the simulated annealing algorithm is used to further locally optimize the preliminary model parameters, which not only maintains the ability to explore the global optimal solution, but also improves the precision of the local search, thereby obtaining target model parameters with better performance; finally, the target generalized regression neural network prediction model is obtained based on the optimized target model parameter training, and the real-time RSSI value of the target to be located is input into the model to output more accurate target position coordinates, effectively improving the positioning accuracy. This scheme combines the global optimization capability of the quantum particle swarm algorithm and the local optimization characteristics of the simulated annealing algorithm to achieve multi-level optimization of the parameters of the generalized regression neural network model, overcome the problem that the traditional parameter optimization method is prone to fall into the local optimal solution, and significantly improve the accuracy of indoor positioning.
[0007] In a second aspect of the present application, a positioning system based on an RSSI fingerprint library and a generalized regression neural network is provided, the system comprising: A database construction module, used to obtain RSSI values and corresponding location information of multiple sampling points in the target space, and to construct a fingerprint database based on the RSSI values and the location information; A model building module, used to build a generalized regression neural network prediction model based on the fingerprint database, the input of the generalized regression neural network prediction model is the RSSI value, and the output is the location information; A global optimization module, used to globally optimize the model parameters of the generalized regression neural network prediction model using a quantum particle swarm algorithm to obtain preliminary model parameters; A local optimization module, used to locally optimize the preliminary model parameters using a simulated annealing algorithm to obtain target model parameters, and to obtain a target generalized regression neural network prediction model based on the target model parameters; The target positioning module is used to collect the real-time RSSI value of the target to be positioned in the target space, input the real-time RSSI value into the target generalized regression neural network prediction model, and output the target position coordinates of the target to be positioned.
[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, and the instructions are suitable for being loaded by a processor and executing the above method steps.
[0009] In a fourth aspect of the present application, an electronic device is provided, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0010] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: This application constructs a fingerprint database by acquiring the RSSI values of multiple sampling points and their corresponding location information in the target space, which provides a data basis for the subsequent establishment of a generalized regression neural network prediction model; secondly, the quantum particle swarm algorithm is used to globally optimize the parameters of the generalized regression neural network prediction model, which can effectively avoid the parameter optimization from falling into the local optimal solution and obtain preliminary model parameters with better global search capabilities; then, the simulated annealing algorithm is used to further locally optimize the preliminary model parameters, which not only maintains the ability to explore the global optimal solution, but also improves the precision of the local search, thereby obtaining target model parameters with better performance; finally, based on the optimized target model parameter training, the target generalized regression neural network prediction model is obtained, and the real-time RSSI value of the target to be located is input into the model to output more accurate target position coordinates, effectively improving the positioning accuracy. This scheme combines the global optimization capability of the quantum particle swarm algorithm and the local optimization characteristics of the simulated annealing algorithm to achieve multi-level optimization of the parameters of the generalized regression neural network model, overcome the problem that the traditional parameter optimization method is prone to falling into the local optimal solution, and significantly improve the accuracy of indoor positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a flow chart of a positioning method based on RSSI fingerprint library and generalized regression neural network provided in an embodiment of the present application; Figure 2 is an example diagram of a positioning result provided by an embodiment of the present application; Figure 3 It is a module schematic diagram of a positioning system based on an RSSI fingerprint library and a generalized regression neural network 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: 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION
[0013] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0014] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0015] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0016] The following will provide a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0017] Please refer to Figure 1 , a flowchart of a positioning method based on RSSI fingerprint library and generalized regression neural network is proposed. The method can be implemented by computer program, can be implemented by single-chip microcomputer, and can also be run on a positioning system based on RSSI fingerprint library and generalized regression neural network. The computer program can be integrated in a computer device or run as an independent tool application. Specifically, the method includes steps 10 to 50, and the above steps are as follows: Step 10: Obtain RSSI values and corresponding location information of multiple sampling points in the target space, and build a fingerprint database based on the RSSI values and location information.
[0018] In the embodiment of the present application, the target space refers to a specific area where indoor positioning is required, which is a specific place for deploying beacons and conducting positioning experiments.
[0019] Sampling points refer to several randomly selected locations in the target space for collecting RSSI signal data. At each sampling point, the RSSI signal strength value from each beacon is collected.
[0020] The fingerprint database records the correspondence between a specific location and its corresponding RSSI signal characteristics, providing training data for the subsequent establishment of a generalized regression neural network prediction model. It can be understood as a "location-signal strength" mapping data set for achieving RSSI-based indoor positioning.
[0021] Specifically, in an embodiment of the present application, 16 beacons are evenly deployed every 2 meters in a target space of 8 meters * 8 meters to ensure the uniformity of signal coverage. Then 100 sampling points are randomly selected in the target space, and the position information of each sampling point includes its two-dimensional coordinates (x, y). At each sampling point, the RSSI signal strength value emitted by each beacon is collected to obtain the RSSI value vector corresponding to the sampling point. The position information, beacon position information and corresponding RSSI values of all sampling points are stored in a fingerprint database to form a mapping relationship between position and signal characteristics. This fingerprint database construction method based on a large number of sampling points can fully reflect the distribution characteristics of RSSI signals in the target space, and provide reliable training data for the subsequent establishment of an accurate generalized regression neural network prediction model.
[0022] Based on the above embodiment, as an optional embodiment, the step of obtaining RSSI values and corresponding location information of multiple sampling points in the target space and constructing a fingerprint database based on the RSSI values and location information may also include the following steps: Step 101: uniformly deploy multiple beacons at preset intervals in the target space.
[0023] Specifically, to ensure the uniformity of signal coverage in the target space, the size of the target space is first measured. In this embodiment, the target space is a rectangular area of 8 meters * 8 meters. Taking into account the effective transmission range and attenuation characteristics of the Bluetooth signal, the preset distance is set to 2 meters, which can ensure that the signals between adjacent beacons have both moderate overlap and do not cause excessive interference. According to this spacing, the target space is divided into grids along the x-axis and y-axis directions, and 16 beacons are deployed at the intersection of the grids. The position coordinates of each beacon are accurately recorded. This evenly distributed deployment method enables any position in the target space to receive signals from at least 3 beacons, providing a reliable signal source for subsequent RSSI signal acquisition, while also avoiding the generation of signal blind spots.
[0024] Step 102: randomly select multiple sampling points in the target space, and collect the RSSI signal of each beacon at each sampling point.
[0025] Specifically, after the beacons are deployed, in order to obtain representative training data, a stratified random sampling method is used to select sampling points in the target space. In the specific implementation, the target space is first divided into 16 equal sub-areas, and 5-8 sampling points are randomly selected in each sub-area, and a total of 100 sampling points are selected. For each sampling point, a high-precision laser rangefinder is used to measure and record its precise two-dimensional coordinates (x, y). This stratified random selection method not only ensures the uniformity of the spatial distribution of the sampling points, but also introduces a certain degree of randomness, which can better reflect the signal propagation characteristics in the target space.
[0026] Step 103: randomly select multiple sampling points in the target space, and collect the RSSI signal of each beacon at each sampling point.
[0027] Specifically, after selecting the sampling points, a customized signal acquisition device is used at each sampling point to collect the Bluetooth signals emitted by each beacon. In the specific collection process, the signal acquisition device is first fixed at a height of 1.2 meters from the ground, which is consistent with the actual application scenario. Then stay at each sampling point for 30 seconds, collect RSSI values from all beacons at a frequency of 2Hz, and obtain 60 sets of data. These data are preprocessed, and the average value is taken after removing the outliers to obtain the characteristic RSSI value of each beacon at the sampling point. Finally, the location coordinates of the sampling point, the corresponding beacon location information, and the processed RSSI value are stored in the fingerprint database according to a predetermined format. This method of averaging multiple samples can effectively reduce the errors caused by signal fluctuations and improve the reliability of the data.
[0028] Step 20: A generalized regression neural network prediction model is established based on the fingerprint database. The input of the generalized regression neural network prediction model is the RSSI value, and the output is the location information.
[0029] In the embodiment of the present application, the generalized regression neural network prediction model refers to a mathematical model used to establish a mapping relationship between RSSI values and location information.
[0030] Specifically, a generalized regression neural network prediction model for positioning is constructed, the actual measured signal strength RSSI value is used as the prediction model input, and the predicted location information is used as the prediction model output, where the input and output here are both vectorized values. The constructed generalized regression neural network prediction model is as follows: ; Where P is the location information, RSSI is the actual measured signal strength, and M is the number of sampling points. is the model parameter of the generalized regression neural network, RSSI i is the RSSI value of the i-th sampling point, P i is the location information of the i-th sampling point.
[0031] Step 30: Use quantum particle swarm algorithm to globally optimize the model parameters of the generalized regression neural network prediction model to obtain preliminary model parameters.
[0032] Specifically, the performance of the generalized regression neural network prediction model depends largely on the selection of model parameters. Traditional parameter optimization methods are prone to fall into local optimal solutions, and the optimization process takes a long time. To solve this problem, this embodiment uses a quantum particle swarm algorithm to globally optimize the model parameters. The algorithm encodes the smoothing parameters, hidden layer weights, and output layer bias parameters of the model in the form of quantum bits, expands the parameter search space through the superposition characteristics of quantum states, and improves the optimization efficiency. During the optimization process, the particle swarm size is set to 50, and the position information of each particle is represented by quantum bit encoding. The optimal parameter combination is searched by iteratively updating the particle position. At the same time, the fitness function is introduced to evaluate the parameter performance. When the optimization result tends to be stable, the preliminary model parameters are obtained. This method can find a parameter solution close to the global optimal in a short time and improve the model prediction accuracy.
[0033] Based on the above embodiment, as another optional embodiment, the step of using quantum particle swarm algorithm to globally optimize the model parameters of the generalized regression neural network prediction model to obtain preliminary model parameters may also include the following steps: Step 301: Initialize the number of iterations of the quantum particle swarm algorithm, the number of particles, and the boundary range of particle activities, and randomly generate initial particle positions within the boundary range.
[0034] Specifically, in order to ensure that the quantum particle swarm algorithm can be effectively optimized in a suitable search space, the algorithm parameters need to be initialized. Set the maximum number of iterations, such as 300 times, to ensure that the algorithm fully converges without causing over-computation; set the number of particles n to 100 and the dimension dim, which can ensure population diversity while maintaining high computational efficiency. Considering the actual physical meaning of the model parameters, set the boundary range of particle activity, including the lower boundary and the upper boundary, and use a uniformly distributed random number generator to generate the initial position of each particle within the set boundary range to ensure that the initial particle swarm is evenly distributed in the search space, providing a good starting point for subsequent optimization.
[0035] Step 302: Calculate the inertia weight according to the current iteration step number, and update the position of each particle based on the inertia weight.
[0036] Specifically, the initial position is taken as the optimal position of the particle and the global optimal position , implement the quantum particle swarm algorithm main loop.
[0037] Generate random numbers q for position updates for n particles in sequence, ranging from -1 to 1; randomly generate rotation angles, ranging from ; Calculate the adaptive inertia weight according to the current iteration step , the formula is as follows: ,in is the current iteration number.
[0038] Update the particle positions of n particles in turn , and perform position boundary control to ensure that the particle position is within the upper and lower boundaries. The particle position update formula is as follows: .
[0039] Step 303: Calculate the parameters of the generalized regression neural network prediction model using the updated particle positions, and perform position prediction on the sampling points in the fingerprint database to obtain the predicted positions.
[0040] Specifically, the model parameters of the generalized regression neural network prediction model are calculated based on the updated particle positions. , the formula is as follows: ; Among them, the particle position .
[0041] Based on the inclusion of the model parameters The generalized regression neural network prediction model is used to predict the positions of M sampling points in turn, and the prediction output vector of the jth sampling point is obtained. , that is, the predicted position.
[0042] Step 304: Calculate the error between the predicted position and the actual position of the sampling point as the fitness value, and use the particle position with the minimum fitness value as the global optimal particle position.
[0043] Specifically, calculate the current particle position The fitness value of , select the mean square error as the fitness function to evaluate the quality of particles. The formula is as follows: ;
[0044] in, is the fitness value corresponding to the current particle, M is the number of sampling points, is the predicted output vector of the jth sampling point, is the actual output vector of the jth sample.
[0045] If the new fitness is better than the best fitness of the current particle, update the best position of the current particle and the best fitness .
[0046] Step 305: Perform mutation optimization on the global optimal particle position, and use the parameters corresponding to the particle position with the optimal fitness value after optimization as the preliminary model parameters.
[0047] Specifically, in order to prevent the algorithm from falling into the local optimum, the global optimal particle position is optimized by mutation. Based on the global optimal particle position, random perturbations that obey the normal distribution N(0,0.1) can be added to generate 10 candidate mutation positions. For each mutation position, it is mapped to a model parameter and a prediction model is constructed. The prediction error of the sampling point in the fingerprint database is calculated as the fitness value. The fitness values of the original global optimal position and all mutation positions are compared, and the parameters corresponding to the position with the smallest fitness value are selected as the preliminary model parameters. This mutation optimization strategy can perform a fine search in a local range, reducing the average positioning error of the model by 5%-10%, effectively improving the positioning accuracy.
[0048] Based on the above embodiment, as another optional embodiment, the step of performing variation optimization on the global optimal particle position and taking the parameters corresponding to the particle position with the optimal fitness value after optimization as the preliminary model parameters may also include the following steps: Step 3051: Initialize the mutation parameters of the global optimal particle position, the mutation parameters include initial mutation probability and mutation strength.
[0049] Specifically, in order to achieve adaptive mutation operation, it is necessary to set mutation parameters reasonably. Mutation parameters include initial mutation probability and mutation strength. The initial mutation probability is set to 0.3, which can ensure a moderate mutation frequency without excessively interfering with the optimization process. The mutation strength is set to 0.1, which represents the standard deviation of Gaussian noise. This strength can produce effective local perturbations without destroying the original solution.
[0050] Step 3052: Adjust the initial mutation probability according to the fitness value corresponding to the global optimal particle position to obtain the target mutation probability.
[0051] Specifically, the mutation probability is dynamically adjusted according to the fitness of the current particle. The formula is as follows: ; in, is the optimal fitness value of the current particle, is the optimal fitness vector of all particles, is the target mutation probability.
[0052] Step 3053: Based on the target mutation probability and mutation intensity, the global optimal particle position is mutated using Gaussian noise to obtain the mutated particle position.
[0053] Specifically, the mutation operation is performed based on the target mutation probability and mutation strength. For each dimension of the global optimal particle position, the target mutation probability is used to randomly determine whether to perform mutation. If mutation is required, Gaussian noise with a mean of 0 and a standard deviation of the mutation strength is superimposed on the dimension. This mutation method based on Gaussian noise can produce an effective local search effect while maintaining the original solution structure.
[0054] Step 3054: Calculate the fitness value corresponding to the mutated particle position. If the fitness value corresponding to the mutated particle position is less than the fitness value corresponding to the global optimal particle position, update the global optimal particle position, and use the parameters corresponding to the updated global optimal particle position as the preliminary model parameters.
[0055] Specifically, the model parameters are recalculated according to the particle positions after mutation. and the corresponding fitness , if the fitness after mutation If it is better than the best fitness of the current particle, then update the best position of the current particle and the best fitness According to the best fitness vector of all particles Get the global optimal fitness value of all particles and the global optimal position , calculate the optimal model parameters of the generalized regression neural network prediction model , which is the preliminary model parameter, the formula is as follows: , where the global optimal position .
[0056] Step 40: Use a simulated annealing algorithm to locally optimize the preliminary model parameters to obtain target model parameters, and train the target generalized regression neural network prediction model based on the target model parameters.
[0057] Specifically, in order to further improve the optimization effect of model parameters, the simulated annealing algorithm is used for local optimization based on the preliminary model parameters obtained by the quantum particle swarm algorithm. For example, the initial annealing temperature T=100, the temperature attenuation coefficient α=0.95, the number of iterations at each temperature L=50, the search step size is set to 0.01 according to the preliminary model parameters, and the neighborhood solution is randomly generated at each temperature. The smoothing parameters and weight parameters of the model are perturbed respectively, and the perturbation amount follows the uniform distribution of [-0.01, 0.01]. The newly generated parameters are applied to the generalized regression neural network prediction model, and the average error between the predicted position and the actual position is calculated as the objective function value. If the objective function value of the new solution is better than the current solution, the new solution is directly accepted; otherwise, the new solution is accepted with probability exp(-(f(new)-f(current)) / T) according to the Metropolis criterion. When the temperature T drops to the preset threshold of 0.01 or the objective function value improves by no more than 0.1% after 10 consecutive temperature decays, the optimization process is terminated and the optimal parameters finally obtained are used as the target model parameters to train the target generalized regression neural network prediction model.
[0058] Based on the above embodiment, as another optional embodiment, the step of locally optimizing the preliminary model parameters using a simulated annealing algorithm to obtain target model parameters, and obtaining the target generalized regression neural network prediction model based on the target model parameter training may also include the following steps: Step 401: Initialize control parameters of the simulated annealing algorithm, the control parameters include an initial search temperature, a minimum search temperature and a temperature attenuation coefficient, and use the preliminary model parameters as the current optimal solution.
[0059] Specifically, in order to ensure that the simulated annealing algorithm can be optimized within a suitable search range and convergence speed, it is necessary to set the control parameters reasonably. For example, the initial search temperature T is set to 100; the minimum search temperature T min Set to 0.01; Temperature attenuation coefficient Set to 0.95, this decay rate can ensure that the algorithm has enough search time without excessively extending the calculation time. The initial model parameters optimized by the quantum particle swarm algorithm are used as the current optimal solution , providing a good starting point for subsequent local optimization.
[0060] Step 402: When the search temperature is greater than the minimum search temperature, the current optimal solution is randomly perturbed to obtain a candidate solution, and the fitness value corresponding to the candidate solution is calculated.
[0061] Specifically, when the search temperature is greater than the minimum search temperature, continue to iterate and find the current optimal solution. Perform small-scale random perturbations to generate candidate solutions , according to the candidate solution Perform position prediction for each sampling point in turn to obtain the predicted output vector of the jth sample , calculate the candidate solution Fitness .
[0062] Step 403: When the fitness value of the candidate solution is better than the fitness value of the current optimal solution, the current optimal solution is updated; when the fitness value of the candidate solution is not better than the fitness value of the current optimal solution, the acceptance probability is calculated based on the search temperature and the current optimal solution is updated.
[0063] Specifically, if the candidate solution Fitness Better fitness than the current optimal solution , then accept the candidate solution as the current optimal solution If the fitness value of the candidate solution is not better than the fitness value of the current optimal solution, in order to avoid falling into the local optimum, the probability Accept the candidate solution as the current optimal solution.
[0064] Step 404: lower the search temperature based on the temperature attenuation coefficient, and repeat the optimization update process until the lowest search temperature is reached, and use the updated current optimal solution as the target model parameter.
[0065] Specifically, the algorithm's search process is controlled by the temperature decay mechanism. After each round of parameter update, the current temperature is multiplied by the temperature decay coefficient of 0.95 to reduce the search temperature. The optimization update process continues at the new temperature until the temperature drops to the lowest search temperature or the improvement of the optimal solution after 10 consecutive temperature decays is less than 0.1%. The current optimal solution finally obtained is used as the target model parameter. This annealing strategy ensures that the algorithm can perform sufficient local optimization based on the preliminary model parameters, significantly improving the prediction accuracy of the model.
[0066] Step 50: Collect the real-time RSSI value of the target to be located in the target space, input the real-time RSSI value into the target generalized regression neural network prediction model, and output the target position coordinates of the target to be located.
[0067] Specifically, the real-time RSSI value of the target to be located is collected in real time in the target space, the RSSI value is converted into an input vector, and input into the target generalized regression neural network prediction model for position estimation, and the target position coordinates of the target to be located are finally output, that is, the target position vector. The target generalized regression neural network prediction model formula is as follows: ; Where P is the target position vector, RSSI is the actual measured signal strength, M is the number of sampling points, is the target model parameter of the generalized regression neural network prediction model, RSSI i is the input vector of the i-th sampling point, P i is the output vector of the i-th sampling point.
[0068] Please refer to Figure 2 , Figure 2 An example diagram of a positioning result provided for an embodiment of the present application, the positioning result diagram demonstrates the positioning effect of the present application solution in an actual application scenario. The blue squares (Beacons) in the figure represent reference nodes deployed in the area to be positioned. These reference nodes are evenly distributed in a rectangular area of 8 meters x 8 meters and are used to collect RSSI signals sent by the target to be positioned. The black solid line (Actual path) represents the actual motion trajectory of the target to be positioned, and the red solid line (Estimated path) represents the target motion trajectory predicted based on the present application solution. Combined with Figure 2 It can be seen that the predicted trajectory is basically consistent with the actual trajectory, especially in the straight motion segment, the positioning effect is good. In general, the predicted trajectory can track the actual motion path of the target well, verifying that the generalized regression neural network prediction model based on optimization proposed in this application has high positioning accuracy.
[0069] Based on the above embodiment, as an optional embodiment, a positioning method based on RSSI fingerprint library and generalized regression neural network may also include the following process: Specifically, in order to improve the adaptability and positioning accuracy of the positioning system, it is necessary to evaluate and optimize the positioning effect in real time. The actual position coordinates of the target to be positioned are obtained through a high-precision positioning device, and the coordinate value is compared with the target position coordinates predicted by the system, and the Euclidean distance is calculated as the positioning error. When the positioning error exceeds the preset threshold of 2 meters, it means that the current environment may have changed and the fingerprint database needs to be updated. At this time, based on the actual position coordinates of the target to be positioned, all sampling points within 5 meters of the target position in the fingerprint database are screened out, and these sampling points are marked as relevant sampling points. These relevant sampling points are resampled, and each sampling point re-collects 100 RSSI values, and the average value is taken as the new RSSI feature after removing the abnormal values. At the same time, the timestamp, temperature, humidity and other environmental parameters at the time of sampling are recorded, and the newly collected RSSI value and its corresponding position coordinates and environmental parameters replace the original data records in the fingerprint database. This dynamic update mechanism enables the fingerprint database to adapt to environmental changes, timely reflect changes in wireless signal propagation characteristics, and significantly improve the positioning accuracy of the system in a dynamic environment.
[0070] See also Figure 3, is a module schematic diagram of a positioning system based on an RSSI fingerprint library and a generalized regression neural network provided in an embodiment of the present application, wherein the system includes: A database construction module, used to obtain RSSI values and corresponding location information of multiple sampling points in the target space, and to construct a fingerprint database based on the RSSI values and the location information; A model building module, used to build a generalized regression neural network prediction model based on the fingerprint database, the input of the generalized regression neural network prediction model is the RSSI value, and the output is the location information; A global optimization module, used to globally optimize the model parameters of the generalized regression neural network prediction model using a quantum particle swarm algorithm to obtain preliminary model parameters; A local optimization module, used to locally optimize the preliminary model parameters using a simulated annealing algorithm to obtain target model parameters, and to obtain a target generalized regression neural network prediction model based on the target model parameters; The target positioning module is used to collect the real-time RSSI value of the target to be positioned in the target space, input the real-time RSSI value into the target generalized regression neural network prediction model, and output the target position coordinates of the target to be positioned.
[0071] Optionally, the database construction module is further used to evenly deploy multiple beacons at preset distances within the target space; Randomly selecting a plurality of sampling points in the target space, and collecting RSSI signals of each of the beacons at each of the sampling points; A fingerprint database including the positions of the beacons, the positions of the sampling points and the corresponding RSSI signals is generated.
[0072] Optionally, the global optimization module is further used to initialize the number of iterations of the quantum particle swarm algorithm, the number of particles, and the boundary range of particle activities, and randomly generate initial particle positions within the boundary range; Calculate the inertia weight according to the current iteration step, and update the position of each particle based on the inertia weight; Calculating the model parameters of the generalized regression neural network prediction model using the updated particle positions, and performing position prediction on the sampling points in the fingerprint database to obtain the predicted positions; Calculate the error between the predicted position and the actual position of the sampling point as the fitness value, and take the particle position with the minimum fitness value as the global optimal particle position; The global optimal particle position is subjected to mutation optimization, and the parameters corresponding to the particle position having the optimal fitness value after optimization are used as preliminary model parameters.
[0073] Optionally, the global optimization module is further used to initialize the mutation parameters of the global optimal particle position, wherein the mutation parameters include an initial mutation probability and a mutation intensity; Adjust the initial mutation probability according to the fitness value corresponding to the global optimal particle position to obtain a target mutation probability; Based on the target mutation probability and the mutation strength, the global optimal particle position is mutated using Gaussian noise to obtain a mutated particle position; The fitness value corresponding to the mutated particle position is calculated. If the fitness value corresponding to the mutated particle position is less than the fitness value corresponding to the global optimal particle position, the global optimal particle position is updated, and the parameters corresponding to the updated global optimal particle position are used as preliminary model parameters.
[0074] Optionally, the local optimization module is further used to initialize control parameters of the simulated annealing algorithm, the control parameters including an initial search temperature, a minimum search temperature and a temperature attenuation coefficient, and use the preliminary model parameters as the current optimal solution; When the search temperature is greater than the minimum search temperature, randomly perturb the current optimal solution to obtain a candidate solution, and calculate the fitness value corresponding to the candidate solution; When the fitness value of the candidate solution is better than the fitness value of the current optimal solution, the current optimal solution is updated; when the fitness value of the candidate solution is not better than the fitness value of the current optimal solution, the acceptance probability is calculated based on the search temperature and the current optimal solution is updated; The search temperature is lowered based on the temperature attenuation coefficient, and the optimization update process is repeatedly performed until the lowest search temperature is reached, and the updated current optimal solution is used as the target model parameter.
[0075] Optionally, a positioning system based on RSSI fingerprint library and generalized regression neural network also includes an optimization module for obtaining the actual position coordinates of the target to be positioned; Calculating the positioning error between the target position coordinates and the actual position coordinates; When the positioning error exceeds a preset threshold, marking relevant sampling points for positioning the target to be positioned; The relevant sampling points are resampled and the fingerprint database is updated.
[0076] 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.
[0077] An embodiment of the present application also provides a computer storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing a positioning method based on an RSSI fingerprint library and a generalized regression neural network in the above embodiment. The specific execution process can be found in the specific description of the above embodiment, which will not be repeated here.
[0078] Please refer to Figure 4 The application also discloses an electronic device. Figure 4 The electronic device 300 may include: at least one processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0079] The communication bus 302 is used to realize the connection and communication between these components.
[0080] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0081] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0082] Among them, the processor 301 may include one or more processing cores. The processor 301 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 305, and calling data stored in the memory 305. Optionally, the processor 301 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 301 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 301, and it can be implemented separately through a chip.
[0083] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 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 305 may optionally also be at least one storage device located away from the aforementioned processor 301. Refer to Figure 4 The memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program of a positioning method based on an RSSI fingerprint library and a generalized regression neural network.
[0084] exist Figure 4In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call the memory 305 to store an application program for a positioning method based on an RSSI fingerprint library and a generalized regression neural network. When executed by one or more processors 301, the electronic device 300 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited 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 be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] The above are only exemplary embodiments 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.
[0091] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A positioning method based on RSSI fingerprint library and generalized regression neural network, characterized in that: The method comprises: Obtain RSSI values and corresponding location information of multiple sampling points in the target space, and build a fingerprint database based on the RSSI values and the location information; Establishing a generalized regression neural network prediction model based on the fingerprint database, wherein the input of the generalized regression neural network prediction model is the RSSI value and the output is the location information; The generalized regression neural network prediction model is: ; Where P is the location information, RSSI is the actual measured signal strength, and M is the number of sampling points. is the model parameter of the generalized regression neural network, RSSI i is the RSSI value of the i-th sampling point, P i is the location information of the i-th sampling point; The quantum particle swarm algorithm is used to globally optimize the model parameters of the generalized regression neural network prediction model to obtain preliminary model parameters; Using a simulated annealing algorithm to locally optimize the preliminary model parameters to obtain target model parameters, and training a target generalized regression neural network prediction model based on the target model parameters; Collecting the real-time RSSI value of the target to be located in the target space, inputting the real-time RSSI value into the target generalized regression neural network prediction model, and outputting the target position coordinates of the target to be located; The method further comprises: Obtain the actual position coordinates of the target to be located; Calculating the positioning error between the target position coordinates and the actual position coordinates; When the positioning error exceeds a preset threshold, marking relevant sampling points for positioning the target to be positioned; The relevant sampling points are resampled and the fingerprint database is updated.
2. The positioning method based on RSSI fingerprint library and generalized regression neural network according to claim 1, characterized in that: The obtaining of RSSI values and corresponding position information of a plurality of sampling points in the target space, and constructing a fingerprint database based on the RSSI values and the position information, includes: Evenly deploying a plurality of beacons at predetermined intervals within the target space; Randomly selecting a plurality of sampling points in the target space, and collecting RSSI signals of each of the beacons at each of the sampling points; A fingerprint database including the positions of the beacons, the positions of the sampling points and the corresponding RSSI signals is generated.
3. The positioning method based on RSSI fingerprint library and generalized regression neural network according to claim 1, characterized in that: The quantum particle swarm algorithm is used to globally optimize the model parameters of the generalized regression neural network prediction model to obtain preliminary model parameters, including: Initialize the number of iterations of the quantum particle swarm algorithm, the number of particles, and the boundary range of particle activities, and randomly generate initial particle positions within the boundary range; Calculate the inertia weight according to the current iteration step, and update the position of each particle based on the inertia weight; Calculating the model parameters of the generalized regression neural network prediction model using the updated particle positions, and performing position prediction on the sampling points in the fingerprint database to obtain the predicted positions; Calculate the error between the predicted position and the actual position of the sampling point as the fitness value, and take the particle position with the minimum fitness value as the global optimal particle position; The global optimal particle position is subjected to mutation optimization, and the parameters corresponding to the particle position having the optimal fitness value after optimization are used as preliminary model parameters.
4. The positioning method based on RSSI fingerprint library and generalized regression neural network according to claim 3 is characterized in that: The step of performing mutation optimization on the global optimal particle position and taking the parameters corresponding to the particle position having the optimal fitness value after optimization as the preliminary model parameters includes: Initializing the mutation parameters of the global optimal particle position, wherein the mutation parameters include an initial mutation probability and a mutation intensity; Adjust the initial mutation probability according to the fitness value corresponding to the global optimal particle position to obtain a target mutation probability; Based on the target mutation probability and the mutation strength, the global optimal particle position is mutated using Gaussian noise to obtain a mutated particle position; The fitness value corresponding to the mutated particle position is calculated. If the fitness value corresponding to the mutated particle position is less than the fitness value corresponding to the global optimal particle position, the global optimal particle position is updated, and the parameters corresponding to the updated global optimal particle position are used as preliminary model parameters.
5. The positioning method based on RSSI fingerprint library and generalized regression neural network according to claim 1, characterized in that: The method of locally optimizing the preliminary model parameters using a simulated annealing algorithm to obtain target model parameters includes: Initializing control parameters of a simulated annealing algorithm, the control parameters including an initial search temperature, a minimum search temperature, and a temperature attenuation coefficient, and using the preliminary model parameters as a current optimal solution; When the search temperature is greater than the minimum search temperature, randomly perturb the current optimal solution to obtain a candidate solution, and calculate the fitness value corresponding to the candidate solution; When the fitness value of the candidate solution is better than the fitness value of the current optimal solution, the current optimal solution is updated; when the fitness value of the candidate solution is not better than the fitness value of the current optimal solution, the acceptance probability is calculated based on the search temperature and the current optimal solution is updated; The search temperature is lowered based on the temperature attenuation coefficient, and the optimization update process is repeatedly performed until the lowest search temperature is reached, and the updated current optimal solution is used as the target model parameter.
6. A positioning system based on RSSI fingerprint library and generalized regression neural network for implementing the positioning method based on RSSI fingerprint library and generalized regression neural network as claimed in claim 1, characterized in that: The system comprises: A database construction module, used to obtain RSSI values and corresponding location information of multiple sampling points in the target space, and to construct a fingerprint database based on the RSSI values and the location information; A model building module, used to build a generalized regression neural network prediction model based on the fingerprint database, the input of the generalized regression neural network prediction model is the RSSI value, and the output is the location information; A global optimization module, used to globally optimize the model parameters of the generalized regression neural network prediction model using a quantum particle swarm algorithm to obtain preliminary model parameters; A local optimization module, used to locally optimize the preliminary model parameters using a simulated annealing algorithm to obtain target model parameters, and to obtain a target generalized regression neural network prediction model based on the target model parameters; The target positioning module is used to collect the real-time RSSI value of the target to be positioned in the target space, input the real-time RSSI value into the target generalized regression neural network prediction model, and output the target position coordinates of the target to be positioned.
7. 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 5.
8. 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 claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
WiFi indoor positioning fingerprint database construction and update method
CN104853317A
Indoor fingerprint positioning method based on improved LSSVR
CN114422952A
Cited By
Wireless radio frequency positioning method based on multi-source data and convolutional neural network
CN120908748A
Positioning optimization method based on multi-modal data
CN121388299A
A localization optimization method based on multimodal data
CN121388299B