WiFi-based signal indoor positioning method
By scanning WiFi signals to form fingerprint features and using matching algorithms, combined with K nearest neighbor query to optimize positioning, the problem of high-precision indoor positioning is solved, and low-cost and high-precision indoor positioning services are realized, suitable for complex environments.
Patent Information
- Application Number
- CN202411277887.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-03
AI Technical Summary
In complex indoor environments, prior art is difficult to provide high-precision positioning services and requires the deployment of additional terminal equipment, which increases implementation costs and complexity.
By scanning the surrounding WiFi signals, collecting the received signal strength of the access point, forming fingerprint characteristics of each location, and using the matching algorithm to estimate the user's current position, combining the K-nearest query process to optimize the positioning results, establish a location fingerprint matching database, and divide the location fingerprint matching database. The grid stores the location information of the moving object and dynamically adjusts the fine-grainedness of the grid to adapt to user movement.
It realizes high-precision positioning in indoor environments where GPS cannot work, reduces implementation costs, enhances the robustness and real-time update capabilities of the system, and is suitable for applications in commercial and residential environments.
Smart Images

Figure CN119071750A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of wireless positioning, and in particular relates to an indoor positioning method based on WiFi signals. Background Art
[0002] With the increasing demand for positioning and navigation, data and multimedia services have developed rapidly. In some complex indoor environments, the location of indoor holders or their mobile terminals, items and facilities sometimes needs to be determined, but due to the relatively complex indoor environment, it is difficult to guarantee the positioning time and positioning accuracy, and it is impossible to fully utilize the perfect positioning technology. Therefore, in order to solve this problem, many experts and scholars have proposed different types of solutions to solve this problem, such as Active bat infrared technology, A-GPS assisted GPS positioning technology, infrared technology, Bluetooth technology, ultra-wideband technology, RFID radio frequency identification technology, etc. These indoor positioning technologies can be divided into four categories, namely, positioning technology combined with GNSS and wireless positioning (A-GPS or A-GNSS), GNSS technology (such as pseudo satellites, etc.), wireless positioning technology (radio frequency wireless tags, wireless communication signals, optical tracking, ultrasonic waves, wireless sensor positioning technology, etc.), and other positioning technologies (dead reckoning, computer vision, etc.).
[0003] The currently used Active bat infrared technology, A-GPS assisted GPS positioning technology, infrared technology, Bluetooth technology, ultra-wideband technology, RFID radio frequency identification technology, etc. require the use of other terminals, and the social coverage is not high, and corresponding terminal equipment needs to be deployed to increase equipment. In addition, the signal distance supported by infrared technology and Bluetooth is weak, and dense equipment needs to be laid. Summary of the invention
[0004] The purpose of the present invention is to provide an indoor positioning method based on WiFi signals, aiming to solve the technical problems existing in the prior art identified in the background technology.
[0005] The present invention is an indoor positioning method based on WiFi signals, which comprises:
[0006] The received signal strength of the access point is collected by scanning the surrounding WiFi signals, and the collected signal information is analyzed and classified to form the fingerprint characteristics of each location, and all the information is stored in the fingerprint database;
[0007] Establish a location fingerprint matching database, divide the indoor environment into grids, and store the location information of mobile objects;
[0008] Scan the surrounding WiFi signals in real time, analyze the acquired signal strength using matching algorithms, and estimate the user's current actual location;
[0009] Through the K nearest neighbor query process, several objects closest to the user's location are determined to optimize the positioning.
[0010] As a further solution of the present invention, the received signal strength of the access point is collected by scanning the surrounding WiFi signals, and the collected signal information is analyzed and classified to form the fingerprint characteristics of each location, and stored in the fingerprint database, specifically:
[0011] Scan the surrounding WiFi hotspots and access points AP;
[0012] Collect wireless signals transmitted by AP and record the received signal strength of each access point;
[0013] Analyze and classify the collected signals to form a signal fingerprint for each location;
[0014] The signal strength information is stored in the fingerprint database.
[0015] As a further solution of the present invention, the received signal strength of the access point is collected by scanning the surrounding WiFi signals, and the collected signal information is analyzed and classified to form the fingerprint characteristics of each location, and stored in the fingerprint database, specifically:
[0016] Use preset hardware devices to perform signal scanning;
[0017] Collect data sets emitted by mobile clients from the environment through hardware devices;
[0018] Analyze the collected data to form edge signal characteristics at each position;
[0019] The signal strength information is saved in the fingerprint database.
[0020] As a further solution of the present invention, the establishment of a location fingerprint matching database divides the indoor environment into grids and stores the location information of mobile objects, specifically including:
[0021] According to the indoor map, the entire plane is divided into several grid areas and the grid size is determined;
[0022] Collect available AP information through WiFi scanning tools and store the AP information in the database;
[0023] According to the location of each grid, the distance and signal strength data to the surrounding APs are calculated, and the relationship between each grid and its corresponding AP, including the signal strength value, is stored to form a grid index, which is subdivided into coarse-grained index and fine-grained index;
[0024] Allocate storage space for each moving object in the memory buffer, record its location information (x, y), and register it in the index using the unique identifier of the moving object;
[0025] Detect the moving speed of each moving object, dynamically adjust its position in the grid, and assign it to a coarse-grained grid or a fine-grained grid according to the moving speed of the object;
[0026] A qKNN table is built in the index of each moving object, and the neighboring objects are sorted according to their distance from the current position.
[0027] As a further solution of the present invention, the real-time scanning of the surrounding WiFi signals, analyzing the acquired signal strength using a matching algorithm, and estimating the current actual location of the user specifically includes:
[0028] Regularly scan the surrounding Wi-Fi access points (APs) and record the RSSI value of each AP.
[0029] A selection interval [RSSI-r, RSSI+r] is set for each AP's RSSI value, where r is an empirical value obtained through experiments. The interval is used to determine which location in the fingerprint database matches the current signal strength;
[0030] Search the signal strength of each AP in the fingerprint database, find the location points that meet the selection interval conditions, and record all the location points that meet the conditions. If there are n location points that fall within this interval, these location points are assigned a weight of 1 / n, and the other location points are assigned a weight of 0;
[0031] After the above processing is performed on all APs, the weights of all location points are added together, and the location point with the largest weight is selected as the estimated location of the current user.
[0032] As a further solution of the present invention, the K nearest neighbor query process is used to determine several objects closest to the user's position and optimize the positioning, which specifically includes:
[0033] According to the user's current location information q, calculate its corresponding grid cell q.Cell, find the K location points Ki closest to q in the cell, and Ki≤K, and store these location points in the qKNN table in order of distance. If the number of moving objects Ki in the qKNN table is less than K, expand the search range in sequence until K objects are found;
[0034] During the positioning process, the location information of the moving object is updated regularly, and snapshots are generated. The index structure within and between layers is adjusted according to the snapshots.
[0035] The final calculated K nearest neighbor positions are used in combination with the existing AP information to output the user's current location information and feed the location result back to the user device.
[0036] The beneficial effects of the present invention are:
[0037] This method uses existing WiFi infrastructure to provide high-precision positioning services, usually accurate to a few meters, in indoor environments where GPS cannot work effectively. This accuracy comes from real-time monitoring of the signal strength of multiple access points, combined with a fingerprint matching algorithm to dynamically adjust the positioning results, thereby enhancing the robustness of the system and reducing errors caused by signal fluctuations. In addition, the real-time update capability means that the system can quickly adapt to changes in user location and environment, ensuring that users can obtain location information in real time, improving the overall user experience. Since this method does not require additional hardware investment, the implementation cost is low and the deployment process is simple, it is suitable for widespread application in commercial and residential environments. Ultimately, the participation of user devices not only makes data collection and updating more flexible, but also promotes the intelligent development of the system. Therefore, the WiFi-based indoor positioning method provides a cost-effective and highly adaptable solution for various application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the signal characteristic diagram method;
[0039] Figure 2 Schematic diagram of edge signal feature method;
[0040] Figure 3 This is a double-layer grid index structure diagram. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0042] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0043] An indoor positioning method based on WiFi signals, the method comprising:
[0044] The received signal strength of the access point is collected by scanning the surrounding WiFi signals, and the collected signal information is analyzed and classified to form the fingerprint characteristics of each location, and all the information is stored in the fingerprint database;
[0045] This method introduces two signal scanning methods. Both are based on the received signal strength (RSS) fingerprinting feature. One is the signal signature method, and the other is the perimeter method.
[0046] The Wi-Fi signal characteristic graph method is suitable for situations where the surrounding hotspot environment is relatively good, so it can be used for indoor close-range positioning. The signal characteristic graph method is shown in Figure 1 As shown, first open the client program, the nearby Wi-Fi hotspots and APs will radiate wireless signals into the air, and after the client program is opened, it will collect wireless signal information according to the characteristics, analyze and classify each received access point information, and then save the radiated wireless signal strength information. The signal fingerprint (also called "fingerprint information") is formed by these signal strengths, so the feature map of each location is formed.
[0047] Specific:
[0048] Scan the surrounding WiFi hotspots and access points AP;
[0049] Collect wireless signals transmitted by AP and record the received signal strength of each access point;
[0050] Analyze and classify the collected signals to form a signal fingerprint for each location;
[0051] The signal strength information is stored in the fingerprint database.
[0052] Figure 2 To represent the edge signal feature method, specific hardware devices for scanning are needed in the surrounding environment. These scanning devices need to be used together with specific software to complete the signal scanning function. When the device is working, it will continuously collect and receive data sets radiated by mobile clients from the surrounding environment, and analyze these data sets, save and form signal strength information. The edge signal characteristics of each scanning device point are thus presented, and the fingerprint signal information of each position is thus formed.
[0053] Specific:
[0054] Use preset hardware devices to perform signal scanning;
[0055] Collect data sets emitted by mobile clients from the environment through hardware devices;
[0056] Analyze the collected data to form edge signal characteristics at each position;
[0057] The signal strength information is saved in the fingerprint database.
[0058] Establish a location fingerprint matching database, divide the indoor environment into grids, and store the location information of mobile objects;
[0059] The principle of Wi-Fi positioning can be divided into the arrival angle positioning method, the received signal strength positioning method, and the arrival time difference positioning method according to the different parameters for completing the positioning. The calculation of the distance from the receiving point to the transmitting point is the core of the three methods. The method based on the received signal strength detection is that the transmitter transmits a wireless signal of a certain power into the environment, and the receiving end receives this wireless signal and measures the power intensity after attenuation. Then the distance between the transmitter and the receiver is calculated by the formula Los (dbm) = 32.44 + 20lgD (m) + 20lgF (MHz), and the influence of multipath propagation and noise is considered. Finally, the distance is determined according to the energy ratio. The arrival angle positioning method is to use the antenna to receive the signal sent by the transmitter, measure the incident angle of the electromagnetic wave from the transmitter to the two receivers, and then calculate the distance from the receiver to the mobile terminal through the public. The arrival time detection method is to use the time of the wireless signal received by the receiver minus the time of the wireless signal sent by the transmitter, and then use this time delay to multiply the electromagnetic wave propagation speed in the air to calculate the distance between the transmitter and the receiver. The third method is simple and practical, easy to implement and calculate, and is widely used in Wi-Fi positioning. The arrival time difference positioning method can be understood as using time parameters to calculate the distance between the transmitter and the receiver, and the spatial sphere surface positioning is mainly used.
[0060] The entire indoor plane is divided into grids, and the grid index is established using the location of each AP and the specific information of all grids. We can divide the grid index into coarse-grained grid index and fine-grained grid index. Since the memory area occupied by each block of the coarse-grained index is relatively large, the amount of index data of each unit is relatively large, which increases the difficulty of maintaining the unit grid, so it is suitable for situations where the object is relatively fast as a whole. Although the memory area occupied by each block of the fine-grained index is relatively small, the amount of index data of each unit is relatively small, which reduces the difficulty of maintaining each unit. Frequent refreshes are required to obtain the index distribution of large areas, so fine-grained grids are suitable for situations with slow movement.
[0061] The positioning database uses a two-layer grid index for mobile objects. In this structure, the location information (x, y) of each mobile object is stored in the memory buffer B, which updates the content of the buffer by continuously collecting location information. The mobile object can get itself in the B index according to its unique identifier Mac address. Each PL (i, j) table maintains a corresponding PL (i, j) table, and stores its own MAC address unique identifier as an index in the compiled grid unit. The system dynamically adjusts its coarse-grained or fine-grained position to adapt to the fast and slow changes of the mobile object. Each query object maintains a qKNN table, and sorts K objects from the distance from the current position into the order from near to far and stores them in the early qKNN table. In the established index, the coarse-grained dimension is n*n, the fine-grained dimension is m*m, and it is guaranteed that m is a multiple of n.
[0062] The double-layer grid index structure is as follows Figure 3 shown.
[0063] Specific:
[0064] According to the indoor map, the entire plane is divided into several grid areas and the grid size is determined;
[0065] Collect available AP information through WiFi scanning tools and store the AP information in the database;
[0066] According to the location of each grid, the distance and signal strength data to the surrounding APs are calculated, and the relationship between each grid and its corresponding AP, including the signal strength value, is stored to form a grid index, which is subdivided into coarse-grained index and fine-grained index;
[0067] Allocate storage space for each moving object in the memory buffer, record its location information (x, y), and register it in the index using the unique identifier of the moving object;
[0068] Detect the moving speed of each moving object, dynamically adjust its position in the grid, and assign it to a coarse-grained grid or a fine-grained grid according to the moving speed of the object;
[0069] A qKNN table is built in the index of each moving object, and the neighboring objects are sorted according to their distance from the current position.
[0070] Scan the surrounding WiFi signals in real time, analyze the acquired signal strength using matching algorithms, and estimate the user's current actual location;
[0071] After the fingerprint database is successfully established, a matching algorithm is added to compare the signal strength information scanned by the AP access point with the data in the fingerprint feature database, so that a more accurate location estimate can be obtained. Common matching algorithms include K nearest neighbor node algorithm (KNN), nearest neighbor method (NN), etc. Here we use the nearest neighbor algorithm. In order to achieve more accurate positioning, we need to improve the location fingerprint algorithm. For the RSSI value of each scanned AP, a selection interval [RSSI-r, RSSI+r] is designed, where r is the empirical value of multiple experiments. The location points that meet this interval range are searched in the fingerprint database. If there are n location points falling within this interval range, these location points are weighted as 1 / n respectively, and the other location points are weighted as 0; after all APs are processed as above, the one with the largest weight is selected for subsequent location estimation.
[0072] The location fingerprint positioning process is generally divided into two stages. The first stage is the fingerprint training stage, which has been completed above. The second stage is the real-time positioning stage. In this stage, the real-time signal strength value of the user's location is measured, and then the KNN matching algorithm is used to find the area that best matches the fingerprint database, thereby determining the user's actual location.
[0073] Through the K nearest neighbor query process, several objects closest to the user's location are determined to optimize the positioning.
[0074] Specifically include:
[0075] Regularly scan the surrounding Wi-Fi access points (APs) and record the RSSI value of each AP.
[0076] A selection interval [RSSI-r, RSSI+r] is set for each AP's RSSI value, where r is an empirical value obtained through experiments. The interval is used to determine which location in the fingerprint database matches the current signal strength;
[0077] Search the signal strength of each AP in the fingerprint database, find the location points that meet the selection interval conditions, and record all the location points that meet the conditions. If there are n location points that fall within this interval, these location points are assigned a weight of 1 / n, and the other location points are assigned a weight of 0;
[0078] After the above processing is performed on all APs, the weights of all location points are added together, and the location point with the largest weight is selected as the estimated location of the current user.
[0079] When used for the first time, all the values in the database are empty. During positioning operation, we use the fine layer to initialize the index moving objects, update the location information at regular intervals and update the snapshot at the same time, and adjust the index structure within and between layers according to the snapshot. Assuming that all moving objects correspond one by one with their indexes, the K-nearest neighbor query goes through the following two processes. First, calculate q.Cell according to the location q(x, y) of q. Find the Ki (Ki <= K) p's in q.Cell.PL that are closest to q, and sort the K objects in ascending order of the distance from the current location and put them into the qKNN table. If the number of moving objects p in the qKNN table, Ki < K, then expand one layer of cells around q.Cell as the center, and perform the following processing on each cell in this layer: Recalculate the distance dist from each p to q, compare it with the K objects that have been sorted in the qKNN table, and adjust the qKNN table to always store the Ki p's that are closest to q. If Ki is still less than K, continue this operation until Ki = K. In this way, we get the K p's that are closest in the qKNN table. Sort them, and we will get the nearest moving objects. Through this index, we can use the existing AP to obtain the current location information.
[0080] Through the K-nearest neighbor query process, determine several objects closest to the user's location to optimize the positioning, specifically including:
[0081] According to the user's current location information q, calculate its corresponding grid cell q.Cell, find the K location points Ki closest to q in this cell, and Ki <= K, and sort these location points by distance and store them in the qKNN table. If the number of moving objects Ki in the qKNN table is less than K, then expand the search range in turn until K objects are found;
[0082] During the positioning process, regularly update the location information of the moving objects, generate a snapshot, and adjust the index structure within and between layers according to the snapshot;
[0083] Use the finally calculated K nearest neighbor locations, combined with the existing AP information, to output the user's current location information and feedback the location result to the user device.
[0084] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0086] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0088] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An indoor positioning method based on WiFi signals, characterized in that: The method comprises: The received signal strength of the access point is collected by scanning the surrounding WiFi signals, and the collected signal information is analyzed and classified to form the fingerprint characteristics of each location, and all the information is stored in the fingerprint database; Establish a location fingerprint matching database, divide the indoor environment into grids, and store the location information of mobile objects; Scan the surrounding WiFi signals in real time, analyze the acquired signal strength using matching algorithms, and estimate the user's current actual location; Through the K nearest neighbor query process, several objects closest to the user's location are determined to optimize the positioning.
2. The method according to claim 1, characterized in that The received signal strength of the access point is collected by scanning the surrounding WiFi signals, and the collected signal information is analyzed and classified to form the fingerprint features of each location and store them in the fingerprint database, specifically: Scan the surrounding WiFi hotspots and access points AP; Collect wireless signals transmitted by AP and record the received signal strength of each access point; Analyze and classify the collected signals to form a signal fingerprint for each location; The signal strength information is stored in the fingerprint database.
3. The method according to claim 1, characterized in that The received signal strength of the access point is collected by scanning the surrounding WiFi signals, and the collected signal information is analyzed and classified to form the fingerprint features of each location and store them in the fingerprint database, specifically: Use preset hardware devices to perform signal scanning; Collect data sets emitted by mobile clients from the environment through hardware devices; Analyze the collected data to form edge signal characteristics at each position; The signal strength information is saved in the fingerprint database.
4. The method according to claim 1 or 3, characterized in that: The establishment of a location fingerprint matching database divides the indoor environment into grids and stores the location information of mobile objects, specifically including: According to the indoor map, the entire plane is divided into several grid areas and the grid size is determined; Collect available AP information through WiFi scanning tools and store the AP information in the database; According to the location of each grid, the distance and signal strength data to the surrounding APs are calculated, and the relationship between each grid and its corresponding AP, including the signal strength value, is stored to form a grid index, which is subdivided into coarse-grained index and fine-grained index; Allocate storage space for each moving object in the memory buffer, record its location information (x, y), and register it in the index using the unique identifier of the moving object; Detect the moving speed of each moving object, dynamically adjust its position in the grid, and assign it to a coarse-grained grid or a fine-grained grid according to the moving speed of the object; A qKNN table is built in the index of each moving object, and the neighboring objects are sorted according to their distance from the current position.
5. The method according to claim 4, characterized in that The real-time scanning of the surrounding WiFi signals and the use of a matching algorithm to analyze the acquired signal strength to estimate the user's current actual location specifically include: Regularly scan the surrounding Wi-Fi access points (APs) and record the RSSI value of each AP. A selection interval [RSSI-r, RSSI+r] is set for each AP's RSSI value, where r is an empirical value obtained through experiments. The interval is used to determine which location in the fingerprint database matches the current signal strength; Search the signal strength of each AP in the fingerprint database, find the location points that meet the selection interval conditions, and record all the location points that meet the conditions. If there are n location points that fall within this interval, these location points are assigned a weight of 1 / n, and the other location points are assigned a weight of 0; After the above processing is performed on all APs, the weights of all location points are added together, and the location point with the largest weight is selected as the estimated location of the current user.
6. The method according to claim 5, characterized in that The K nearest neighbor query process is used to determine several objects closest to the user's location and optimize the positioning, specifically including: According to the user's current location information q, calculate its corresponding grid cell q.Cell, find the K location points Ki closest to q in the cell, and Ki≤K, and store these location points in the qKNN table in order of distance. If the number of moving objects Ki in the qKNN table is less than K, expand the search range in sequence until K objects are found; During the positioning process, the location information of the moving object is updated regularly, and snapshots are generated. The index structure within and between layers is adjusted according to the snapshots. The final calculated K nearest neighbor positions are used in combination with the existing AP information to output the user's current location information and feed the location result back to the user device.
Citation Information
Cited By
WiFi-based positioning method and apparatus, and electronic device
CN121486967A
