CN107290714B - A positioning method based on multi-identity fingerprint positioning - Google Patents
A positioning method based on multi-identity fingerprint positioning Download PDFInfo
- Publication number
- CN107290714B CN107290714B CN201710538630.8A CN201710538630A CN107290714B CN 107290714 B CN107290714 B CN 107290714B CN 201710538630 A CN201710538630 A CN 201710538630A CN 107290714 B CN107290714 B CN 107290714B
- Authority
- CN
- China
- Prior art keywords
- training
- tuple
- priority queue
- tuples
- positioning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W64/00—Locating users or terminals or network equipment for network management purposes, e.g. mobility management
- H04W64/006—Locating users or terminals or network equipment for network management purposes, e.g. mobility management with additional information processing, e.g. for direction or speed determination
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S5/00—Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
- G01S5/02—Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves
- G01S5/0252—Radio frequency fingerprinting
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Mobile Radio Communication Systems (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
本发明公开了一种基于多标识指纹定位的定位方法,先绘制wifi部署地图,并在地图上标记出无线AP的位置;然后在离线采样时将地图坐标化,每一个坐标点记为一个训练元组,利用移动终端在WiFi网络中每个坐标点处采集无线AP的信号强度RSSI信息划分训练元组,进行过滤处理后建立离线数据库,离线数据库包括训练元组以及训练元组对应的标号和坐标;最后在线定位时通过遍历离线数据库中的训练元组集计算训练元组与测试元组的曼哈顿距离,根据曼哈顿距离更新优先级队列,统计优先级队列中每个训练元组出现的次数,出现次数最多的训练元组对应的坐标点即作为待定位的移动终端所处位置的坐标点。
The invention discloses a positioning method based on multi-identity fingerprint positioning. First, a wifi deployment map is drawn, and the position of a wireless AP is marked on the map; then the map is coordinated during offline sampling, and each coordinate point is recorded as a training point. Tuple, using the mobile terminal to collect the signal strength RSSI information of the wireless AP at each coordinate point in the WiFi network to divide the training tuple, and after filtering, an offline database is established. The offline database includes the training tuple and the corresponding label and Coordinates; in the final online positioning, the Manhattan distance between the training tuple and the test tuple is calculated by traversing the training tuple set in the offline database, and the priority queue is updated according to the Manhattan distance, and the number of occurrences of each training tuple in the priority queue is counted. The coordinate point corresponding to the training tuple with the largest number of occurrences is the coordinate point of the location of the mobile terminal to be located.
Description
技术领域technical field
本发明属于定位跟踪技术领域,具体涉及一种基于多标识指纹定位的定位方法。The invention belongs to the technical field of positioning and tracking, and in particular relates to a positioning method based on multi-identity fingerprint positioning.
背景技术Background technique
目前,定位服务已经成为日常生活不可少的服务,随着商场车站等公共设施的大量建设,人们对室内定位的需求不断的提高,室内定位正在逐渐成为人们研究的热点。然而室内多径条件复杂,传统的蓝牙定位方法误差较大,而且难以分辨用户,同时又需要专门的设备去测量用户坐标,从而增加了系统的复杂度。基于无线局域网RSSI信号测量的定位方法由于其成本低、覆盖范围大同时系统布设简单,正在逐渐成为室内定位的热点。At present, positioning service has become an indispensable service in daily life. With the large-scale construction of public facilities such as shopping malls and stations, people's demand for indoor positioning continues to increase, and indoor positioning is gradually becoming a research hotspot. However, the indoor multipath conditions are complex, the traditional Bluetooth positioning method has large errors, and it is difficult to distinguish users. At the same time, special equipment is required to measure the user coordinates, which increases the complexity of the system. The positioning method based on RSSI signal measurement of wireless local area network is gradually becoming a hot spot of indoor positioning due to its low cost, large coverage and simple system layout.
室内定位技术的主要方法分为两类:确定性方法和概率性方法。确定性方法中的经典算法有最邻近法(Nearest Neighbor,NN)、K近邻法(K Nearest Neighbor,KNN)和加权K近邻法(Weighted K Nearest Neighbor,WKNN),这类算法在设计中只考虑了信号特征均值,对原有数据利用率较低,因而定位的误差较大,与确定行算法相比,概率性算法基于数理统计的思想,能更好地解决由环境等带来的影响,但同样是对原有数据利用率较低。The main methods of indoor positioning technology are divided into two categories: deterministic methods and probabilistic methods. The classic algorithms in the deterministic method are the nearest neighbor method (Nearest Neighbor, NN), K nearest neighbor method (K Nearest Neighbor, KNN) and weighted K nearest neighbor method (Weighted K Nearest Neighbor, WKNN), such algorithms are only considered in the design. Compared with the deterministic algorithm, the probabilistic algorithm is based on the idea of mathematical statistics, which can better solve the influence caused by the environment, etc. However, the utilization rate of the original data is also low.
现有的算法,没有很好的处理预先测得的数据,无论是求取平均值,还是进行加权求取平均值,中间会有一定的数据损失,间接的增加了算法误差。Existing algorithms do not handle the pre-measured data well, whether it is to obtain the average value or to obtain the average value by weighting, there will be a certain data loss in the middle, which indirectly increases the algorithm error.
发明内容SUMMARY OF THE INVENTION
为了解决现有技术中的问题,本发明提出一种能够减小算法误差,增加算法精确度的基于多标识指纹定位的定位方法。In order to solve the problems in the prior art, the present invention proposes a positioning method based on multi-identity fingerprint positioning, which can reduce the algorithm error and increase the algorithm accuracy.
为了实现以上目的,本发明所采用的技术方案为:包括以下步骤:In order to achieve the above purpose, the technical scheme adopted in the present invention is: comprising the following steps:
1)绘制wifi部署地图,并在地图上标记出无线AP的位置;1) Draw a wifi deployment map, and mark the location of the wireless AP on the map;
2)离线采样:将地图坐标化,每一个坐标点记为一个训练元组,利用移动终端在WiFi网络中每个坐标点处采集无线AP的信号强度RSSI信息划分训练元组,并发送到定位服务器,定位服务器将训练元组集排序后存储在搜索树中,同时存储训练元组对应的标号和坐标得到离线数据库,并对离线数据库进行过滤处理;2) Offline sampling: Coordinate the map, record each coordinate point as a training tuple, and use the mobile terminal to collect the signal strength RSSI information of the wireless AP at each coordinate point in the WiFi network to divide the training tuple and send it to the location. The server, the positioning server sorts the training tuple set and stores it in the search tree, stores the labels and coordinates corresponding to the training tuple to obtain the offline database, and filters the offline database;
3)在线定位:待定位的移动终端在WiFi网络的随机点采集无线AP的信号强度RSSI信息作为测试元组,从离线数据库的训练元组中选择最近邻训练元组构建优先级队列,分别计算测试元组与最近邻训练元组的曼哈顿距离,遍历离线数据库中的训练元组集计算训练元组与测试元组的曼哈顿距离,并根据曼哈顿距离更新优先级队列,统计优先级队列中每个训练元组出现的次数,出现次数最多的训练元组对应的坐标点即作为待定位的移动终端所处位置的坐标点。3) Online positioning: The mobile terminal to be located collects the signal strength RSSI information of the wireless AP at a random point on the WiFi network as a test tuple, selects the nearest neighbor training tuple from the training tuple of the offline database to construct a priority queue, and calculates the The Manhattan distance between the test tuple and the nearest neighbor training tuple, traverse the training tuple set in the offline database to calculate the Manhattan distance between the training tuple and the test tuple, and update the priority queue according to the Manhattan distance, and count each item in the priority queue. The number of occurrences of the training tuple, and the coordinate point corresponding to the training tuple with the largest number of occurrences is taken as the coordinate point of the location of the mobile terminal to be located.
所述步骤2)中对离线数据库进行过滤处理包括以下步骤:In the described step 2), the off-line database is filtered and processed and includes the following steps:
2.1)地图中每一个坐标点(Xi,Yi)处的RSSI值记为向量: 2.1) The RSSI value at each coordinate point (X i , Y i ) in the map is recorded as a vector:
其中,i为第i个点,j为在该点处测得的第j组数据,sn为训练元组内的向量,具体含义为第n个AP点在该坐标点出测得的RSSI值;Among them, i is the ith point, j is the jth group of data measured at this point, s n is the vector in the training tuple, and the specific meaning is the RSSI measured by the nth AP point at this coordinate point value;
2.2)求取每一个训练元组的平均向量: 2.2) Find the average vector for each training tuple:
其中,m为每个训练元组内向量的个数,为向量平均值;where m is the number of vectors in each training tuple, is the vector mean;
2.3)计算每一个训练元组中向量与平均向量的欧几里德距离: 2.3) Calculate the Euclidean distance between the vectors in each training tuple and the mean vector:
2.4)删除每一个训练元组中与平均向量的欧几里德距离大于30个单位的向量,完成对离线数据库的过滤。2.4) Delete the vectors whose Euclidean distance from the average vector is greater than 30 units in each training tuple to complete the filtering of the offline database.
所述步骤3)具体包括以下步骤:The step 3) specifically includes the following steps:
3.1)待定位的移动终端在WiFi网络的随机点采集无线AP的信号强度RSSI信息,并发送给定位服务器,定位服务器将缓存的RSSI信息作为测试元组;3.1) The mobile terminal to be located collects the signal strength RSSI information of the wireless AP at a random point of the WiFi network, and sends it to the positioning server, and the positioning server uses the cached RSSI information as a test tuple;
3.2)构建用于存储最近邻训练元组的优先级队列,并从训练元组集中随机选择若干训练元组作为最近邻训练元组,分别计算测试元组与最近邻训练元组的曼哈顿距离,并将最近邻训练元组的标号、坐标,以及测试元组与最近邻训练元组的曼哈顿距离存入优先级队列;3.2) Build a priority queue for storing the nearest neighbor training tuples, and randomly select several training tuples from the training tuple set as the nearest neighbor training tuples, and calculate the Manhattan distance between the test tuples and the nearest neighbor training tuples, respectively, and store the label, coordinates of the nearest neighbor training tuple, and the Manhattan distance between the test tuple and the nearest neighbor training tuple into the priority queue;
3.3)遍历离线数据库中的训练元组集,计算当前训练元组与测试元组的曼哈顿距离,将所得的曼哈顿距离D与优先级队列中的最大曼哈顿距离Dmax进行比较,若D≥Dmax,则舍弃当前训练元组,遍历下一个训练元组;若D<Dmax,则删除优先级队列中的最大曼哈顿距离对应的训练元组,将当前训练元组存入优先级队列,重复以上过程直至遍历完整个训练元组集,得到更新的优先级队列;3.3) Traverse the training tuple set in the offline database, calculate the Manhattan distance between the current training tuple and the test tuple, and compare the obtained Manhattan distance D with the maximum Manhattan distance D max in the priority queue, if D ≥ D max , then discard the current training tuple and traverse the next training tuple; if D < D max , delete the training tuple corresponding to the maximum Manhattan distance in the priority queue, store the current training tuple in the priority queue, repeat the above The process continues until the entire training tuple set is traversed to obtain an updated priority queue;
3.4)统计优先级队列中每个训练元组出现的次数,出现次数最多的训练元组对应的坐标点即作为待定位的移动终端所处位置的坐标点。3.4) Count the number of occurrences of each training tuple in the priority queue, and the coordinate point corresponding to the training tuple with the largest number of occurrences is taken as the coordinate point of the location of the mobile terminal to be located.
所述步骤3)中待定位的移动终端在随机点的RSSI值记为向量:S=(b1,b2,b3,…,bn),bn为测试元组内的向量,测试元组与训练元组的曼哈顿距离的计算公式为: In the step 3), the RSSI value of the mobile terminal to be located at a random point is denoted as a vector: S=(b 1 , b 2 , b 3 , ..., bn ), bn is the vector in the test tuple, and the test The formula for calculating the Manhattan distance between a tuple and a training tuple is:
所述步骤3)中优先级队列中存储有1000个训练元组作为最近邻训练元组。In the step 3), 1000 training tuples are stored in the priority queue as nearest neighbor training tuples.
所述步骤3)中优先级队列中的最近邻训练元组根据与测试元组的曼哈顿距离由小到大进行排序。In the step 3), the nearest neighbor training tuples in the priority queue are sorted according to the Manhattan distance from the test tuples from small to large.
所述移动终端采用API采集无线AP的信号强度RSSI信息。The mobile terminal uses the API to collect the signal strength RSSI information of the wireless AP.
与现有技术相比,本发明首先绘制wifi部署地图,并在地图上标记出无线AP的位置;然后在离线采样时将地图坐标化,每一个坐标点记为一个训练元组,利用移动终端在WiFi网络中每个坐标点处采集无线AP的信号强度RSSI信息划分训练元组,进行过滤处理后建立离线数据库,离线数据库包括训练元组以及训练元组对应的标号和坐标;最后在线定位时通过遍历离线数据库中的训练元组集计算训练元组与测试元组的曼哈顿距离,根据曼哈顿距离更新优先级队列,统计优先级队列中每个训练元组出现的次数,出现次数最多的训练元组对应的坐标点即作为待定位的移动终端所处位置的坐标点,完成定位。本发明通过划分组元的方法,通过多标识的方法,利用多组数据来标识每一个坐标点,摒弃现有方法中求取平均值的方法。即现有方法采用标量去标识一个坐标点,本发明采用向量标识一个坐标点,减小了误差,提高了定位的精准度。Compared with the prior art, the present invention first draws a wifi deployment map, and marks the location of the wireless AP on the map; then coordinates the map during offline sampling, each coordinate point is recorded as a training tuple, and the mobile terminal is used to coordinate the map. Collect the signal strength RSSI information of the wireless AP at each coordinate point in the WiFi network and divide it into training tuples. After filtering, an offline database is established. The offline database includes the training tuples and the labels and coordinates corresponding to the training tuples; Calculate the Manhattan distance between the training tuple and the test tuple by traversing the training tuple set in the offline database, update the priority queue according to the Manhattan distance, count the number of occurrences of each training tuple in the priority queue, and the training tuple with the most occurrences The coordinate points corresponding to the group are the coordinate points of the location of the mobile terminal to be located, and the positioning is completed. The invention uses the method of dividing the components and the method of multiple identification, and uses multiple sets of data to identify each coordinate point, and abandons the method of obtaining the average value in the existing method. That is, the existing method uses a scalar to identify a coordinate point, and the present invention uses a vector to identify a coordinate point, which reduces errors and improves positioning accuracy.
进一步,根据训练元组的向量与平均向量的欧几里德距离对离线数据库进行过滤处理,去除了离线数据库中无用的向量,减少了计算量和计算误差,进一步提高了本发明的精准度。通过欧几里德距离对离线数据库进行过滤处理,满足误差要求,同时降低了时间复杂度。Further, filtering the offline database according to the Euclidean distance between the vector of the training tuple and the average vector removes useless vectors in the offline database, reduces the amount of calculation and calculation error, and further improves the accuracy of the present invention. The offline database is filtered through Euclidean distance to meet the error requirements and reduce the time complexity.
附图说明Description of drawings
图1为移动终端与无线AP的信息示意图;1 is a schematic diagram of information of a mobile terminal and a wireless AP;
图2为本发明的方法流程图。FIG. 2 is a flow chart of the method of the present invention.
具体实施方式Detailed ways
下面结合具体的实施例和说明书附图对本发明作进一步的解释说明。The present invention will be further explained below with reference to specific embodiments and accompanying drawings.
参见图2,本发明包括初始配置阶段、离线采样阶段和在线实时定位阶段:Referring to Figure 2, the present invention includes an initial configuration stage, an offline sampling stage and an online real-time positioning stage:
1)初始配置阶段:绘制wifi部署地图,并在地图上标记出无线AP的位置;1) Initial configuration stage: draw a wifi deployment map, and mark the location of the wireless AP on the map;
2)离线采样阶段:将地图坐标化,每一个坐标点记为一个训练元组,利用移动终端在WiFi网络中每个坐标点处采集无线AP的信号强度RSSI信息划分训练元组,并发送到定位服务器,定位服务器将训练元组集排序后存储在搜索树中,同时存储训练元组对应的标号和坐标得到离线数据库,并对离线数据库进行过滤处理;2) Offline sampling stage: coordinate the map, record each coordinate point as a training tuple, use the mobile terminal to collect the signal strength RSSI information of the wireless AP at each coordinate point in the WiFi network to divide the training tuple, and send it to The positioning server, which sorts the training tuple set and stores it in the search tree, stores the labels and coordinates corresponding to the training tuple to obtain the offline database, and filters the offline database;
过滤处理包括以下步骤:The filtering process includes the following steps:
2.1)地图中每一个坐标点(Xi,Yi)处的RSSI值记为向量: 2.1) The RSSI value at each coordinate point (X i , Y i ) in the map is recorded as a vector:
其中,i为第i个点,j为在该点处测得的第j组数据,sn为训练元组内的向量;Among them, i is the ith point, j is the jth group of data measured at this point, and sn is the vector in the training tuple;
2.2)求取每一个训练元组的平均向量: 2.2) Find the average vector for each training tuple:
其中,m为每个训练元组内向量的个数,为向量平均值;where m is the number of vectors in each training tuple, is the vector mean;
2.3)计算每一个训练元组中向量与平均向量的欧几里德距离: 2.3) Calculate the Euclidean distance between the vectors in each training tuple and the mean vector:
2.4)删除每一个训练元组中与平均向量的欧几里德距离大于30个单位的向量,完成对离线数据库的过滤;2.4) Delete the vector whose Euclidean distance from the average vector is greater than 30 units in each training tuple to complete the filtering of the offline database;
3)在线实时定位阶段:待定位的移动终端在WiFi网络的随机点采集无线AP的信号强度RSSI信息作为测试元组,从离线数据库的训练元组中选择最近邻训练元组构建优先级队列,分别计算测试元组与最近邻训练元组的曼哈顿距离,遍历离线数据库中的训练元组集计算训练元组与测试元组的曼哈顿距离,并根据曼哈顿距离更新优先级队列,统计优先级队列中每个训练元组出现的次数,出现次数最多的训练元组对应的坐标点即作为待定位的移动终端所处位置的坐标点;具体包括以下步骤:3) Online real-time positioning stage: the mobile terminal to be located collects the signal strength RSSI information of the wireless AP at a random point of the WiFi network as a test tuple, and selects the nearest neighbor training tuple from the training tuple of the offline database to construct a priority queue, Calculate the Manhattan distance between the test tuple and the nearest neighbor training tuple respectively, traverse the training tuple set in the offline database to calculate the Manhattan distance between the training tuple and the test tuple, and update the priority queue according to the Manhattan distance. The number of times each training tuple appears, and the coordinate point corresponding to the training tuple with the largest number of occurrences is the coordinate point of the location of the mobile terminal to be located; specifically, the following steps are included:
3.1)待定位的移动终端在WiFi网络的随机点采集无线AP的信号强度RSSI信息,并发送给定位服务器,定位服务器将缓存的RSSI信息作为测试元组,待定位的移动终端在随机点的RSSI值记为向量:S=(b1,b2,b3,…,bn),bn为测试元组内的向量;3.1) The mobile terminal to be located collects the signal strength RSSI information of the wireless AP at a random point of the WiFi network, and sends it to the positioning server. The positioning server uses the cached RSSI information as a test tuple, and the mobile terminal to be located is at a random point. RSSI information The value is recorded as a vector: S=(b 1 ,b 2 ,b 3 ,...,b n ), where b n is the vector in the test tuple;
3.2)构建用于存储最近邻训练元组的优先级队列,并从训练元组集中随机选择1000个训练元组作为最近邻训练元组,分别计算测试元组与最近邻训练元组的曼哈顿距离,并将最近邻训练元组的标号、坐标,以及测试元组与最近邻训练元组的曼哈顿距离存入优先级队列,优先级队列中的最近邻训练元组根据与测试元组的曼哈顿距离由小到大进行排序,测试元组与训练元组的曼哈顿距离的计算公式为: 3.2) Build a priority queue for storing the nearest neighbor training tuples, and randomly select 1000 training tuples from the training tuple set as the nearest neighbor training tuples, and calculate the Manhattan distance between the test tuples and the nearest neighbor training tuples respectively , and store the label, coordinates of the nearest neighbor training tuple, and the Manhattan distance between the test tuple and the nearest neighbor training tuple into the priority queue, and the nearest neighbor training tuple in the priority queue is based on the Manhattan distance from the test tuple. Sorting from small to large, the formula for calculating the Manhattan distance between the test tuple and the training tuple is:
3.3)遍历离线数据库中的训练元组集,计算当前训练元组与测试元组的曼哈顿距离,将所得的曼哈顿距离D与优先级队列中的最大曼哈顿距离Dmax进行比较,若D≥Dmax,则舍弃当前训练元组,遍历下一个训练元组;若D<Dmax,则删除优先级队列中的最大曼哈顿距离对应的训练元组,将当前训练元组存入优先级队列,重复以上过程直至遍历完整个训练元组集,得到更新的优先级队列;3.3) Traverse the training tuple set in the offline database, calculate the Manhattan distance between the current training tuple and the test tuple, and compare the obtained Manhattan distance D with the maximum Manhattan distance D max in the priority queue, if D ≥ D max , then discard the current training tuple and traverse the next training tuple; if D < D max , delete the training tuple corresponding to the maximum Manhattan distance in the priority queue, store the current training tuple in the priority queue, repeat the above The process continues until the entire training tuple set is traversed to obtain an updated priority queue;
3.4)统计优先级队列中每个训练元组出现的次数,出现次数最多的训练元组对应的坐标点即作为待定位的移动终端所处位置的坐标点。3.4) Count the number of occurrences of each training tuple in the priority queue, and the coordinate point corresponding to the training tuple with the largest number of occurrences is taken as the coordinate point of the location of the mobile terminal to be located.
方法中移动终端采用API采集无线AP的信号强度RSSI信息。In the method, the mobile terminal adopts the API to collect the signal strength RSSI information of the wireless AP.
本发明在初始配置阶段,预先配置如下信息:绘制wifi部署地图,在地图上标记出无线AP的安装位置;In the initial configuration stage of the present invention, the following information is pre-configured: a wifi deployment map is drawn, and the installation position of the wireless AP is marked on the map;
在离线采样阶段步骤如下:The steps in the offline sampling phase are as follows:
1.处理离线地图,划分离线地图上面的点,每间隔一米划分一个坐标点,总计有n个点,那么第i个点的训练元组标记就为i;1. Process the offline map, divide the points on the offline map, divide a coordinate point every one meter, there are n points in total, then the training tuple of the i-th point is marked as i;
2.在部署有WiFi网络的环境中,手持不同型号的移动终端到达特定位置,停止20-60s,以收集该位置的WiFi指纹特征,收集的指纹为:移动终端通过安装采样APP调用系统API来收集周边部署的信号强度RSSI信息并发送到定位服务器,定位服务器将以上数据存储至离线数据库,每一个坐标点(Xi,Yi)都记作为一个训练元组,对每一个训练元组赋一个标号,记为Ai,之后每一个在(Xi,Yi)处所测得的RSSI值i为第i个点,j为在该点处测得的第j组数据,都属于Ai训练元组。每一条数据记为移动终端与无线AP具体布置方式见图1;2. In an environment where a WiFi network is deployed, hold different types of mobile terminals to a specific location, and stop for 20-60s to collect the WiFi fingerprint characteristics of the location. The fingerprints collected are: the mobile terminal calls the system API by installing the sampling APP. Collect the signal strength RSSI information deployed around and send it to the positioning server. The positioning server stores the above data in the offline database. Each coordinate point (X i , Y i ) is recorded as a training tuple, and each training tuple is assigned a A label, denoted A i , and then each RSSI value measured at (X i ,Y i ) i is the i-th point, and j is the j-th group of data measured at this point, all of which belong to the A i training tuple. Each piece of data is recorded as The specific arrangement of the mobile terminal and the wireless AP is shown in Figure 1;
3.实际测量得到停车场路线,将路线图绘制在坐标系中,将存储的训练元组预先排序并安排在搜索树中;3. The parking lot route is obtained by actual measurement, the route map is drawn in the coordinate system, and the stored training tuples are pre-sorted and arranged in the search tree;
过滤阶段通过过滤算法,过滤掉离线数据库中的无用信息:The filtering stage filters out the useless information in the offline database through the filtering algorithm:
1.求取每一个训练元组的平均向量,计算公式如下:1. Find the average vector of each training tuple, the formula is as follows:
注:m为每个元组内向量的个数; Note: m is the number of vectors in each tuple;
2.在每一个训练元组中删除与平均向量相差30个单位的欧几里得距离的向量,欧几里得距离计算公式如下:2. In each training tuple, delete the vector with a Euclidean distance that is 30 units away from the average vector. The Euclidean distance is calculated as follows:
3.将其余向量存入离线数据库中;3. Store the remaining vectors in the offline database;
在线实时定位阶段,对于任意待定位终端,进入该无线部署区域,并连接上WiFi,安装定位APP,具体步骤如下:In the online real-time positioning stage, for any terminal to be located, enter the wireless deployment area, connect to WiFi, and install the positioning APP. The specific steps are as follows:
1.移动终端进入该无线部署区域后,定位APP采集周边的无线AP的信号强度RSSI值,将其发送到定位服务器;1. After the mobile terminal enters the wireless deployment area, the positioning APP collects the signal strength RSSI value of the surrounding wireless APs and sends it to the positioning server;
2.定位服务器程序将3-5s缓存的RSSI,作为待匹配识别的特征,记为向量S=(b1,b2,b3,…,bn);2. The positioning server program takes the RSSI cached for 3-5s as the feature to be matched and identified, and denote it as a vector S=(b 1 , b 2 , b 3 ,...,b n );
3.维护一个大小为1000训练元组且按曼哈顿距离由小到大排序的优先级队列,用于存储最近邻训练元组,曼哈顿距离公式为:3. Maintain a priority queue with a size of 1000 training tuples sorted by Manhattan distance from small to large to store the nearest neighbor training tuples. The Manhattan distance formula is:
4.随机从训练元组集中选取1000个元组作为初始的最近邻训练元组,分别计算测试元组到这1000个训练元组的曼哈顿距离,将训练元组标号、坐标和曼哈顿距离存入优先级队列;4. Randomly select 1000 tuples from the training tuple set as the initial nearest neighbor training tuples, calculate the Manhattan distance from the test tuple to the 1000 training tuples, and store the training tuple label, coordinates and Manhattan distance into priority queue;
5.遍历训练元组集,计算当前训练元组与测试元组的曼哈顿距离,将所得距离D与优先级队列中的最大距离Dmax进行比较,若D≥Dmax,则舍弃该元组,遍历下一个元组;若D<Dmax,删除优先级队列中最大距离的元组,将当前训练元组存入优先级队列;5. Traverse the training tuple set, calculate the Manhattan distance between the current training tuple and the test tuple, and compare the obtained distance D with the maximum distance D max in the priority queue. If D ≥ D max , discard the tuple, Traverse the next tuple; if D < D max , delete the tuple with the largest distance in the priority queue, and store the current training tuple in the priority queue;
6.遍历完毕,统计优先级队列中每个训练元组出现的次数,并将出现次数最多的训练元组作为测试元组的类别,该训练元组对应的坐标点即作为待定位的移动终端所处位置的坐标点。6. After the traversal is completed, count the number of occurrences of each training tuple in the priority queue, and use the training tuple with the most occurrences as the category of the test tuple, and the coordinate point corresponding to the training tuple is the mobile terminal to be located. The coordinate point of the location.
传统的WKNN定位算法为,离线阶段,布置n个AP,将地图坐标化(假定共有m个点),每一个坐标点处测得多组n个AP的信号值,然后求得n个AP分别在该点处的加权平均值,此n组数据作为一个n维向量,唯一标识该点(该坐标与n维向量一一对应),存入数据库;在线阶段,测得n个AP在该点在某坐标点处的信号值,与离线数据库匹配,得出该点的坐标值。本发明与原先加权求取平均值的方法不同,在(Xi,Yi)点处测得的所有数据标识该点。求取每一个训练元组的平均向量,在每一个训练元组中取与平均向量的欧几里得距离相差在30个单位以内的向量,舍弃其余向量,存入离线数据库内,过滤处理时也可以使用曼哈顿距离或其它距离度量;在线定位时移动终端在(X,Y)处测得的数据为向量S=(b1,b2,b3,…,bn),计算S与的几何距离,对几何距离进行排序,取前1000组数据,统计每个训练元组出现的次数,出现次数最多的训练元组即为该点的训练元组,最后通过该训练元组求出该点的坐标。The traditional WKNN positioning algorithm is, in the offline stage, arrange n APs, coordinate the map (assuming there are m points in total), measure the signal values of multiple groups of n APs at each coordinate point, and then obtain the n APs respectively. The weighted average at this point, the n sets of data are used as an n-dimensional vector to uniquely identify the point (the coordinates are in one-to-one correspondence with the n-dimensional vector) and stored in the database; in the online stage, n APs are measured at this point The signal value at a certain coordinate point is matched with the offline database, and the coordinate value of this point is obtained. The present invention is different from the original method of obtaining the average value by weighting, and all data measured at the point (X i , Y i ) identify the point. Obtain the average vector of each training tuple, and in each training tuple, take the vector whose Euclidean distance from the average vector is within 30 units, discard the remaining vectors, and store them in the offline database. Manhattan distance or other distance measures can also be used; the data measured by the mobile terminal at (X, Y) during online positioning is a vector S=(b 1 , b 2 , b 3 , . . . , bn ), calculate S and The geometric distance is sorted, the first 1000 sets of data are taken, the number of occurrences of each training tuple is counted, the training tuple with the most occurrences is the training tuple of the point, and finally the training tuple is used to obtain the coordinates of this point.
本发明通过划分组元的方法,通过多标识的方法,利用多组数据来标识每一个坐标点,摒弃现有方法中求取平均值的方法,减小了误差,提高了定位的精准度。另外根据训练元组的向量与平均向量的欧几里德距离对离线数据库进行过滤处理,去除了离线数据库中无用的向量,减少了计算量和计算误差,进一步提高了本发明的精准度。通过欧几里德距离对离线数据库进行过滤处理,满足误差要求,同时降低了时间复杂度。The invention uses the method of dividing the components and the method of multiple identification, and uses multiple sets of data to identify each coordinate point, and abandons the method of obtaining the average value in the existing method, thereby reducing the error and improving the positioning accuracy. In addition, the offline database is filtered according to the Euclidean distance between the vector of the training tuple and the average vector, which removes useless vectors in the offline database, reduces the amount of calculation and calculation error, and further improves the accuracy of the present invention. The offline database is filtered through Euclidean distance to meet the error requirements and reduce the time complexity.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710538630.8A CN107290714B (en) | 2017-07-04 | 2017-07-04 | A positioning method based on multi-identity fingerprint positioning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710538630.8A CN107290714B (en) | 2017-07-04 | 2017-07-04 | A positioning method based on multi-identity fingerprint positioning |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107290714A CN107290714A (en) | 2017-10-24 |
CN107290714B true CN107290714B (en) | 2020-02-21 |
Family
ID=60100121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710538630.8A Active CN107290714B (en) | 2017-07-04 | 2017-07-04 | A positioning method based on multi-identity fingerprint positioning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107290714B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107886758A (en) * | 2017-10-30 | 2018-04-06 | 广州小鹏汽车科技有限公司 | A kind of intelligent car-searching method and system based on WIFI |
CN108828643B (en) * | 2018-04-25 | 2022-04-29 | 长安大学 | An indoor and outdoor seamless positioning system and method based on grey prediction model |
CN110267209B (en) * | 2019-06-28 | 2021-09-10 | 深圳数位传媒科技有限公司 | Indoor positioning method and device based on WiFi longitude and latitude |
CN111246378B (en) * | 2020-01-10 | 2021-08-20 | 北京腾文科技有限公司 | Navigation method based on iBeacon Bluetooth positioning and related components |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010197049A (en) * | 2009-02-20 | 2010-09-09 | Nippon Telegr & Teleph Corp <Ntt> | System for estimating position and device for measuring reference data |
CN103200678B (en) * | 2013-04-09 | 2016-01-13 | 南京信息工程大学 | The Android device WiFi indoor orientation method of position-based algorithm for recognizing fingerprint |
CN103297924B (en) * | 2013-05-24 | 2016-03-02 | 上海交通大学 | Based on novel location fingerprint method for designing and the indoor locating system of channel estimating |
CN104185275B (en) * | 2014-09-10 | 2017-11-17 | 北京航空航天大学 | A kind of indoor orientation method based on WLAN |
CN106879065A (en) * | 2015-12-11 | 2017-06-20 | 中南大学 | A Wi-Fi Indoor Positioning Method Based on Improved WKNN |
CN105894177B (en) * | 2016-03-25 | 2020-12-15 | 国家电网公司 | A risk analysis and evaluation method for power equipment operation based on decision tree algorithm |
CN106507475B (en) * | 2016-11-14 | 2019-07-16 | 华南理工大学 | Indoor area WiFi positioning method and system based on EKNN |
CN106792554A (en) * | 2016-11-23 | 2017-05-31 | 长安大学 | A kind of localization method based on Dual Matching fingerprint location technology |
CN106646338B (en) * | 2016-12-07 | 2019-07-16 | 华南理工大学 | A kind of quickly accurate indoor orientation method |
CN106597370B (en) * | 2016-12-09 | 2019-11-19 | 厦门大学嘉庚学院 | A kind of indoor wireless positioning method based on RFID |
CN106793075A (en) * | 2016-12-21 | 2017-05-31 | 武汉大学 | A kind of WiFi indoor orientation methods based on domain cluster |
CN106851571B (en) * | 2017-01-20 | 2020-07-28 | 华南理工大学 | Decision tree-based rapid KNN indoor WiFi positioning method |
-
2017
- 2017-07-04 CN CN201710538630.8A patent/CN107290714B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107290714A (en) | 2017-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111061821B (en) | Low-voltage distribution network topology verification method and system based on improved k-value clustering algorithm | |
CN108536851B (en) | A User Identity Recognition Method Based on Similarity Comparison of Movement Trajectories | |
CN107290714B (en) | A positioning method based on multi-identity fingerprint positioning | |
CN107071743B (en) | Rapid KNN indoor WiFi positioning method based on random forest | |
CN104185275B (en) | A kind of indoor orientation method based on WLAN | |
CN102111872B (en) | Location method and device based on fingerprint location technology | |
CN106714109B (en) | Update method of WiFi fingerprint database based on crowdsourcing data | |
CN104302000B (en) | The indoor orientation method of correlation is indicated based on signal receiving strength | |
CN106851571B (en) | Decision tree-based rapid KNN indoor WiFi positioning method | |
CN106131959B (en) | A kind of dual-positioning method divided based on Wi-Fi signal space | |
CN105657823B (en) | WIFI indoor weighted K-nearest neighbor localization algorithm based on main feature extraction of kernel function | |
CN109511085B (en) | A UWB Fingerprint Location Method Based on MeanShift and Weighted k-Nearest Neighbor Algorithm | |
CN106707233A (en) | Multi-side positioning method and multi-side positioning device based on outlier detection | |
CN104754735B (en) | Localization method based on location fingerprint storehouse | |
CN101620270A (en) | Wireless location method based on cluster-fusion | |
CN109348416B (en) | Fingerprint indoor positioning method based on bipartite k-means | |
CN106646339A (en) | Online matching and positioning method in wireless position fingerprint indoor positioning | |
CN110636437A (en) | An Auxiliary Positioning Method Based on Fingerprint Pairs | |
CN110430578A (en) | The method for realizing cell Azimuth prediction based on mobile terminal data | |
CN110458205A (en) | An improved PCA clustering method based on WLAN indoor positioning | |
CN111866912A (en) | Time-space-based traffic area classification and analysis method | |
CN112004233B (en) | A network planning method based on big data mining | |
CN109121083B (en) | Indoor positioning method based on fingerprint similarity of AP (Access Point) sequence | |
CN104683953B (en) | Indoor WLAN based on SimRank Similar Composite Systems neighborhood graph structure positions network-building method | |
CN105792138B (en) | The positioning of indoor WLAN user and behavior analysis method based on line segment density |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |