一种室内定位方法、装置、设备及存储介质An indoor positioning method, device, equipment and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请基于申请号为202011253132.7,申请日为2020年11月11日,申请名称为“一种室内定位方法、装置、设备及存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is based on the Chinese patent application with the application number of 202011253132.7, the application date is November 11, 2020, and the application title is "An indoor positioning method, device, equipment and storage medium", and claims the priority of the Chinese patent application , the entire content of the Chinese patent application is hereby incorporated by reference into the present application.
技术领域technical field
本申请定位领域,尤其涉及一种室内定位方法、装置、设备及存储介质。The present application is in the field of positioning, and in particular, relates to an indoor positioning method, apparatus, device, and storage medium.
背景技术Background technique
随着城市经济、文化发展和人口的快速增长,各类物联网技术的出现对大众生活和行业发展带来了改变,人们对室内定位的需求也越来越高。但由于室内环境屏蔽卫星信号,使得常见的卫星导航定位技术无法在室内环境中使用,常见的卫星***例如:全球定位***(Global Positioning System,GPS)、北斗***等。With the rapid growth of urban economy, culture and population, the emergence of various Internet of Things technologies has brought changes to public life and industry development, and people's demand for indoor positioning is also increasing. However, due to the shielding of satellite signals in the indoor environment, common satellite navigation and positioning technologies cannot be used in the indoor environment. Common satellite systems such as Global Positioning System (GPS), Beidou system, etc.
目前,室内定位的方法经常使用无线网络指纹技术融合多传感器的方案进行定位。由于无线路由器发射的信号强度与距离的关系复杂化,难以用函数拟合两者关系,无线信号强度存在自身不稳定性问题,因此,根据现有WI-FI指纹定位方案得到位置信息常常不准确。At present, indoor positioning methods often use wireless network fingerprint technology to integrate multi-sensor solutions for positioning. Due to the complicated relationship between the signal strength and the distance transmitted by the wireless router, it is difficult to use a function to fit the relationship between the two, and the wireless signal strength has its own instability problem. Therefore, the location information obtained according to the existing WI-FI fingerprint positioning scheme is often inaccurate .
申请内容Application content
为解决上述技术问题,本申请实施例提供了一种室内定位方法、装置、 设备及存储介质。To solve the above technical problems, embodiments of the present application provide an indoor positioning method, apparatus, device, and storage medium.
第一方面,本申请实施例提供了一种室内定位方法,应用于定位服务器,方法包括:In a first aspect, an embodiment of the present application provides an indoor positioning method, which is applied to a positioning server, and the method includes:
接收定位终端的定位请求信息,所述定位请求信息包括第一信号强度序列,其中,所述第一信号强度序列包括多个接入点的信号强度值;receiving positioning request information of a positioning terminal, where the positioning request information includes a first signal strength sequence, wherein the first signal strength sequence includes signal strength values of multiple access points;
从预设指纹数据库中获取所述多个接入点所在的区域内对应多个第一采样点采集到的多个第二信号强度序列,其中,所述第二信号强度序列包括多个所述接入点在第一预设采样周期内的若干采样时刻的信号强度值;A plurality of second signal strength sequences collected corresponding to a plurality of first sampling points in the area where the multiple access points are located are obtained from a preset fingerprint database, wherein the second signal strength sequence includes a plurality of the Signal strength values of the access point at several sampling moments within the first preset sampling period;
确定所述多个接入点所在所述区域的信号强度比值;determining the signal strength ratio of the area where the multiple access points are located;
根据所述第一信号强度序列、每个所述第一采样点对应的多个所述第二信号强度序列和所述信号强度比值对应的定位算法,计算所述定位终端的位置信息。Calculate the position information of the positioning terminal according to the first signal strength sequence, the plurality of second signal strength sequences corresponding to each of the first sampling points, and the positioning algorithm corresponding to the signal strength ratio.
在第一方面的一些可实现方式中,所述确定所述多个接入点所在所述区域的信号强度比值,包括:根据每个所述接入点在第一预设采样周期内的多个采样时刻的信号强度值,确定每个所述接入点的信号强度均值;确定大于或等于预设信号强度阈值的第一信号强度均值和小于所述预设信号强度阈值的第二信号强度均值;根据所述第一信号强度均值、所述第二信号强度均值和所述接入点的数量,确定所述信号强度比值。In some implementation manners of the first aspect, the determining the signal strength ratio of the area where the multiple access points are located includes: according to the multiple access points of each access point in the first preset sampling period The signal strength values of each sampling time are determined, and the mean signal strength of each access point is determined; the first mean signal strength greater than or equal to the preset signal strength threshold and the second signal strength less than the preset signal strength threshold are determined mean value; the signal strength ratio is determined according to the first signal strength mean value, the second signal strength mean value and the number of the access points.
在第一方面的一些可实现方式中,所述根据所述第一信号强度序列、每个所述第一采样点对应的多个所述第二信号强度序列和所述信号强度比值对应的定位算法,计算所述定位终端的位置信息,包括:获取每个所述第一采样点对应的多个所述第二信号强度序列与所述第一信号强度序列的欧氏距离,得到对应每个所述第一采样点第一欧氏距离集合;根据至少一个所述第一欧氏距离集合和所述信号强度比值对应的定位算法,计算所述定位终端的位置信息。In some implementations of the first aspect, the positioning according to the first signal strength sequence, the plurality of second signal strength sequences corresponding to each of the first sampling points, and the signal strength ratio value an algorithm, calculating the position information of the positioning terminal, comprising: acquiring the Euclidean distances between the second signal strength sequences corresponding to each of the first sampling points and the first signal strength sequence, and obtaining the corresponding Euclidean distances for each The first set of Euclidean distances for the first sampling point; the location information of the positioning terminal is calculated according to at least one positioning algorithm corresponding to the first set of Euclidean distances and the signal strength ratio.
在第一方面的一些可实现方式中,当所述信号强度比值在第一预设信号强度比值范围时,所述计算所述定位终端的位置信息,包括:从多个所述第一欧氏距离集合的欧氏距离中确定前M个最小的欧氏距离对应的第三信号强度序列,其中,M为正整数;根据预设的误差剔除算法,剔除所述第一信号强度序列中的干扰信号强度值,得到第四信号强度序列,以及分别剔除M个所述第三信号强度序列中的干扰信号强度值,对应得到M个第五信号强度序列;根据所述第四信号强度序列、每个所述第五信号序列和预设指纹匹配算法,进行定位解算,当解算得到唯一位置信息时,确定所述定位终端的第一位置信息,将所述第一位置信息作为所述定位终端的位置信息。In some implementations of the first aspect, when the signal strength ratio is within a first preset signal strength ratio range, the calculating the location information of the positioning terminal includes: selecting from a plurality of the first Euclidean values Determine the third signal strength sequence corresponding to the first M smallest Euclidean distances from the Euclidean distances of the distance set, where M is a positive integer; according to a preset error elimination algorithm, the interference in the first signal strength sequence is eliminated signal strength value, obtain a fourth signal strength sequence, and remove M interfering signal strength values in the third signal strength sequence respectively, and correspondingly obtain M fifth signal strength sequences; according to the fourth signal strength sequence, each The fifth signal sequence and the preset fingerprint matching algorithm are used to perform positioning calculation, and when unique position information is obtained from the calculation, the first position information of the positioning terminal is determined, and the first position information is used as the positioning The location information of the terminal.
在第一方面的一些可实现方式中,当所述信号强度比值在第二预设信号强度比值范围时,所述计算所述定位终端的位置信息,包括:对每个所述第一采样点的第一欧氏距离集合划分为预设K个子集,得到每个所述第一采样点对应的K个第二欧氏距离集合,其中,K为正整数;获取每个所述第二欧氏距离集合的区间分配因子;根据每个所述第一采样点对应的K个第二欧氏距离集合的区间分配因子,确定每个所述第一采样点的位置权重;获取每个所述第一采样点的位置信息;根据每个所述第一采样点的位置信息和所述第一采样点的位置权重,确定所述定位终端的第二位置信息,将所述第二位置信息作为所述定位终端的位置信息。In some implementations of the first aspect, when the signal strength ratio is within a second preset signal strength ratio range, the calculating the location information of the positioning terminal includes: for each of the first sampling points The first Euclidean distance set is divided into preset K subsets, and K second Euclidean distance sets corresponding to each of the first sampling points are obtained, where K is a positive integer; obtain each of the second Euclidean distance sets The interval allocation factor of the Euclidean distance set; according to the interval allocation factor of the K second Euclidean distance sets corresponding to each of the first sampling points, determine the position weight of each of the first sampling points; obtain each of the The position information of the first sampling point; according to the position information of each first sampling point and the position weight of the first sampling point, determine the second position information of the positioning terminal, and use the second position information as The location information of the positioning terminal.
在第一方面的一些可实现方式中,所述获取每个所述第二欧氏距离集合的区间分配因子,包括:确定所述第二欧氏距离集合中信号强度值的均值、最小值和方差;根据所述均值、所述最小值、所述方差和子集数量K,计算得到所述第二欧氏距离集合的区间分配因子。In some implementations of the first aspect, the obtaining an interval allocation factor for each of the second Euclidean distance sets includes: determining a mean value, a minimum value and a minimum value of signal strength values in the second Euclidean distance set. Variance; according to the mean value, the minimum value, the variance and the number of subsets K, the interval allocation factor of the second Euclidean distance set is obtained by calculating.
在第一方面的一些可实现方式中,当所述信号强度比值在第三预设信号强度比值范围时,所述计算所述定位终端的位置信息,包括:分别获取 所述第一位置信息和所述第二位置信息;根据所述信号强度比值分别确定所述第一位置信息的第一权重值和所述第二位置信息的第二权重值;根据所述第一位置信息的第一权重值和所述第二位置信息的第二权重值,计算得到所述定位终端的第三位置信息,将所述第三位置信息作为所述定位终端的位置信息。In some implementations of the first aspect, when the signal strength ratio is within a third preset signal strength ratio range, the calculating the position information of the positioning terminal includes: acquiring the first position information and the second position information; the first weight value of the first position information and the second weight value of the second position information are respectively determined according to the signal strength ratio; the first weight according to the first position information value and the second weight value of the second position information, the third position information of the positioning terminal is obtained by calculation, and the third position information is used as the position information of the positioning terminal.
在第一方面的一些可实现方式中,在所述接收定位终端的定位请求信息之前,所述方法还包括:接收每个采样点按照预设采样频率采集的多个接入点的信号强度值,其中,所述预设采样频率根据所述区域内当前的人流密度确定;根据每个采样点按照预设采样频率采集的多个接入点的信号强度值,构建所述预设指纹数据库。In some implementations of the first aspect, before the receiving the positioning request information of the positioning terminal, the method further includes: receiving signal strength values of multiple access points collected by each sampling point according to a preset sampling frequency , wherein the preset sampling frequency is determined according to the current density of people in the area; the preset fingerprint database is constructed according to the signal strength values of multiple access points collected at each sampling point according to the preset sampling frequency.
第二方面,本申请实施例提供了一种室内定位装置,包括:In a second aspect, an embodiment of the present application provides an indoor positioning device, including:
接收模块,配置为接收定位终端的定位请求信息,所述定位请求信息包括第一信号强度序列,其中,所述第一信号强度序列包括多个接入点的信号强度值;a receiving module, configured to receive positioning request information of a positioning terminal, where the positioning request information includes a first signal strength sequence, wherein the first signal strength sequence includes signal strength values of multiple access points;
获取模块,配置为从预设指纹数据库中获取所述多个接入点所在的区域内对应多个第一采样点采集到的多个第二信号强度序列,其中,所述第二信号强度序列包括多个所述接入点在第一预设采样周期内的若干采样时刻的信号强度值;an acquisition module, configured to acquire, from a preset fingerprint database, a plurality of second signal strength sequences collected from a plurality of first sampling points in the region where the plurality of access points are located, wherein the second signal strength sequences Including the signal strength values of a plurality of the access points at several sampling moments within the first preset sampling period;
定位模块,配置为确定所述多个接入点所在所述区域的信号强度比值;a positioning module, configured to determine the signal strength ratio of the area where the multiple access points are located;
计算模块,配置为根据所述第一信号强度序列、每个所述第一采样点对应的多个所述第二信号强度序列和所述信号强度比值对应的定位算法,计算所述定位终端的位置信息。The calculation module is configured to calculate the positioning algorithm of the positioning terminal according to the first signal strength sequence, the plurality of second signal strength sequences corresponding to each of the first sampling points, and the positioning algorithm corresponding to the signal strength ratio. location information.
第三方面,提供了一种室内定位设备,包括:处理器和配置为存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器配置为运行所述计算机程序时,执行前述方法的步骤。In a third aspect, an indoor positioning device is provided, comprising: a processor and a memory configured to store a computer program executable on the processor, wherein the processor is configured to execute the aforementioned method when running the computer program A step of.
第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,其中,该计算机程序被处理器执行时实现前述方法的步骤。In a fourth aspect, there is provided a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the aforementioned method.
本申请公开了一种室内定位方法,在根据定位终端的定位请求信息为定位终端进行定位计算时,首先,通过根据定位请求信息中包括的接入点在预设采样周期内的若干采样时刻的信号强度值,确定接入点所在区域的信号强度比值,接下来,可以根据信号强度比值对应的定位算法,结合定位请求信息包括第一信号强度序列和每个所述第一采样点对应的多个所述第二信号强度序列,对定位终端进行定位计算,得到定位终端的位置信息。由于进行定位计算时,对应不同的信号强度比值,采用不同的定位计算方法,有效避免了因信号自身的不稳定性所产生的定位计算的结果不准确问题,提高了定位计算的精度和准确性。The present application discloses an indoor positioning method. When performing positioning calculation for the positioning terminal according to the positioning request information of the positioning terminal, firstly, according to the access point included in the positioning request information at several sampling times within a preset sampling period The signal strength value is used to determine the signal strength ratio of the area where the access point is located. Next, according to the positioning algorithm corresponding to the signal strength ratio, combined with the positioning request information, the first signal strength sequence and the number of samples corresponding to each of the first sampling points can be included. The second signal strength sequence is obtained, and the positioning calculation is performed on the positioning terminal to obtain the position information of the positioning terminal. Different positioning calculation methods are used for different signal strength ratios during positioning calculation, which effectively avoids the problem of inaccurate positioning calculation results caused by the instability of the signal itself, and improves the accuracy and accuracy of positioning calculation. .
附图说明Description of drawings
图1为本申请实施例提供的一种室内定位方法的流程示意图;1 is a schematic flowchart of an indoor positioning method according to an embodiment of the present application;
图2为本申请实施例提供的另一种室内定位方法的流程示意图;2 is a schematic flowchart of another indoor positioning method provided by an embodiment of the present application;
图3为本申请实施例提供的一种室内定位装置的结构示意图;3 is a schematic structural diagram of an indoor positioning device according to an embodiment of the present application;
图4为本申请实施例提供的一种室内定位设备的结构示意图。FIG. 4 is a schematic structural diagram of an indoor positioning device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将详细描述本申请的各个方面的特征和示例性实施例,为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及具体实施例,对本申请进行进一步详细描述。应理解,此处所描述的具体实施例仅意在解释本申请,而不是限定本申请。对于本领域技术人员来说,本申请可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本申请的示例来提供对本申请更好的理解。The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. It will be apparent to those skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating examples of the present application.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用 来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprises" does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases.
随着城市经济、文化发展和人口的快速增长,各类物联网技术的出现对大众生活和行业发展带来了改变,人们对室内定位的需求也越来越高。但由于室内环境屏蔽卫星信号,使得常见的卫星导航定位技术无法在室内环境中使用,常见的卫星***例如:全球定位***(Global Positioning System,GPS)、北斗***等。With the rapid growth of urban economy, culture and population, the emergence of various Internet of Things technologies has brought changes to public life and industry development, and people's demand for indoor positioning is also increasing. However, due to the shielding of satellite signals in the indoor environment, common satellite navigation and positioning technologies cannot be used in the indoor environment. Common satellite systems such as Global Positioning System (GPS), Beidou system, etc.
现阶段,随着通讯技术的发展,出现了各类室内定位技术,例如:Wi-Fi(无线网络)的室内定位技术、超宽带定位技术、发光二极管(Light Emitting Diode,LED)可见光通信定位技术等。就目前来看,基于Wi-Fi信号强度Wi-Fi指纹技术凭借可移植性强、操作方便、价格低廉的优势,使得其在众多的室内定位技术方案中脱颖而出。At this stage, with the development of communication technology, various indoor positioning technologies have emerged, such as: Wi-Fi (wireless network) indoor positioning technology, ultra-wideband positioning technology, Light Emitting Diode (LED) visible light communication positioning technology Wait. At present, Wi-Fi fingerprint technology based on Wi-Fi signal strength has the advantages of strong portability, convenient operation and low price, which makes it stand out among many indoor positioning technology solutions.
目前,室内定位的方法经常使用无线网络指纹技术融合多传感器的方案进行定位。当接收器距离无线路由器的位置越近,接收器所接收到的信号强度越强,反之越弱。At present, indoor positioning methods often use wireless network fingerprint technology to integrate multi-sensor solutions for positioning. The closer the receiver is to the wireless router, the stronger the signal strength received by the receiver, and vice versa.
但是,使用现有的Wi-Fi指纹定位方案得到位置信息常常不准确,导致 位置信息不准确的原因,例如:无线路由器发射的信号强度与距离的关系复杂化,难以用函数拟合两者关系;或者无线信号强度存在自身不稳定性问题;或者现有的例如制作工艺限制、通信电压不稳定、信号传播环境干扰等原因;又或者如室内人员流动对Wi-Fi信号强度值产生了干扰等等。However, the location information obtained using the existing Wi-Fi fingerprint positioning scheme is often inaccurate. The reasons for the inaccurate location information, for example, the relationship between the signal strength and the distance transmitted by the wireless router is complicated, and it is difficult to use a function to fit the relationship between the two. ; Or the wireless signal strength has its own instability problem; or existing reasons such as manufacturing process limitations, unstable communication voltage, signal propagation environment interference, etc.; Wait.
针对于此,本申请实施例提供了一种室内定位方法、装置、设备和计算机可读存储介质,对于定位请求所在区域,可以根据区域内在不同信号强度时,对应使用不同的定位计算方法,以提高定位计算的准确性。In response to this, the embodiments of the present application provide an indoor positioning method, apparatus, device, and computer-readable storage medium. For the region where the positioning request is located, different positioning calculation methods can be used correspondingly according to different signal strengths in the region, so as to Improve the accuracy of positioning calculations.
下面结合附图对本申请实施例所提供的室内定位方法进行介绍。The indoor positioning method provided by the embodiments of the present application will be introduced below with reference to the accompanying drawings.
图1示出了本申请一个实施例提供的室内定位方法的流程示意图。如图1所示,该方法可以包括S110-S140:FIG. 1 shows a schematic flowchart of an indoor positioning method provided by an embodiment of the present application. As shown in FIG. 1, the method may include S110-S140:
S110、接收定位终端的定位请求信息。S110. Receive positioning request information of the positioning terminal.
在一些实施例中,定位请求信息包括第一信号强度序列,第一信号强度序列包括多个接入点的信号强度值。In some embodiments, the location request information includes a first sequence of signal strengths including signal strength values for a plurality of access points.
在本申请实施例中,定位终端所在的区域预先设置了多个接入点(Access Point,AP)。定位终端可以接收到每个接入点的信号强度值,定位终端可以将接收到的多个接入点的信号强度值组成第一信号强度序列,并将第一信号强度序列放入定位请求信息中,以用于定位服务器根据定位请求信息计算定位请求终端的位置信息。In this embodiment of the present application, multiple access points (Access Point, AP) are preset in the area where the positioning terminal is located. The positioning terminal can receive the signal strength value of each access point, and the positioning terminal can combine the received signal strength values of multiple access points into a first signal strength sequence, and put the first signal strength sequence into the positioning request information is used for the positioning server to calculate the position information of the positioning requesting terminal according to the positioning request information.
接下来,执行S120。Next, S120 is performed.
S120、从预设指纹数据库中获取多个接入点所在的区域内对应多个第一采样点采集到的多个第二信号强度序列。S120. Acquire, from a preset fingerprint database, multiple second signal strength sequences collected from multiple first sampling points in the region where multiple access points are located.
在一些实施例中,第二信号强度序列包括多个接入点在第一预设采样周期内的若干采样时刻的信号强度值。In some embodiments, the second signal strength sequence includes signal strength values of a plurality of access points at several sampling instants within the first preset sampling period.
可以理解的是,每个接入点都有一个对应的接入标识,例如物理地址。在一些实施例中,定位请求信息中还可以包括每个信号强度值对应接入点 的接入标识,根据接入标识,定位服务器可以预设指纹数据库中获取多个接入点所在的区域内对应多个第一采样点采集到的多个第二信号强度序列,其中,第二信号强度序列包括多个接入点在第一预设采样周期内的若干采样时刻的信号强度值。It can be understood that each access point has a corresponding access identifier, such as a physical address. In some embodiments, the location request information may further include an access identifier of the access point corresponding to each signal strength value. According to the access identifier, the location server may preset the fingerprint database to obtain the areas where the multiple access points are located. Corresponding to multiple second signal strength sequences collected from multiple first sampling points, wherein the second signal strength sequence includes signal strength values of multiple access points at several sampling moments within the first preset sampling period.
在一些实施例中,定位服务器可以与每个采样点进行从通信连接,定位服务器可以接收每个采样点按照预设采样频率采集的多个接入点的信号强度值;根据每个采样点按照预设采样频率采集的多个接入点的信号强度值,构建预设指纹数据库。In some embodiments, the positioning server may be in a slave communication connection with each sampling point, and the positioning server may receive signal strength values of multiple access points collected by each sampling point according to a preset sampling frequency; The signal strength values of multiple access points collected at the preset sampling frequency are used to construct a preset fingerprint database.
为了避免人员流动对信号强度产生的干扰,在一个示例中,预设采样频率可以根据区域内当前的人流密度确定。也就是说,根据区域内的人流密度可以实时调整每个接入点的预设采样频率,在接收到每个采样点按照预设采样频率采集的多个接入点的信号强度值后,对应每个采样点采集到接入点的信号强度值组成的信号强度序列保存到预设指纹数据库。对应每个采样点也可以预先设置唯一标识,预设指纹数据库对应每个采样点保存采样点的实际位置信息,例如:经纬度、高度等。In order to avoid interference to the signal strength caused by the flow of people, in an example, the preset sampling frequency may be determined according to the current density of people flow in the area. That is to say, the preset sampling frequency of each access point can be adjusted in real time according to the density of people in the area. After receiving the signal strength values of multiple access points collected by each sampling point according to the preset sampling frequency, the corresponding The signal strength sequence composed of the signal strength values of the access point collected at each sampling point is stored in the preset fingerprint database. A unique identifier can also be preset corresponding to each sampling point, and the preset fingerprint database corresponding to each sampling point stores the actual location information of the sampling point, such as: latitude, longitude, altitude, etc.
在本申请实施例中,由于根据区域内人流密度动态调整预设采样频率,可以有效降低采样点的功耗,提升采样点的工作有效性,同时在区域内人流密度增加后,会加快采样频率,可以提高定位准确性和定位精度,符合现实场景的应用,提高***的鲁棒性。In the embodiment of the present application, since the preset sampling frequency is dynamically adjusted according to the population density in the area, the power consumption of the sampling point can be effectively reduced, and the working efficiency of the sampling point can be improved. , can improve the positioning accuracy and positioning accuracy, in line with the application of real scenarios, improve the robustness of the system.
可以理解的是,在构建指纹数据初期,可以先按照相同时间间隔,对预设指纹数据库进行初步构建。It can be understood that, in the initial stage of constructing the fingerprint data, the preset fingerprint database can be initially constructed according to the same time interval.
在得到多个接入点所在的区域内对应多个第一采样点采集到的多个第二信号强度序列之后,接下来可以执行S130。After obtaining the multiple second signal strength sequences collected by the multiple first sampling points in the area where the multiple access points are located, S130 may be performed next.
S130、确定多个接入点所在区域的信号强度比值。S130. Determine the signal strength ratios of the areas where the multiple access points are located.
在一些实施例中,信号强度的比值可以是接收信号强度指示(Received Signal Strength Indicator,RSSI)、参考信号接收功率(Reference Signal Received Power,RSRP)或参考信号接收质量(Reference Signal Received Quality,RSRQ)中的一种。In some embodiments, the ratio of signal strengths may be Received Signal Strength Indicator (RSSI), Reference Signal Received Power (RSRP), or Reference Signal Received Quality (RSRQ) one of the.
获取信号强度比值可以包括S131-S133。Obtaining the signal strength ratio may include S131-S133.
S131、根据每个接入点在第一预设采样周期内的多个采样时刻的信号强度值,确定每个接入点的信号强度均值。S131. Determine the mean value of the signal strength of each access point according to the signal strength values of each access point at multiple sampling times within the first preset sampling period.
S132、确定大于或等于预设信号强度阈值的第一信号强度均值和小于预设信号强度阈值的第二信号强度均值。S132. Determine a first mean signal strength greater than or equal to a preset signal strength threshold and a second mean signal strength less than a preset signal strength threshold.
S133、根据第一信号强度均值、第二信号强度均值和接入点的数量,确定信号强度比值。由于简单的求取比值操作容易增加因采集误差导致的误差积累,所以使用均值,利用接入点的均值计算得到信号强度比,可以降低因信号强度采集导致的误差积累,提高定位计算的准确性。在本申请实施例S133中,计算信号强度比值例如可以参考公式(1)。S133. Determine a signal strength ratio according to the first signal strength mean value, the second signal strength mean value, and the number of access points. Since the simple operation of calculating the ratio is easy to increase the error accumulation caused by the acquisition error, the average value is used to calculate the signal strength ratio by using the mean value of the access point, which can reduce the error accumulation caused by the signal strength acquisition and improve the accuracy of positioning calculation. . In the embodiment S133 of the present application, the calculation of the signal strength ratio may refer to formula (1), for example.
其中,θ为信号强度比,Y为接入点的数量,mp
bh为第一信号强度均值,
为第二信号强度均值。
where θ is the signal strength ratio, Y is the number of access points, mp bh is the mean value of the first signal strength, is the mean value of the second signal strength.
在得到信号强度比值之后,接下来可以执行S140。After the signal strength ratio is obtained, S140 may be performed next.
S140、根据第一信号强度序列、每个第一采样点对应的多个第二信号强度序列和信号强度比值对应的定位算法,计算定位终端的位置信息。S140. Calculate the position information of the positioning terminal according to the first signal strength sequence, the plurality of second signal strength sequences corresponding to each first sampling point, and the positioning algorithm corresponding to the signal strength ratio.
在本申请实施例S140中,计算定位终端的位置信息可以先获取每个第一采样点对应的多个第二信号强度序列与第一信号强度序列的欧氏距离,得到对应每个第一采样点第一欧氏距离集合;然后,根据至少一个第一欧氏距离集合和信号强度比值对应的定位算法,计算定位终端的位置信息。In the embodiment S140 of the present application, the calculation of the position information of the positioning terminal may first obtain the Euclidean distances between a plurality of second signal strength sequences corresponding to each first sampling point and the first signal strength sequence, and obtain corresponding to each first sampling point. point the first Euclidean distance set; then, calculate the position information of the positioning terminal according to the positioning algorithm corresponding to the at least one first Euclidean distance set and the signal strength ratio.
在一些实施例中,第一预设信号强度范围为区域内信号强度比较强时的范围,当信号强度较强时,容易产生粗差,或者人员流动对Wi-Fi信号产 生遮挡对定位精度的影响较大,会造成定位不准确。In some embodiments, the first preset signal strength range is a range when the signal strength in the area is relatively strong. When the signal strength is relatively strong, gross errors are likely to occur, or the Wi-Fi signal is blocked by the flow of people, which affects the positioning accuracy. The impact is large, which will cause inaccurate positioning.
因此,当信号强度比值在第一预设信号强度比值范围时,计算定位终端的位置信息,可以首先从多个第一欧氏距离集合的欧氏距离中确定前M个最小的欧氏距离对应的第三信号强度序列,其中,M为正整数;然后,根据预设的误差剔除算法,剔除第一信号强度序列中的干扰信号强度值,得到第四信号强度序列,以及分别剔除M个第三信号强度序列中的干扰信号强度值,对应得到M个第五信号强度序列;最后,根据第四信号强度序列、每个第五信号序列和预设指纹匹配算法,进行定位解算,当解算得到唯一位置信息时,确定定位终端的第一位置信息,将第一位置信息作为定位终端的位置信息。Therefore, when the signal strength ratio is within the first preset signal strength ratio range, to calculate the position information of the positioning terminal, the first M minimum Euclidean distances may be determined from the Euclidean distances of the first Euclidean distance sets. The third signal strength sequence of , where M is a positive integer; then, according to the preset error elimination algorithm, the interference signal strength values in the first signal strength sequence are eliminated to obtain a fourth signal strength sequence, and the Mth signal strength values are eliminated respectively. For the interfering signal strength values in the three signal strength sequences, M fifth signal strength sequences are correspondingly obtained; finally, according to the fourth signal strength sequence, each fifth signal sequence and the preset fingerprint matching algorithm, the positioning calculation is performed. When the unique position information is calculated, the first position information of the positioning terminal is determined, and the first position information is used as the position information of the positioning terminal.
在一些实施例中,第一预设信号强度比值范围为信号强度较强时,所对应的数值范围,示例性的,例如,第一预设信号强度比值范围大于或等于1.2的数值范围。可以理解的是,第一预设信号强度比值范围可以根据不同区域信号的实际情况具体限定,本申请实施例仅为示例性描述。In some embodiments, the first preset signal strength ratio range is a corresponding numerical range when the signal strength is strong, for example, the first preset signal strength ratio range is greater than or equal to a numerical range of 1.2. It can be understood that, the range of the first preset signal strength ratio may be specifically defined according to actual conditions of signals in different regions, and the embodiments of the present application are only exemplary descriptions.
在一些实施例中,预设的误差剔除算法可以是先计算得到第一信号强度序列与每个第三信号强度序列的误差,以及按照预设提出顺序依次剔除第一信号强度序列第三信号强度序列中的某一信号强度值的对应值,并计算剔除后的误差,若剔除数据后的误差小于剔除数据前的误差,说明剔除数据为干扰值,可以得到更加匹配的第四信号强度序列和第五信号强度序列。In some embodiments, the preset error elimination algorithm may first calculate the error between the first signal strength sequence and each of the third signal strength sequences, and sequentially eliminate the first signal strength sequence and the third signal strength sequence according to the preset order. The corresponding value of a signal strength value in the sequence, and calculate the error after excluding the data. If the error after excluding the data is smaller than the error before excluding the data, it means that the excluding data is an interference value, and a more matching fourth signal strength sequence and Fifth signal strength sequence.
在一些实施例中,对应使用预设的误差剔除算法处理后的序列进行定位解算,当解算得到唯一位置信息时,则得到定位终端的位置信息。若不唯一,则继续使用预设的误差剔除算法,对干扰之进行剔除,并使用预设的误差剔除算法处理后的序列,继续进行定位解算,直到得到唯一的位置信息作为定位终端的位置信息。In some embodiments, the positioning calculation is performed corresponding to the sequence processed by the preset error elimination algorithm, and when the unique position information is obtained through the calculation, the position information of the positioning terminal is obtained. If it is not unique, continue to use the preset error elimination algorithm to eliminate the interference, and use the sequence processed by the preset error elimination algorithm to continue the positioning calculation until the unique position information is obtained as the position of the positioning terminal. information.
通过上述定位计算方法,尤其在Wi-Fi信号强度较强的区域,可以有效避免人员流动的干扰,提高定位精度和准确性。Through the above positioning calculation method, especially in areas with strong Wi-Fi signal strength, the interference of people flow can be effectively avoided, and the positioning accuracy and accuracy can be improved.
在一些实施例中,当信号强度比值在第二预设信号强度比值范围时,计算定位终端的位置信息,可以首先,对每个第一采样点的第一欧氏距离集合划分为预设K个子集,得到每个第一采样点对应的K个第二欧氏距离集合,其中,K为正整数;然后,获取每个第二欧氏距离集合的区间分配因子。In some embodiments, when the signal strength ratio is within the second preset signal strength ratio range, to calculate the position information of the positioning terminal, the first Euclidean distance set of each first sampling point may be divided into preset K obtain K second Euclidean distance sets corresponding to each first sampling point, where K is a positive integer; then, obtain an interval allocation factor for each second Euclidean distance set.
在一些实施例中,第二预设信号强度比值范围为信号强度较弱时,所对应的数值范围,示例性的,例如,第二预设信号强度比值范围小于0.8的数值范围。可以理解的是,第二预设信号强度比值范围可以根据不同区域信号的实际情况具体限定,本申请实施例仅为示例性描述。In some embodiments, the second preset signal strength ratio range is a numerical range corresponding to weak signal strength, for example, the second preset signal strength ratio range is a numerical range less than 0.8. It can be understood that, the range of the second preset signal strength ratio may be specifically defined according to actual conditions of signals in different regions, and the embodiments of the present application are only exemplary descriptions.
在一些实施例中,获取每个第二欧氏距离集合的区间分配因子,可以先确定第二欧氏距离集合中信号强度值的均值、最小值和方差;之后再根据均值、最小值、方差和子集数量K,计算得到第二欧氏距离集合的区间分配因子。In some embodiments, to obtain the interval allocation factor of each second Euclidean distance set, the mean value, minimum value and variance of the signal strength values in the second Euclidean distance set may be determined first; and the number of subsets K, the interval distribution factor of the second Euclidean distance set is calculated.
在一个示例中,区间分配因子例如可以根据公式(2),计算得到。In one example, the interval allocation factor can be calculated according to formula (2), for example.
其中,θ
k为第k个区间的区间分配因子,
为第二欧氏距离集合中信号强度值的均值,min(D)为第二欧氏距离集合中信号强度值的最小值,σ
2D为第二欧氏距离集合中信号强度值的方差,K为子集数量。
Among them, θ k is the interval allocation factor of the kth interval, is the mean of the signal strength values in the second Euclidean distance set, min(D) is the minimum value of the signal strength values in the second Euclidean distance set, σ 2 D is the variance of the signal strength values in the second Euclidean distance set, K is the number of subsets.
接下来,根据每个第一采样点对应的K个第二欧氏距离集合的区间分配因子,确定每个第一采样点的位置权重。Next, according to the interval allocation factors of the K second Euclidean distance sets corresponding to each first sampling point, the position weight of each first sampling point is determined.
在一个示例中,每个第一采样点的位置权重可以根据公式(3)计算得到。In one example, the position weight of each first sampling point can be calculated according to formula (3).
其中,w
n为第n个第一采样点的位置权重,θ
k为第k个区间的区间分配因子,J为第一采样点的数量。
Among them, wn is the position weight of the n -th first sampling point, θ k is the interval allocation factor of the k-th interval, and J is the number of first sampling points.
接下来,获取每个第一采样点的位置信息。Next, the position information of each first sampling point is obtained.
在预设指纹数据库对应每个采样点保存采样点的实际的位置信息,因此,可以根据预设指纹数据库中第一采样点的位置信息,进一步计算定位终端的第二位置信息。The actual position information of the sampling point is stored in the preset fingerprint database corresponding to each sampling point. Therefore, the second position information of the positioning terminal can be further calculated according to the position information of the first sampling point in the preset fingerprint database.
最后,根据每个第一采样点的位置信息和第一采样点的位置权重,确定定位终端的第二位置信息,将第二位置信息作为定位终端的位置信息。Finally, the second position information of the positioning terminal is determined according to the position information of each first sampling point and the position weight of the first sampling point, and the second position information is used as the position information of the positioning terminal.
在一些实施例中,获取第二位置信息例如可以根据公式(4)和公式(5)计算得到。In some embodiments, obtaining the second position information may be calculated according to formula (4) and formula (5), for example.
其中,w
n代表第n个第一采样点的位置权重,x
n代表第n个第一采样点对应的实际位置的x坐标,y
i代表第n个第一采样点对应的实际位置的y坐标。
Among them, w n represents the position weight of the nth first sampling point, xn represents the x coordinate of the actual position corresponding to the nth first sampling point, and yi represents the y of the actual position corresponding to the nth first sampling point coordinate.
为了进一步提升室内定位的精度和准确性,在一些实施例中,当信号强度比值在第三预设信号强度比值范围时,计算定位终端的位置信息,可以首先分别获取第一位置信息和第二位置信息;然后,根据信号强度比值分别确定第一位置信息的第一权重值和第二位置信息的第二权重值;最后,根据第一位置信息的第一权重值和第二位置信息的第二权重值,计算得到定位终端的第三位置信息,将第三位置信息作为定位终端的位置信息。其 中,获得第一位置信息和第二位置信息分别可以参照上述实施例获取第一位置信息和第二位置信息的方法获得,在此不再赘述。In order to further improve the accuracy and accuracy of indoor positioning, in some embodiments, when the signal strength ratio is within the third preset signal strength ratio range, to calculate the position information of the positioning terminal, the first position information and the second position information may be obtained respectively. position information; then, respectively determine the first weight value of the first position information and the second weight value of the second position information according to the signal strength ratio; finally, according to the first weight value of the first position information and the first weight value of the second position information With two weight values, the third position information of the positioning terminal is obtained by calculation, and the third position information is used as the position information of the positioning terminal. Wherein, obtaining the first position information and the second position information can be obtained by referring to the method for obtaining the first position information and the second position information in the above-mentioned embodiment, which will not be repeated here.
在一些实施例中,第三预设信号强度比值范围为信号强度处于均衡状态时,所对应的数值范围,示例性的,例如,第三预设信号强度比值范围大于或等于0.8以及小于1.2的数值范围。可以理解的是,第三预设信号强度比值范围可以根据不同区域信号的实际情况具体限定,本申请实施例仅为示例性描述。In some embodiments, the third preset signal strength ratio range is the corresponding numerical range when the signal strength is in a balanced state. For example, for example, the third preset signal strength ratio range is greater than or equal to 0.8 and less than 1.2. range of values. It can be understood that, the third preset signal strength ratio range may be specifically defined according to actual conditions of signals in different regions, and the embodiments of the present application are only exemplary descriptions.
通过本申请实施例提供的室内定位方法,在根据定位终端的定位请求信息为定位终端进行定位计算时,首先,通过根据定位请求信息中包括的接入点在预设采样周期内的若干采样时刻的信号强度值,确定接入点所在区域的信号强度比值,接下来,可以根据信号强度比值对应的定位算法,结合定位请求信息包括第一信号强度序列和每个所述第一采样点对应的多个所述第二信号强度序列,对定位终端进行定位计算,得到定位终端的位置信息。由于进行定位计算时,对应不同的信号强度比值,采用不同的定位计算方法,有效避免了因信号自身的不稳定性所产生的定位计算的结果不准确问题,提高了定位计算的精度和准确性。尤其是通过分区不同信号强度比值所对应的计算位置信息算法,对于大区域的室内复杂定位场景中,有效降低了Wi-Fi信号区域衰减而带来定位不准确的影响,从而提高了室内定位的定位精度。With the indoor positioning method provided by the embodiment of the present application, when performing positioning calculation for the positioning terminal according to the positioning request information of the positioning terminal, first, according to the access point included in the positioning request information, several sampling moments within the preset sampling period are performed. Then, according to the positioning algorithm corresponding to the signal strength ratio, combined with the positioning request information, the first signal strength sequence and the corresponding first sampling point can be included. A plurality of the second signal strength sequences are used to perform positioning calculation on the positioning terminal to obtain the position information of the positioning terminal. Different positioning calculation methods are used for different signal strength ratios during positioning calculation, which effectively avoids the problem of inaccurate positioning calculation results caused by the instability of the signal itself, and improves the accuracy and accuracy of positioning calculation. . In particular, the algorithm for calculating the location information corresponding to the ratio of different signal strengths in the partition can effectively reduce the influence of inaccurate positioning caused by the attenuation of the Wi-Fi signal area in the indoor complex positioning scene in a large area, thereby improving the indoor positioning accuracy. positioning accuracy.
为了更加清楚的解释本申请实施例提供的室内定位方法,图2示出了另一室内定位方法流程示意图,结合图2所示,该方法可以包括S211-S223。In order to more clearly explain the indoor positioning method provided by the embodiments of the present application, FIG. 2 shows a schematic flowchart of another indoor positioning method. With reference to FIG. 2 , the method may include S211-S223.
S211、接收定位终端的定位请求信息。S211. Receive the positioning request information of the positioning terminal.
定位请求信息可以包括第一信号强度序列,第一信号强度序列可以包括多个接入点的信号强度值。The positioning request information may include a first signal strength sequence, and the first signal strength sequence may include signal strength values of a plurality of access points.
S212、获取多个接入点所在的区域内对应多个第一采样点采集到的多 个第二信号强度序列。S212: Acquire multiple second signal strength sequences collected corresponding to multiple first sampling points in an area where multiple access points are located.
定位服务器可以预设指纹数据库中获取多个接入点所在的区域内对应多个第一采样点采集到的多个第二信号强度序列,其中,第二信号强度序列可以包括多个接入点在第一预设采样周期内的若干采样时刻的信号强度值。The positioning server may preset the fingerprint database to obtain multiple second signal strength sequences collected from multiple first sampling points in the area where multiple access points are located, where the second signal strength sequence may include multiple access points Signal strength values at several sampling instants within the first preset sampling period.
在一些实施例中,预设指纹数据库中的信号强度序列为实时更新的数据,更新过程可以包括S221-S223。In some embodiments, the signal strength sequence in the preset fingerprint database is data updated in real time, and the update process may include S221-S223.
S221、获取当前区域的人流密度。S221. Obtain the density of people flow in the current area.
S222、根据人流密度确定每个采样点的预设采样频率。S222. Determine the preset sampling frequency of each sampling point according to the density of people flow.
S223、接收每个采样点按照预设采样频率采集的多个接入点的信号强度值,更新预设指纹数据库。S223: Receive signal strength values of multiple access points collected by each sampling point according to a preset sampling frequency, and update the preset fingerprint database.
在得到多个第一采样点采集到的多个第二信号强度序列之后,接下来可以执行S213。After obtaining multiple second signal intensity sequences collected by multiple first sampling points, S213 may be performed next.
S213、确定多个接入点所在区域的信号强度比值。S213. Determine the signal strength ratios of the areas where the multiple access points are located.
在S213中,可以先根据每个接入点在第一预设采样周期内的多个采样时刻的信号强度值,确定每个接入点的信号强度均值,然后,根据大于或等于预设信号强度阈值的第一信号强度均值和小于预设信号强度阈值的第二信号强度均值,以及接入点的数量确定多个接入点所在区域的信号强度比值。In S213, the mean value of the signal strength of each access point may be determined first according to the signal strength values of each access point at multiple sampling moments within the first preset sampling period, and then, according to the signal strength greater than or equal to the preset signal The first signal strength mean value of the strength threshold and the second signal strength mean value less than the preset signal strength threshold value, and the number of access points determine the signal strength ratio of the areas where the multiple access points are located.
S214、计算定位终端的位置信息。S214. Calculate the position information of the positioning terminal.
定位服务器可以先获取每个第一采样点对应的多个第二信号强度序列与第一信号强度序列的欧氏距离,得到对应每个第一采样点第一欧氏距离集合;然后,根据至少一个第一欧氏距离集合和信号强度比值对应的定位算法,计算定位终端的位置信息。The positioning server may first obtain the Euclidean distances between multiple second signal strength sequences corresponding to each first sampling point and the first signal strength sequence, and obtain a first Euclidean distance set corresponding to each first sampling point; then, according to at least A positioning algorithm corresponding to the first Euclidean distance set and the signal strength ratio calculates the position information of the positioning terminal.
通过本申请实施例提供的室内定位方法,在根据定位终端的定位请求 信息为定位终端进行定位计算时,首先,通过根据定位请求信息中包括的接入点在预设采样周期内的若干采样时刻的信号强度值,确定接入点所在区域的信号强度比值,接下来,可以根据信号强度比值对应的定位算法,结合定位请求信息包括第一信号强度序列和每个所述第一采样点对应的多个所述第二信号强度序列,对定位终端进行定位计算,得到定位终端的位置信息。由于进行定位计算时,对应不同的信号强度比值,采用不同的定位计算方法,有效避免了因信号自身的不稳定性所产生的定位计算的结果不准确问题,提高了定位计算的精度和准确性。尤其是通过分区不同信号强度比值所对应的计算位置信息算法,对于大区域的室内复杂定位场景中,有效降低了Wi-Fi信号区域衰减而带来定位不准确的影响,从而提高了室内定位的定位精度。With the indoor positioning method provided by the embodiment of the present application, when performing positioning calculation for the positioning terminal according to the positioning request information of the positioning terminal, first, according to the access point included in the positioning request information, several sampling moments within the preset sampling period are performed. Then, according to the positioning algorithm corresponding to the signal strength ratio, combined with the positioning request information, the first signal strength sequence and the corresponding first sampling point can be included. A plurality of the second signal strength sequences are used to perform positioning calculation on the positioning terminal to obtain the position information of the positioning terminal. Different positioning calculation methods are used for different signal strength ratios during positioning calculation, which effectively avoids the problem of inaccurate positioning calculation results caused by the instability of the signal itself, and improves the accuracy and accuracy of positioning calculation. . In particular, the algorithm for calculating the location information corresponding to the ratio of different signal strengths in the partition can effectively reduce the influence of inaccurate positioning caused by the attenuation of the Wi-Fi signal area in the indoor complex positioning scene in a large area, thereby improving the indoor positioning accuracy. positioning accuracy.
图3是本申请实施例提供的一种室内定位装置的结构示意图,如图3所示,该室内定位装置300可以包括:接收模块310、获取模块320、定位模块330和计算模块340。FIG. 3 is a schematic structural diagram of an indoor positioning apparatus provided by an embodiment of the present application. As shown in FIG. 3 , the indoor positioning apparatus 300 may include a receiving module 310 , an acquiring module 320 , a positioning module 330 and a computing module 340 .
接收模块310,配置为接收定位终端的定位请求信息,定位请求信息包括第一信号强度序列,其中,第一信号强度序列包括多个接入点的信号强度值。The receiving module 310 is configured to receive positioning request information of the positioning terminal, where the positioning request information includes a first signal strength sequence, where the first signal strength sequence includes signal strength values of multiple access points.
获取模块320,配置为从预设指纹数据库中获取多个接入点所在的区域内对应多个第一采样点采集到的多个第二信号强度序列,其中,第二信号强度序列包括多个接入点在第一预设采样周期内的若干采样时刻的信号强度值。The acquisition module 320 is configured to acquire, from a preset fingerprint database, a plurality of second signal strength sequences collected by corresponding to a plurality of first sampling points in an area where a plurality of access points are located, wherein the second signal strength sequence includes a plurality of Signal strength values of the access point at several sampling moments within the first preset sampling period.
定位模块330,配置为确定多个接入点所在区域的信号强度比值。The positioning module 330 is configured to determine the signal strength ratio of the areas where the multiple access points are located.
计算模块340,配置为根据第一信号强度序列、每个第一采样点对应的多个第二信号强度序列和信号强度比值对应的定位算法,计算定位终端的位置信息。The calculation module 340 is configured to calculate the position information of the positioning terminal according to the first signal strength sequence, the plurality of second signal strength sequences corresponding to each first sampling point, and the positioning algorithm corresponding to the signal strength ratio.
在一些实施例中,定位模块330还配置为根据每个接入点在第一预设采样周期内的多个采样时刻的信号强度值,确定每个接入点的信号强度均值;以及确定大于或等于预设信号强度阈值的第一信号强度均值和小于预设信号强度阈值的第二信号强度均值;以及根据第一信号强度均值、第二信号强度均值和接入点的数量,确定信号强度比值。In some embodiments, the positioning module 330 is further configured to determine the mean value of the signal strength of each access point according to the signal strength values of each access point at multiple sampling moments within the first preset sampling period; or a first mean signal strength equal to the preset signal strength threshold and a second mean signal strength less than the preset signal strength threshold; and determining the signal strength according to the first mean value of signal strength, the second mean value of signal strength and the number of access points ratio.
在一些实施例中,计算模块340还配置为获取每个第一采样点对应的多个第二信号强度序列与第一信号强度序列的欧氏距离,得到对应每个第一采样点第一欧氏距离集合;以及根据至少一个第一欧氏距离集合和信号强度比值对应的定位算法,计算定位终端的位置信息。In some embodiments, the calculation module 340 is further configured to obtain the Euclidean distances between the plurality of second signal strength sequences corresponding to each first sampling point and the first signal strength sequences, to obtain the first Euclidean distance corresponding to each first sampling point and calculating the position information of the positioning terminal according to the positioning algorithm corresponding to the at least one first Euclidean distance set and the signal strength ratio.
在一些实施例中,当信号强度比值在第一预设信号强度比值范围时,计算定位终端的位置信息,计算模块340还配置为从多个第一欧氏距离集合的欧氏距离中确定前M个最小的欧氏距离对应的第三信号强度序列,其中,M为正整数;以及根据预设的误差剔除算法,剔除第一信号强度序列中的干扰信号强度值,得到第四信号强度序列,以及分别剔除M个第三信号强度序列中的干扰信号强度值,对应得到M个第五信号强度序列;以及根据第四信号强度序列、每个第五信号序列和预设指纹匹配算法,进行定位解算,当解算得到唯一位置信息时,确定定位终端的第一位置信息,将第一位置信息作为定位终端的位置信息。In some embodiments, when the signal strength ratio is within the first preset signal strength ratio range, the position information of the positioning terminal is calculated, and the calculation module 340 is further configured to The third signal strength sequence corresponding to the M smallest Euclidean distances, where M is a positive integer; and according to a preset error elimination algorithm, the interference signal strength value in the first signal strength sequence is eliminated to obtain a fourth signal strength sequence , and remove the interfering signal strength values in the M third signal strength sequences respectively, and correspondingly obtain M fifth signal strength sequences; and according to the fourth signal strength sequence, each fifth signal sequence and the preset fingerprint matching algorithm, carry out In the positioning calculation, when the unique position information is obtained through calculation, the first position information of the positioning terminal is determined, and the first position information is used as the position information of the positioning terminal.
在一些实施例中,当信号强度比值在第二预设信号强度比值范围时,计算模块340还配置为对每个第一采样点的第一欧氏距离集合划分为预设K个子集,得到每个第一采样点对应的K个第二欧氏距离集合,其中,K为正整数;获取每个第二欧氏距离集合的区间分配因子;根据每个第一采样点对应的K个第二欧氏距离集合的区间分配因子,确定每个第一采样点的位置权重;获取每个第一采样点的位置信息;根据每个第一采样点的位置信息和第一采样点的位置权重,确定定位终端的第二位置信息,将第二 位置信息作为定位终端的位置信息。In some embodiments, when the signal strength ratio is within the second preset signal strength ratio range, the calculation module 340 is further configured to divide the first Euclidean distance set of each first sampling point into preset K subsets, to obtain K second Euclidean distance sets corresponding to each first sampling point, where K is a positive integer; obtain the interval allocation factor of each second Euclidean distance set; according to the K second Euclidean distance sets corresponding to each first sampling point The interval allocation factor of the two-Euclidean distance set determines the position weight of each first sampling point; obtains the position information of each first sampling point; according to the position information of each first sampling point and the position weight of the first sampling point , determine the second position information of the positioning terminal, and use the second position information as the position information of the positioning terminal.
在一些实施例中,计算模块340还配置为确定第二欧氏距离集合中信号强度值的均值、最小值和方差;以及根据均值、最小值、方差和子集数量K,计算得到第二欧氏距离集合的区间分配因子。In some embodiments, the calculation module 340 is further configured to determine the mean, minimum and variance of the signal strength values in the second set of Euclidean distances; and calculate the second Euclidean according to the mean, minimum, variance and the number of subsets K Interval allocation factor for distance sets.
在一些实施例中,当信号强度比值在第三预设信号强度比值范围时,计算定位终端的位置信息,计算模块340还配置为分别获取第一位置信息和第二位置信息;根据信号强度比值分别确定第一位置信息的第一权重值和第二位置信息的第二权重值;以及根据第一位置信息的第一权重值和第二位置信息的第二权重值,计算得到定位终端的第三位置信息,将第三位置信息作为定位终端的位置信息。In some embodiments, when the signal strength ratio is within the third preset signal strength ratio range, the position information of the positioning terminal is calculated, and the calculation module 340 is further configured to obtain the first position information and the second position information respectively; according to the signal strength ratio Determine the first weight value of the first position information and the second weight value of the second position information respectively; and calculate the first weight value of the positioning terminal according to the first weight value of the first position information and the second weight value of the second position information. The third position information is used as the position information of the positioning terminal.
在一些实施例中,接收模块还配置为接收每个采样点按照预设采样频率采集的多个接入点的信号强度值,其中,预设采样频率根据区域内当前的人流密度确定;In some embodiments, the receiving module is further configured to receive signal strength values of multiple access points collected by each sampling point according to a preset sampling frequency, wherein the preset sampling frequency is determined according to the current density of people in the area;
在一些实施例中,室内定位装置300可以包括指纹数据库构建模块,配置为根据每个采样点按照预设采样频率采集的多个接入点的信号强度值,构建预设指纹数据库。In some embodiments, the indoor positioning apparatus 300 may include a fingerprint database construction module configured to construct a preset fingerprint database according to the signal strength values of multiple access points collected at each sampling point according to a preset sampling frequency.
可以理解的是,本申请实施例的室内定位装置300,可以对应于本申请实施例所提供的室内定位方法的执行主体,室内定位装置300的各个模块/单元的操作和/或功能的具体细节可以参见上述本申请实施例所提供的室内定位方法中的相应部分的描述,为了简洁,在此不再赘述。It can be understood that the indoor positioning device 300 in the embodiment of the present application may correspond to the execution subject of the indoor positioning method provided in the embodiment of the present application, and the specific details of the operation and/or function of each module/unit of the indoor positioning device 300 Reference may be made to the description of the corresponding part in the indoor positioning method provided by the above embodiments of the present application, which is not repeated here for brevity.
本申请实施例的室内定位装置,在根据定位终端的定位请求信息为定位终端进行定位计算时,首先,通过根据定位请求信息中包括的接入点在预设采样周期内的若干采样时刻的信号强度值,确定接入点所在区域的信号强度比值,接下来,可以根据信号强度比值对应的定位算法,结合定位请求信息包括第一信号强度序列和每个所述第一采样点对应的多个所述第 二信号强度序列,对定位终端进行定位计算,得到定位终端的位置信息。由于进行定位计算时,对应不同的信号强度比值,采用不同的定位计算方法,有效避免了因信号自身的不稳定性所产生的定位计算的结果不准确问题,提高了定位计算的精度和准确性。尤其是通过分区不同信号强度比值所对应的计算位置信息算法,对于大区域的室内复杂定位场景中,有效降低了Wi-Fi信号区域衰减而带来定位不准确的影响,从而提高了室内定位的定位精度。In the indoor positioning device of the embodiment of the present application, when performing positioning calculation for the positioning terminal according to the positioning request information of the positioning terminal, firstly, according to the signals of the access point included in the positioning request information at several sampling times within the preset sampling period strength value, to determine the signal strength ratio of the area where the access point is located. Next, according to the positioning algorithm corresponding to the signal strength ratio, combined with the positioning request information, the first signal strength sequence and the multiple In the second signal strength sequence, the positioning calculation is performed on the positioning terminal to obtain the position information of the positioning terminal. Different positioning calculation methods are used for different signal strength ratios during positioning calculation, which effectively avoids the problem of inaccurate positioning calculation results caused by the instability of the signal itself, and improves the accuracy and accuracy of positioning calculation. . In particular, the algorithm for calculating the location information corresponding to the ratio of different signal strengths in the partition can effectively reduce the influence of inaccurate positioning caused by the attenuation of the Wi-Fi signal area in the indoor complex positioning scene in a large area, thereby improving the indoor positioning accuracy. positioning accuracy.
图4是本申请实施例提供的一种室内定位设备的硬件结构示意图。FIG. 4 is a schematic diagram of a hardware structure of an indoor positioning device provided by an embodiment of the present application.
如图4所示,本实施例中的室内定位设备400包括输入设备401、输入接口402、中央处理器403、存储器404、输出接口405、以及输出设备406。其中,输入接口402、中央处理器403、存储器404、以及输出接口405通过总线410相互连接,输入设备401和输出设备406分别通过输入接口402和输出接口405与总线410连接,进而与室内定位设备400的其他组件连接。As shown in FIG. 4 , the indoor positioning device 400 in this embodiment includes an input device 401 , an input interface 402 , a central processing unit 403 , a memory 404 , an output interface 405 , and an output device 406 . Among them, the input interface 402, the central processing unit 403, the memory 404, and the output interface 405 are connected to each other through the bus 410, and the input device 401 and the output device 406 are respectively connected to the bus 410 through the input interface 402 and the output interface 405, and then to the indoor positioning device. 400 other components are connected.
具体地,输入设备401接收来自外部的输入信息,并通过输入接口402将输入信息传送到中央处理器403;中央处理器403基于存储器404中存储的计算机可执行指令对输入信息进行处理以生成输出信息,将输出信息临时或者永久地存储在存储器404中,然后通过输出接口405将输出信息传送到输出设备406;输出设备406将输出信息输出到室内定位设备400的外部供用户使用。Specifically, the input device 401 receives input information from the outside, and transmits the input information to the central processing unit 403 through the input interface 402; the central processing unit 403 processes the input information based on the computer-executable instructions stored in the memory 404 to generate output information, temporarily or permanently store the output information in the memory 404, and then transmit the output information to the output device 406 through the output interface 405; the output device 406 outputs the output information to the outside of the indoor positioning device 400 for the user to use.
也就是说,图4所示的室内定位设备也可以被实现为包括:存储有计算机可执行指令的存储器;以及处理器,该处理器在执行计算机可执行指令时可以实现结合本申请实施例提供的室内定位方法。That is to say, the indoor positioning device shown in FIG. 4 can also be implemented to include: a memory storing computer-executable instructions; and a processor, which, when executing the computer-executable instructions, can implement the steps provided by the embodiments of the present application. indoor positioning method.
在一个实施例中,图4所示的室内定位设备400包括:存储器404,用于存储程序;处理器403,用于运行存储器中存储的程序,以执行本申请实 施例提供的室内定位方法。In one embodiment, the indoor positioning device 400 shown in FIG. 4 includes: a memory 404 for storing a program; and a processor 403 for running the program stored in the memory to execute the indoor positioning method provided by the embodiment of the present application.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序指令;该计算机程序指令被处理器执行时实现本申请实施例提供的室内定位方法。Embodiments of the present application further provide a computer-readable storage medium, where computer program instructions are stored thereon; when the computer program instructions are executed by a processor, the indoor positioning method provided by the embodiments of the present application is implemented.
需要明确的是,本申请并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本申请的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本申请的精神后,做出各种改变、修改和添加,或者改变步骤之间的顺序。To be clear, the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above-described embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the sequence of steps after comprehending the spirit of the present application .
以上所述的结构框图中所示的功能块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(Application Specific Integrated Circuit,ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本申请的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、只读存储器(Read-Only Memory,ROM)、闪存、可擦除只读存储器(Erasable Read Only Memory,EROM)、软盘、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、光盘、硬盘、光纤介质、射频(Radio Frequency,RF)链路,等等。代码段可以经由诸如因特网、内联网等的计算机网络被下载。The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, and the like. When implemented in software, elements of the present application are programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted over a transmission medium or communication link by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disks Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical media, radio frequency (Radio Frequency, RF) links, etc. The code segments may be downloaded via a computer network such as the Internet, an intranet, or the like.
还需要说明的是,本申请中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或***。但是,本申请不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps may be performed in the order mentioned in the embodiment, or may be different from the order in the embodiment, or several steps may be performed simultaneously.
上面参考根据本公开的实施例的方法、装置(***)和计算机程序产品的流程图和/或框图描述了本公开的各方面。应当理解,流程图和/或框图中的每个方框以及流程图和/或框图中各方框的组合可以由计算机程序指令实现。这些计算机程序指令可被提供给通用计算机、专用计算机、或其它可编程数据处理装置的处理器,以产生一种机器,使得经由计算机或其它可编程数据处理装置的处理器执行的这些指令使能对流程图和/或框图的一个或多个方框中指定的功能/动作的实现。这种处理器可以是但不限于是通用处理器、专用处理器、特殊应用处理器或者现场可编程逻辑电路。还可理解,框图和/或流程图中的每个方框以及框图和/或流程图中的方框的组合,也可以由执行指定的功能或动作的专用硬件来实现,或可由专用硬件和计算机指令的组合来实现。Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that execution of the instructions via the processor of the computer or other programmable data processing apparatus enables the Implementation of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. Such processors may be, but are not limited to, general purpose processors, special purpose processors, application specific processors, or field programmable logic circuits. It will also be understood that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can also be implemented by special purpose hardware for performing the specified functions or actions, or by special purpose hardware and/or A combination of computer instructions is implemented.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
工业实用性Industrial Applicability
本申请提供了一种室内定位方法,在根据定位终端的定位请求信息为定位终端进行定位计算时,首先,通过根据定位请求信息中包括的接入点在预设采样周期内的若干采样时刻的信号强度值,确定接入点所在区域的信号强度比值,接下来,可以根据信号强度比值对应的定位算法,结合定位请求信息包括第一信号强度序列和每个所述第一采样点对应的多个所述第二信号强度序列,对定位终端进行定位计算,得到定位终端的位置信息。由于进行定位计算时,对应不同的信号强度比值,采用不同的定位计算方法,有效避免了因信号自身的不稳定性所产生的定位计算的结果不准确问题,提高了定位计算的精度和准确性。The present application provides an indoor positioning method. When performing positioning calculation for the positioning terminal according to the positioning request information of the positioning terminal, firstly, according to the access point included in the positioning request information at several sampling times within a preset sampling period The signal strength value is used to determine the signal strength ratio of the area where the access point is located. Next, according to the positioning algorithm corresponding to the signal strength ratio, combined with the positioning request information, the first signal strength sequence and the number of samples corresponding to each of the first sampling points can be included. The second signal strength sequence is obtained, and the positioning calculation is performed on the positioning terminal to obtain the position information of the positioning terminal. Different positioning calculation methods are used for different signal strength ratios during positioning calculation, which effectively avoids the problem of inaccurate positioning calculation results caused by the instability of the signal itself, and improves the accuracy and accuracy of positioning calculation. .