[go: up one dir, main page]

CN109874172A - A Bluetooth positioning method, device, device and system - Google Patents

A Bluetooth positioning method, device, device and system Download PDF

Info

Publication number
CN109874172A
CN109874172A CN201910136106.7A CN201910136106A CN109874172A CN 109874172 A CN109874172 A CN 109874172A CN 201910136106 A CN201910136106 A CN 201910136106A CN 109874172 A CN109874172 A CN 109874172A
Authority
CN
China
Prior art keywords
bluetooth
positioning
node
current
nodes
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.)
Pending
Application number
CN201910136106.7A
Other languages
Chinese (zh)
Inventor
张骁
张弢
陈辞
王周红
高民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou HKUST Fok Ying Tung Research Institute
Original Assignee
Guangzhou HKUST Fok Ying Tung Research Institute
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou HKUST Fok Ying Tung Research Institute filed Critical Guangzhou HKUST Fok Ying Tung Research Institute
Priority to CN201910136106.7A priority Critical patent/CN109874172A/en
Publication of CN109874172A publication Critical patent/CN109874172A/en
Pending legal-status Critical Current

Links

Landscapes

  • Position Fixing By Use Of Radio Waves (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a kind of bluetooth localization methods, comprising: the Bluetooth signal of several bluetooth nodes detected is obtained within the current detection period;Wherein, Bluetooth signal is greater than preset signal strength, and detection cycle is the period;The positioning coordinate for obtaining a upper detection cycle is the initial position co-ordinates in current detection period, and the confidence level of current Bluetooth node is calculated according to initial position co-ordinates and the coordinate vector for the bluetooth nodes for detecting Bluetooth signal;According to the weight of the bluetooth signal intensity of the bluetooth nodes detected and confidence calculations bluetooth nodes;According to the weight computing current positioning coordinate of bluetooth nodes, and current positioning coordinate is stored as to the initial position co-ordinates of next detection cycle.The embodiment of the invention also discloses a kind of bluetooth positioning device, a kind of bluetooth positioning device and a kind of bluetooth positioning systems.Using the embodiment of the present invention, accuracy and ease for use can be improved, remove the demand of acquisition early period data tranining database from, reduce cost.

Description

一种蓝牙定位方法、装置、设备和系统A Bluetooth positioning method, device, device and system

技术领域technical field

本发明涉及蓝牙定位技术,尤其涉及一种蓝牙定位方法、装置、设备和系统。The present invention relates to Bluetooth positioning technology, in particular to a Bluetooth positioning method, device, device and system.

背景技术Background technique

随着城市的快速发展,大型地下停车场、购物中心等大型建筑物不断涌现。在上述的室内环境中,人们希望能够快速的确定自己所在的位置,以及找到自己想去的目的地。现有技术中采用的蓝牙定位技术包括以下两种,一种是将智能终端在线采集到蓝牙节点信号强度值直接通过拟合等一些映射方式建立信号强度和实际距离的关系;另二种是在训练时将智能终端离线蓝牙模块的指纹向量数据进行存储得到指纹-位置映射数据库资源,使用时,将智能终端在线模块将采集到的的指纹向量与指纹数据资源中每个指纹向量进行比对,选取接近度较高的参考位置作为样本位置进行融合输出。With the rapid development of cities, large buildings such as large underground parking lots and shopping malls continue to emerge. In the above indoor environment, people hope to quickly determine their location and find their desired destination. The Bluetooth positioning technologies used in the prior art include the following two. One is to directly collect the signal strength value of the Bluetooth node from the intelligent terminal online to establish the relationship between the signal strength and the actual distance through some mapping methods such as fitting; During training, the fingerprint vector data of the offline Bluetooth module of the smart terminal is stored to obtain the fingerprint-location mapping database resource. When used, the fingerprint vector collected by the online module of the smart terminal is compared with each fingerprint vector in the fingerprint data resource. Select the reference position with higher proximity as the sample position for fusion output.

但是,对于第一种方案,因信号强度受环境因素(温度、湿度、物理遮挡等因素)影响较大,故由其计算得出的实际距离值也是极其不稳定、不准确的;对于第二种方案,训练数据库时样本采集成本极高,而任何室内场景的变换/重新分隔,都会导致该区域的指纹数据库失效,需要再度进行采集训练,造成成本的增加。However, for the first solution, since the signal strength is greatly affected by environmental factors (temperature, humidity, physical occlusion, etc.), the actual distance value calculated by it is also extremely unstable and inaccurate; for the second solution In this scheme, the sample collection cost is extremely high when training the database, and any transformation/re-separation of the indoor scene will cause the fingerprint database in the area to fail, requiring collection and training again, resulting in increased costs.

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的是提供一种蓝牙定位方法、装置、设备和系统,不需要直接拟合信号强度和实际距离的关系,提高准确度和易用性,免去前期采集数据训练数据库的需求,降低成本。The purpose of the embodiments of the present invention is to provide a Bluetooth positioning method, device, equipment and system, which does not need to directly fit the relationship between signal strength and actual distance, improves accuracy and ease of use, and eliminates the need for pre-collecting data to train a database ,cut costs.

为实现上述目的,本发明实施例提供了一种蓝牙定位方法,包括:To achieve the above purpose, an embodiment of the present invention provides a Bluetooth positioning method, including:

在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度,所述检测周期为时间段;Acquire the Bluetooth signals of several Bluetooth nodes detected in the current detection period; wherein, the Bluetooth signal is greater than a preset signal strength, and the detection period is a time period;

获取上一检测周期的定位坐标为当前检测周期的初始位置坐标,根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;Obtain the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period, and calculate the confidence level of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node that detects the Bluetooth signal;

根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值;Calculate the weight of the bluetooth node according to the detected bluetooth signal strength of the bluetooth node and the confidence;

根据所述蓝牙节点的权值计算当前定位坐标,并将所述当前定位坐标存储为下一检测周期的初始位置坐标。The current positioning coordinates are calculated according to the weights of the Bluetooth nodes, and the current positioning coordinates are stored as the initial position coordinates of the next detection cycle.

与现有技术相比,本发明公开的蓝牙定位方法,首先,在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号,并获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;然后,根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;最后,根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值,并根据所述蓝牙节点的权值计算当前定位坐标。解决了现有技术中因受环境因素影响导致计算的实际距离值不准确的问题,同时还解决了需要前期采集数据导致成本增加的问题,本发明公开的蓝牙定位方法不需要直接拟合信号强度和实际距离的关系,提高准确度和易用性,免去前期采集数据训练数据库的需求,降低成本。Compared with the prior art, in the Bluetooth positioning method disclosed by the present invention, firstly, the Bluetooth signals of several Bluetooth nodes detected in the current detection period are acquired, and the positioning coordinates obtained in the previous detection period are the initial position coordinates of the current detection period. ; Then, calculate the confidence level of the current Bluetooth node according to the coordinates of the initial position and the coordinate vector of the Bluetooth node that detected the Bluetooth signal; finally, calculate the confidence level according to the detected Bluetooth signal strength of the Bluetooth node and the confidence level The weight of the Bluetooth node, and the current positioning coordinates are calculated according to the weight of the Bluetooth node. The problem that the calculated actual distance value is inaccurate due to the influence of environmental factors in the prior art is solved, and at the same time, the problem that the cost increases due to the need to collect data in the early stage is solved. The Bluetooth positioning method disclosed by the present invention does not need to directly fit the signal strength. The relationship between the actual distance and the actual distance improves the accuracy and ease of use, eliminates the need for pre-collecting data to train the database, and reduces costs.

作为上述方案的改进,若当前检测周期为初始检测周期,则初次检测到蓝牙信号的所述蓝牙节点的置信度为1。As an improvement of the above solution, if the current detection period is the initial detection period, the confidence level of the Bluetooth node that detects the Bluetooth signal for the first time is 1.

作为上述方案的改进,每一所述蓝牙节点按照相同周期发送相同信号强度的蓝牙信号。As an improvement of the above solution, each of the Bluetooth nodes sends Bluetooth signals with the same signal strength in the same period.

作为上述方案的改进,所述蓝牙节点设于可通行区域中;其中,所述可通行区域被划分成若干个大小相等的正方形区域,每一所述正方形区域的四个节点上均设置有所述蓝牙节点。As an improvement of the above solution, the Bluetooth node is set in a passable area; wherein, the passable area is divided into several square areas of equal size, and four nodes of each square area are provided with the bluetooth node.

作为上述方案的改进,所述根据所述蓝牙节点的权值计算当前定位坐标,具体包括:As an improvement of the above solution, the calculation of the current positioning coordinates according to the weight of the Bluetooth node specifically includes:

根据所述蓝牙节点的权值和所述蓝牙节点的坐标向量计算所述当前定位坐标。The current positioning coordinates are calculated according to the weight of the Bluetooth node and the coordinate vector of the Bluetooth node.

为实现上述目的,本发明实施例还提供了一种蓝牙定位装置,包括:To achieve the above purpose, an embodiment of the present invention also provides a Bluetooth positioning device, including:

蓝牙信号检测单元,用于在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度,所述检测周期为时间段;A Bluetooth signal detection unit, configured to acquire Bluetooth signals of several Bluetooth nodes detected in the current detection period; wherein, the Bluetooth signal is greater than a preset signal strength, and the detection period is a time period;

初始位置坐标获取单元,用于获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;an initial position coordinate obtaining unit, used for obtaining the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period;

置信度获取单元,用于根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;a confidence level obtaining unit, configured to calculate the confidence level of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node that detects the Bluetooth signal;

蓝牙节点权值获取单元,用于根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值;a Bluetooth node weight acquisition unit, configured to calculate the weight of the Bluetooth node according to the detected Bluetooth signal strength and the confidence level of the Bluetooth node;

当前定位坐标获取单元,用于根据所述蓝牙节点的权值计算当前定位坐标,,并将所述当前定位坐标存储为下一检测周期的初始位置坐标。The current positioning coordinate obtaining unit is configured to calculate the current positioning coordinates according to the weight of the Bluetooth node, and store the current positioning coordinates as the initial position coordinates of the next detection cycle.

与现有技术相比,本发明公开的蓝牙定位装置,首先,蓝牙信号检测单元在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号,初始位置坐标获取单元获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;然后,置信度获取单元根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;最后,蓝牙节点权值获取单元根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值,当前定位坐标获取单元根据所述蓝牙节点的权值计算当前定位坐标。解决了现有技术中因受环境因素影响导致计算的实际距离值不准确的问题,同时还解决了需要前期采集数据导致成本增加的问题,本发明公开的蓝牙定位装置不需要直接拟合信号强度和实际距离的关系,提高准确度和易用性,免去前期采集数据训练数据库的需求,降低成本。Compared with the prior art, in the Bluetooth positioning device disclosed in the present invention, firstly, the Bluetooth signal detection unit acquires the Bluetooth signals of several Bluetooth nodes detected in the current detection period, and the initial position coordinate acquisition unit acquires the positioning coordinates of the previous detection period. is the initial position coordinate of the current detection period; then, the confidence degree acquisition unit calculates the confidence degree of the current Bluetooth node according to the initial position coordinate and the coordinate vector of the Bluetooth node that detects the Bluetooth signal; finally, the Bluetooth node weight acquisition unit according to the detection The received Bluetooth signal strength and the confidence level of the Bluetooth node calculate the weight of the Bluetooth node, and the current positioning coordinate obtaining unit calculates the current positioning coordinate according to the weight of the Bluetooth node. The problem that the calculated actual distance value is inaccurate due to the influence of environmental factors in the prior art is solved, and at the same time, the problem of increasing the cost caused by the need to collect data in the early stage is solved. The Bluetooth positioning device disclosed in the present invention does not need to directly fit the signal strength. The relationship between the actual distance and the actual distance improves the accuracy and ease of use, eliminates the need for pre-collecting data to train the database, and reduces costs.

作为上述方案的改进,若当前检测周期为初始检测周期,则初次检测到蓝牙信号的所述蓝牙节点的置信度为1。As an improvement of the above solution, if the current detection period is the initial detection period, the confidence level of the Bluetooth node that detects the Bluetooth signal for the first time is 1.

作为上述方案的改进,所述当前定位坐标获取单元具体用于:As an improvement of the above solution, the current positioning coordinate obtaining unit is specifically used for:

根据所述蓝牙节点的权值和所述蓝牙节点的坐标向量计算所述当前定位坐标。The current positioning coordinates are calculated according to the weight of the Bluetooth node and the coordinate vector of the Bluetooth node.

为实现上述目的,本发明实施例还提供一种蓝牙定位设备,其特征在于,包括处理器、存储器以及存储在所述存储器中且被配置为由所述处理器执行的计算机程序,所述处理器执行所述计算机程序时实现如上述任一实施例所述的蓝牙定位方法。To achieve the above object, an embodiment of the present invention further provides a Bluetooth positioning device, which is characterized by comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processing When the computer executes the computer program, the Bluetooth positioning method according to any of the above embodiments is implemented.

为实现上述目的,本发明实施例还提供一种蓝牙定位系统,包括若干蓝牙节点和如上述任一实施例所述的蓝牙定位装置;其中,To achieve the above purpose, an embodiment of the present invention further provides a Bluetooth positioning system, including several Bluetooth nodes and the Bluetooth positioning device according to any of the above embodiments; wherein,

所述蓝牙节点设于可通行区域中;其中,所述可通行区域被划分成若干个大小相等的正方形区域,每一所述正方形区域的四个节点上均设置有所述蓝牙节点;每一所述蓝牙节点按照相同周期发送相同信号强度的蓝牙信号。The bluetooth node is set in a passable area; wherein, the passable area is divided into several square areas of equal size, and the bluetooth nodes are arranged on the four nodes of each square area; each The bluetooth nodes send bluetooth signals with the same signal strength according to the same period.

附图说明Description of drawings

图1是本发明实施例提供的一种蓝牙定位方法的流程图;1 is a flowchart of a Bluetooth positioning method provided by an embodiment of the present invention;

图2是本发明实施例提供的一种蓝牙定位装置10的结构示意图;FIG. 2 is a schematic structural diagram of a Bluetooth positioning device 10 according to an embodiment of the present invention;

图3是本发明实施例提供的一种蓝牙定位设备20的结构示意图;3 is a schematic structural diagram of a Bluetooth positioning device 20 provided by an embodiment of the present invention;

图4是本发明实施例提供的一种蓝牙定位系统30的结构示意图。FIG. 4 is a schematic structural diagram of a Bluetooth positioning system 30 according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例一Example 1

参见图1,图1是本发明实施例提供的一种蓝牙定位方法的流程图;包括:Referring to FIG. 1, FIG. 1 is a flowchart of a Bluetooth positioning method provided by an embodiment of the present invention; including:

S1、在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度,所述检测周期为时间段;S1. Acquire Bluetooth signals of several Bluetooth nodes detected in the current detection period; wherein, the Bluetooth signal is greater than a preset signal strength, and the detection period is a time period;

S2、获取上一检测周期的定位坐标为当前检测周期的初始位置坐标,根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;S2, obtaining the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period, and calculating the confidence of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node that detects the Bluetooth signal;

S3、根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值;S3. Calculate the weight of the Bluetooth node according to the detected Bluetooth signal strength and the confidence level of the Bluetooth node;

S4、根据所述蓝牙节点的权值计算当前定位坐标,并将所述当前定位坐标存储为下一检测周期的初始位置坐标。S4. Calculate the current positioning coordinates according to the weight of the Bluetooth node, and store the current positioning coordinates as the initial position coordinates of the next detection cycle.

值得说明的是,本发明实施例所述的蓝牙定位方法可以通过移动终端执行实现,所述移动终端可以是手机、平板电脑或其他可实现定位功能的移动终端。本发明实施例在一定的可通行区域内布置若干个蓝牙节点用于发射蓝牙信号,每一所述蓝牙节点按相同的周期性发送信号,且发送的信号强度相等;其中,所述可通行区域被划分成若干个大小相等的正方形区域,每一所述正方形区域的四个节点上均设置有所述蓝牙节点。当用户手持所述移动终端进入所述蓝牙节点的信号范围内时,即可开始实现定位功能。It should be noted that the Bluetooth positioning method described in the embodiments of the present invention may be implemented by a mobile terminal, and the mobile terminal may be a mobile phone, a tablet computer, or other mobile terminals that can implement a positioning function. In the embodiment of the present invention, several Bluetooth nodes are arranged in a certain passable area for transmitting Bluetooth signals, and each of the Bluetooth nodes sends signals at the same periodicity, and the transmitted signal strengths are equal; wherein, the passable area is It is divided into several square areas of equal size, and the Bluetooth nodes are arranged on the four nodes of each square area. When the user holds the mobile terminal and enters the signal range of the Bluetooth node, the positioning function can be started.

选用的蓝牙模块的有效覆盖半径为10米,在m(m=5)米的范围内强度随着距离衰减的规律比较稳定,如果距离超过范围,距离的区分精度就会降低。为实现精度为米级的定位,将蓝牙模块布置于25平方米的大正方形区域的4个顶点上,在扩大定位区域时,只需将多个正方形按单边重合的方式进行拓展。于是在提前规划出的可通行区域内,每一个大小为25平方米的正方形区域都可以有四个蓝牙节点覆盖。若存在通信区域面积不足与25平方米的情况,可以适当调整蓝牙节点间的最小距离m,使其尽量均匀分布在四周外围,包裹住核心区域。The effective coverage radius of the selected Bluetooth module is 10 meters. In the range of m (m=5) meters, the intensity decays with the distance is relatively stable. If the distance exceeds the range, the distance discrimination accuracy will be reduced. In order to achieve meter-level positioning, the Bluetooth module is arranged on the four vertices of a large square area of 25 square meters. Therefore, in the passable area planned in advance, each square area with a size of 25 square meters can be covered by four Bluetooth nodes. If there is a situation where the communication area is less than 25 square meters, the minimum distance m between the Bluetooth nodes can be adjusted appropriately so that it is evenly distributed around the periphery and wraps the core area.

具体的,在步骤S1中,在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度;优选的,所述检测周期可以为2s。当打开定位程序时,进入被蓝牙节点覆盖的区域内,首先将统计最近2s中内采集到的若干个蓝牙节点的信号强度,并从中筛选出信号强度大于预设信号强度的蓝牙节点。Specifically, in step S1, the bluetooth signals of several bluetooth nodes detected are acquired in the current detection period; wherein, the bluetooth signals are greater than the preset signal strength; preferably, the detection period may be 2s. When the positioning program is opened, it enters the area covered by the Bluetooth node. First, the signal strength of several Bluetooth nodes collected in the last 2s will be counted, and the Bluetooth nodes whose signal strength is greater than the preset signal strength will be screened out.

具体的,在步骤S2中,获取上一检测周期的定位坐标为当前检测周期的初始位置坐标,值得说明的是,若当前检测周期为初始检测周期,即用户可能手持移动终端刚进入所述可通行区域,此时,则不会获取的上一检测周期的定位坐标或获取的上一检测周期的定位坐标为0。Specifically, in step S2, the positioning coordinates of the previous detection period are obtained as the initial position coordinates of the current detection period. It is worth noting that, if the current detection period is the initial detection period, that is, the user may hold the mobile terminal and just enter the Passing area, at this time, the positioning coordinates of the previous detection cycle that will not be acquired or the acquired positioning coordinates of the previous detection cycle are 0.

考虑到手机终端的移动是连续,在单位采集时间间隔(即所述检测周期)内,其位移不会与上一检测周期的位置差产生较大偏差,于是本发明实施例以上一检测周期估计的定位坐标Yt-1为期望的高斯曲线N(Xi,Yt-1,θ)来模拟这一规律。其中,Xi代表第i个蓝牙节点的坐标向量,方差θ=10,这样距离上一次定位相差十米以内的蓝牙节点仍能获得较高的置信度,而在十米距离之外,即使检测到了蓝牙节点,也仍然被认为不太可信,使其对定位的影响因子较小,根据所述初始位置坐标和上一检测周期中检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度,则蓝牙节点的置信度的计算方法为:Considering that the movement of the mobile phone terminal is continuous, within the unit collection time interval (that is, the detection period), its displacement will not produce a large deviation from the position difference of the previous detection period, so the previous detection period in the embodiment of the present invention is estimated. The positioning coordinate Y t-1 is the desired Gaussian curve N(X i , Y t-1 , θ) to simulate this law. Among them, X i represents the coordinate vector of the i-th Bluetooth node, and the variance θ=10, so that the Bluetooth nodes within ten meters from the last positioning can still obtain a high degree of confidence. When the Bluetooth node is reached, it is still considered to be untrustworthy, so that its influence factor on positioning is small. confidence, then the calculation method of the confidence of the Bluetooth node is:

confidencei=N(Xi,Yt-1,θ) 公式(1);confidence i =N(X i ,Y t-1 ,θ) Formula (1);

其中,若当前检测周期为初始检测周期,则初次检测到蓝牙信号的所述蓝牙节点的置信度为1,即此时confidencei=1。Wherein, if the current detection period is the initial detection period, the confidence of the Bluetooth node that detects the Bluetooth signal for the first time is 1, that is, confidence i =1 at this time.

具体的,在步骤S3中,在确定所述蓝牙节点基于历史定位的置信度后,需要在该区域内确定更详细的定位坐标,理所当然的,认为移动终端应该最为接近的蓝牙节点,其可信度最高,不过也为了更高的鲁棒性,不能忽视其他蓝牙节点的作用,根据其他蓝牙节点的信号强度与最高强度的差值,对剩余其他蓝牙节点赋予不同的置信度,用高斯曲线来模拟这一规律,假设各蓝牙节点的信号强度分别为Ri(i=1,2,3…),将其中最大的数值max(Ri)作为正态分布N(Ri,μ,δ)的期望μ,方差为δ,优选的,方差δ可以取10,这样信号强度差距在10db以内的蓝牙节点仍能获得较高的置信度,则每个蓝牙节点的权值计算方法为:Specifically, in step S3, after determining the confidence of the Bluetooth node based on historical positioning, it is necessary to determine more detailed positioning coordinates in the area. Of course, it is considered that the mobile terminal should be the closest Bluetooth node, which is credible However, for the sake of higher robustness, the role of other Bluetooth nodes cannot be ignored. According to the difference between the signal strength of other Bluetooth nodes and the highest strength, different confidence levels are given to the remaining other Bluetooth nodes, and the Gaussian curve is used to calculate To simulate this law, assume that the signal strength of each Bluetooth node is Ri (i=1, 2, 3...), and take the largest value max(Ri) as the expected μ of the normal distribution N(Ri, μ, δ) , the variance is δ, preferably, the variance δ can be set to 10, so that the Bluetooth nodes whose signal strength difference is within 10db can still obtain a high degree of confidence, then the calculation method of the weight of each Bluetooth node is:

具体的,在步骤S4中,在得到每个蓝牙节点的权值后,根据所述蓝牙节点的权值和所述蓝牙节点的坐标向量计算所述当前定位坐标,则预估的所述当前定位坐标为:Specifically, in step S4, after the weight of each Bluetooth node is obtained, the current positioning coordinates are calculated according to the weight of the Bluetooth node and the coordinate vector of the Bluetooth node, and the estimated current positioning The coordinates are:

Yt=∑iPi*Xi 公式(3);Y t =∑ i P i *X i formula (3);

其中,Xi代表第i个蓝牙节点的坐标向量。Among them, Xi represents the coordinate vector of the ith Bluetooth node.

值得说明的是,所述当前定位坐标即为最终输出的定位坐标,则在用户手持移动终端不断移动的过程中,每获取一组蓝牙节点,根据其强度进行筛选后,观察其与上一检测周期估计的定位坐标,来确定当前蓝牙节点的置信度,进而求出当前定位坐标,每次输出的所述当前定位坐标在下一时间间隔(即下一检测周期)即作为所述初始位置坐标来进行计算。即在后续定位过程中,重复执行步骤S1~S4的工作过程。It is worth noting that the current positioning coordinates are the final output positioning coordinates. In the process that the user is holding the mobile terminal and moving continuously, each time a group of Bluetooth nodes is obtained, after screening according to their strength, observe the difference between them and the previous detection. The periodic estimated positioning coordinates are used to determine the confidence of the current Bluetooth node, and then the current positioning coordinates are obtained. The current positioning coordinates output each time are used as the initial position coordinates in the next time interval (ie, the next detection period). Calculation. That is, in the subsequent positioning process, the working processes of steps S1 to S4 are repeatedly performed.

进一步的,通过采用上述方案进行定位,定位精度已经有了较大提高,但如果能获取到所述移动终端的运动信息特征,则可以通过卡尔曼滤波算法将所述移动终端的运动信息特征和基于信号强度测量的位置估计线性拟合,还能够进一步完善当前时刻用户运动状态的估计。Further, by adopting the above scheme for positioning, the positioning accuracy has been greatly improved, but if the motion information features of the mobile terminal can be obtained, the motion information features of the mobile terminal and The linear fitting of the position estimation based on the signal strength measurement can further improve the estimation of the user's motion state at the current moment.

具体实施时,首先,在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号,并获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;然后,根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;最后,根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值,并根据所述蓝牙节点的权值计算当前定位坐标。During the specific implementation, firstly, acquire the Bluetooth signals of several Bluetooth nodes detected in the current detection period, and obtain the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period; then, according to the initial position coordinates and detection Calculate the confidence of the current Bluetooth node from the coordinate vector of the Bluetooth node to the Bluetooth signal; finally, calculate the weight of the Bluetooth node according to the detected Bluetooth signal strength of the Bluetooth node and the confidence, and calculate the weight of the Bluetooth node according to the Bluetooth signal. The weight of the node calculates the current positioning coordinates.

与现有技术相比,本发明公开的蓝牙定位方法,解决了现有技术中因受环境因素影响导致计算的实际距离值不准确的问题,同时还解决了需要前期采集数据导致成本增加的问题,本发明公开的蓝牙定位方法不需要直接拟合信号强度和实际距离的关系,提高准确度和易用性,免去前期采集数据训练数据库的需求,降低成本,纵使室内场景发生变化,也仅需要在后台重新分配计算相邻节点组的配置方案,不需要重新实地采集更新指纹库,大大缩减维护成本。Compared with the prior art, the Bluetooth positioning method disclosed by the present invention solves the problem of inaccurate calculated actual distance value in the prior art due to the influence of environmental factors, and also solves the problem of increasing cost due to the need to collect data in the early stage. , the Bluetooth positioning method disclosed in the present invention does not need to directly fit the relationship between signal strength and actual distance, improves accuracy and ease of use, eliminates the need for pre-collecting data to train a database, and reduces costs. Even if the indoor scene changes, only the It is necessary to redistribute and calculate the configuration scheme of adjacent node groups in the background, and it is not necessary to collect and update the fingerprint database on the spot, which greatly reduces the maintenance cost.

实施例二Embodiment 2

参见图2,图2是本发明实施例提供的一种蓝牙定位装置10的结构示意图;包括:Referring to FIG. 2, FIG. 2 is a schematic structural diagram of a Bluetooth positioning device 10 provided by an embodiment of the present invention; including:

蓝牙信号检测单元11,用于在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度,所述检测周期为时间段;The Bluetooth signal detection unit 11 is used for acquiring Bluetooth signals of several Bluetooth nodes detected in the current detection period; wherein, the Bluetooth signal is greater than a preset signal strength, and the detection period is a time period;

初始位置坐标获取单元12,用于获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;The initial position coordinate obtaining unit 12 is used to obtain the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period;

置信度获取单元13,用于根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;A confidence level obtaining unit 13, configured to calculate the confidence level of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node that detects the Bluetooth signal;

蓝牙节点权值获取单元14,用于根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值;A Bluetooth node weight acquisition unit 14, configured to calculate the weight of the Bluetooth node according to the detected Bluetooth signal strength and the confidence level of the Bluetooth node;

当前定位坐标获取单元15,用于根据所述蓝牙节点的权值计算当前定位坐标,,并将所述当前定位坐标存储为下一检测周期的初始位置坐标。The current positioning coordinate obtaining unit 15 is configured to calculate the current positioning coordinates according to the weight of the Bluetooth node, and store the current positioning coordinates as the initial position coordinates of the next detection cycle.

值得说明的是,本发明实施例所述的蓝牙定位装置10可以是移动终端,所述移动终端可以是手机、平板电脑或其他可实现定位功能的移动终端。本发明实施例在一定的可通行区域内布置若干个蓝牙节点用于发射蓝牙信号,每一所述蓝牙节点按相同的周期性发送信号,且发送的信号强度相等;其中,所述可通行区域被划分成若干个大小相等的正方形区域,每一所述正方形区域的四个节点上均设置有所述蓝牙节点。当用户手持所述移动终端进入所述蓝牙节点的信号范围内时,即可开始实现定位功能。It should be noted that the Bluetooth positioning apparatus 10 described in this embodiment of the present invention may be a mobile terminal, and the mobile terminal may be a mobile phone, a tablet computer, or other mobile terminals that can implement a positioning function. In the embodiment of the present invention, several Bluetooth nodes are arranged in a certain passable area for transmitting Bluetooth signals, and each of the Bluetooth nodes sends signals at the same periodicity, and the transmitted signal strengths are equal; wherein, the passable area is It is divided into several square areas of equal size, and the Bluetooth nodes are arranged on the four nodes of each square area. When the user holds the mobile terminal and enters the signal range of the Bluetooth node, the positioning function can be started.

选用的蓝牙模块的有效覆盖半径为10米,在m(m=5)米的范围内强度随着距离衰减的规律比较稳定,如果距离超过范围,距离的区分精度就会降低。为实现精度为米级的定位,将蓝牙模块布置于25平方米的大正方形区域的4个顶点上,在扩大定位区域时,只需将多个正方形按单边重合的方式进行拓展。于是在提前规划出的可通行区域内,每一个大小为25平方米的正方形区域都可以有四个蓝牙节点覆盖。若存在通信区域面积不足与25平方米的情况,可以适当调整蓝牙节点间的最小距离m,使其尽量均匀分布在四周外围,包裹住核心区域。The effective coverage radius of the selected Bluetooth module is 10 meters. In the range of m (m=5) meters, the intensity decays with the distance is relatively stable. If the distance exceeds the range, the distance discrimination accuracy will be reduced. In order to achieve meter-level positioning, the Bluetooth module is arranged on the four vertices of a large square area of 25 square meters. Therefore, in the passable area planned in advance, each square area with a size of 25 square meters can be covered by four Bluetooth nodes. If there is a situation where the communication area is less than 25 square meters, the minimum distance m between the Bluetooth nodes can be adjusted appropriately so that it is evenly distributed around the periphery and wraps the core area.

具体的,所述蓝牙信号检测单元11在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度;优选的,所述检测周期可以为2s。当打开定位程序时,进入被蓝牙节点覆盖的区域内,首先将统计最近2s中内采集到的若干个蓝牙节点的信号强度,并从中筛选出信号强度大于预设信号强度的蓝牙节点。Specifically, the Bluetooth signal detection unit 11 acquires the Bluetooth signals of several Bluetooth nodes detected in the current detection period; wherein, the Bluetooth signal is greater than a preset signal strength; preferably, the detection period may be 2s. When the positioning program is opened, it enters the area covered by the Bluetooth node. First, the signal strength of several Bluetooth nodes collected in the last 2s will be counted, and the Bluetooth nodes whose signal strength is greater than the preset signal strength will be screened out.

具体的,所述初始位置坐标获取单元12获取上一检测周期的定位坐标为当前检测周期的初始位置坐标,考虑到手机终端的移动是连续,在单位采集时间间隔(即所述检测周期)内,其位移不会与上一检测周期的位置差产生较大偏差,于是本发明实施例以上一检测周期估计的定位坐标Yt-1为期望的高斯曲线N(Xi,Yt-1,θ)来模拟这一规律。其中,Xi代表第i个蓝牙节点的坐标向量,方差θ=10,这样距离上一次定位相差十米以内的蓝牙节点仍能获得较高的置信度,而在十米距离之外,即使检测到了蓝牙节点,也仍然被认为不太可信,使其对定位的影响因子较小,所述置信度获取单元13根据所述初始位置坐标和上一检测周期中检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度,所述蓝牙节点的置信度的计算方法为:Specifically, the initial position coordinate obtaining unit 12 obtains the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period. Considering that the movement of the mobile phone terminal is continuous, within the unit collection time interval (ie the detection period) , its displacement will not have a large deviation from the position difference of the previous detection period, so the positioning coordinate Y t-1 estimated by the previous detection period in the embodiment of the present invention is the desired Gaussian curve N(X i , Y t-1 , θ) to simulate this law. Among them, X i represents the coordinate vector of the i-th Bluetooth node, and the variance θ=10, so that the Bluetooth nodes within ten meters from the last positioning can still obtain a high degree of confidence. When the bluetooth node is reached, it is still considered to be less credible, so that its influence factor on positioning is small. The coordinate vector calculates the confidence of the current Bluetooth node, and the calculation method of the confidence of the Bluetooth node is:

confidencei=N(Xi,Yt-1,θ) 公式(1);confidence i =N(X i ,Y t-1 ,θ) Formula (1);

其中,若当前检测周期为初始检测周期,则初次检测到蓝牙信号的所述蓝牙节点的置信度为1,即此时confidencei=1。Wherein, if the current detection period is the initial detection period, the confidence of the Bluetooth node that detects the Bluetooth signal for the first time is 1, that is, confidence i =1 at this time.

具体的,在确定所述蓝牙节点基于历史定位的置信度后,需要在该区域内确定更详细的定位坐标,理所当然的,认为移动终端应该最为接近的蓝牙节点,其可信度最高,不过也为了更高的鲁棒性,不能忽视其他蓝牙节点的作用,根据其他蓝牙节点的信号强度与最高强度的差值,对剩余其他蓝牙节点赋予不同的置信度,用高斯曲线来模拟这一规律,假设各蓝牙节点的信号强度分别为Ri(i=1,2,3…),将其中最大的数值max(Ri)作为正态分布N(Ri,μ,δ)的期望μ,方差为δ,优选的,方差δ可以取10,这样信号强度差距在10db以内的蓝牙节点仍能获得较高的置信度,所述蓝牙节点权值获取单元14根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值,每个蓝牙节点的权值计算方法为:Specifically, after determining the confidence of the Bluetooth node based on historical positioning, it is necessary to determine more detailed positioning coordinates in the area. Of course, it is considered that the Bluetooth node that the mobile terminal should be the closest to has the highest reliability. For higher robustness, the role of other Bluetooth nodes cannot be ignored. According to the difference between the signal strength of other Bluetooth nodes and the highest strength, the remaining other Bluetooth nodes are given different confidence levels, and the Gaussian curve is used to simulate this law. Assuming that the signal strength of each Bluetooth node is Ri (i=1, 2, 3...), the maximum value max(Ri) is taken as the expected μ of the normal distribution N(Ri, μ, δ), and the variance is δ, Preferably, the variance δ can be set to 10, so that the bluetooth nodes whose signal strength difference is within 10db can still obtain a higher confidence degree. The confidence calculates the weight of the Bluetooth node, and the calculation method for the weight of each Bluetooth node is:

具体的,在得到每个蓝牙节点的权值后,所述当前定位坐标获取单元15根据所述蓝牙节点的权值和所述蓝牙节点的坐标向量计算所述当前定位坐标,则预估的所述当前定位坐标为:Specifically, after obtaining the weight of each Bluetooth node, the current positioning coordinate obtaining unit 15 calculates the current positioning coordinates according to the weight of the Bluetooth node and the coordinate vector of the Bluetooth node, and the estimated The current positioning coordinates are:

Yt=∑iPi*Xi 公式(3);Y t =∑ i P i *X i formula (3);

其中,Xi代表第i个蓝牙节点的坐标向量。Among them, Xi represents the coordinate vector of the ith Bluetooth node.

值得说明的是,所述当前定位坐标即为最终输出的定位坐标,则在用户手持移动终端不断移动的过程中,每获取一组蓝牙节点,根据其强度进行筛选后,观察其与上一检测周期估计的定位坐标,来确定当前蓝牙节点的置信度,进而求出当前定位坐标,每次输出的所述当前定位坐标在下一时间间隔(即下一检测周期)即作为所述初始位置坐标来进行计算。It is worth noting that the current positioning coordinates are the final output positioning coordinates. In the process that the user is holding the mobile terminal and moving continuously, each time a group of Bluetooth nodes is obtained, after screening according to their strength, observe the difference between them and the previous detection. The periodic estimated positioning coordinates are used to determine the confidence of the current Bluetooth node, and then the current positioning coordinates are obtained. The current positioning coordinates output each time are used as the initial position coordinates in the next time interval (ie, the next detection period). Calculation.

进一步的,通过采用上述方案进行定位,定位精度已经有了较大提高,但如果能获取到所述移动终端的运动信息特征,则可以通过卡尔曼滤波算法将所述移动终端的运动信息特征和基于信号强度测量的位置估计线性拟合,还能够进一步完善当前时刻用户运动状态的估计。Further, by adopting the above scheme for positioning, the positioning accuracy has been greatly improved, but if the motion information features of the mobile terminal can be obtained, the motion information features of the mobile terminal and The linear fitting of the position estimation based on the signal strength measurement can further improve the estimation of the user's motion state at the current moment.

具体实施时,首先,蓝牙信号检测单元11在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号,初始位置坐标获取单元12获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;然后,置信度获取单元13根据所述初始位置坐标和当前检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;最后,蓝牙节点权值获取单元14根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值,当前定位坐标获取单元15根据所述蓝牙节点的权值计算当前定位坐标。During specific implementation, first, the Bluetooth signal detection unit 11 acquires the Bluetooth signals of several Bluetooth nodes detected in the current detection period, and the initial position coordinate acquisition unit 12 acquires the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period; Then, the confidence degree acquisition unit 13 calculates the confidence degree of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node that currently detects the Bluetooth signal; finally, the Bluetooth node weight acquisition unit 14 is based on the detected Bluetooth node. The weight of the Bluetooth node is calculated based on the Bluetooth signal strength and the confidence level, and the current positioning coordinate obtaining unit 15 calculates the current positioning coordinate according to the weight of the Bluetooth node.

与现有技术相比,本发明公开的蓝牙定位装置10,解决了现有技术中因受环境因素影响导致计算的实际距离值不准确的问题,同时还解决了需要前期采集数据导致成本增加的问题,本发明公开的蓝牙定位装置10不需要直接拟合信号强度和实际距离的关系,提高准确度和易用性,免去前期采集数据训练数据库的需求,降低成本,纵使室内场景发生变化,也仅需要在后台重新分配计算相邻节点组的配置方案,不需要重新实地采集更新指纹库,大大缩减维护成本。Compared with the prior art, the Bluetooth positioning device 10 disclosed in the present invention solves the problem that the calculated actual distance value is inaccurate due to the influence of environmental factors in the prior art, and also solves the problem of increasing the cost due to the need to collect data in the early stage. The problem is that the Bluetooth positioning device 10 disclosed in the present invention does not need to directly fit the relationship between signal strength and actual distance, improves accuracy and ease of use, eliminates the need for pre-collecting data to train a database, and reduces costs. Even if the indoor scene changes, It only needs to redistribute and calculate the configuration scheme of adjacent node groups in the background, and does not need to re-collect and update the fingerprint database on the spot, which greatly reduces the maintenance cost.

实施例三Embodiment 3

参见图3,图3是本发明实施例提供的一种蓝牙定位设备20的结构示意图;该实施例的蓝牙定位设备20包括:处理器21、存储器22以及存储在所述存储器22中并可在所述处理器21上运行的计算机程序。所述处理器21执行所述计算机程序时实现上述各个蓝牙定位方法实施例中的步骤,例如图1所示的步骤S1~S4。或者,所述处理器21执行所述计算机程序时实现上述各装置实施例中各模块/单元的功能,例如初次定位坐标获取单元11。Referring to FIG. 3, FIG. 3 is a schematic structural diagram of a Bluetooth positioning device 20 provided by an embodiment of the present invention; the Bluetooth positioning device 20 in this embodiment includes: a processor 21, a memory 22, and a processor 21, a memory 22, and a device stored in the memory 22 and available in the A computer program running on the processor 21 . When the processor 21 executes the computer program, the steps in each of the foregoing Bluetooth positioning method embodiments are implemented, for example, steps S1 to S4 shown in FIG. 1 . Alternatively, when the processor 21 executes the computer program, the functions of the modules/units in the foregoing device embodiments are implemented, for example, the initial positioning of the coordinate obtaining unit 11 .

示例性的,所述计算机程序可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器22中,并由所述处理器21执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序在所述蓝牙定位设备20中的执行过程。例如,所述计算机程序可以被分割成蓝牙信号检测单元11、初始位置坐标获取单元12、置信度获取单元13、蓝牙节点权值获取单元14和当前定位坐标获取单元15,各模块具体功能请参考上述实施例二中所述蓝牙定位装置10的各个单元的具体功能,在此不再赘述。Exemplarily, the computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 22 and executed by the processor 21 to complete the present invention. invention. The one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program in the Bluetooth positioning device 20 . For example, the computer program can be divided into a Bluetooth signal detection unit 11, an initial position coordinate acquisition unit 12, a confidence degree acquisition unit 13, a Bluetooth node weight acquisition unit 14, and a current positioning coordinate acquisition unit 15. Please refer to the specific functions of each module. The specific functions of each unit of the Bluetooth positioning device 10 described in the second embodiment above will not be repeated here.

所述蓝牙定位设备20可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述蓝牙定位设备20可包括,但不仅限于,处理器21、存储器22。本领域技术人员可以理解,所述示意图仅仅是蓝牙定位设备20的示例,并不构成对蓝牙定位设备20的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述蓝牙定位设备20还可以包括输入输出设备、网络接入设备、总线等。The Bluetooth positioning device 20 may be a computing device such as a desktop computer, a notebook computer, a palmtop computer, and a cloud server. The Bluetooth positioning device 20 may include, but is not limited to, a processor 21 and a memory 22 . Those skilled in the art can understand that the schematic diagram is only an example of the Bluetooth positioning device 20, and does not constitute a limitation on the Bluetooth positioning device 20, and may include more or less components than the one shown, or combine certain components, or Different components, such as the Bluetooth positioning device 20, may also include input and output devices, network access devices, buses, and the like.

所称处理器21可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述蓝牙定位设备20的控制中心,利用各种接口和线路连接整个蓝牙定位设备20的各个部分。The so-called processor 21 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is the control center of the Bluetooth positioning device 20, and uses various interfaces and lines to connect the entire Bluetooth positioning device 20. various parts.

所述存储器22可用于存储所述计算机程序和/或模块,所述处理器21通过运行或执行存储在所述存储器22内的计算机程序和/或模块,以及调用存储在存储器22内的数据,实现所述蓝牙定位设备20的各种功能。所述存储器22可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器22可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(SecureDigital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 22 can be used to store the computer programs and/or modules, and the processor 21 executes or executes the computer programs and/or modules stored in the memory 22 and calls the data stored in the memory 22, Various functions of the Bluetooth positioning device 20 are implemented. The memory 22 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.); the storage data area may Stores data (such as audio data, phonebook, etc.) created according to the use of the mobile phone, and the like. In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory such as hard disk, internal memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card , a flash memory card (Flash Card), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.

其中,所述蓝牙定位设备20集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器21执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。Wherein, if the modules/units integrated in the Bluetooth positioning device 20 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor 21, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Electric carrier signals and telecommunication signals are not included.

实施例四Embodiment 4

参见图4,图4是本发明实施例提供的一种蓝牙定位系统30的结构示意图;包括若干蓝牙节点31和如上述任一实施例所述的蓝牙定位装置10;其中,Referring to FIG. 4, FIG. 4 is a schematic structural diagram of a Bluetooth positioning system 30 provided by an embodiment of the present invention; including several Bluetooth nodes 31 and the Bluetooth positioning device 10 described in any of the above embodiments; wherein,

所述蓝牙节点31设于可通行区域中;其中,所述可通行区域被划分成若干个大小相等的正方形区域,每一所述正方形区域的四个节点上均设置有所述蓝牙节点31;每一所述蓝牙节点31按照相同周期发送相同信号强度的蓝牙信号。The bluetooth node 31 is set in a passable area; wherein, the passable area is divided into several square areas of equal size, and the bluetooth node 31 is arranged on four nodes of each square area; Each of the bluetooth nodes 31 sends bluetooth signals with the same signal strength according to the same period.

值得说明的是,所述蓝牙定位装置10的具体工作过程请参考上述实施例二所述蓝牙定位装置10的工作过程,在此不再赘述。It should be noted that, for the specific working process of the Bluetooth positioning device 10 , please refer to the working process of the Bluetooth positioning device 10 described in the second embodiment, which will not be repeated here.

具体实施时,首先,所述蓝牙定位装置10在当前检测周期内获取检测到的若干蓝牙节点31的蓝牙信号,并获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;然后,所述蓝牙定位装置10根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点31的坐标向量计算当前蓝牙节点的置信度;最后,所述蓝牙定位装置10根据检测到的所述蓝牙节点31的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值,并根据所述蓝牙节点31的权值计算当前定位坐标。In specific implementation, first, the Bluetooth positioning device 10 acquires the Bluetooth signals of several Bluetooth nodes 31 detected in the current detection period, and obtains the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period; The Bluetooth positioning device 10 calculates the confidence of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node 31 that detects the Bluetooth signal; finally, the Bluetooth positioning device 10 The weight of the Bluetooth node is calculated based on the signal strength and the confidence, and the current positioning coordinates are calculated according to the weight of the Bluetooth node 31 .

与现有技术相比,本发明公开的蓝牙定位系统30,解决了现有技术中因受环境因素影响导致计算的实际距离值不准确的问题,同时还解决了需要前期采集数据导致成本增加的问题,本发明公开的蓝牙定位系统30不需要直接拟合信号强度和实际距离的关系,提高准确度和易用性,免去前期采集数据训练数据库的需求,降低成本,纵使室内场景发生变化,也仅需要在后台重新分配计算相邻节点组的配置方案,不需要重新实地采集更新指纹库,大大缩减维护成本。Compared with the prior art, the Bluetooth positioning system 30 disclosed in the present invention solves the problem that the calculated actual distance value is inaccurate due to the influence of environmental factors in the prior art, and also solves the problem of increasing the cost due to the need to collect data in the early stage. The problem is that the Bluetooth positioning system 30 disclosed in the present invention does not need to directly fit the relationship between signal strength and actual distance, improves accuracy and ease of use, eliminates the need for pre-collecting data to train a database, and reduces costs. Even if the indoor scene changes, It only needs to redistribute and calculate the configuration scheme of adjacent node groups in the background, and does not need to re-collect and update the fingerprint database on the spot, which greatly reduces the maintenance cost.

需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本发明提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It should be noted that the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical unit, that is, it can be located in one place, or it can be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. In addition, in the drawings of the apparatus embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative effort.

以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。The above are the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made, and these improvements and modifications may also be regarded as It is the protection scope of the present invention.

Claims (10)

1.一种蓝牙定位方法,其特征在于,包括:1. a Bluetooth positioning method, is characterized in that, comprises: 在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度,所述检测周期为时间段;Acquire the Bluetooth signals of several Bluetooth nodes detected in the current detection period; wherein, the Bluetooth signal is greater than a preset signal strength, and the detection period is a time period; 获取上一检测周期的定位坐标为当前检测周期的初始位置坐标,根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;Obtain the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period, and calculate the confidence level of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node that detects the Bluetooth signal; 根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值;Calculate the weight of the bluetooth node according to the detected bluetooth signal strength of the bluetooth node and the confidence; 根据所述蓝牙节点的权值计算当前定位坐标,并将所述当前定位坐标存储为下一检测周期的初始位置坐标。The current positioning coordinates are calculated according to the weights of the Bluetooth nodes, and the current positioning coordinates are stored as the initial position coordinates of the next detection cycle. 2.如权利要求1所述的蓝牙定位方法,其特征在于,若当前检测周期为初始检测周期,则初次检测到蓝牙信号的所述蓝牙节点的置信度为1。2 . The Bluetooth positioning method according to claim 1 , wherein if the current detection period is the initial detection period, the confidence level of the Bluetooth node that detects the Bluetooth signal for the first time is 1. 3 . 3.如权利要求1所述的蓝牙定位方法,其特征在于,每一所述蓝牙节点按照相同周期发送相同信号强度的蓝牙信号。3 . The Bluetooth positioning method according to claim 1 , wherein each of the Bluetooth nodes sends Bluetooth signals with the same signal strength according to the same period. 4 . 4.如权利要求1所述的蓝牙定位方法,其特征在于,所述蓝牙节点设于可通行区域中;其中,所述可通行区域被划分成若干个大小相等的正方形区域,每一所述正方形区域的四个节点上均设置有所述蓝牙节点。4. The Bluetooth positioning method according to claim 1, wherein the Bluetooth node is set in a passable area; wherein, the passable area is divided into several square areas of equal size, each of the The bluetooth nodes are arranged on the four nodes in the square area. 5.如权利要求1所述的蓝牙定位方法,其特征在于,所述根据所述蓝牙节点的权值计算当前定位坐标,具体包括:5. The Bluetooth positioning method according to claim 1, wherein the calculation of the current positioning coordinates according to the weight of the Bluetooth node specifically includes: 根据所述蓝牙节点的权值和所述蓝牙节点的坐标向量计算所述当前定位坐标。The current positioning coordinates are calculated according to the weight of the Bluetooth node and the coordinate vector of the Bluetooth node. 6.一种蓝牙定位装置,其特征在于,包括:6. A Bluetooth positioning device, characterized in that, comprising: 蓝牙信号检测单元,用于在当前检测周期内获取检测到的若干蓝牙节点的蓝牙信号;其中,所述蓝牙信号大于预设信号强度,所述检测周期为时间段;A Bluetooth signal detection unit, configured to acquire Bluetooth signals of several Bluetooth nodes detected in the current detection period; wherein, the Bluetooth signal is greater than a preset signal strength, and the detection period is a time period; 初始位置坐标获取单元,用于获取上一检测周期的定位坐标为当前检测周期的初始位置坐标;an initial position coordinate obtaining unit, used for obtaining the positioning coordinates of the previous detection period as the initial position coordinates of the current detection period; 置信度获取单元,用于根据所述初始位置坐标和检测到蓝牙信号的蓝牙节点的坐标向量计算当前蓝牙节点的置信度;a confidence level obtaining unit, configured to calculate the confidence level of the current Bluetooth node according to the initial position coordinates and the coordinate vector of the Bluetooth node that detects the Bluetooth signal; 蓝牙节点权值获取单元,用于根据检测到的所述蓝牙节点的蓝牙信号强度和所述置信度计算所述蓝牙节点的权值;a Bluetooth node weight acquisition unit, configured to calculate the weight of the Bluetooth node according to the detected Bluetooth signal strength and the confidence level of the Bluetooth node; 当前定位坐标获取单元,用于根据所述蓝牙节点的权值计算当前定位坐标,,并将所述当前定位坐标存储为下一检测周期的初始位置坐标。The current positioning coordinate obtaining unit is configured to calculate the current positioning coordinates according to the weight of the Bluetooth node, and store the current positioning coordinates as the initial position coordinates of the next detection cycle. 7.如权利要求6所述的蓝牙定位装置,其特征在于,若当前检测周期为初始检测周期,则初次检测到蓝牙信号的所述蓝牙节点的置信度为1。7 . The Bluetooth positioning device according to claim 6 , wherein if the current detection period is the initial detection period, the confidence level of the Bluetooth node that detects the Bluetooth signal for the first time is 1. 8 . 8.如权利要求6所述的蓝牙定位装置,其特征在于,所述当前定位坐标获取单元具体用于:8. The bluetooth positioning device according to claim 6, wherein the current positioning coordinate obtaining unit is specifically used for: 根据所述蓝牙节点的权值和所述蓝牙节点的坐标向量计算所述当前定位坐标。The current positioning coordinates are calculated according to the weight of the Bluetooth node and the coordinate vector of the Bluetooth node. 9.一种蓝牙定位设备,其特征在于,包括处理器、存储器以及存储在所述存储器中且被配置为由所述处理器执行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至5中任意一项所述的蓝牙定位方法。9. A Bluetooth positioning device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, when the processor executes the computer program, The Bluetooth positioning method according to any one of claims 1 to 5. 10.一种蓝牙定位系统,其特征在于,包括若干蓝牙节点和如权利要求6~8中任一项所述的蓝牙定位装置;其中,10. A Bluetooth positioning system, characterized by comprising several Bluetooth nodes and the Bluetooth positioning device according to any one of claims 6 to 8; wherein, 所述蓝牙节点设于可通行区域中;其中,所述可通行区域被划分成若干个大小相等的正方形区域,每一所述正方形区域的四个节点上均设置有所述蓝牙节点;每一所述蓝牙节点按照相同周期发送相同信号强度的蓝牙信号。The bluetooth node is set in a passable area; wherein, the passable area is divided into several square areas of equal size, and the bluetooth nodes are arranged on the four nodes of each square area; each The bluetooth nodes send bluetooth signals with the same signal strength according to the same period.
CN201910136106.7A 2019-02-25 2019-02-25 A Bluetooth positioning method, device, device and system Pending CN109874172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910136106.7A CN109874172A (en) 2019-02-25 2019-02-25 A Bluetooth positioning method, device, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910136106.7A CN109874172A (en) 2019-02-25 2019-02-25 A Bluetooth positioning method, device, device and system

Publications (1)

Publication Number Publication Date
CN109874172A true CN109874172A (en) 2019-06-11

Family

ID=66919267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910136106.7A Pending CN109874172A (en) 2019-02-25 2019-02-25 A Bluetooth positioning method, device, device and system

Country Status (1)

Country Link
CN (1) CN109874172A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938854A (en) * 2021-10-18 2022-01-14 深圳市前海智车科技有限公司 Beacon signal preprocessing method, system and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820582A (en) * 2009-02-27 2010-09-01 美国博通公司 The method and system of processing signals
US20160316324A1 (en) * 2015-04-23 2016-10-27 Blazer and Flip Flops, Inc. dba The Experience Engine Targeted venue message distribution
CN107734636A (en) * 2017-09-14 2018-02-23 上海斐讯数据通信技术有限公司 A kind of indoor positioning algorithms and system
CN107801241A (en) * 2016-09-07 2018-03-13 黄大卫 Indoor orientation method and system based on wifi equipment
CN108064019A (en) * 2017-12-29 2018-05-22 北京奇宝科技有限公司 A kind of intelligent locating method, device, server and computer readable storage medium
CN108375754A (en) * 2018-02-10 2018-08-07 沈阳理工大学 Node positioning method based on mobile node original state and mobile status in WSN
CN108984785A (en) * 2018-07-27 2018-12-11 武汉大学 A kind of update method and device of the fingerprint base based on historical data and increment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820582A (en) * 2009-02-27 2010-09-01 美国博通公司 The method and system of processing signals
US20160316324A1 (en) * 2015-04-23 2016-10-27 Blazer and Flip Flops, Inc. dba The Experience Engine Targeted venue message distribution
CN107801241A (en) * 2016-09-07 2018-03-13 黄大卫 Indoor orientation method and system based on wifi equipment
CN107734636A (en) * 2017-09-14 2018-02-23 上海斐讯数据通信技术有限公司 A kind of indoor positioning algorithms and system
CN108064019A (en) * 2017-12-29 2018-05-22 北京奇宝科技有限公司 A kind of intelligent locating method, device, server and computer readable storage medium
CN108375754A (en) * 2018-02-10 2018-08-07 沈阳理工大学 Node positioning method based on mobile node original state and mobile status in WSN
CN108984785A (en) * 2018-07-27 2018-12-11 武汉大学 A kind of update method and device of the fingerprint base based on historical data and increment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938854A (en) * 2021-10-18 2022-01-14 深圳市前海智车科技有限公司 Beacon signal preprocessing method, system and storage medium

Similar Documents

Publication Publication Date Title
CN109883423B (en) Positioning method, system, equipment and storage medium based on Kalman filtering
CN111935820B (en) Positioning implementation method based on wireless network and related equipment
CN109326087B (en) Urban waterlogging early warning method and device based on drainage pipe network monitoring
CN110335313A (en) Audio acquisition equipment positioning method and device and speaker identification method and system
CN113420682A (en) Target detection method and device in vehicle-road cooperation and road side equipment
CN108732559A (en) A kind of localization method, device, electronic equipment and readable storage medium storing program for executing
CN106470478B (en) Positioning data processing method, device and system
CN106600652A (en) Panoramic camera positioning method based on artificial neural network
CN116912508A (en) Target tracking method and device for multimedia data
CN109831737B (en) A confidence-based Bluetooth positioning method, device, device and system
CN114371475A (en) Method, system, equipment and computer storage medium for optimizing calibration parameters
CN105898711B (en) A kind of localization method and device based on earth magnetism reference line
CN109889977B (en) Bluetooth positioning method, device, equipment and system based on Gaussian regression
CN113486732A (en) Crowd density estimation method, device, equipment and storage medium
CN119881794A (en) Multi-source fusion indoor positioning method and equipment based on particle filtering and PDR
WO2022088613A1 (en) Robot positioning method and apparatus, device and storage medium
CN109788431B (en) Bluetooth positioning method, device, equipment and system based on adjacent node group
CN109874172A (en) A Bluetooth positioning method, device, device and system
CN118152677B (en) Track complement method, terminal and computer readable storage medium
CN113269301A (en) Method and system for estimating parameters of multi-target tracking system based on neural network
CN116593961B (en) Positioning method and device of mobile terminal
CN118015559A (en) Object identification method and device, electronic equipment and storage medium
US20210295257A1 (en) System and method for geofence based cycle time determination
CN114494365B (en) Image processing method, device, storage medium and electronic device
CN113038596B (en) Indoor positioning method, apparatus, device and computer-readable storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190611