CN114760686A - Asset positioning method and system based on BLE Mesh network - Google Patents
Asset positioning method and system based on BLE Mesh network Download PDFInfo
- Publication number
- CN114760686A CN114760686A CN202210484275.1A CN202210484275A CN114760686A CN 114760686 A CN114760686 A CN 114760686A CN 202210484275 A CN202210484275 A CN 202210484275A CN 114760686 A CN114760686 A CN 114760686A
- Authority
- CN
- China
- Prior art keywords
- node
- mesh
- signal strength
- information
- gateway
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 230000008569 process Effects 0.000 claims description 15
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 claims description 5
- 239000000284 extract Substances 0.000 claims description 3
- 238000012856 packing Methods 0.000 claims description 3
- 230000002159 abnormal effect Effects 0.000 claims 2
- 238000010276 construction Methods 0.000 abstract description 11
- 238000004364 calculation method Methods 0.000 abstract description 2
- 238000004891 communication Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000006855 networking Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 235000008694 Humulus lupulus Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W64/00—Locating users or terminals or network equipment for network management purposes, e.g. mobility management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/24—Connectivity information management, e.g. connectivity discovery or connectivity update
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Mobile Radio Communication Systems (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
本发明属于室内定位技术领域,具体涉及一种基于BLE Mesh网络的资产定位方法及系统;该方法包括:构建基于BLE Mesh网络的资产定位系统;网关周期性地向节点发送心跳包;节点扫描心跳包,得到邻居节点的广播地址和信号强度值;当信号强度样本数量达到阈值时,对所有信号强度样本进行滤波处理;得到各邻居节点对应的信号强度均值;节点定时将邻居节点信息打包;将打包后的信息经网关传回后台定位服务器;后台定位服务器根据打包后的信息对资产进行相对定位解算,得到资产的具体位置;本发明大大降低了定位系统的建设成本,同时降低了前期施工的复杂度,提高了系统部署的灵活性。
The invention belongs to the technical field of indoor positioning, and in particular relates to an asset positioning method and system based on a BLE Mesh network; the method includes: constructing an asset positioning system based on a BLE Mesh network; a gateway periodically sends a heartbeat packet to a node; the node scans the heartbeat packet to obtain the broadcast address and signal strength value of the neighbor node; when the number of signal strength samples reaches the threshold, filter all the signal strength samples; obtain the mean value of the signal strength corresponding to each neighbor node; the node periodically packs the neighbor node information; The packaged information is sent back to the background positioning server through the gateway; the background positioning server performs a relative positioning calculation on the asset according to the packaged information, and obtains the specific position of the asset; the invention greatly reduces the construction cost of the positioning system and reduces the preliminary construction at the same time. The complexity of the system improves the flexibility of system deployment.
Description
技术领域technical field
本发明属于室内定位技术领域,具体涉及一种基于BLE Mesh网络的资产定位方法及系统。The invention belongs to the technical field of indoor positioning, and in particular relates to an asset positioning method and system based on a BLE Mesh network.
背景技术Background technique
由于早期的低功耗蓝牙只能实现“点对点”的通信,不支持Mesh组网,不能进行“多对多”的通信,所以目前商用的定位产品常用的蓝牙定位方法有基于范围检测的定位、基于信号强度的定位以及基于角度的定位三种。Because the early low-power Bluetooth can only achieve "point-to-point" communication, does not support Mesh networking, and cannot carry out "many-to-many" communication, the Bluetooth positioning methods commonly used in current commercial positioning products include range detection-based positioning, There are three types of positioning based on signal strength and positioning based on angle.
基于范围检测的定位系统是利用不同功率等级的蓝牙设备的信号覆盖范围不同这一特性来实现的,资产管理标签用来发送带有自身MAC地址等信息的信号,蓝牙网关则用来读取并解析资产管理标签发来的信息,能收到信息就表示资产在网关所在的房间,这种方法只能识别空间中资产的存在,而不能检测资产的位置。The positioning system based on range detection is realized by using the feature that the signal coverage range of Bluetooth devices of different power levels is different. The asset management tag is used to send signals with information such as its own MAC address, and the Bluetooth gateway is used to read and Parse the information sent by the asset management tag. If the information can be received, it means that the asset is in the room where the gateway is located. This method can only identify the existence of the asset in the space, but cannot detect the location of the asset.
基于信号强度的定位系统是利用接收到的信号强度值为特征量进行定位,这种方法定位精度在1~10m范围,这取决于锚节点的部署密度以及所使用的优化方法。一般可以分为信号模型定位法和场强指纹匹配法两类。信号模型定位法通过公式将接收到的RSSI值换算成距离,用基于测距的算法进行目标定位,这类方法通常需要配合滤波算法或迭代算法来提高定位精度。而场强指纹匹配法是直接用接收到的RSSI值与前期建立的指纹数据库进行比对,从而得到定位坐标,此类方法不需要解算,但是前期的指纹离线采集需要耗费大量的时间及人力成本。The signal strength-based positioning system uses the received signal strength as a feature value for positioning. The positioning accuracy of this method is in the range of 1 to 10 m, which depends on the deployment density of anchor nodes and the optimization method used. Generally, it can be divided into two categories: signal model positioning method and field strength fingerprint matching method. The signal model positioning method converts the received RSSI value into a distance through a formula, and uses a ranging-based algorithm to locate the target. This kind of method usually needs to cooperate with a filtering algorithm or an iterative algorithm to improve the positioning accuracy. The field intensity fingerprint matching method is to directly compare the received RSSI value with the fingerprint database established in the previous stage to obtain the positioning coordinates. This kind of method does not need to solve, but the offline fingerprint collection in the early stage requires a lot of time and manpower cost.
基于角度的定位系统则是通过锚节点中的天线阵列获取信号在不同天线之间的相位差,从而获得来波方向的角度信息,再利用三角定位算法来实现定位。相比基于信号强度的定位方式极大的提高了定位精度,甚至可以达到亚米级。然而,这类定位方法对硬件要求较高,需要配备天线阵列,不仅成本高而且数据处理较复杂。The angle-based positioning system obtains the phase difference of the signal between different antennas through the antenna array in the anchor node, so as to obtain the angle information of the incoming wave direction, and then uses the triangulation positioning algorithm to realize the positioning. Compared with the positioning method based on signal strength, the positioning accuracy is greatly improved, and it can even reach the sub-meter level. However, this type of positioning method requires high hardware and needs to be equipped with an antenna array, which is not only costly but also complicated in data processing.
基于范围检测的资产定位系统只能达到“房间级”的定位,其精度不足以满足当下资产定位的需求。而基于信号强度和角度的定位系统虽然定位精度得到了提升,其中基于角度的定位系统甚至远超资产定位的米级定位需求,但是两者当前的系统结构都需要在建设初期部署大量的定位基站作为锚节点,单个定位基站的故障势必影响到其覆盖范围内的资产定位精度,并且数据的回传还需要通过加装WIFI模块或是布设网线的方式来解决,使得系统的建设成本进一步增加,前期工程实施复杂。The asset positioning system based on range detection can only achieve "room-level" positioning, and its accuracy is not enough to meet the needs of current asset positioning. Although the positioning accuracy of the positioning system based on signal strength and angle has been improved, the angle-based positioning system even far exceeds the meter-level positioning requirements of asset positioning, but the current system structure of both requires the deployment of a large number of positioning base stations in the early stage of construction. As an anchor node, the failure of a single positioning base station will inevitably affect the asset positioning accuracy within its coverage area, and the data return needs to be solved by adding a WIFI module or laying a network cable, which further increases the construction cost of the system. The pre-engineering implementation is complicated.
综上所述,亟需一种能满足资产定位精度需求的同时,将成本大幅降低,让前期施工变得更加灵活简便的资产定位方法。To sum up, there is an urgent need for an asset positioning method that can meet the requirements of asset positioning accuracy, while greatly reducing the cost and making pre-construction more flexible and convenient.
发明内容SUMMARY OF THE INVENTION
针对现有技术存在的不足,本发明提出了一种基于BLE Mesh网络的资产定位方法及系统,该方法包括:In view of the deficiencies in the prior art, the present invention proposes a method and system for locating assets based on BLE Mesh network. The method includes:
S1:采用资产标签和网关进行组网,得到利用BLE Mesh网络进行通信的资产定位系统;S1: Use asset tags and gateways for networking, and obtain an asset positioning system that uses BLE Mesh network for communication;
S2:网关周期性地向Mesh网络中的所有节点发送心跳包;其中,不同的心跳包具有不同的序列号;S2: The gateway periodically sends heartbeat packets to all nodes in the Mesh network; wherein, different heartbeat packets have different sequence numbers;
S3:Mesh网络中所有Mesh节点扫描心跳包,得到邻居节点的广播地址和信号强度值;Mesh节点判断是否第一次收到该序列号的心跳包,若为第一次,则根据该心跳包获取节点到网关的最短跳距值并向邻居节点转发该心跳包,否则,将该心跳包丢弃;S3: All Mesh nodes in the Mesh network scan the heartbeat packet to obtain the broadcast address and signal strength value of the neighbor node; the Mesh node judges whether it has received the heartbeat packet of the sequence number for the first time, and if it is the first time, according to the heartbeat packet Obtain the shortest hop distance value from the node to the gateway and forward the heartbeat packet to the neighbor node, otherwise, discard the heartbeat packet;
S4:设置信号强度样本数量阈值,节点统计扫描到的信号强度样本数量;若信号强度样本数量达到阈值,则对所有信号强度样本进行处理,得到各邻居节点对应的信号强度均值;S4: Set the threshold of the number of signal strength samples, and the node counts the number of scanned signal strength samples; if the number of signal strength samples reaches the threshold, all signal strength samples are processed to obtain the mean value of signal strength corresponding to each neighbor node;
S5:Mesh网络中所有Mesh节点定时将自身的邻居节点的广播地址和信号强度均值以及节点自身的电量信息进行打包;将打包后的信息经网关传回后台定位服务器;S5: All Mesh nodes in the Mesh network regularly package the broadcast address and average signal strength of their neighbor nodes and the node's own power information; the packaged information is sent back to the background positioning server through the gateway;
S6:后台定位服务器根据打包后的信息对资产进行相对定位解算,得到资产的具体位置。S6: The background positioning server performs a relative positioning solution on the asset according to the packaged information to obtain the specific position of the asset.
优选的,得到邻居节点的广播地址和信号强度值的过程包括:Mesh节点扫描广播的心跳包,从广播包的元数据中提取邻居节点的广播地址和该包的信号强度值。Preferably, the process of obtaining the broadcast address and signal strength value of the neighbor node includes: the Mesh node scans the broadcast heartbeat packet, and extracts the broadcast address of the neighbor node and the signal strength value of the packet from the metadata of the broadcast packet.
优选的,判断节点是否第一次收到该序列号的心跳包包括:若Mesh节点的缓存中没有与该心跳包序列号和源地址相同的信息,则判断是第一次收到该心跳包并将心跳包的源地址和序列号存入缓存;若Mesh节点的缓存中有与该心跳包序列号和源地址匹配的信息,则判断为非第一次收到该心跳包。Preferably, judging whether the node has received the heartbeat packet of the sequence number for the first time includes: if there is no information identical to the sequence number and source address of the heartbeat packet in the cache of the Mesh node, then judging that the heartbeat packet is received for the first time The source address and sequence number of the heartbeat packet are stored in the cache; if there is information matching the sequence number and source address of the heartbeat packet in the cache of the Mesh node, it is determined that the heartbeat packet is not received for the first time.
优选的,对所有信号强度样本进行处理的过程包括:对所有信号强度样本进行高斯滤波处理,得到剔除异常值后的信号强度样本;对剔除异常值后的信号强度样本求均值,得到各邻居节点对应的信号强度均值。Preferably, the process of processing all signal strength samples includes: performing Gaussian filtering on all signal strength samples to obtain signal strength samples after removing outliers; averaging the signal strength samples after removing outliers to obtain each neighbor node The corresponding mean signal strength.
优选的,将打包后的信息传回后台定位服务器的过程包括:各Mesh节点设置TTL值,将打包后的信息转发至邻居节点;邻居节点判断自身是否为信息的目的地址,若是则接收并处理打包后的信息,否则,判断自身到网关的最短跳距值是否小于或等于TTL值;若自身到网关的最短跳距值小于或等于TTL值,则将TTL值减1后进行中继转发,否则,丢弃打包后的信息。Preferably, the process of sending the packaged information back to the background location server includes: each Mesh node sets a TTL value, and forwards the packaged information to a neighbor node; the neighbor node determines whether it is the destination address of the information, and if so, receives and processes it The packaged information, otherwise, determine whether the shortest hop distance from itself to the gateway is less than or equal to the TTL value; if the shortest hop distance from itself to the gateway is less than or equal to the TTL value, the TTL value is subtracted by 1 and then relayed and forwarded. Otherwise, the packed information is discarded.
优选的,各Mesh节点设置的TTL值为自身到网关的最短跳距值或者自身到网关的最短跳距值加1。Preferably, the TTL value set by each Mesh node is the shortest hop distance value from itself to the gateway or the shortest hop distance value from itself to the gateway plus 1.
优选的,对资产进行相对定位解算包括:采用MDS与三边定位算法相结合的方式对资产进行相对定位解算。Preferably, performing the relative positioning solution on the asset includes: performing the relative positioning solution on the asset by using a combination of MDS and a trilateral positioning algorithm.
进一步的,采用MDS与三边定位算法相结合的方式对资产进行相对定位解算包括:根据资产标签的数量以及实际部署的环境,设置一个最大全连通节点数量阀值;当回传的数据不能满足最大全连通节点数量阀值时,采用Euclidean测距方法对当前最大全连通节点外的两跳范围内缺少的节点间的距离信息进行补全。Further, using the combination of MDS and trilateral positioning algorithm to solve the relative positioning of assets includes: setting a threshold for the maximum number of fully connected nodes according to the number of asset tags and the actual deployment environment; when the returned data cannot be When the threshold of the maximum number of fully connected nodes is met, the Euclidean ranging method is used to complete the distance information between the missing nodes within two hops outside the current maximum fully connected node.
一种基于BLE Mesh网络的资产定位系统,包括:监控终端、后台定位服务器、网关、Mesh节点;An asset positioning system based on BLE Mesh network, including: monitoring terminal, background positioning server, gateway, Mesh node;
所述Mesh节点用于获取邻居节点的广播地址和信号强度均值并打包邻居节点信息;Described Mesh node is used for obtaining the broadcast address and signal strength mean value of neighbor node and packing neighbor node information;
所述网关用于周期性地发送心跳包,接收Mesh节点传回的邻居节点信息并将邻居节点信息发送给后台服务器;The gateway is used to periodically send heartbeat packets, receive the neighbor node information returned by the Mesh node, and send the neighbor node information to the background server;
所述后台定位服务器用于根据邻居节点信息对Mesh节点位置进行解算,得到Mesh节点的具体位置;The background positioning server is used to calculate the position of the Mesh node according to the neighbor node information, and obtain the specific position of the Mesh node;
所述监控终端用于显示Mesh节点的具体位置。The monitoring terminal is used to display the specific location of the Mesh node.
本发明的有益效果为:本发明着眼于解决当前资产定位系统要么定位精度低,要么成本高、部署不够灵活等问题,本发明取消定位基站,采用资产标签和网关搭建BLE Mesh网络,利用BLE Mesh网络中节点之间可以相互通信的特点,结合其心跳机制来实现对节点之间相互距离的信息获取,并且利用TTL处理机制提高了数据回传的可靠性,最后通过集中式定位算法对资产进行定位解算,得到定位信息。相比现有的基于信号强度/角度的定位系统,本发明通过取消定位基站的部署以及通过BLE Mesh网络的方式回传数据,定位精度更高,能在满足资产定位的米级要求下,降低前期施工的复杂度,提高系统部署的灵活性,其成本更低、施工方便、灵活性好,具有一定的工程性。The beneficial effects of the present invention are as follows: the present invention aims to solve the problems of the current asset positioning system, such as low positioning accuracy, high cost, and inflexible deployment. The present invention cancels the positioning base station, uses asset tags and gateways to build a BLE Mesh network, and uses BLE Mesh to build a BLE Mesh network. The characteristics of mutual communication between nodes in the network, combined with its heartbeat mechanism to achieve the information acquisition of the mutual distance between nodes, and the use of TTL processing mechanism to improve the reliability of data backhaul, and finally through the centralized positioning algorithm for assets. The positioning solution is obtained to obtain the positioning information. Compared with the existing positioning system based on signal strength/angle, the present invention eliminates the deployment of the positioning base station and transmits data through the BLE Mesh network, so that the positioning accuracy is higher, and the meter-level requirements for asset positioning can be reduced. The complexity of pre-construction improves the flexibility of system deployment. It has lower cost, convenient construction, good flexibility and certain engineering.
附图说明Description of drawings
图1为本发明中基于BLE Mesh网络的资产定位方法流程图;Fig. 1 is the flow chart of the asset location method based on BLE Mesh network in the present invention;
图2为现有的基于范围检测的定位系统结构示意图;2 is a schematic structural diagram of an existing positioning system based on range detection;
图3为现有的基于信号强度/角度的定位系统结构示意图;3 is a schematic structural diagram of an existing signal strength/angle-based positioning system;
图4为本发明中资产定位系统结构示意图。FIG. 4 is a schematic structural diagram of an asset positioning system in 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.
本发明提出了一种基于BLE Mesh网络的资产定位方法及系统,所述方法包括:The present invention proposes a method and system for locating assets based on BLE Mesh network, and the method includes:
Mesh节点获取邻居节点的广播地址和信号强度均值,Mesh节点即蓝牙资产标签,与固定资产一一对应;The Mesh node obtains the broadcast address and the average signal strength of the neighbor nodes, and the Mesh node is the Bluetooth asset tag, which corresponds to the fixed assets one-to-one;
Mesh节点定时打包邻居节点信息并将打包后的信息传回后台定位服务器;其中,邻居节点信息包括邻居节点的广播地址和信号强度均值以及Mesh节点自身的电量信息;The Mesh node regularly packages neighbor node information and sends the packaged information back to the background positioning server; wherein, the neighbor node information includes the neighbor node's broadcast address and average signal strength, as well as the Mesh node's own power information;
Mesh节点根据后台定位服务器的解算信息,确定出具体位置。The Mesh node determines the specific location according to the solution information of the background positioning server.
现有的基于范围检测的定位系统结构如图2所示,图中的蓝牙标签用来发送带有自身MAC地址等信息的信号,网关用来读取并解析蓝牙标签发来的信息,能收到信息就表示资产在网关所在的房间,这种方法只能识别空间中资产的存在,而不能检测资产的位置。基于信号强度/角度的定位系统结构如图3所示,采用这种结构的定位系统需要在建设初期在天花板部署大量的定位基站作为锚节点,单个定位基站的故障势必影响到其覆盖范围内的资产定位精度,并且数据的回传还需要通过加装WIFI模块或是布设网线的方式来解决,使得系统的建设成本进一步增加,前期工程实施复杂。The structure of the existing positioning system based on range detection is shown in Figure 2. The Bluetooth tag in the figure is used to send signals with information such as its own MAC address, and the gateway is used to read and parse the information sent by the Bluetooth tag. The arrival information indicates that the asset is in the room where the gateway is located. This method can only identify the existence of the asset in the space, but cannot detect the location of the asset. The structure of the positioning system based on signal strength/angle is shown in Figure 3. The positioning system using this structure needs to deploy a large number of positioning base stations on the ceiling as anchor nodes in the early stage of construction. The failure of a single positioning base station will inevitably affect the coverage of the The accuracy of asset positioning and the return of data need to be solved by adding a WIFI module or laying a network cable, which further increases the construction cost of the system and complicated the implementation of the preliminary project.
本发明还提供一种基于BLE Mesh网络的资产定位系统,包括:监控终端、后台定位服务器、网关、Mesh节点;The present invention also provides an asset positioning system based on the BLE Mesh network, comprising: a monitoring terminal, a background positioning server, a gateway, and a Mesh node;
所述Mesh节点用于获取邻居节点的广播地址和信号强度均值并打包邻居节点信息;Described Mesh node is used for obtaining the broadcast address and signal strength mean value of neighbor node and packing neighbor node information;
所述网关用于周期性地发送心跳包,接收Mesh节点传回的邻居节点信息并将邻居节点信息发送给后台服务器;The gateway is used to periodically send heartbeat packets, receive the neighbor node information returned by the Mesh node, and send the neighbor node information to the background server;
所述后台定位服务器用于根据邻居节点信息对Mesh节点位置进行解算,得到Mesh节点的具体位置;The background positioning server is used to calculate the position of the Mesh node according to the neighbor node information, and obtain the specific position of the Mesh node;
所述监控终端用于显示Mesh节点的具体位置。The monitoring terminal is used to display the specific location of the Mesh node.
本发明的一种基于BLE Mesh网络的资产定位方法的流程如图1所示,进行资产定位具体过程如下:The process of a BLE Mesh network-based asset positioning method of the present invention is shown in Figure 1, and the specific process of asset positioning is as follows:
构建基于BLE Mesh网络的资产定位系统,具体的,采用资产标签和网关进行组网,得到利用BLE Mesh网络进行通信的资产定位系统;本发明的资产定位系统如图4所示,由Mesh节点、网关、定位服务器以及监控终端组成,Mesh节点即为资产标签(蓝牙标签),该定位系统通过把蓝牙标签与网关搭建BLE Mesh网络的方式实现了定位系统中各设备可以相互通信。组成Mesh网络后的蓝牙标签与网关都可以采集相邻节点的信号强度值和广播地址,并且都具备中继功能,区别在于蓝牙标签采取电池供电,每个标签对应一个唯一的资产信息,而网关则是采取市电接入,并可通过串口线与定位服务器通信;定位服务器可解析网关传回的信息并进行定位解算,监控终端将定位服务器解算的定位信息与地图匹配,并进行直观呈现。Build an asset location system based on BLE Mesh network. Specifically, use asset tags and gateways for networking to obtain an asset location system that utilizes BLE Mesh network for communication; the asset location system of the present invention is shown in Figure 4, which consists of Mesh nodes, The gateway, the positioning server and the monitoring terminal are composed. The Mesh node is the asset tag (Bluetooth tag). The positioning system realizes that each device in the positioning system can communicate with each other by building a BLE Mesh network with the Bluetooth tag and the gateway. Both Bluetooth tags and gateways after forming a mesh network can collect the signal strength value and broadcast address of adjacent nodes, and both have the relay function. The difference is that Bluetooth tags are battery-powered, and each tag corresponds to a unique asset information, while the gateway It is connected to the mains, and can communicate with the positioning server through the serial line; the positioning server can parse the information returned by the gateway and perform positioning calculation, and the monitoring terminal matches the positioning information calculated by the positioning server with the map, and intuitively render.
网关周期性地向Mesh网络中的所有节点发送TTL值为127的心跳包,该心跳包可以通过其它节点中继转发到网络中的任何节点;其中,为了防止重放攻击,根据BLE Mesh协议规定,网关每次发送的心跳包具有不同的序列号SEQ,SEQ是Mesh网络定义的一个字段,是为了防止重放攻击而将每次发布的消息设置一个唯一的序列号。The gateway periodically sends a heartbeat packet with a TTL value of 127 to all nodes in the mesh network. The heartbeat packet can be relayed to any node in the network through other nodes. Among them, in order to prevent replay attacks, according to the BLE Mesh protocol , the heartbeat packet sent by the gateway each time has a different sequence number SEQ. SEQ is a field defined by the Mesh network. To prevent replay attacks, each message published is set to a unique sequence number.
各Mesh节点扫描心跳包,具体的,Mesh节点扫描广播包中的元数据,从元数据中国提取邻居节点的广播地址和该包的信号强度值RSSI;判断节点是否第一次收到该序列号的心跳包,若为第一次,则根据该心跳包内的TTL字段内容获取自身到网关的最短跳数值,之后将心跳包的TTL值减1并进行中继转发,否则,将该心跳包丢弃。Mesh节点判断是否第一次收到该序列号的心跳包包括:若Mesh节点的缓存中没有与该心跳包序列号和源地址相同的信息,则判断是第一次收到该心跳包并将心跳包的源地址和序列号存入缓存;若Mesh节点的缓存中有与该心跳包序列号和源地址匹配的信息,则判断为非第一次收到该心跳包。Each Mesh node scans the heartbeat packet, specifically, the Mesh node scans the metadata in the broadcast packet, extracts the broadcast address of the neighbor node and the signal strength value RSSI of the packet from the metadata China; judges whether the node receives the sequence number for the first time. If the heartbeat packet is the first time, the shortest hop value from itself to the gateway is obtained according to the content of the TTL field in the heartbeat packet, and then the TTL value of the heartbeat packet is decremented by 1 and relayed and forwarded, otherwise, the heartbeat packet throw away. The Mesh node judges whether it receives the heartbeat packet of the sequence number for the first time, including: if the cache of the Mesh node does not have the same information as the sequence number and source address of the heartbeat packet, it is judged that it is the first time that the heartbeat packet is received and will be sent to the Mesh node. The source address and sequence number of the heartbeat packet are stored in the cache; if there is information matching the sequence number and source address of the heartbeat packet in the cache of the mesh node, it is determined that the heartbeat packet is not received for the first time.
设置信号强度样本数量阈值,Mesh节点统计扫描到的信号强度样本数量;样本数量阈值在代码烧录至节点之前设置,阈值越大可用于滤波处理的样本值越多,滤波得到的结果越准确,但也需要综合考虑芯片的内存大小,优选的,信号强度样本数量阈值设置为100;若信号强度样本数量达到阈值,则对所有信号强度样本进行处理,对所有信号强度样本进行处理的过程为:当收到满足信号强度样本数量阈值的RSSI样本之后,在节点处对这些RSSI样本值进行高斯滤波处理,剔除因信号波动带来的数据异常值,得到剔除异常值后的信号强度样本;对各邻居节点的剔除异常值后的信号强度样本求均值,得到各邻居节点对应的信号强度均值。Set the threshold of the number of signal strength samples, and the Mesh node counts the number of scanned signal strength samples; the threshold of the number of samples is set before the code is burned to the node. However, it is also necessary to comprehensively consider the memory size of the chip. Preferably, the threshold of the number of signal strength samples is set to 100; if the number of signal strength samples reaches the threshold, all signal strength samples are processed. The process of processing all signal strength samples is as follows: After receiving the RSSI samples that meet the threshold of the number of signal strength samples, Gaussian filtering is performed on these RSSI sample values at the node, and the data outliers caused by signal fluctuations are eliminated, and the signal strength samples after the outliers are eliminated are obtained. The signal strength samples of neighbor nodes after removing outliers are averaged to obtain the mean value of signal strength corresponding to each neighbor node.
Mesh网络中所有Mesh节点定时将前期采集到的各邻居节点的广播地址和经滤波处理后的信号强度均值以及节点自身的电量信息进行打包;将打包后的信息经网关传回后台定位服务器;在回传的过程中,各Mesh节点设置回传数据(打包后的信息)的TTL值,将回传数据的目的地址设置成为网关的单播地址;优选的,各Mesh节点设置的TTL值为自身到网关的最短跳距值或者自身到网关的最短跳距值加1,通过将TTL设置为自身到网关的最短跳距值加1,产生一定富余度,以此增加回传数据的可靠性;其余节点在对该回传数据进行中继转发之前先判断自身是否为信息的目的地址,若是,即节点为网关时,则接收回传数据并将回传数据通过串口线发送到后台定位服务器;否则,判断自身到网关的最短跳距值是否小于或等于待中继数据中设置的TTL值;若自身到网关的最短跳距值小于或等于TTL值,则将TTL值减1后进行中继转发,否则,丢弃打包后的信息。All Mesh nodes in the Mesh network regularly package the broadcast address of each neighbor node collected in the previous stage, the average signal strength after filtering and the power information of the node itself; the packaged information is sent back to the background positioning server through the gateway; During the return process, each Mesh node sets the TTL value of the returned data (packaged information), and sets the destination address of the returned data as the unicast address of the gateway; preferably, the TTL value set by each Mesh node is itself. The shortest hop distance value to the gateway or the shortest hop distance value from itself to the gateway is increased by 1, and by setting the TTL to the shortest hop distance value from itself to the gateway plus 1, a certain margin is generated, thereby increasing the reliability of the returned data; The other nodes first determine whether they are the destination address of the information before relaying and forwarding the return data. If so, that is, when the node is a gateway, it will receive the return data and send the return data to the background location server through the serial line; Otherwise, judge whether the shortest hop distance from itself to the gateway is less than or equal to the TTL value set in the data to be relayed; if the shortest hop distance from itself to the gateway is less than or equal to the TTL value, then reduce the TTL value by 1 before relaying Forward, otherwise, discard the packaged information.
上述过程保证了数据的回传方向是朝着网关方向转发,以此来避免整个Mesh网络中充斥大量的冗余数据,减少消息冲突和内爆,提高数据到达定位服务器的可靠性。The above process ensures that the data is sent back toward the gateway, so as to avoid flooding the entire Mesh network with a large amount of redundant data, reduce message conflict and implosion, and improve the reliability of data reaching the location server.
定位服务器接收并根据打包后的信息对资产进行相对定位解算,其具体过程为:The positioning server receives and calculates the relative positioning of the asset according to the packaged information. The specific process is as follows:
定位服务器通过接收到的各节点的回传数据,可根据数据从中获得节点间的相互距离信息;采用MDS与三边定位算法相结合的方式对资产进行相对定位解算;其中,实行MDS定位算法的前提是需要节点构成全连通结构,即任意两个节点之间的距离都知晓。为保证最后的定位精度,本发明将结合资产标签的数量以及实际部署的环境,设置一个最大全连通节点数量阀值,从而确保有足够多的节点可以通过MDS这种精度较高的集中式定位算法实现初始定位,并以这些节点作为后续三边定位算法的参考锚节点;当回传的数据本身不能满足最大全连通节点数量阀值时,通过Euclidean测距方法对当前最大全连通节点外围的两跳范围内缺少的节点间的距离信息进行补全,当补全后的最大全连节点个数达到设置的阀值要求后再进行上述定位算法的解算,通过此方法可提高最终的资产定位精度。The positioning server can obtain the mutual distance information between the nodes according to the data sent back by each node; the relative positioning solution of the assets is carried out by the combination of MDS and the trilateral positioning algorithm; among them, the MDS positioning algorithm is implemented. The premise is that the nodes need to form a fully connected structure, that is, the distance between any two nodes is known. In order to ensure the final positioning accuracy, the present invention sets a threshold for the maximum number of fully connected nodes in combination with the number of asset tags and the actual deployment environment, so as to ensure that there are enough nodes that can pass the high-precision centralized positioning such as MDS. The algorithm realizes the initial positioning, and uses these nodes as the reference anchor nodes of the subsequent three-sided positioning algorithm; when the returned data itself cannot meet the threshold of the maximum number of fully connected nodes, the Euclidean ranging method is used to measure the peripheral nodes of the current maximum fully connected node. The distance information between the missing nodes within the two-hop range is completed. When the maximum number of fully connected nodes after completion reaches the set threshold, the above positioning algorithm can be solved. This method can improve the final asset. positioning accuracy.
通过定位解算,可获得资产的具体位置信息。Through the positioning solution, the specific location information of the asset can be obtained.
相比现有的基于范围检测的定位系统,本发明通过把蓝牙标签与网关搭建BLEMesh网络的方式实现了相互通信,并借助由此获取的节点间相互距离信息实现了定位精度的提高;相比现有的基于信号强度/角度的定位系统,本发明通过取消定位基站的部署以及通过BLE Mesh网络的方式回传数据,大大降低了定位系统的建设成本,同时降低了前期施工的复杂度,提高了系统部署的灵活性。Compared with the existing positioning system based on range detection, the present invention realizes mutual communication by building a BLEMesh network between a Bluetooth tag and a gateway, and improves the positioning accuracy by means of the mutual distance information between nodes obtained thereby; In the existing positioning system based on signal strength/angle, the present invention greatly reduces the construction cost of the positioning system by canceling the deployment of the positioning base station and returning data through the BLE Mesh network, while reducing the complexity of the preliminary construction and improving the performance of the positioning system. flexibility in system deployment.
以上所举实施例,对本发明的目的、技术方案和优点进行了进一步的详细说明,所应理解的是,以上所举实施例仅为本发明的优选实施方式而已,并不用以限制本发明,凡在本发明的精神和原则之内对本发明所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above-mentioned embodiments further describe the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above-mentioned embodiments are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made to the present invention within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210484275.1A CN114760686A (en) | 2022-05-06 | 2022-05-06 | Asset positioning method and system based on BLE Mesh network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210484275.1A CN114760686A (en) | 2022-05-06 | 2022-05-06 | Asset positioning method and system based on BLE Mesh network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114760686A true CN114760686A (en) | 2022-07-15 |
Family
ID=82334012
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210484275.1A Pending CN114760686A (en) | 2022-05-06 | 2022-05-06 | Asset positioning method and system based on BLE Mesh network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114760686A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070273504A1 (en) * | 2006-05-16 | 2007-11-29 | Bao Tran | Mesh network monitoring appliance |
CN102098731A (en) * | 2011-01-25 | 2011-06-15 | 无锡泛联物联网科技股份有限公司 | Hop-based flow adaptive dormancy scheduling method in wireless sensor network |
CN103929344A (en) * | 2014-04-29 | 2014-07-16 | 北京瑞赛长城航空测控技术有限公司 | Self-organized and self-healing wireless tree-based network and organizing method thereof |
CN106291460A (en) * | 2016-07-27 | 2017-01-04 | 浙江瑞瀛物联科技有限公司 | Localization method based on the asset management system |
CN107613465A (en) * | 2017-09-05 | 2018-01-19 | 武汉慧联无限科技有限公司 | Goods and materials alignment system |
CN108777844A (en) * | 2018-05-17 | 2018-11-09 | 北京百瑞互联技术有限公司 | A kind of localization method and system based on bluetooth MESH network |
US20200182995A1 (en) * | 2015-07-17 | 2020-06-11 | Origin Wireless, Inc. | Method, apparatus, and system for outdoor target tracking |
CN111683127A (en) * | 2020-05-27 | 2020-09-18 | 深圳市海洋王照明工程有限公司 | Data transmission method and device and terminal equipment |
-
2022
- 2022-05-06 CN CN202210484275.1A patent/CN114760686A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070273504A1 (en) * | 2006-05-16 | 2007-11-29 | Bao Tran | Mesh network monitoring appliance |
CN102098731A (en) * | 2011-01-25 | 2011-06-15 | 无锡泛联物联网科技股份有限公司 | Hop-based flow adaptive dormancy scheduling method in wireless sensor network |
CN103929344A (en) * | 2014-04-29 | 2014-07-16 | 北京瑞赛长城航空测控技术有限公司 | Self-organized and self-healing wireless tree-based network and organizing method thereof |
US20200182995A1 (en) * | 2015-07-17 | 2020-06-11 | Origin Wireless, Inc. | Method, apparatus, and system for outdoor target tracking |
CN106291460A (en) * | 2016-07-27 | 2017-01-04 | 浙江瑞瀛物联科技有限公司 | Localization method based on the asset management system |
CN107613465A (en) * | 2017-09-05 | 2018-01-19 | 武汉慧联无限科技有限公司 | Goods and materials alignment system |
CN108777844A (en) * | 2018-05-17 | 2018-11-09 | 北京百瑞互联技术有限公司 | A kind of localization method and system based on bluetooth MESH network |
CN111683127A (en) * | 2020-05-27 | 2020-09-18 | 深圳市海洋王照明工程有限公司 | Data transmission method and device and terminal equipment |
Non-Patent Citations (1)
Title |
---|
HERNANDEZ A: "Bluetooth mesh analysis,issues and challenges", 《IEEE ACCESS》, 13 March 2020 (2020-03-13) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109660958B (en) | Networking method of electric power meter reading system and meter reading method | |
CN107889185B (en) | A kind of networking method of wireless data acquisition system of electric meter | |
Cai et al. | Leveraging 1-hop neighborhood knowledge for efficient flooding in wireless ad hoc networks | |
US20060285510A1 (en) | Method and apparatus for transferring frames in extended wireless LAN | |
CN105262687B (en) | A kind of power information acquisition system group-net communication method based on WIA-PA technologies | |
US8570999B1 (en) | System and method for communications in a network | |
US10735321B2 (en) | Method and apparatus for relaying packet transmission and updating network address information in communication system | |
CN110035468B (en) | High reliability and high security wireless network topology control system | |
CN111599158A (en) | Power consumption information acquisition system based on broadband carrier and bluetooth communication | |
CN101437293A (en) | Method for polling long distance wireless multi-hop data facing transparent transmission equipment | |
Dwijaksara et al. | Multihop gateway-to-gateway communication protocol for lora networks | |
CN102801609B (en) | Selection method for relay station and station equipment | |
WO2018019056A1 (en) | Data transmission method and relay node | |
US9144006B2 (en) | Multi-hop communication terminal, multi-hop communication system, and multi-hop communication method | |
CN105072034A (en) | Powerline communications (PLC) network routing method and system | |
CN102970233B (en) | Obtain the method for route, device, equipment, concentrator and system | |
CN105634554A (en) | Carrier wave communication networking method, nodes and system | |
CN114760686A (en) | Asset positioning method and system based on BLE Mesh network | |
CN101951334B (en) | Multi-mode heterogeneous network fusion method | |
CN112803970B (en) | System and method for monitoring power line broadband carrier communication system of whole network | |
CN111970739B (en) | LoRa relay networking communication method and LoRa relay | |
CN101610549A (en) | The large-scale sensor network routing method of catching based on routing authentication and RREP | |
Ingelrest et al. | Energy-efficient broadcasting in wireless mobile ad hoc networks | |
CN104661282A (en) | Ad-hoc network access, data transmission and construction method | |
CN110278586B (en) | Frame response method and related device |
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 |