Indoor dynamic positioning method and device based on adaptive layered resampling
By adopting the indoor dynamic positioning method of adaptive layered resampling in an indoor environment, the problem of degradation of positioning accuracy in an indoor environment is solved, and dynamic real-time high-precision positioning is achieved.
Patent Information
- Application Number
- CN202510538376.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-27
AI Technical Summary
In indoor environment, the particle filter positioning algorithm reduces the positioning accuracy due to factors such as sensor noise and dynamic environmental changes, making it difficult to achieve real-time high-precision positioning.
The indoor dynamic positioning method based on adaptive hierarchical resampling is adopted. By dividing the indoor map into sub-map areas, setting positioning beacons and positioning labels to communicate, initializing particle distribution, and dynamically adjusting the hierarchical size through weight update and hierarchical interval adjustment to improve positioning accuracy.
Dynamic real-time high-precision positioning is realized. By automatically adjusting the size of the hierarchical interval, adapting to the changes in particle weights, improving the sampling accuracy of high-weight areas and reducing the sampling opportunities of low-weight areas.
Smart Images

Figure CN120066801A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of indoor positioning, and particularly relates to an indoor dynamic positioning method and device based on adaptive hierarchical resampling. Background Art
[0002] The rapid development of technology has led to an increasing demand for location information services. Traditional location information services mainly focus on outdoor positioning research. In outdoor environments, satellite positioning can achieve sub-meter positioning accuracy, basically meeting the positioning needs of users. However, in complex indoor environments, due to the obstruction of buildings, satellite signals will rapidly attenuate or even completely interrupt, resulting in a significant decrease in the accuracy of indoor positioning and unable to meet people's needs. Indoor positioning technology makes up for the problem of insufficient positioning accuracy of satellite positioning in indoor environments and is widely used in shopping mall navigation, intelligent warehousing and logistics systems, robot navigation, augmented reality (AR), and virtual reality (VR), and can provide accurate location information services.
[0003] The particle filter algorithm has been widely applied and studied in the field of indoor positioning, mainly due to its superiority in dealing with positioning problems in non-linear, non-Gaussian noise, and dynamic environments. The particle filter algorithm has high flexibility and scalability and can adapt to dynamic positioning scenarios.
[0004] However, the positioning accuracy of the particle filter positioning algorithm is still affected by sensor noise and errors, dynamic changes in the environment, etc., resulting in an increase in positioning errors, and thus it is difficult to achieve real-time positioning in actual application scenarios. Summary of the Invention
[0005] In order to improve the positioning accuracy of indoor positioning and achieve real-time positioning, this application provides an indoor dynamic positioning method and device based on adaptive hierarchical resampling.
[0006] In a first aspect, this application provides an indoor dynamic positioning method based on adaptive hierarchical resampling, including: Dividing the constructed indoor map into at least two sub-map regions; Setting at least two positioning beacons at fixed positions within the indoor map, where the positioning beacons are used to communicate with positioning tags, and the positioning tags are configured on moving objects; Initializing the particle distribution within the sub-map regions to obtain initial particles; During the movement of the positioning tag, perform position transfer on the initial particles to obtain a first candidate particle set, where the first candidate particle set includes a first sub-particle set and a second sub-particle set. The first sub-particle set is the particle set that exceeds the boundary of the sub-map area, and the second sub-particle set is the particle set that does not exceed the boundary of the sub-map area; Perform position correction on the first sub-particle set to obtain a third sub-particle set; During the communication between the positioning beacon and the positioning tag, perform weight update on the second sub-particle set and the third sub-particle set. The third sub-particle set and the second sub-particle set form a second candidate particle set; Based on the particle weights of the particles in the second candidate particle set, determine at least two stratification intervals, where the interval size of the stratification interval is negatively correlated with the particle weight; Based on the stratification interval and the particle weights of the particles in the second candidate particle set, collect target particles from the second candidate particle set to obtain a target particle set; Based on the target particle set, determine the positioning position of the positioning tag.
[0007] By adopting the above technical solution, after updating the weights of the particles in each sub-map area on the indoor map, at least two stratification intervals are determined according to the particle weights. Among them, the interval size of the stratification interval is negatively correlated with the particle weight, so that the interval size of the stratification interval can automatically adapt to the updated and changing particle weights, that is, the stratification size can be dynamically adjusted according to the weight distribution, making the stratification in the high-weight area finer, increasing the sampling opportunity of high-weight particles, making the stratification in the low-weight area coarser, reducing the sampling opportunity of low-weight particles, and moreover, the above technical solution can perform position correction on out-of-bounds particles, realizing dynamic real-time high-precision positioning.
[0008] In a specific feasible implementation, the determining at least two stratification intervals based on the particle weights of the particles in the second candidate particle set includes: Based on the particle weights of the particles in the second candidate particle set, determine the weight density corresponding to each particle, where the weight density is positively correlated with the particle weight; Based on the weight density corresponding to each particle, determine the interval size of each stratification interval, where the interval size is negatively correlated with the weight density; Based on the interval sizes of at least two of the stratification intervals, determine at least two of the stratification intervals.
[0009] By adopting the above technical solution, the weight density corresponding to each particle in the second candidate particle set is determined, so as to determine the distribution of particle weights in the entire particle set. Compared with simply determining the interval size according to the numerical size of particle weights, first determining the interval size according to the weight density and then determining the stratified intervals can avoid inaccurate stratification caused by the overall low or high numerical value of particle weights, so that the stratified intervals can adapt to the dynamic changes of the particle weights of each particle in the particle set.
[0010] In a specific feasible implementation, determining the weight density corresponding to each particle based on the particle weights of each particle in the second candidate particle set includes: Normalize the particle weights of each particle in the second candidate particle set to obtain the normalized weight of each particle; Calculate the weight density corresponding to each particle according to formula (1): ; Wherein, is the weight density of the th particle, is the normalized weight of the th particle, is the maximum normalized weight.
[0011] In the above technical solution, taking the maximum normalized weight as the denominator when calculating the weight density and taking the normalized weight of a single particle as the numerator when calculating the weight density can increase the difference between high-weight particles and low-weight particles and improve the influence degree of high-weight particles on the stratified intervals compared with taking the cumulative sum of weights as the denominator when calculating the weight density.
[0012] In a specific feasible implementation, the number of the stratified intervals is equal to the total number of particles in the second candidate particle set; Determining the interval size of each stratified interval based on the weight density corresponding to each particle includes: Sort each particle according to the particle weight, wherein a single particle corresponds to a single stratified interval; Calculate the interval size of the stratified interval corresponding to each particle according to formula (2): ; Wherein, is the interval size of the stratified interval corresponding to the th particle, is the weight density of the th particle, is the total number of particles.
[0013] In the above technical solution, by sorting the particle weights, the high-weight particles are concentrated. During the stratified resampling process, since the weight density and the interval size in formula (2) are negatively correlated, the greater the weight density, the smaller the corresponding interval size, and the denser the stratified sampling. By adopting the above technical solution, the determination method of the interval size of the stratified interval is clarified, which is beneficial to improving the stratification rationality so as to increase the sampling chance of high-weight particles.
[0014] In a specific feasible implementation, the dividing the constructed indoor map into at least two sub-map regions includes: Dividing the indoor map into the at least two sub-map regions according to the shape, the regional shapes of the at least two sub-map regions include arc-shaped regions, rectangular regions, and triangular regions. The arc-shaped regions are used to represent arc-shaped corridors, the rectangular regions are used to represent rooms or rectangular corridors, and the combined regions of the triangular regions and the rectangular regions are used to represent rooms adjacent to the arc-shaped corridors, wherein the triangular regions are adjacent to the arc-shaped regions; The correcting the particle positions of the first subset of particles includes: In the case where the sub-map region is the arc-shaped region, removing the particle positions of the first subset of particles that exceed the arc-shaped region; In the case where the sub-map region is the triangular region, correcting the particle positions of the first subset of particles back to the boundary of the triangular region; In the case where the sub-map region is the rectangular region, correcting the particle positions of the first subset of particles back to the boundary of the rectangular region.
[0015] By adopting the above technical solution, the indoor map is divided according to arc-shaped regions, rectangular regions, and triangular regions. Among them, different regions represent different indoor scenes. For example, arc-shaped regions represent arc-shaped corridors, which is beneficial to correcting the positions of particles that exceed the sub-map regions in different indoor scenes according to sub-map regions of different shapes, and improving the accuracy when the particle set estimates possible positioning positions.
[0016] In a specific feasible implementation, there are connection nodes on the adjacent boundaries between the at least two sub-map regions for connecting the indoor spaces represented by the adjacent sub-map regions; The correcting the particle positions of the first subset of particles back to the boundary of the rectangular region includes: In the case where the distance between the particle positions of the first subset of particles and the connection nodes is less than the distance threshold, correcting the particle positions of the first subset of particles to the connection nodes of the rectangular region; Correcting the particle positions of the first subset of particles back to the boundary of the triangular region includes: When the distance between the particle positions of the first subset of particles and the connected node is less than a distance threshold, correcting the particle positions of the first subset of particles to the connected node of the triangular region.
[0017] In the above technical solution, considering that there are connected nodes between different indoor spaces, for example, a room door can connect a corridor and a room. On the boundary with connected nodes, the probability that a particle is located at the connected node is relatively high. By correcting the out-of-bounds particles around the connected node to the connected node, the positioning accuracy at the connected node can be improved.
[0018] In a specific feasible implementation, the sub-map region includes an oriented rectangular region, and the oriented rectangular region represents the region corresponding to the one-way movement path on the indoor map; When the sub-map region is the oriented rectangular region, after updating the weights of the second subset of particles and the third subset of particles during the communication between the positioning beacon and the positioning tag, the method further includes: Determining a one-way movement coefficient according to the particle position at the current moment, the particle position at the previous moment, and the one-way movement direction of the oriented rectangular region, where the one-way movement coefficient is used to reduce the particle weight of the particles moving in the reverse direction and increase the particle weight of the particles moving in the forward direction; Performing a secondary update on the updated particle weights using the one-way movement coefficient.
[0019] In the above technical solution, a secondary update of the particle weights is performed in the indoor one-way movement scenario. For example, in the scenario of moving in a single-line passage or on an escalator, obviously, the probability of moving in a specific direction is higher than that of moving in other directions. By determining the one-way movement coefficient, a secondary update of the particle weights is realized, suppressing the influence of the particles moving in the reverse direction on the result, enhancing the influence of the particles moving in the forward direction on the result, and being beneficial to improving the positioning accuracy in the one-way movement scenario.
[0020] In a second aspect, the present application provides an indoor dynamic positioning system based on adaptive hierarchical resampling, adopting the following technical solution: An indoor dynamic positioning system based on adaptive hierarchical resampling, including: A partitioning module, configured to partition the constructed indoor map into at least two sub-map regions; A setting module, configured to set at least two positioning beacons at fixed positions in the indoor map, where the positioning beacons are used to communicate with a positioning tag, and the positioning tag is configured on a moving object; An initialization module, configured to initialize the particle distribution within the sub-map area to obtain initial particles; A transfer module, configured to transfer the positions of the initial particles during the movement of the positioning tag to obtain a first candidate particle set, where the first candidate particle set includes a first sub-particle set and a second sub-particle set, the first sub-particle set being the set of particles that exceed the boundary of the sub-map area, and the second sub-particle set being the set of particles that do not exceed the boundary of the sub-map area; A correction module, configured to correct the positions of the first sub-particle set to obtain a third sub-particle set; An update module, configured to update the weights of the second sub-particle set and the third sub-particle set during the communication between the positioning beacon and the positioning tag, where the third sub-particle set and the second sub-particle set form a second candidate particle set; An interval determination module, configured to determine at least two hierarchical intervals based on the particle weights of the particles in the second candidate particle set, where the interval size of the hierarchical interval is negatively correlated with the particle weight; An acquisition module, configured to acquire target particles from the second candidate particle set based on the hierarchical intervals and the particle weights of the particles in the second candidate particle set to obtain a target particle set; A position determination module, configured to determine the positioning position of the positioning tag based on the target particle set.
[0021] In a third aspect, the present application provides an electronic device, adopting the following technical solution: An electronic device 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 described in the above aspect.
[0022] In a fourth aspect, the present application provides a computer-readable storage medium, adopting the following technical solution: A computer-readable storage medium stores multiple instructions, and the instructions are loaded and executed by a processor to implement the method described in the above aspect.
[0023] In summary, the present application includes at least one of the following beneficial technical effects: 1. Correct the positions of the out-of-bounds particles, and dynamically adjust the hierarchical size according to the weight distribution, making the high-weight area more finely stratified, increasing the sampling chance of high-weight particles, and achieving dynamic real-time high-precision positioning. Among them, by changing the weight density calculation method, the difference between high-weight particles and low-weight particles is increased, and the influence degree of high-weight particles on the hierarchical interval is improved, realizing the dynamic determination of the hierarchical interval size.
[0024] 2. For sub-map regions of different shapes, implement position correction for particles that exceed the sub-map region to improve the accuracy when estimating possible positioning positions of the particle set. Among them, by correcting the out-of-bounds particles around the connected nodes to the connected nodes, the positioning accuracy at the connected nodes can be improved. By determining the one-way movement coefficient, the secondary update of the particle weights is realized, the influence of the reverse-moving particles on the result is suppressed, and the influence of the forward-moving particles on the result is enhanced, which is beneficial to improving the positioning accuracy in the directional movement scenario. Description of the Drawings
[0025] Figure 1 is a flowchart of an indoor dynamic positioning method based on adaptive hierarchical resampling provided by an exemplary embodiment of the present application; Figure 2 is a schematic diagram of an indoor map provided by an exemplary embodiment of the present application; Figure 3 is a flowchart of the determination process of the hierarchical interval provided by an exemplary embodiment of the present application; Figure 4 is a schematic diagram of the positioning position determined based on the target particle set provided by an exemplary embodiment of the present application; Figure 5 is a schematic diagram of the path positioning result provided by an exemplary embodiment of the present application; Figure 6 A schematic diagram of an indoor map divided by shape provided by another exemplary embodiment of the present application; Figure 7 is a structural block diagram of an indoor dynamic positioning system based on adaptive hierarchical resampling provided by an exemplary embodiment of the present application; Figure 8 is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. Detailed Embodiments
[0026] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0027] First, introduce the nouns involved in the embodiments of the present application.
[0028] Indoor map: An indoor map is a top view showing the indoor space distribution. The indoor map may include the boundary division and annotation of different indoor spaces.
[0029] Particle set: The particle set on the indoor map is used to describe the possibility of the positioning position at each particle position. Each particle position corresponds to a particle weight, and the particle weight can be used to characterize the probability of the positioning position at this particle position.
[0030] Location tag: A location tag refers to a component or device configured on a moving object that can communicate with a location beacon to determine its own location.
[0031] Location beacon: A device with a fixed position as a reference marker that can communicate with a location tag to determine the current location on an indoor map based on the relative position relationship between the location tag and the location beacon.
[0032] In related indoor positioning technologies, the positioning accuracy of the particle filter positioning algorithm is still affected by sensor noise and errors, dynamic changes in the environment, etc., resulting in an increase in positioning errors, and further leading to real-time problems in actual application scenarios.
[0033] This application provides an indoor dynamic positioning method that can dynamically adjust the hierarchical interval size during hierarchical resampling according to particle weights. Among them, the hierarchical interval can automatically adapt to changes in particle weights, and in subsequent resampling processes, the resampling opportunity for high-weight particles is increased, thereby improving indoor positioning accuracy.
[0034] See Figure 1 , Figure 1 is a flowchart of an indoor dynamic positioning method based on adaptive hierarchical resampling provided by an exemplary embodiment of this application. This method is executed by an electronic device. The electronic device includes devices with particle computing capabilities such as smartphones, smartwatches, tablets, personal computers, intelligent vehicle consoles, workstations, etc. This method includes the following steps.
[0035] Step 101, divide the constructed indoor map into at least two sub-map regions.
[0036] Optionally, the indoor map can be a pre-constructed two-dimensional map, which can include the zoning of different indoor spaces and the markings of each indoor space. The indoor map can also be used to represent a single connected indoor space, such as a connected corridor.
[0037] In a possible implementation manner, the electronic device divides the indoor map according to its shape. For example, the electronic device divides the indoor map into at least two sub-map regions in a rectangular shape. For another example, the electronic device divides the corridor into at least two connected sub-map regions in a rectangular shape and an arc shape.
[0038] In another possible implementation manner, the electronic device divides the indoor map according to the region type. For example, the indoor map is marked with indoor regions such as office areas, corridor areas, and rest areas according to the region type, and the electronic device divides each indoor region into a sub-map region.
[0039] Step 102: Set at least two positioning beacons at fixed positions within the indoor map. The positioning beacons are used to communicate with positioning tags, and the positioning tags are configured on moving objects.
[0040] In some embodiments, the positioning tags are configured on moving objects, which can be electronic devices, or movable objects such as pedestrians, pets, and remote control devices carrying the positioning tags. The electronic devices can be connected to the positioning tags through Bluetooth, Wi-Fi (Wireless Fidelity), and UWB (Ultra-Wideband) to achieve information interaction.
[0041] A positioning beacon is a device with a fixed position used as a reference marker. Communication can be carried out between the positioning beacon and the positioning tag. Optionally, the positioning beacon can be a Bluetooth beacon, a UWB beacon, or a Wi-Fi beacon, that is, communication between the positioning beacon and the positioning tag can be through Bluetooth, UWB, and Wi-Fi.
[0042] Step 103: Initialize the particle distribution within the sub-map area to obtain initial particles.
[0043] In some embodiments, among at least two sub-map areas, the number of initialized particles on different sub-map areas is different. Optionally, the number of particles can be determined according to the area shape and size of the sub-map area. For example, 150 particles are initialized in a rectangular area, and 100 particles are initialized in an arc-shaped area.
[0044] Optionally, the number of particles initialized in the sub-map area can also be supplemented according to the characteristics of the indoor map and the requirements of computational efficiency. For example, in an indoor map with a starting point and an ending point, it is easy for the random sampling distribution to be sparse, resulting in a long convergence time for the algorithm. To improve computational efficiency, particles can be supplemented at the starting point and the ending point of the indoor map when initializing the particle distribution.
[0045] Optionally, within sub-map areas with different shapes, the particle distributions of the initial particles are different. For example, for the initial positions of the particles within an arc-shaped area, in the polar coordinate system, both the distance from the particle to the center of the circle and the angle conform to a uniform distribution; the initial positions of the particles within a rectangular area conform to a Laplace distribution.
[0046] See Figure 2 , Figure 2 is a schematic diagram of an indoor map provided by an exemplary embodiment of the present application.
[0047] Taking an arc-shaped corridor within a 25-meter * 18-meter two-dimensional plane as an example below, steps 101 to 103 are described.
[0048] First, divide the arc-shaped corridor map according to its shape into One area, from bottom to top, is the sub-map area 201 ( ), the sub-map area 202 ( ), and the sub-map area 203 ( ). Among them, the sub-map area 201 is an arc-shaped area, the sub-map area 202 is a rectangular area, and the sub-map area 203 is an arc-shaped area. Among them, the edge line segment (bold part) of the sub-map area 201 represents the starting position 204, and the edge line segment (bold part) of the sub-map area 203 represents the ending position 205.
[0049] Then, a Bluetooth beacon is set every radians on both arc segments of the corridor, and a Bluetooth beacon is set every 2.5 meters on the straight line segment.
[0050] Initialize particles in the c-th area within the map. Among them, , , , 65 supplementary particles are added at the starting position 204 and the ending position 205 of the map respectively.
[0051] Subsequently, initialize the particle distribution in the corridors represented by different sub-map areas. The initialized particle distributions in sub-map areas of different shapes are different.
[0052] The initial positions of the particles in the arc-shaped area are obtained by converting from the polar coordinate system to the rectangular coordinate system. In the polar coordinate system, the distance and angle of the particle from the center of the circle both conform to a uniform distribution, and the probability density function formula is as follows: ; ; Among them, is the distance of the particle from the center of the circle, is the angle in the polar coordinate system, and correspond to the lower bound of the uniform distribution, and correspond to the upper bound of the uniform distribution. Take , , , in the sub-map area 201, and take , , , in the sub-map area 203.
[0053] The initial positions of the particles in the rectangular area conform to the Laplace distribution, and the probability density function formula is as follows: ; ; Among them, and are position coordinate variables, and are the means of the Laplace distribution, which determine the central position of the distribution, and are the scale parameters of the Laplace distribution, which determine the width of the distribution. In the sub-map area 202, take , , , .
[0054] To improve the calculation efficiency, the electronic device adds 65 supplementary particles at the starting position 204 and the ending position 205 of the map respectively. The initial positions of the particles conform to the Gaussian distribution, and the probability density function formula is as follows: ; ; Among them, and are position coordinate variables, and are the means of the Gaussian distribution, which determine the central position of the distribution, and are the variances of the Gaussian distribution, which determine the degree of dispersion of the distribution. At the starting position, take , , and , and within the ending position, take , , and .
[0055] Calculate the total number of particles , is the total number of regions. This total number of particles includes the number of supplementary particles at the starting position and the terminal position; initialize the initial weights of all particles, and the initial weights of each particle are uniformly set to .
[0056] Step 104, during the movement of the positioning label, perform position transfer on the initial particles to obtain the first candidate particle set. The first candidate particle set includes a first subset of particles and a second subset of particles. The first subset of particles is the set of particles that exceed the boundary of the sub-map area, and the second subset of particles is the set of particles that do not exceed the boundary of the sub-map area.
[0057] Among them, the movement amount of the particle position transfer follows the Gaussian distribution, and the formula is as follows: ; ; ; Among them, and are respectively the position of the th particle at time on the axis and and are respectively the position of the th particle at time on the axis, and are respectively the coordinate displacement amounts of the particle on the axis and axis, both conforming to the Gaussian distribution, is its probability density function, and are the variances of the Gaussian distribution, determining the degree of dispersion of the distribution, and are the means of the Gaussian distribution, determining the central position of the distribution, and respectively take , , , .
[0058] Step 105, perform position correction on the first subset of particles to obtain the third subset of particles.
[0059] Optionally, the electronic device first determines whether the particles exceed the boundary of the sub-map area. In the case of exceeding the boundary of the sub-map area, according to the shape of the sub-map area, determine the position correction method, including the following two correction methods: Method 1, correct the particle positions of the first subset of particles back to the boundary of the sub-map area.
[0060] Method 2, remove the particle positions of the first subset of particles that exceed the sub-map area.
[0061] Step 106, during the communication between the positioning beacon and the positioning tag, update the weights of the second subset of particles and the third subset of particles. The third subset of particles and the second subset of particles form the second candidate particle set.
[0062] First, the implementation process of weight update for the second subset of particles is described below.
[0063] The electronic device first converts the RSSI (Received Signal Strength Indication) data measured by the positioning tag into the distance between the positioning tag and the positioning beacon. The formula is as follows: ; where, is the received signal strength data measured, is the loss factor, is the distance between the positioning tag and the beacon, is the positioning tag at a distance of the signal strength received at the position, is the measurement noise random variable, which follows a Gaussian distribution with a mean of 0 and a variance of . After measurement and calculation, we get: ; Subsequently, the electronic device updates the particle weights according to the distance between the positioning tag and the positioning beacon. The formula is as follows: ; ; where, is the weight of the th particle at the th moment, and are the th beacon's axis and axis coordinates, and are the th particle's th moment axis and axis coordinates, is the distance from the th particle to the th beacon, is the distance from the positioning tag to the th beacon, is the RSSI measurement noise variance, is the total number of beacons that can receive RSSI, taking the RSSI measurement noise variance . is a constant.
[0064] The weight update of the third subset of sub-particles corresponds to the position correction method in step 105. Among them, in method 1, the particle weights are recalculated in the same way as the second subset of sub-particles. In method 2, the particle weights are set to 0.
[0065] Step 107: Based on the particle weights of the particles in the second candidate particle set, determine at least two stratification intervals, and the interval size of the stratification interval is negatively correlated with the particle weight.
[0066] See Figure 3 , Figure 3 is a flowchart of the process for determining the stratification interval provided by an exemplary embodiment of the present application. This process includes the following sub-steps.
[0067] Sub-step 107A: Based on the particle weights of the particles in the second candidate particle set, determine the weight density corresponding to each particle, and the weight density is positively correlated with the particle weight.
[0068] The electronic device first normalizes the particle weights of the particles in the second candidate particle set to obtain the normalized weights of the particles. The formula is as follows: ; where is the weight of the th particle at the th moment, is the normalized weight of the th particle, is the total number of particles.
[0069] Then, calculate the weight density corresponding to each particle according to the following formula: ; where is the weight density of the th particle, is the normalized weight of the th particle, is the maximum normalized weight.
[0070] Exemplarily, the particle weights of the particles in the second candidate particle set include {0.2, 0.4, 0.2, 0.5, 0.3}, and the normalized weights obtained after normalization are {0.125, 0.25, 0.125, 0.31, 0.19}. Among them, the maximum normalized weight is 0.31, and the weight density is {0.4, 0.8, 0.4, 1, 0.6}.
[0071] Sub-step 107B: Based on the weight density corresponding to each particle, determine the interval size of each stratification interval, and the interval size is negatively correlated with the weight density.
[0072] The electronic device first sorts the particles according to the particle weights so that the high-weight particles are concentrated, where a single particle corresponds to a single stratification interval. The number of stratification intervals is equal to the total number of particles in the second candidate particle set.
[0073] Then, calculate the interval size of the stratification interval corresponding to each particle according to the following formula: ; Wherein, is the interval size of the stratification interval corresponding to the th particle, is the weight density of the th particle, is the total number of particles.
[0074] Subsequently, the electronic device normalizes the interval size of the stratification interval, and the formula is as follows: ; Wherein, is the interval size of the stratification interval of the th particle before normalization, is the interval size of the th particle after normalization, is the total number of particles.
[0075] Sub-step 107C, determine at least two stratification intervals based on the interval sizes of at least two stratification intervals.
[0076] The electronic device first calculates the cumulative sum of particle weights, and the formula is as follows: ; Wherein, is the cumulative sum of weights of the first particles, is the normalized weight of the th particle, is the total number of particles.
[0077] Subsequently, the electronic device normalizes all the cumulative sums of weights, and the formula is as follows: ; Wherein, is the cumulative sum of weights of the first particles, is the cumulative sum of weights of the first particles after normalization, is the total number of particles.
[0078] Step 108, collect target particles from the second candidate particle set based on the stratification intervals and the particle weights of each particle in the second candidate particle set to obtain a target particle set.
[0079] The electronic device is based on the interval size Perform stratified resampling and randomly sample a value within each stratified interval , find the first index greater than or equal to of , copy the th particle as the target particle after resampling, and repeat times to obtain the particle set after resampling, that is, the target particle set. After resampling, the weight of each particle is uniformly updated to .
[0080] Step 109, based on the target particle set, determine the positioning position of the positioning tag
[0081] The electronic device estimates the position of the positioning tag through the particle position coordinates and particle weights. The formula is as follows ; where is the positioning position of the positioning tag at moment, which is composed of the axis coordinate and the axis coordinate . is the coordinate of the rd particle at moment, which is composed of the axis coordinate and the axis coordinate . is the total number of particles
[0082] See Figure 4 , Figure 4 is a schematic diagram of the positioning position determined based on the target particle set provided by an exemplary embodiment of this application. This figure takes an arc-shaped corridor map within a 25-meter * 18-meter two-dimensional indoor map as an example to illustrate the positioning position finally determined by the electronic device
[0083] Among them, the arc-shaped corridor is divided into single rectangular segments and two arc segments according to its shape. As Figure 4 shown, a positioning beacon 401 is set every radians on both arc segments of the corridor, and a positioning beacon 401 is set every 2.5 meters on the straight segment. The positioning tag is located at the real position 402. The electronic device determines the target particle set by executing the above steps. The target particle set gathers around this real position 402. The position of the positioning tag is estimated through the particle position coordinates and particle weights, and the estimated position 403 is determined as the positioning position of the positioning tag, and the matching degree between this positioning position and the real position 402 is improved
[0084] The positioning positions of the positioning tags determined in real time by the electronic device can be concatenated to obtain a path positioning result. Refer to Figure 5 , Figure 5 FIG. is a schematic diagram of a path positioning result provided by an exemplary embodiment of the present application. This figure takes an arc-shaped corridor map in a 25-meter * 18-meter two-dimensional plane of an indoor map as an example for illustration. Similarly, Figure 4 , the beacon setting method and shape of this arc-shaped corridor will not be elaborated here.
[0085] Among them, the solid-line connection part is the estimated position 501, and the position marked by the dotted line is the real position 502. When the matching degree between the positioning position and the real position 502 is improved, the matching degree between the estimated path and the real path is improved, and the accuracy of real-time positioning is improved.
[0086] In the above embodiment, after updating the weights of the particles in each sub-map area on the indoor map, at least two hierarchical intervals are determined according to the particle weights. Among them, the interval size of the hierarchical interval is negatively correlated with the particle weight, so that the interval size of the hierarchical interval can automatically adapt to the updated and changing particle weights, that is, the hierarchical size can be dynamically adjusted according to the weight distribution, so that the high-weight area is stratified more finely, increasing the sampling opportunity of high-weight particles, and making the low-weight area stratified coarser, reducing the sampling opportunity of low-weight particles. Moreover, the above technical solution can correct the positions of out-of-bounds particles, realizing dynamic real-time high-precision positioning.
[0087] Among them, by determining the weight density corresponding to each particle in the second candidate particle set, the distribution of particle weights in the entire particle set is determined. Compared with simply determining the interval size according to the numerical size of the particle weights, first determining the interval size according to the weight density and then determining the hierarchical interval can avoid inaccurate stratification caused by the overall low or high numerical value of the particle weights, so that the hierarchical interval can adapt to the dynamic changes of the particle weights of each particle in the particle set.
[0088] By using the maximum normalized weight as the denominator when calculating the weight density and the normalized weight of a single particle as the numerator when calculating the weight density, compared with using the cumulative weight sum as the denominator when calculating the weight density, the difference between high-weight particles and low-weight particles can be increased, and the influence degree of high-weight particles on the hierarchical interval can be improved.
[0089] By sorting according to the particle weights, the high-weight particles are concentrated. In the process of hierarchical resampling, since the weight density is negatively correlated with the interval size, the greater the weight density, the smaller the corresponding interval size, and the denser the hierarchical sampling. By adopting the above technical solution, the determination method of the interval size of the hierarchical interval is clarified, which is beneficial to improving the stratification rationality so as to increase the sampling opportunity of high-weight particles.
[0090] The process of correcting the position of the first subset of particles in step 105 will be further described below. The content shown in the indoor map includes each room and the corridor outside the room. Among them, the corridor can be divided into sub-map areas according to rectangles and arcs, and the rooms on both sides of the corridor can be divided into sub-map areas according to rectangles and triangles.
[0091] In some embodiments, the electronic device divides the indoor map into at least two sub-map areas according to the shape. Among them, the area shapes of the at least two sub-map areas include arc-shaped areas, rectangular areas, and triangular areas. Among them, the arc-shaped area is used to represent an arc-shaped corridor, the rectangular area is used to represent a room or a rectangular corridor, and the combined area of the triangular area and the rectangular area is used to represent a room adjacent to the arc-shaped corridor, where the triangular area is adjacent to the arc-shaped area. It should be noted that the triangular area can also be an area approximately in the shape of a triangle adjacent to the arc-shaped area.
[0092] See Figure 6 , Figure 6 is a schematic diagram of an indoor map divided by shape provided by another exemplary embodiment of the present application. Among them, the arc-shaped area 601 is an arc-shaped path of the corridor, and the combined area of the triangular area 602 and the rectangular area 603 is used to represent a room adjacent to the arc-shaped area 601. The rectangular area 604 is a rectangular path of the corridor. Among them, the triangular area 602 is adjacent to the arc-shaped area 601.
[0093] In the process of correcting the position of the first subset of particles, the electronic device adopts the following correction methods according to different sub-map area shapes and the meanings of the sub-map areas: Method 1: In the case where the sub-map area is an arc-shaped area, remove the particle positions of the first subset of particles that exceed the arc-shaped area.
[0094] In some embodiments, the boundaries between adjacent sub-map areas can be divided into two types: connected boundaries and closed boundaries. Among them, the connected boundary is used to represent that the combined graph of two adjacent sub-map areas is the same indoor space, and the closed boundary is used to represent that the two adjacent sub-map areas represent two different indoor spaces. For the particles that exceed the closed boundary, the particle positions can be removed, and for the particles that exceed the connected boundary, the particle positions can be corrected to the connected boundary.
[0095] Considering that the two arcs of the arc-shaped area are closed boundaries, the electronic device removes the particle positions of the first subset of particles that exceed the arc-shaped area.
[0096] As Figure 2 shown, the path center in the sub-map area 201 , , the path center in the sub - map area 203 , . Similarly, Figure 6 The middle - sized map constructs the coordinate system in the same way, and the centers of the arc - shaped paths are respectively , , and , .
[0097] The electronic device calculates the distances between all particles in the arc - shaped area and the center of the arc - shaped path , and the formula is as follows: ; Among them, and are the th particle's axis and axis coordinates at the moment, and are the axis and axis coordinates of the center of the arc - shaped path.
[0098] Subsequently, in the polar coordinate system, the electronic device determines whether the particle exceeds the path boundary according to the distance and the upper and lower bound information of the radius of the arc - shaped path and , optimizes the particles that exceed the boundary, and sets the weights of these particles to 0.
[0099] Method 2: In the case where the sub - map area is a triangular area, correct the particle positions of the first sub - particle set back to the boundary of the triangular area.
[0100] In some embodiments, in the case where the sub - map area is a triangular area or a rectangular area, since the area boundary includes a connected boundary and the positioning position may be on the connected boundary, the particle positions of the first sub - particle set are corrected back to the boundary of the triangular area.
[0101] Exemplarily, Figure 6 the triangular area 602 is adjacent to the rectangular area 603, and the combined figure of the triangular area 602 and the rectangular area 603 represents a room together.
[0102] Optionally, the boundary between the triangular area 602 and the rectangular area 603 is hereinafter referred to as the first adjacent side. The first adjacent side belongs to the connected boundary. When the electronic device exceeds this first adjacent side, the particle positions of the first sub - particle set are corrected back to the first adjacent side.
[0103] In some embodiments, the positioning tag moves within the corridor and stays within the room. It can be seen that the probability of the positioning tag staying near the inner wall of the room is relatively high, while the probability of staying near the wall of the corridor is relatively low. Therefore, the electronic device can also correct the particle positions of the first subset of particles back to the closed boundary of the triangular region.
[0104] Method 3: When the sub-map region is a rectangular region, correct the particle positions of the first subset of particles back to the boundary of the rectangular region.
[0105] Similarly, since the boundary of the rectangular region includes a connected boundary and the positioning position may be on the connected boundary, the particle positions of the first subset of particles are corrected back to the connected boundary of the triangular region. Also, since the probability of the positioning tag staying near the inner wall of the room is relatively high and the probability of staying near the wall of the corridor is relatively low, the electronic device can also correct the particle positions of the first subset of particles back to the closed boundary of the rectangular region.
[0106] Exemplarily, Figure 6 In the figure, the triangular region 602 is adjacent to the rectangular region 603, and the rectangular region 604 is adjacent to the arc-shaped region 601. The combined figure of the triangular region 602 and the rectangular region 603 together represents a room. The rectangular region 604 and the arc-shaped region 601 represent a section of the same corridor, that is, the combined figure of the rectangular region and the arc-shaped region can represent the corridor.
[0107] Optionally, the boundary between the rectangular region 604 and the arc-shaped region 601 is hereinafter referred to as the second adjacent side. When the electronic device exceeds this second adjacent side, it corrects the particle positions of the first subset of particles back to the second adjacent side.
[0108] In some embodiments, there may be connected nodes on the closed boundary.
[0109] Optionally, there are connected nodes on the adjacent boundary between at least two sub-map regions for connecting the indoor spaces between adjacent sub-map regions, such as connecting the corridor and the room, where the room is represented by the triangular region and the rectangular region.
[0110] When the electronic device corrects the particle positions of the first subset of particles back to the boundary of the rectangular region, if the distance between the particle positions of the first subset of particles and the connected node is less than the distance threshold, it can correct the particle positions of the first subset of particles to the connected node of the rectangular region; when correcting the particle positions of the first subset of particles back to the boundary of the triangular region, if the distance between the particle positions of the first subset of particles and the connected node is less than the distance threshold, it can correct the particle positions of the first subset of particles to the connected node of the triangular region.
[0111] Exemplarily, such as Figure 6As shown, there is a connection node 606 between the rectangular area 604 and the rectangular area 605, which represents the door leading from the corridor to the interior of the room. Hereinafter, the boundary between the rectangular area 604 and the rectangular area 605 is referred to as the third adjacent boundary. Since the positioning position may be at the connection node 606 or on the closed boundary where the connection node 606 is located, such as staying at the edge of the room, the electronic device can first correct the particle positions that are outside the third adjacent boundary around the connection node and whose distance from the connection node is less than the distance threshold to the connection node 606, and then correct the other particles outside the third adjacent boundary to the third adjacent boundary.
[0112] Optionally, the sub-map area includes an oriented rectangular area, which represents the area corresponding to the one-way movement path on the indoor map. For example, the escalators and one-way passages in the mall.
[0113] When the sub-map area is an oriented rectangular area, during the communication between the positioning beacon and the positioning label, after updating the weights of the second subset of particles and the third subset of particles, the electronic device can also perform the following steps: Step 1, determine the one-way movement coefficient according to the particle position at the current moment, the particle position at the previous moment, and the one-way movement direction of the oriented rectangular area. The one-way movement coefficient is used to reduce the particle weight of the particles moving in the reverse direction and increase the particle weight of the particles moving in the forward direction.
[0114] In a possible implementation manner, the electronic device determines the particle movement direction according to the particle position at the current moment and the particle position at the previous moment, and determines the direction angle according to the one-way movement direction of the oriented rectangular area and the particle movement direction. Subsequently, the one-way movement coefficient is determined using the direction angle, where the angle is negatively correlated with the one-way movement coefficient. For example, the direction angle is , , the one-way movement coefficient is , is a constant greater than 0. Another example, the angle is , , the one-way movement coefficient is , is a constant greater than 0. Another example, when the angle is greater than 0, .
[0115] Optionally, the electronic device can adjust the determination function of the one-way movement coefficient according to actual needs, such as according to the requirement for the change trend of the one-way movement coefficient. For example, for particles, a larger one-way movement coefficient is adopted, and the change trend of the one-way movement coefficient is relatively slow. For The particles adopt a relatively small one-way movement coefficient, and the change trend of the one-way movement coefficient shows a sharp decline first and then a steady decline. The electronic device can fit a corresponding one according to this requirement .
[0116] Step 2: Use the one-way movement coefficient to perform a secondary update on the updated particle weights.
[0117] The electronic device performs the secondary update according to the following formula: ; where refers to the particle weight of the th particle at the th moment after the secondary update, is the normalized weight of the th particle, and the one-way movement coefficient is .
[0118] Optionally, the secondary update can be performed synchronously with the initial update. When the electronic device executes step 106, the following formula can be used to update the particle weights of the second subset of particles: ; where is the weight of the th particle at the th moment, is the distance from the th particle to the th beacon, is the distance from the positioning tag to the th beacon, is the RSSI measurement noise variance, is the total number of beacons that can receive RSSI. Take the RSSI measurement noise variance . is a constant. The one-way movement coefficient is .
[0119] By adopting the above technical solution, the indoor map is divided according to the circular arc area, rectangular area and triangular area. Among them, different areas represent different indoor scenes. For example, the circular arc area represents a circular arc corridor, which is beneficial to realizing the position correction of particles outside the sub-map area in different indoor scenes according to the sub-map areas of different shapes, and improving the accuracy when the particle set estimates the possible positioning positions.
[0120] In the above technical solution, considering that there are connection nodes between different indoor spaces, for example, a room door can connect a corridor and a room. At the boundary with connection nodes, the probability of a particle being located at a connection node is relatively high. By correcting the out-of-bounds particles around the connection node to the connection node, the positioning accuracy at the connection node can be improved.
[0121] In the above technical solution, the particle weights are updated twice for the indoor directional movement scenario. For example, in the scenario of moving in a single-line passage or on an escalator, obviously, the probability of moving in a specific direction is higher than that of moving in other directions. By determining the one-way movement coefficient, the particle weights are updated twice, suppressing the influence of reverse-moving particles on the result and enhancing the influence of forward-moving particles on the result, which is beneficial to improving the positioning accuracy in the directional movement scenario.
[0122] Based on the same inventive concept as above, the embodiment of the present application also discloses an indoor dynamic positioning system based on adaptive hierarchical resampling. Refer to Figure 7 , including: A division module 701, configured to divide the constructed indoor map into at least two sub-map regions; A setting module 702, configured to set at least two positioning beacons at fixed positions in the indoor map, and the positioning beacons are used for communicating with positioning tags; An initialization module 703, configured to initialize the particle distribution in the sub-map region to obtain initial particles; A transfer module 704, configured to transfer the positions of the initial particles during the movement of the positioning tag to obtain a first candidate particle set, where the first candidate particle set includes a first sub-particle set and a second sub-particle set, the first sub-particle set is a set of particles that exceed the boundary of the sub-map region, and the second sub-particle set is a set of particles that do not exceed the boundary of the sub-map region; A correction module 705, configured to correct the positions of the first sub-particle set to obtain a third sub-particle set; An update module 706, configured to update the weights of the second sub-particle set and the third sub-particle set during the communication between the positioning beacon and the positioning tag, and the third sub-particle set and the second sub-particle set form a second candidate particle set; An interval determination module 707, configured to determine at least two hierarchical intervals based on the particle weights of the particles in the second candidate particle set, and the interval size of the hierarchical interval is negatively correlated with the particle weight; An acquisition module 708, configured to acquire target particles from the second candidate particle set based on the hierarchical interval and the particle weights of the particles in the second candidate particle set to obtain a target particle set; A position determination module 709, configured to determine the positioning position of the positioning tag based on the target particle set.
[0123] Optionally, the interval determination module 707 is further configured to: Determine the weight density corresponding to each particle based on the particle weights of the particles in the second candidate particle set, where the weight density is positively correlated with the particle weight; Determine the interval size of each stratification interval based on the weight density corresponding to each particle, where the interval size is negatively correlated with the weight density; Determine at least two of the stratification intervals based on the interval sizes of at least two of the stratification intervals.
[0124] Optionally, the interval determination module 707 is further configured to: Perform normalization processing on the particle weights of the particles in the second candidate particle set to obtain the normalized weights of the particles; Calculate the weight density corresponding to each particle according to formula (1): ; Where The weight density of the th particle, is the normalized weight of the th particle, is the maximum normalized weight.
[0125] Optionally, the number of the stratification intervals is equal to the total number of particles in the second candidate particle set; The interval determination module 707 is further configured to: Sort each particle according to the particle weight, where a single particle corresponds to a single stratification interval; Calculate the interval size of the stratification interval corresponding to each particle according to formula (2): ; Where is the interval size of the stratification interval corresponding to the th particle, is the weight density of the th particle, is the total number of particles.
[0126] Optionally, the partitioning module 701 is further configured to: Divide the indoor map into the at least two sub - map regions according to the shape. The regional shapes of the at least two sub - map regions include arc - shaped regions, rectangular regions, and triangular regions. The arc - shaped regions are used to represent arc - shaped corridors, the rectangular regions are used to represent rooms or rectangular corridors, and the combined region of the triangular regions and the rectangular regions is used to represent the rooms adjacent to the arc - shaped corridors, where the triangular regions are adjacent to the arc - shaped regions. The correction module 705 is further configured to: When the sub - map region is the arc - shaped region, remove the particle positions of the first subset of particles that exceed the arc - shaped region. When the sub - map region is the triangular region, correct the particle positions of the first subset of particles back to the boundary of the triangular region. When the sub - map region is the rectangular region, correct the particle positions of the first subset of particles back to the boundary of the rectangular region.
[0127] Optionally, there are connection nodes on the adjacent boundaries between the at least two sub - map regions, which are used to connect the indoor spaces between the adjacent sub - map regions. The correction module 705 is further configured to: When the distance between the particle positions of the first subset of particles and the connection nodes is less than the distance threshold, correct the particle positions of the first subset of particles to the connection nodes in the rectangular region. When the distance between the particle positions of the first subset of particles and the connection nodes is less than the distance threshold, correct the particle positions of the first subset of particles to the connection nodes in the triangular region.
[0128] Optionally, the sub - map region includes an oriented rectangular region, and the oriented rectangular region represents the region corresponding to the one - way movement path on the indoor map. When the sub - map region is the oriented rectangular region, the update module 706 is further configured to: Determine a one - way movement coefficient according to the particle positions at the current moment, the particle positions at the previous moment, and the one - way movement direction of the oriented rectangular region. The one - way movement coefficient is used to reduce the particle weights of the particles moving in the reverse direction and increase the particle weights of the particles moving in the forward direction. Perform a secondary update on the updated particle weights using the one - way movement coefficient.
[0129] Based on the same inventive concept as above, the present application also discloses an electronic device. Please refer to Figure 8 , Figure 8It is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. The electronic device 800 may include: a processor 801, a communication bus 802, a user interface 803, a network interface 804, and a memory 805.
[0130] Among them, the communication bus 802 is used to realize the connection and communication between these components.
[0131] Among them, the user interface 803 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 803 may further include a standard wired interface and a wireless interface.
[0132] Among them, the network interface 804 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0133] Among them, the processor 801 may include one or more processing cores. The processor 801 connects various parts within the entire server through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 805, and by calling data stored in the memory 805, it executes various functions of the server and processes data. Optionally, the processor 801 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 801 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 801 and may be implemented separately by a single chip.
[0134] Among them, the memory 805 may include a Random Access Memory (RAM), and may also include a Read-Only Memory (ROM). Optionally, the memory 805 includes a non-transitory computer-readable medium. The memory 805 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 805 may include a program storage area and a data storage area. Among them, the program storage area can store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area can store the data involved in the above-mentioned method embodiments. Optionally, the memory 805 may also be at least one storage system located far from the aforementioned processor 801.
[0135] Among them, the memory 805 is used to store instructions, the user interface 803 and the network interface 804 are used to communicate with other devices, and the processor 801 is used to execute the instructions stored in the memory 805, so that the electronic device executes the method provided in the above embodiments.
[0136] Based on the same inventive concept as above, an embodiment of the present application also discloses a computer-readable storage medium, in which multiple instructions are stored, and the instructions are loaded and executed by a processor to implement the method described in the above embodiments.
[0137] Referring to Figure 8 , in the memory 805 as a computer storage medium, an operating system, a network communication module, a user interface module, and application programs may be included.
[0138] In Figure 8 In the electronic device 800 shown, the user interface 803 is mainly used to provide an input interface for the user to obtain user input data; and the processor 801 can be used to call the application program for the road evaluation method stored in the memory 805. When executed by one or more processors 801, the electronic device 800 executes one or more of the methods in the above embodiments. It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application. In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0139] It should be understood that the "plurality" mentioned herein refers to two or more. "And / or" describes the relationship between associated objects and indicates that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, both A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0140] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. The above-mentioned storage media include, for example, various media that can store program codes such as USB flash drives, mobile hard disks, read-only memory ROM, random access memory RAM, magnetic disks, or optical discs.
[0141] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An indoor dynamic positioning method based on adaptive layered resampling, characterized in that: include: Dividing the constructed indoor map into at least two sub-map areas; At least two positioning beacons are arranged at fixed positions in the indoor map, the positioning beacons are used to communicate with positioning tags, and the positioning tags are arranged on the mobile objects; Initializing the particle distribution in the sub-map area to obtain initial particles; During the movement of the positioning tag, the initial particle is transferred to obtain a first candidate particle set, wherein the first candidate particle set includes a first sub-particle set and a second sub-particle set, the first sub-particle set is a particle set that exceeds the boundary of the sub-map area, and the second sub-particle set is a particle set that does not exceed the boundary of the sub-map area; Performing position correction on the first sub-particle set to obtain a third sub-particle set; During the communication between the positioning beacon and the positioning tag, weights of the second sub-particle set and the third sub-particle set are updated, and the third sub-particle set and the second sub-particle set form a second candidate particle set; Based on the particle weight of each particle in the second candidate particle set, determining at least two stratification intervals, wherein the interval size of the stratification interval is negatively correlated with the particle weight; Based on the stratified interval and the particle weight of each particle in the second candidate particle set, collecting target particles from the second candidate particle set to obtain a target particle set; Based on the target particle set, the positioning position of the positioning tag is determined.
2. The method according to claim 1, characterized in that The step of determining at least two hierarchical intervals based on the particle weight of each particle in the second candidate particle set includes: Based on the particle weight of each particle in the second candidate particle set, determine the weight density corresponding to each particle, wherein the weight density is positively correlated with the particle weight; Based on the weight density corresponding to each particle, determining the interval size of each stratified interval, wherein the interval size is negatively correlated with the weight density; At least two stratified intervals are determined based on the interval sizes of at least two stratified intervals.
3. The method according to claim 2, characterized in that The determining the weight density corresponding to each particle based on the particle weight of each particle in the second candidate particle set includes: Normalizing the particle weight of each particle in the second candidate particle set to obtain a normalized weight of each particle; The weight density corresponding to each particle is calculated according to formula (1): ; in, It is The weight density of particles, It is The normalized weight of a particle, is the maximum normalized weight.
4. The method according to claim 2, characterized in that: The number of the stratified intervals is equal to the total number of particles in the second candidate particle set; The step of determining the interval size of each stratified interval based on the weight density corresponding to each particle includes: sorting the particles according to the particle weights, wherein a single particle corresponds to a single stratification interval; According to formula (2), the interval size of the stratification interval corresponding to each particle is calculated: ; in, It is The interval size of the stratified interval corresponding to the particles, It is The weight density of particles, is the total number of particles.
5. The method according to claim 1, characterized in that The step of dividing the constructed indoor map into at least two sub-map areas includes: Dividing the indoor map into the at least two sub-map areas according to shapes, wherein the area shapes of the at least two sub-map areas include arc-shaped areas, rectangular areas and triangular areas, wherein the arc-shaped areas are used to represent arc-shaped corridors, the rectangular areas are used to represent rooms or rectangular corridors, and the combined area of the triangular areas and the rectangular areas is used to represent rooms adjacent to the arc-shaped corridors, wherein the triangular areas are adjacent to the arc-shaped areas; The step of correcting the position of the first sub-particle set comprises: When the sub-map area is the arc-shaped area, removing the particle positions of the first sub-particle set that are beyond the arc-shaped area; When the sub-map area is the triangular area, correcting the particle positions of the first sub-particle set back to the boundary of the triangular area; When the sub-map area is the rectangular area, the particle positions of the first sub-particle set are corrected back to the boundary of the rectangular area.
6. The method according to claim 5, characterized in that There is a connection node on the adjacent boundary between the at least two sub-map areas, which is used to connect the indoor spaces represented by the adjacent sub-map areas; The step of correcting the particle positions of the first sub-particle set back to the boundary of the rectangular area comprises: When the distance between the particle position of the first sub-particle set and the connected node is less than a distance threshold, correcting the particle position of the first sub-particle set to the connected node in the rectangular area; The step of correcting the particle positions of the first sub-particle set back to the boundary of the triangular area comprises: When the distance between the particle position of the first sub-particle set and the connected node is less than a distance threshold, the particle position of the first sub-particle set is corrected to the connected node in the triangular area.
7. The method according to claim 1, characterized in that The sub-map area includes a directional rectangular area, and the directional rectangular area represents an area corresponding to a one-way moving path on the indoor map; In the case where the sub-map area is the directional rectangular area, after updating the weights of the second sub-particle set and the third sub-particle set during the communication between the positioning beacon and the positioning tag, the method further includes: Determine a one-way movement coefficient according to the particle position at the current moment, the particle position at the previous moment, and the one-way movement direction of the directional rectangular area, wherein the one-way movement coefficient is used to reduce the particle weight of the particle moving in the reverse direction and increase the particle weight of the particle moving in the forward direction; The updated particle weight is updated twice using the one-way movement coefficient.
8. An indoor dynamic positioning system based on adaptive layered resampling, characterized in that: include: A division module, used for dividing the constructed indoor map into at least two sub-map areas; A setting module, used to set at least two positioning beacons at fixed positions in the indoor map, wherein the positioning beacons are used to communicate with positioning tags, and the positioning tags are configured on mobile objects; An initialization module, used to initialize the particle distribution in the sub-map area to obtain initial particles; A transfer module, used for transferring the position of the initial particle during the movement of the positioning tag to obtain a first candidate particle set, wherein the first candidate particle set includes a first sub-particle set and a second sub-particle set, the first sub-particle set is a particle set that exceeds the boundary of the sub-map area, and the second sub-particle set is a particle set that does not exceed the boundary of the sub-map area; A correction module, used for performing position correction on the first sub-particle set to obtain a third sub-particle set; An updating module, used for updating the weights of the second sub-particle set and the third sub-particle set during the communication between the positioning beacon and the positioning tag, wherein the third sub-particle set and the second sub-particle set constitute a second candidate particle set; An interval determination module, configured to determine at least two hierarchical intervals based on the particle weight of each particle in the second candidate particle set, wherein the interval size of the hierarchical interval is negatively correlated with the particle weight; A collection module, configured to collect target particles from the second candidate particle set based on the stratification interval and the particle weight of each particle in the second candidate particle set to obtain a target particle set; The position determination module is used to determine the positioning position of the positioning tag based on the target particle set.
9. An electronic device, characterized in that: It includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, which are loaded and executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Indoor localization method for large open type area
CN106441302A
Method for particle filter indoor positioning based on map information and position self-adaption correction
CN106643724A
Indoor mobile phone positioning solving method
CN106767828A
Target object positioning method and device
CN111578938A
Indoor positioning method and device, communication equipment and storage medium
CN116761254A