Pseudolite deployment method and apparatus, storage medium
Patent Information
- Application Number
- CN202211002893.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-08-19
AI Technical Summary
[0002]伪卫星作为可以发送类似轨道卫星信号的地面信号发射器,可以应用于室内独立组网定位,但室内复杂的建筑结构和多变的实际环境使伪卫星应用于室内定位面临诸多困难
[0020]第四方面,本申请实施例提出一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述伪卫星布局方法。
Smart Images

Figure CN117647821B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pseudo-satellite positioning technology, and in particular to a pseudo-satellite deployment method, apparatus, and storage medium. Background Technology
[0002] As a ground signal transmitter capable of sending signals similar to those of orbiting satellites, pseudo-satellites can be used for independent indoor network positioning. However, the complex building structures and variable real-world environments indoors present many challenges to the application of pseudo-satellites for indoor positioning.
[0003] Currently, particle swarm optimization (PSO) can be used for pseudo-satellite deployment. However, conventional PSO suffers from slow particle convergence and local convergence issues, making it difficult to achieve optimal performance targets. Summary of the Invention
[0004] This application provides a pseudo-satellite layout method, apparatus, and storage medium, which can accelerate particle convergence speed, avoid getting trapped in local optima, and thus make it easier to achieve optimization targets.
[0005] The technical solution of this application is implemented as follows:
[0006] In a first aspect, embodiments of this application propose a pseudo-satellite deployment method, characterized in that the method includes:
[0007] Set the user's location and generate initial particles based on the initial number of pseudo-satellites and their positions;
[0008] Based on the user's location and the initial pseudo-satellite location, the initial particle is updated to obtain an updated particle; and the globally optimal particle is determined from the updated particle.
[0009] If the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations has not reached the preset number threshold, the updated particle is divided into elite particles and ordinary particles according to the distance between the updated particle and the globally optimal particle, and the suboptimal particle is determined from the ordinary particles.
[0010] The current particle is obtained by performing crossover operations on the elite particle and the globally optimal particle, and mutation operations on the ordinary particle and the suboptimal particle.
[0011] From the updated particles and the current particles, determine the top N particles in terms of fitness; update the set of particles based on their fitness values; until the fitness value of the current global best particle satisfies the preset fitness index, then perform pseudo-satellite deployment based on the updated set of particles.
[0012] Secondly, embodiments of this application propose a pseudo-satellite deployment device, the device comprising:
[0013] The setting unit is used to set the user's position and generate initial particles based on the initial number of pseudo-satellites and the initial pseudo-satellite positions;
[0014] An update unit is used to update the initial particle based on the user's position and the initial pseudo-satellite position to obtain an updated particle;
[0015] The partitioning unit is used to divide the updated particle into elite particles and ordinary particles based on the distance between the updated particle and the global optimal particle when the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations has not reached the preset number threshold.
[0016] The crossover and mutation unit is used to perform crossover operations on the elite particle and the globally optimal particle, and to perform mutation operations on the ordinary particle and the suboptimal particle, respectively, to obtain the current particle.
[0017] The determining unit is configured to determine a group of N particles with the highest fitness from the updated particles and the current particles; determine the globally optimal particle from the updated particles; and determine the second-best particle from the ordinary particles.
[0018] The updating unit is further configured to update the group of particles based on the fitness values of the group of particles; until the fitness value of the determined current global best particle satisfies the preset fitness index, then a pseudo-satellite layout is performed based on the updated group of particles.
[0019] Thirdly, this application provides a pseudo-satellite deployment device, which includes a processor, a memory, and a communication bus; the processor executes the running program stored in the memory to implement the above-mentioned pseudo-satellite deployment method.
[0020] Fourthly, embodiments of this application propose a storage medium storing a computer program that, when executed by a processor, implements the aforementioned pseudo-satellite deployment method.
[0021] This application provides a pseudo-satellite deployment method, apparatus, and storage medium. The method includes: setting a user position and generating initial particles based on the initial number and position of pseudo-satellites; updating the initial particles based on the user position and the initial pseudo-satellite position to obtain updated particles; determining the globally optimal particle from the updated particles; if the fitness value of the globally optimal particle does not meet a preset fitness index and the number of optimizations has not reached a preset threshold, dividing the updated particles into elite particles and ordinary particles based on the distance between the updated particles and the globally optimal particle, and determining the suboptimal particles from the ordinary particles; performing crossover operations on the elite particles and the globally optimal particles, and mutation operations on the ordinary particles and the suboptimal particles, respectively, to obtain current particles; determining a group of particles with the top N fitness values from the updated particles and the current particles; updating the group of particles based on the fitness values of the group of particles; until the fitness value of the determined current globally optimal particle meets the preset fitness index, then performing pseudo-satellite deployment based on the updated group of particles. By adopting the above implementation scheme, elite particles are determined based on the distance between the updated particle and the global optimal particle. Crossing operations are then performed on elite particles and the global optimal particle to accelerate the convergence speed. Crossing operations are then performed on elite particles and the global optimal particle, and mutation operations are performed on ordinary particles and suboptimal particles to obtain the current particle. This effectively avoids premature convergence of particles and prevents them from getting trapped in local optima. Particle updates are performed based on the selection of elite particles and cross-mutation operations, making it easier for the updated particles to achieve the optimization targets. Attached Figure Description
[0022] Figure 1 A flowchart illustrating a pseudo-satellite layout method provided in this application embodiment;
[0023] Figure 2 A flowchart illustrating an exemplary indoor pseudo-satellite layout method provided in this application embodiment;
[0024] Figure 3 A schematic diagram of a pseudo-satellite deployment device provided in this application embodiment. Figure 1 ;
[0025] Figure 4 A schematic diagram of a pseudo-satellite deployment device provided in this application embodiment. Figure 2 . Detailed Implementation
[0026] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0028] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first, second, third" used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0029] This application provides a pseudo-satellite deployment method, such as... Figure 1 As shown, the method may include:
[0030] S101. Set the user's location and generate initial particles based on the initial number of pseudo-satellites and the initial pseudo-satellite locations.
[0031] The pseudo-satellite deployment method proposed in this application is applicable to scenarios requiring indoor scene positioning.
[0032] In this embodiment, the device for deploying pseudo-satellites can be any device with processing and storage functions, such as tablet computers, mobile phones, personal computers (PCs), laptops, etc. The specific device can be selected according to the actual situation, and this embodiment does not impose any specific limitations.
[0033] In this embodiment of the application, a spatial model is established based on the indoor scene to be located and the activity area in the indoor scene to be located; in the spatial model, the user position is set using a function that follows a preset distribution.
[0034] In this embodiment, the preset distribution can be a uniform distribution, a Gaussian distribution, etc., and the specific distribution can be selected according to the actual situation. This embodiment does not impose any specific limitations.
[0035] In this embodiment of the application, the user location represents the location that the user may reach in the indoor scene to be located.
[0036] In this embodiment of the application, the process of generating initial particles based on the initial number of pseudo-satellites and the initial pseudo-satellite positions includes: generating an initial position matrix using the initial number of pseudo-satellites as the number of rows and each initial pseudo-satellite position as each row of data; or generating an initial position matrix using the initial number of pseudo-satellites as the number of columns and each initial pseudo-satellite position as each column of data; and determining the initial position matrix as the initial particles.
[0037] In this embodiment of the application, the pseudo-satellite position can be the three-dimensional coordinates of the pseudo-satellite.
[0038] In this embodiment of the application, the initial number of satellites is set to pl_num, then each particle is a 3×pl_num dimensional row vector, where 3 corresponds to the three-dimensional coordinates of the pseudo-satellite.
[0039] In this embodiment of the application, the initial number of pseudo-satellites and the initial position of pseudo-satellites can be randomly initialized. For example, the initial number of pseudo-satellites can be 3 or 4.
[0040] S102. Update the initial particles based on the user's position and the initial pseudo-satellite position to obtain updated particles; and determine the globally optimal particle from the updated particles.
[0041] In this embodiment of the application, the process of updating the initial particles based on the user position and the initial pseudo-satellite position to obtain the updated particles includes: calculating the fitness value of the initial particles based on the user position and the initial pseudo-satellite position; determining the initial global optimal particle and the initial local optimal particle from the initial particles according to the fitness value of the initial particles; updating the initial position using the initial global optimal particle and the initial local optimal particle to obtain the updated position; and updating the initial particles based on the updated position and the initial number of pseudo-satellites to obtain the updated particles.
[0042] It should be noted that the types of fitness values can include: Geometric Dilution Precision (GDOP), Position Dilution of Precision (PDOP), Horizontal Dilution of Precision (HDOP), Vertical Dilution of Precision (VDOP), and Time Dilution of Precision (TDOP), etc.
[0043] According to navigation theory, the calculation of various DOPs is shown in formulas (1)-(5).
[0044]
[0045]
[0046]
[0047]
[0048]
[0049] In the formula, tr represents the matrix trace operator, and H represents the weight coefficient matrix, where H is calculated as shown in formula (6).
[0050] H = (G T G) -1 (6)
[0051] Where G is the observation matrix, defined as shown in formula (7):
[0052]
[0053] In formula (7), (a) xi ,a yi ,a zi ) is the unit vector between the user's location and the initial pseudo-satellite location of the i-th pseudo-satellite; n represents the number of observable initial pseudo-satellites.
[0054] During the optimization process, the DOP value is calculated once for each of the m user locations, and its mean or weighted value is used as the fitness. The mean is calculated as shown in formula (9):
[0055]
[0056] It should be noted that in indoor positioning, more attention is usually paid to the horizontal accuracy factor (HDOP), so HDOP is often used as the fitness value.
[0057] Specifically, the initial particle is also set with a corresponding initial velocity; the initial position is updated using the initial global optimal particle and the initial local optimal particle to obtain the updated position, including: updating the initial velocity using the initial global optimal particle and the initial local optimal particle to obtain the updated velocity; and updating the initial position using the updated velocity to obtain the updated position.
[0058] In this embodiment, the position update formula refers to formula (9).
[0059] x i =x i +v i (9)
[0060] In formula (9) x i v represents the position of the particle. iTo indicate the update speed, the subscript i represents the i-th round of optimization.
[0061] The speed update formula is referenced from formula (10):
[0062] v i =w·v i +c1·R1·(pbest i -x i )+c2·R2·(gbest i -x i (10)
[0063] In formula (10), c1 and c2 are learning factors, usually both taken as 2; R1 and R2 represent random numbers following U(0,1); w is the inertia factor, a non-negative value, usually calculated using linearly decreasing weights, and its definition is shown in formula (11); pbest i The best particle in the i-th round is the locally optimal particle, i.e., the optimal particle during the same particle update process; gbest i It is the globally optimal particle in the i-th round, that is, the optimal particle in the entire particle update process.
[0064]
[0065] In formula (11), k is the current iteration step, and K is the maximum iteration step. start Typically, 0.9 is used, w end The value is usually 0.4.
[0066] It should be noted that the selection of the globally optimal particle and the locally optimal particle is based on the fitness value.
[0067] S103. If the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations has not reached the preset number threshold, the updated particle is divided into elite particles and ordinary particles according to the distance between the updated particle and the globally optimal particle, and the suboptimal particle is determined from the ordinary particles.
[0068] In this embodiment, after determining the globally optimal particle from the updated particles, the fitness value of the globally optimal particle is compared with a preset fitness index. If the fitness value of the globally optimal particle meets the preset fitness index, the updated particles are used for pseudo-satellite deployment. If the fitness value of the globally optimal particle does not meet the preset fitness index, the number of optimizations is obtained. If the number of optimizations has not reached a preset threshold, the updated particles are divided into elite particles and ordinary particles based on the distance between the updated particles and the globally optimal particle, and the suboptimal particles are determined from the ordinary particles.
[0069] In this embodiment, the process of dividing the updated particles into elite particles and ordinary particles based on the distance between the updated particles and the global optimal particles is as follows: obtaining the first position matrix corresponding to the updated particles and the second position matrix corresponding to the global optimal particles; using the first position matrix and the second position matrix, determining the distance between the updated particles and the global optimal particles; selecting the particles with the highest distance M from the updated particles as elite particles in order of distance from closest to furthest; and determining the particles other than elite particles in the updated particles as ordinary particles.
[0070] For example, both the updated particle and the globally optimal particle can be rewritten as p. 3,pl_num The distance between the updated particle and the globally optimal particle is calculated based on formula (12). At this time, the distance between the updated particle and the globally optimal particle is the spatial distance, not the distance between particles. This is more in line with the actual physical layout and can effectively avoid the illusion of excessive distance between particles with the same layout due to the inconsistent order of pseudo-satellites in the particles.
[0071]
[0072] In this context, the superscript i corresponds to the globally optimal particle, and the superscript j corresponds to the updated particle.
[0073] It should be noted that the distance between the updated particle and the globally optimal particle can be calculated by calculating the spatial distance between the two or the distance between the particles (i.e., subtracting the modulus between particles). The specific method can be selected according to the actual situation, and this application does not impose any specific limitations.
[0074] In this embodiment of the application, M is a positive integer greater than 0. For example, the value of M is 30% of the number of updated particles.
[0075] Furthermore, if the fitness value of the globally optimal particle does not meet the preset fitness index, and the number of optimization attempts reaches the preset threshold, the initial number of pseudo-satellites is incremented by one to obtain the updated number of pseudo-satellites, and a new pseudo-satellite position is obtained; the initial particle is regenerated based on the updated number of pseudo-satellites, the new pseudo-satellite position, and the initial pseudo-satellite position. Then, S102 is executed again.
[0076] It is understood that the embodiments of this application can autonomously calculate the number of pseudo-satellites required to meet the preset fitness index and provide the optimal layout without the need to analyze the pseudo-satellite quantity requirements in advance.
[0077] S104. Perform crossover operations on elite particles and globally optimal particles, and mutation operations on ordinary particles and suboptimal particles respectively, to obtain the current particle.
[0078] In this embodiment of the application, the process of performing cross-operation on elite particles and globally optimal particles includes: obtaining the third position matrix corresponding to the elite particles and the fourth position matrix corresponding to the globally optimal particles respectively; and processing the third position matrix based on the difference between the third position matrix and the fourth position matrix to perform cross-operation on elite particles and globally optimal particles.
[0079] Specifically, elite particles and globally optimal particles are converted into p 3,pl_num The matrix is in the form of a 3D matrix, and its x-axis coordinates are sorted from smallest to largest. For points with the same x-value, the y-values are sorted, and so on. Thus, the positional relationships of all particle matrix pseudo-satellites are unified. For specific cross operations, refer to formula (13):
[0080]
[0081] The above-mentioned cross-strategy takes pseudo-satellites in the same area and crosses their corresponding approximate coordinates, which can ensure that the new position obtained is within the neighborhood, thereby speeding up the search for the optimal layout in the area.
[0082] It should be noted that the above cross operation can also be used to directly add or subtract particles. The specific choice can be made according to the actual situation, and the embodiments of this application do not impose specific limitations.
[0083] Among the ordinary particles, the one with the best fitness is selected as the second-best particle, gbest2. All ordinary particles move towards their own best particle, pbest, and the second-best particle, gbest2, to avoid the algorithm getting trapped in local optima too early. The calculation method is shown in formula (14):
[0084] p i =p i +c3·rand·(gbest2-p i (14)
[0085] In formula (14), c3 is the learning factor.
[0086] Understandably, the elite particle determination method and crossover mutation method proposed in this application can accelerate the algorithm optimization speed, without the need to initialize the algorithm in advance based on the classic layout, which can meet the needs of non-professionals.
[0087] S105. From the updated particles and the current particles, determine the top N groups of particles in terms of fitness; and update the group of particles based on the fitness values of the group of particles; until the fitness value of the current global best particle satisfies the preset fitness index, then perform pseudo-satellite layout based on the updated group of particles.
[0088] It should be noted that updating a set of particles based on their fitness values is described in the section on updating the initial particles to obtain the updated particles, and will not be repeated here.
[0089] It should be noted that N is a positive integer greater than 0. For example, N is set to 50% of the total number of updated particles and current particles.
[0090] It is understandable that determining elite particles based on the distance between the updated particle and the globally optimal particle, and performing cross operations on elite particles and globally optimal particles, can accelerate the convergence speed. Performing cross operations on elite particles and globally optimal particles, and performing mutation operations on ordinary particles and suboptimal particles to obtain the current particle, can effectively avoid premature convergence of particles and avoid getting trapped in local optima. Performing particle updates based on the selection of elite particles and cross-mutation operations can make the updated particles more likely to achieve the optimization index.
[0091] Based on the above embodiments, an indoor pseudo-satellite layout method is proposed, such as... Figure 2 As shown, the method may include:
[0092] 1. Establish a spatial model of the activity area in the indoor scene to be located, and generate user positions that follow a uniform distribution in this spatial model.
[0093] 2. Set the initial number and position of pseudo-satellites, and generate initial particles.
[0094] 3. Using HDOP as the fitness parameter, calculate the fitness of the initial particles and determine the local optimal particles and the global optimal particles of the initial particles.
[0095] 4. Using the user's position, the local optimal particle, and the global optimal particle, update the initial velocity and initial position of the initial particle to obtain the updated particle. Then, select the global optimal particle and the local optimal particle from the updated particle to update the local optimal particle and the global optimal particle determined by the initial particle.
[0096] 5. Determine whether the HDOP of the globally optimal particle meets the HDOP criterion.
[0097] 6. If the HDOP of the globally optimal particle does not meet the HDOP metric, then determine whether the number of optimization attempts has reached the preset number of optimization attempts.
[0098] 7. If the number of optimization attempts does not reach the preset number of optimization attempts, calculate the distance between the updated particle and the globally optimal particle in this round of optimization; and select the top 30% of the updated particles as elite particles according to the order of distance from closest to farthest, and the rest as ordinary particles, and calculate the second-best particle with the best HDOP among the ordinary particles.
[0099] 8. Perform crossover operations on elite particles and globally optimal particles, and mutation operations on ordinary particles and suboptimal particles respectively, to obtain the current particle.
[0100] 9. From the current particles and the updated particles, determine the top 50% of the particles in terms of fitness and perform step 3.
[0101] 10. If the number of optimization attempts reaches the preset number of optimization attempts, increment the initial number of pseudo-satellites by one, obtain the location of a newly added pseudo-satellite, and execute step 2.
[0102] 11. If the HDOP of the globally optimal particle satisfies the HDOP criterion, then the particle optimization process ends.
[0103] Understandably, based on the aforementioned indoor pseudo-satellite layout method, a network layout is constructed for a surface 100m long, 80m wide, and 5m high. The pseudo-satellites must be installed within 0.5 meters of the wall, and the average HDOP for the entire area must be below 1.5. The initial number of pseudo-satellites is 5, the number of particles is 20, and the optimization iterations are performed 30 times.
[0104] Both the conventional particle swarm optimization algorithm and the particle swarm optimization algorithm proposed in this application were used for optimization. Each scheme was simulated 30 times. The number of satellites required to achieve the target in each optimization is summarized in Table 1 below:
[0105] Table 1
[0106] Conventional Particle Swarm Optimization Algorithm 7 19 4 The particle swarm optimization algorithm proposed in this application 17 13 0
[0107] As shown in Table 1, the particle swarm optimization algorithm proposed in this application achieved the optimization target 17 times with 5 pseudosatellites, and achieved the target 13 times after adding one pseudosatellite. Under the same conditions, the conventional particle swarm optimization algorithm only achieved the target 7 times with 5 pseudosatellites, and required adding two pseudosatellites 4 times to meet the target. This comparison demonstrates that the particle swarm optimization algorithm proposed in this application can effectively improve optimization efficiency and prevent premature convergence of particles, thus avoiding getting trapped in local optima.
[0108] Based on the above embodiments, this application provides a pseudo-satellite deployment device 1. For example... Figure 3 As shown, the device 1 includes:
[0109] Setting unit 10 is used to set the user position and generate initial particles based on the initial number of pseudo-satellites and the initial pseudo-satellite positions;
[0110] Update unit 11 is used to update the initial particle according to the user position and the initial pseudo-satellite position to obtain the updated particle;
[0111] The partitioning unit 12 is used to partition the updated particle into elite particles and ordinary particles based on the distance between the updated particle and the global optimal particle when the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations has not reached the preset number threshold.
[0112] The crossover and mutation unit 13 is used to perform crossover operations on the elite particle and the globally optimal particle, and to perform mutation operations on the ordinary particle and the suboptimal particle, respectively, to obtain the current particle.
[0113] The determining unit 14 is used to determine a group of N particles with the highest fitness from the updated particles and the current particles; to determine the globally optimal particle from the updated particles; and to determine the second-best particle from the ordinary particles.
[0114] The updating unit 11 is further configured to update the group of particles based on the fitness values of the group of particles; until the fitness value of the determined current global best particle satisfies the preset fitness index, then pseudo-satellite layout is performed based on the updated group of particles.
[0115] In some embodiments of this application, the apparatus further includes: an acquisition unit;
[0116] The acquisition unit is used to acquire the first position matrix corresponding to the updated particle and the second position matrix corresponding to the globally optimal particle.
[0117] The determining unit 14 is further configured to find the particles with the highest distance M from the updated particles in order from closest to furthest distance as the elite particles; and to determine the particles in the updated particles other than the elite particles as the ordinary particles.
[0118] In some embodiments of this application, the updating unit 11 is further configured to increment the initial number of pseudo-satellites by one to obtain the updated number of pseudo-satellites and obtain a new pseudo-satellite position when the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations reaches the preset number threshold.
[0119] The setting unit 10 is also used to regenerate the initial particles based on the updated number of pseudo-satellites, the newly added pseudo-satellite positions, and the initial pseudo-satellite positions.
[0120] In some embodiments of this application, the determining unit 14 is further configured to calculate the fitness value of the initial particle based on the user position and the initial pseudo-satellite position; and determine the initial global optimal particle and the initial local optimal particle from the initial particles according to the fitness value of the initial particle;
[0121] The updating unit 11 is further configured to update the initial position using the initial global optimal particle and the initial local optimal particle to obtain an updated position; and update the initial particle according to the updated position and the initial number of pseudo-satellites to obtain the updated particle.
[0122] In some embodiments of this application, the initial particle is further provided with a corresponding initial velocity;
[0123] The updating unit 11 is further configured to update the initial velocity using the initial global optimal particle and the initial local optimal particle to obtain an updated velocity; and to update the initial position using the updated velocity to obtain an updated position.
[0124] In some embodiments of this application, the setting unit 10 is further configured to establish a spatial model based on the indoor scene to be located and the activity area in the indoor scene to be located; and in the spatial model, the user position is set using a function that follows a preset distribution.
[0125] In some embodiments of this application, the crossover mutation unit 13 is further configured to obtain the third position matrix corresponding to the elite particle and the fourth position matrix corresponding to the globally optimal particle, respectively; and to process the third position matrix based on the difference between the third position matrix and the fourth position matrix to perform a crossover operation on the elite particle and the globally optimal particle.
[0126] This application provides a pseudo-satellite deployment device, which sets a user position and generates initial particles based on the initial number and position of pseudo-satellites; updates the initial particles based on the user position and the initial pseudo-satellite position to obtain updated particles; and determines the globally optimal particle from the updated particles; if the fitness value of the globally optimal particle does not meet a preset fitness index and the number of optimizations has not reached a preset threshold, the updated particles are divided into elite particles and ordinary particles based on the distance between the updated particles and the globally optimal particles, and the second-best particles are determined from the ordinary particles; cross-operations are performed on the elite particles and the globally optimal particles, and mutation operations are performed on the ordinary particles and the second-best particles to obtain the current particles; a group of particles with the top N fitness values is determined from the updated particles and the current particles; and the group of particles is updated based on the fitness value of the group of particles; until the fitness value of the determined current globally optimal particle meets the preset fitness index, pseudo-satellite deployment is performed based on the updated group of particles. Therefore, the pseudo-satellite layout device proposed in this embodiment determines elite particles based on the distance between the updated particles and the globally optimal particles, and performs cross operations on the elite particles and the globally optimal particles, which can accelerate the convergence speed. By performing cross operations on the elite particles and the globally optimal particles, and mutation operations on the ordinary particles and the suboptimal particles, the current particles can be obtained, which can effectively avoid premature convergence of particles and avoid getting trapped in local optima. The particle update based on the selection of elite particles and the cross mutation operation can make the updated particles more likely to achieve the optimization index.
[0127] Figure 4 A schematic diagram of the composition structure of a pseudo-satellite deployment device 1 provided in this application embodiment. Figure 2 In practical applications, based on the same disclosed concept of the above embodiments, such as Figure 4 As shown, the pseudo-satellite layout device 1 in this embodiment includes: a processor 15, a memory 16, and a communication bus 17.
[0128] In a specific embodiment, the aforementioned setting unit 10, updating unit 11, partitioning unit 12, crossover mutation unit 13, determining unit 14, and acquisition unit can be implemented by a processor 15 located on the pseudo-satellite deployment device 1. The processor 15 can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor functions can also be other types; this embodiment does not specifically limit this.
[0129] In this embodiment, the communication bus 17 is used to establish communication between the processor 15 and the memory 16; when the processor 15 executes the running program stored in the memory 16, it implements the following pseudo-satellite deployment method:
[0130] Set the user's position and generate initial particles based on the initial number and position of pseudo-satellites; update the initial particles based on the user's position and the initial pseudo-satellite position to obtain updated particles; determine the globally optimal particle from the updated particles; if the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations has not reached the preset threshold, divide the updated particles into elite particles and ordinary particles based on the distance between the updated particles and the globally optimal particle, and determine the suboptimal particles from the ordinary particles; perform cross-operation on the elite particles and the globally optimal particle, and mutation operation on the ordinary particles and the suboptimal particles respectively to obtain the current particles; determine the top N particles in fitness from the updated particles and the current particles; update the group of particles based on their fitness values; until the fitness value of the determined current globally optimal particle meets the preset fitness index, then perform pseudo-satellite deployment based on the updated group of particles.
[0131] In some embodiments of this application, the processor 15 is further configured to generate an initial position matrix using the initial number of pseudo-satellites as the number of rows and each initial pseudo-satellite position as each row of data; or to generate an initial position matrix using the initial number of pseudo-satellites as the number of columns and each initial pseudo-satellite position as each column of data; determine the initial position matrix as the initial particle; obtain the first position matrix corresponding to the updated particle and the second position matrix corresponding to the globally optimal particle; determine the distance between the updated particle and the globally optimal particle using the first position matrix and the second position matrix; find the particle with the highest distance M from the updated particles in order of distance from closest to furthest as the elite particle; and determine the particles other than the elite particles in the updated particles as the ordinary particles.
[0132] In some embodiments of this application, the processor 15 is further configured to, when the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations reaches the preset number threshold, increment the initial number of pseudo-satellites by one to obtain an updated number of pseudo-satellites and obtain a new pseudo-satellite position; and regenerate the initial particle based on the updated number of pseudo-satellites, the new pseudo-satellite position and the initial pseudo-satellite position.
[0133] In some embodiments of this application, the processor 15 is further configured to: calculate the fitness value of the initial particle based on the user position and the initial pseudo-satellite position; determine the initial global optimal particle and the initial local optimal particle from the initial particle according to the fitness value of the initial particle; update the initial position using the initial global optimal particle and the initial local optimal particle to obtain the updated position; and update the initial particle according to the updated position and the initial number of pseudo-satellites to obtain the updated particle.
[0134] In some embodiments of this application, the initial particle is further provided with a corresponding initial velocity;
[0135] The processor 15 is further configured to update the initial velocity using the initial global optimal particle and the initial local optimal particle to obtain an updated velocity; and to update the initial position using the updated velocity to obtain an updated position.
[0136] In some embodiments of this application, the processor 15 is further configured to establish a spatial model based on the indoor scene to be located and the activity area in the indoor scene to be located; and to set the user's position in the spatial model using a function that follows a preset distribution.
[0137] In some embodiments of this application, the processor 15 is further configured to obtain the third position matrix corresponding to the elite particle and the fourth position matrix corresponding to the globally optimal particle; and to process the third position matrix based on the difference between the third position matrix and the fourth position matrix to perform cross-operation on the elite particle and the globally optimal particle.
[0138] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors and applied in a pseudo-satellite deployment device. The computer program implements the pseudo-satellite deployment method as described above.
[0139] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0141] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A pseudo-satellite layout method, characterized in that, The method includes: Set the user's location and generate initial particles based on the initial number of pseudo-satellites and their positions; Based on the user's location and the initial pseudo-satellite location, the initial particle is updated to obtain an updated particle; and the globally optimal particle is determined from the updated particle. If the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations has not reached the preset number threshold, the updated particle is divided into elite particles and ordinary particles according to the distance between the updated particle and the globally optimal particle, and the suboptimal particle is determined from the ordinary particles. The current particle is obtained by performing crossover operations on the elite particle and the globally optimal particle, and mutation operations on the ordinary particle and the suboptimal particle. From the updated particles and the current particles, determine the top N groups of particles in terms of fitness; and update the group of particles based on their fitness values; until the fitness value of the current global best particle satisfies the preset fitness index, then perform pseudo-satellite deployment based on the updated group of particles. After determining the globally optimal particle from the updated particles, the method further includes: If the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations reaches the preset number threshold, the initial number of pseudo-satellites is incremented by one to obtain the updated number of pseudo-satellites and the position of a newly added pseudo-satellite is obtained. The initial particles are regenerated based on the updated number of pseudo-satellites, the positions of the newly added pseudo-satellites, and the initial positions of the original pseudo-satellites.
2. The method according to claim 1, characterized in that, The generation of initial particles based on the initial number and position of initial pseudo-satellites includes: An initial position matrix is generated by using the initial number of pseudo-satellites as the number of rows and each initial pseudo-satellite position as each row of data; or an initial position matrix is generated by using the initial number of pseudo-satellites as the number of columns and each initial pseudo-satellite position as each column of data. The initial position matrix is used to determine the initial particles; The step of classifying the updated particle into elite particles and ordinary particles based on the distance between the updated particle and the globally optimal particle includes: Obtain the first position matrix corresponding to the updated particle and the second position matrix corresponding to the globally optimal particle; The distance between the updated particle and the globally optimal particle is determined using the first position matrix and the second position matrix; According to the order of distance from nearest to farthest, the particles with the highest distance M from the updated particles are selected as the elite particles; Among the updated particles, those other than the elite particles are identified as ordinary particles.
3. The method according to claim 1, characterized in that, The step of updating the initial particles based on the user's location and the initial pseudo-satellite location to obtain updated particles includes: The fitness value of the initial particle is calculated based on the user's location and the initial pseudo-satellite location. Based on the fitness values of the initial particles, determine the initial global optimal particle and the initial local optimal particle from the initial particles; The position of the initial particle is updated using the initial global optimal particle and the initial local optimal particle to obtain the updated position; The initial particles are updated based on the updated position and the initial number of pseudo-satellites to obtain the updated particles.
4. The method according to claim 3, characterized in that, The initial particle is also given a corresponding initial velocity; updating the position of the initial particle using the initial global optimal particle and the initial local optimal particle to obtain the updated position includes: The initial velocity is updated using the initial global optimal particle and the initial local optimal particle to obtain the updated velocity; The position of the initial particle is updated using the update rate to obtain the updated position.
5. The method according to claim 1, characterized in that, Setting the user location includes: A spatial model is established based on the indoor scene to be located and the activity area in the indoor scene to be located. In the spatial model, the user's location is set using a function that follows a preset distribution.
6. The method according to claim 1, characterized in that, The cross-operation on the elite particle and the globally optimal particle includes: Obtain the third position matrix corresponding to the elite particle and the fourth position matrix corresponding to the globally optimal particle, respectively; Based on the difference between the third position matrix and the fourth position matrix, the third position matrix is processed to perform cross-operation on the elite particle and the globally optimal particle.
7. A pseudo-satellite deployment device, characterized in that, The device includes: The setting unit is used to set the user's position and generate initial particles based on the initial number of pseudo-satellites and the initial pseudo-satellite positions; An update unit is used to update the initial particle based on the user's position and the initial pseudo-satellite position to obtain an updated particle; The partitioning unit is used to divide the updated particle into elite particles and ordinary particles based on the distance between the updated particle and the global optimal particle when the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations has not reached the preset number threshold. The crossover and mutation unit is used to perform crossover operations on the elite particle and the globally optimal particle, and to perform mutation operations on the ordinary particle and the suboptimal particle, respectively, to obtain the current particle. The determining unit is configured to determine a group of N particles with the highest fitness from the updated particles and the current particles; determine the globally optimal particle from the updated particles; and determine the second-best particle from the ordinary particles. The updating unit is further configured to update the group of particles based on the fitness value of the group of particles; until the fitness value of the determined current global best particle satisfies the preset fitness index, then pseudo-satellite layout is performed based on the updated group of particles. The updating unit is further configured to increment the initial number of pseudo-satellites by one to obtain the updated number of pseudo-satellites and acquire the position of a newly added pseudo-satellite when the fitness value of the globally optimal particle does not meet the preset fitness index and the number of optimizations reaches the preset number threshold. The setting unit is also used to regenerate the initial particles based on the updated number of pseudo-satellites, the newly added pseudo-satellite positions, and the initial pseudo-satellite positions.
8. A pseudo-satellite layout device, characterized in that, The device includes: a processor, a memory, and a communication bus; when the processor executes the running program stored in the memory, it implements the method as described in any one of claims 1-6.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Pseudo-satellite layout method used for improving positioning precision
CN107490797A