CN104880693B - Indoor orientation method and device - Google Patents
Indoor orientation method and device Download PDFInfo
- Publication number
- CN104880693B CN104880693B CN201410070178.3A CN201410070178A CN104880693B CN 104880693 B CN104880693 B CN 104880693B CN 201410070178 A CN201410070178 A CN 201410070178A CN 104880693 B CN104880693 B CN 104880693B
- Authority
- CN
- China
- Prior art keywords
- echo
- feature vector
- matched
- signal
- echoe
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S15/00—Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
- G01S15/02—Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems using reflection of acoustic waves
- G01S15/06—Systems determining the position data of a target
- G01S15/46—Indirect determination of position data
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S5/00—Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
- G01S5/18—Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using ultrasonic, sonic, or infrasonic waves
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- General Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Computer Networks & Wireless Communication (AREA)
- Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)
Abstract
本发明实施例提供一种室内定位方法和装置。本发明室内定位方法,包括:处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得回声信号,待定位设备根据空间探测声音信号和回声信号获取对应的待匹配回声特征向量,并在目标回声指纹库中确定与待匹配回声特征向量相匹配的回声特征向量,并将回声特征向量所对应的室内的参考点作为待定位设备的当前位置,其中,待定位设备中存储有多个回声指纹库,各回声指纹库与待定位设备的姿态标识一一对应;各回声指纹库中的多个回声特征向量与室内的多个参考点一一对应;各回声特征向量是待定位设备处于对应的参考点上时根据回声信号而获取的。
Embodiments of the present invention provide an indoor positioning method and device. The indoor positioning method of the present invention includes: the equipment to be positioned indoors plays a space detection sound signal, and at the same time performs recording to obtain an echo signal, and the equipment to be positioned obtains a corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and The echo feature vector matching the echo feature vector to be matched is determined in the target echo fingerprint library, and the reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned, wherein multiple echoes are stored in the device to be positioned Fingerprint library, each echo fingerprint library is in one-to-one correspondence with the posture identification of the device to be positioned; multiple echo feature vectors in each echo fingerprint library are in one-to-one correspondence with multiple reference points in the room; each echo feature vector is the corresponding It is obtained based on the echo signal at the reference point of .
Description
技术领域technical field
本发明实施例涉及设备定位技术,尤其涉及一种室内定位方法和装置。Embodiments of the present invention relate to equipment positioning technologies, and in particular, to an indoor positioning method and device.
背景技术Background technique
随着近年来智能终端(包括智能手机、平板电脑(tablet PC)等)的发展和普及,基于移动终端的室内定位将具有非常广阔的应用前景。利用移动终端的室内定位可以为人们的生活提供室内导航服务,举例而言,在大型商场和写字楼里面借助室内导航快速找到出口和电梯,家长通过使用室内导航跟踪小孩的位置避免小孩在超市中走丢,使用室内导航还可以帮助购物者更快地找到所需要的物品等;利用移动终端的室内定位还可以为人们提供移动终端基于位置的服务(Location Based Service,LBS)推荐业务,例如在购物中心里根据用户所处位置自动推送商家打折和活动信息;利用移动终端的室内定位还应用于其他领域中,例如在医疗行业中重症病人跟踪监护,产房婴儿防盗,贵重医疗设备监控、面向大型建筑物应急疏散、公共安全、及灾后救援等。With the development and popularization of smart terminals (including smart phones, tablet PCs, etc.) in recent years, indoor positioning based on mobile terminals will have a very broad application prospect. The indoor positioning of mobile terminals can provide indoor navigation services for people's lives. For example, in large shopping malls and office buildings, indoor navigation can be used to quickly find exits and elevators. Parents can use indoor navigation to track children's positions to avoid children walking in supermarkets. The use of indoor navigation can also help shoppers find the items they need more quickly; the use of indoor positioning of mobile terminals can also provide people with mobile terminal location-based service (Location Based Service, LBS) recommendation services, such as shopping The center automatically pushes merchant discounts and event information according to the user's location; indoor positioning using mobile terminals is also used in other fields, such as tracking and monitoring of critically ill patients in the medical industry, anti-theft of babies in delivery rooms, monitoring of valuable medical equipment, and large buildings. emergency evacuation, public safety, and post-disaster rescue.
现有的大部分室内定位技术需要在室内布置硬件辅助设备,改造成本高昂,不利于大规模推广,例如基于蓝牙、WIFI的室内定位技术需要在房间内布置多个信号发射源作为定位节点,而基于红外、超声波、UWB的室内定位技术除了需要在建筑物内新增专用的定位节点外,同时还需要特制的终端设备配合使用。Most of the existing indoor positioning technologies need to arrange hardware auxiliary equipment indoors, which is expensive to transform and is not conducive to large-scale promotion. For example, indoor positioning technologies based on Bluetooth and WIFI need to arrange multiple signal transmission sources in the room as positioning nodes, while Indoor positioning technologies based on infrared, ultrasonic, and UWB not only need to add dedicated positioning nodes in buildings, but also require special terminal equipment for use.
发明内容Contents of the invention
本发明实施例提供一种室内定位方法和装置,以克服现有的室内定位技术需要在室内布置硬件辅助设备,改造成本高昂,不利于大规模推广的缺陷。Embodiments of the present invention provide an indoor positioning method and device to overcome the defects that the existing indoor positioning technology needs to arrange hardware auxiliary equipment indoors, which is expensive to transform and is not conducive to large-scale promotion.
第一方面,本发明实施例提供一种室内定位方法,包括:In a first aspect, an embodiment of the present invention provides an indoor positioning method, including:
处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;The indoor device to be positioned plays the space detection sound signal, and simultaneously performs recording to obtain the echo signal of the space detection sound signal;
所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,根据用于表示所述待定位设备当前的设备姿态的姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;The device to be positioned obtains a corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal, and determines it in multiple echo fingerprint libraries according to the gesture identifier used to represent the current device posture of the device to be positioned A target echo fingerprint library, and determine the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and use the reference point in the room corresponding to the echo feature vector as the pending The current position of the bit device;
其中,所述待定位设备中存储有多个回声指纹库,各回声指纹库与用于表示所述待定位设备的设备姿态的姿态标识一一对应,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获得的所述空间探测声音信号的回声信号而获取到的。Wherein, the device to be positioned is stored with a plurality of echo fingerprint databases, and each echo fingerprint database is in one-to-one correspondence with a posture identifier used to represent the posture of the device to be positioned, and the posture of the device is determined by the posture of the device to be positioned. The three dimensions of azimuth, pitch angle and roll angle are jointly represented; each echo fingerprint library includes multiple echo feature vectors, and each echo feature vector in each echo fingerprint library is in one-to-one correspondence with multiple reference points in the room The reference point is a reference position set in advance in the room, and each echo feature vector in each echo fingerprint library is obtained according to the played spatial detection sound signal and recording when the device to be positioned is at the corresponding reference point obtained from the echo signal of the space detection sound signal.
结合第一方面,在第一方面的第一种可能实现的方式中,所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the acquiring, by the device to be located, a corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal includes:
所述待定位设备将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;The device to be positioned performs a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal and takes an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , Len tx is the length of Seq tx ;
在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;The cross-correlation sequence R' of the effective echo part starting from I start is intercepted in the cross-correlation sequence R, wherein, I start is the index where R takes the maximum value;
根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。According to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), where echoE i is the i-th distance interval The average echo energy of i=1,2,...,M.
结合第一方面第一种可能实现的方式,在第一方面的第二种可能实现的方式中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),包括:In combination with the first possible implementation of the first aspect, in the second possible implementation of the first aspect, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo Eigenvector EV=(echoE 1 , echoE 2 ,...,echoE M ), including:
对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为 For the distance interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is
分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
结合第一方面,第一方面第一至第二任一种可能实现的方式,在第一方面第三种可能实现的方式中,所述进行录音获得所述空间探测声音信号的回声信号包括:With reference to the first aspect, any one of the first to second possible implementations of the first aspect, in the third possible implementation of the first aspect, the recording to obtain the echo signal of the spatial detection sound signal includes:
进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt>tA,tA=dmax·2/fsound,dmax为所述空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度。Carry out the recording until the time of delaying at least Δt after the playback ends; wherein, Δt>t A , t A =d max 2/f sound , d max is the farthest distance that the space detection sound signal can return to the echo signal, f sound is the speed of sound in air.
结合第一方面,第一方面第一至第二任一种可能实现的方式,在第一方面的第四种可能实现的方式中,所述在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,包括:With reference to the first aspect, any one of the first to the second possible implementation manners of the first aspect, in the fourth possible implementation manner of the first aspect, the determination in the target echo fingerprint library that matches the echo to be matched The eigenvectors match the echo eigenvectors, including:
将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint database, and use the echo feature vector with the closest result as the echo feature vector matched with the echo feature vector to be matched.
第二方面,本发明实施例提供一种室内定位方法,包括:In a second aspect, an embodiment of the present invention provides an indoor positioning method, including:
处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态,其中所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The indoor device to be positioned plays a space detection sound signal, and simultaneously performs recording to obtain an echo signal of the space detection sound signal; obtains a corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and determines The posture identifier of the device to be positioned, where the posture identifier is used to represent the current device posture of the device to be positioned, wherein the device posture is a combination of the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned express;
所述待定位设备向定位服务器发送定位请求,所述定位请求中包括所述待匹配回声特征向量和所述姿态标识,以供所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;The device to be positioned sends a positioning request to a positioning server, and the positioning request includes the echo feature vector to be matched and the posture identifier, so that the positioning server can determine the location in multiple echo fingerprint libraries according to the posture identifier. A target echo fingerprint library, wherein an echo feature vector matching the echo feature vector to be matched is determined in the target echo fingerprint library, and the reference point in the room corresponding to the echo feature vector is used as the to-be-located the current location of the device;
接收所述定位服务器返回的包括所述当前位置的定位结果;receiving a positioning result including the current position returned by the positioning server;
其中,所述参考点为预先在所述室内设置的参考位置。Wherein, the reference point is a reference position pre-set in the indoor.
结合第二方面,在第二方面的第一种可能实现的方式中,所述根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量包括:With reference to the second aspect, in the first possible implementation manner of the second aspect, the obtaining the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal includes:
所述待定位设备将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;The device to be positioned performs a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal and takes an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , Len tx is the length of Seq tx ;
在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;The cross-correlation sequence R' of the effective echo part starting from I start is intercepted in the cross-correlation sequence R, wherein, I start is the index where R takes the maximum value;
根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。According to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), where echoE i is the i-th distance interval The average echo energy of i=1,2,...,M.
结合第二方面第一种可能实现的方式,在第二方面的第二种可能实现的方式中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),包括:In combination with the first possible implementation of the second aspect, in the second possible implementation of the second aspect, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo Eigenvector EV=(echoE 1 , echoE 2 ,...,echoE M ), including:
对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为 For the distance interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is
分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
结合第二方面,第二方面第一至第二任一种可能实现的方式,在第二方面的第三种可能实现的方式中,所述进行录音获得所述空间探测声音信号的回声信号包括:With reference to the second aspect, any one of the first to second possible implementation manners of the second aspect, in the third possible implementation manner of the second aspect, the recording to obtain the echo signal of the space detection sound signal includes :
进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt>tA,tA=dmax·2/fsound,dmax为所述空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度。Carry out the recording until the time of delaying at least Δt after the playback ends; wherein, Δt>t A , t A =d max 2/f sound , d max is the farthest distance that the space detection sound signal can return to the echo signal, f sound is the speed of sound in air.
第三方面,本发明实施例提供一种室内定位方法,包括:In a third aspect, an embodiment of the present invention provides an indoor positioning method, including:
定位服务器接收处于室内的待定位设备发送的定位请求,所述定位请求中包括待匹配回声特征向量和姿态标识;其中,所述待匹配回声特征向量是由所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述空间探测声音信号和所述回声信号获取的;所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The positioning server receives a positioning request sent by a device to be positioned indoors, and the positioning request includes an echo feature vector to be matched and a gesture identifier; wherein, the echo feature vector to be matched is a spatial detection sound signal played by the device to be positioned , and recording at the same time to obtain the echo signal of the space detection sound signal, it is obtained according to the space detection sound signal and the echo signal; the attitude identification is determined by the device to be positioned, and the attitude identification Used to represent the current device posture of the device to be positioned; the device posture is jointly represented by three dimensions of the device to be positioned: azimuth, pitch angle, and roll angle;
所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应,各回声指纹库中包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应,所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号而获取并发送给定位服务器的;The positioning server determines a target echo fingerprint library in a plurality of echo fingerprint libraries according to the gesture identification, determines an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and sends the The reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned; wherein, a plurality of echo fingerprint libraries are stored in the positioning server, and each echo fingerprint library corresponds to the posture identifier one by one, Each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library is in one-to-one correspondence with a plurality of reference points in the room, and the reference points are pre-set reference positions in the room , each echo feature vector in each echo fingerprint library is acquired and sent to location server;
所述定位服务器向所述待定位设备发送包括所述当前位置的定位结果。The positioning server sends a positioning result including the current position to the device to be positioned.
结合第三方面,在第三方面的第一种可能实现的方式中,所述在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,包括:With reference to the third aspect, in a first possible implementation manner of the third aspect, the determining the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library includes:
将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint database, and use the echo feature vector with the closest result as the echo feature vector matched with the echo feature vector to be matched.
第四方面,本发明实施例提供一种室内定位方法,包括:In a fourth aspect, an embodiment of the present invention provides an indoor positioning method, including:
处于室内的待定位设备播放空间探测声音信号,同时进行录音获得所述空间探测声音信号的回声信号;并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The device to be positioned indoors plays the space detection sound signal, and at the same time performs recording to obtain the echo signal of the space detection sound signal; and determines the attitude mark of the device to be positioned, and the posture mark is used to indicate that the device to be positioned is currently The equipment attitude; the equipment attitude is jointly represented by the three dimensions of the azimuth angle, pitch angle and roll angle of the equipment to be positioned;
所述待定位设备向定位服务器发送定位请求,所述定位请求中包括所述空间探测声音信号、所述回声信号和所述姿态标识,以供所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量后,根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述参考点为预先在所述室内设置的参考位置;The device to be positioned sends a positioning request to a positioning server, and the positioning request includes the space detection sound signal, the echo signal and the posture identifier, so that the positioning server can use the space detection sound signal and the After the echo signal obtains the corresponding echo feature vector to be matched, determine the target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, and determine in the target echo fingerprint library that matches the echo feature vector to be matched The echo feature vector, and the reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned; wherein, the reference point is a reference position set in advance in the room;
接收所述定位服务器返回的包括所述当前位置的定位结果。and receiving a positioning result including the current position returned by the positioning server.
第五方面,本发明实施例提供一种室内定位方法,包括:In a fifth aspect, an embodiment of the present invention provides an indoor positioning method, including:
定位服务器接收处于室内的待定位设备发送的定位请求,所述定位请求中包括空间探测声音信号、回声信号和姿态标识;其中,所述回声信号是由所述待定位设备播放所述空间探测声音信号的同时进行录音而获得的所述空间探测声音信号的回声信号,所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The positioning server receives the positioning request sent by the device to be positioned indoors, and the positioning request includes a space detection sound signal, an echo signal and an attitude indicator; wherein, the echo signal is played by the device to be positioned by playing the space detection sound The echo signal of the space detection sound signal obtained by recording the signal at the same time, the attitude identifier is determined by the device to be positioned, and the attitude identifier is used to represent the current device posture of the device to be positioned, so The attitude of the device is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned;
所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时将在此处播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号发送给所述定位服务器,由所述定位服务器获取到的;The positioning server obtains corresponding echo feature vectors to be matched according to the space detection sound signal and the echo signal, and determines a target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, and determines the target echo fingerprint library in the target echo fingerprint library. Determine the echo feature vector matching the echo feature vector to be matched in the fingerprint library, and use the reference point in the room corresponding to the echo feature vector as the current position of the device to be positioned; wherein, the positioning Multiple echo fingerprint databases are stored in the server, and each echo fingerprint database corresponds to the posture identification one by one; each echo fingerprint database includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint database corresponds to the Multiple reference points in the room are in one-to-one correspondence; the reference point is a reference position pre-set in the room, and each echo feature vector in each echo fingerprint library is the The space detection sound signal played here and the echo signal of the space detection sound signal obtained by recording are sent to the positioning server, and are obtained by the positioning server;
所述定位服务器向所述待定位设备发送包括所述当前位置的定位结果。The positioning server sends a positioning result including the current position to the device to be positioned.
结合第五方面,在第五方面第一种可能实现的方式中,所述根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量包括:With reference to the fifth aspect, in the first possible implementation manner of the fifth aspect, the acquiring the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal includes:
所述定位服务器将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;The positioning server performs a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal and takes an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , Len tx is the length of Seq tx ;
在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;The cross-correlation sequence R' of the effective echo part starting from I start is intercepted in the cross-correlation sequence R, wherein, I start is the index where R takes the maximum value;
根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。According to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), where echoE i is the i-th distance interval The average echo energy of i=1,2,...,M.
结合第五方面第一种可能实现的方式,在第五方面第二种可能实现的方式中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),包括:In combination with the first possible implementation of the fifth aspect, in the second possible implementation of the fifth aspect, according to the cross-correlation sequence R', the average echo energy of M distance intervals is respectively calculated to obtain the echo feature Vector EV=(echoE 1 , echoE 2 ,...,echoE M ), including:
对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为 For the distance interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is
分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
结合第五方面,第五方面第一至第二任一种可能实现的方式,在第五方面第三种可能实现的方式中,所述在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,包括:With reference to the fifth aspect, any one of the first to the second possible implementation manners of the fifth aspect, in the third possible implementation manner of the fifth aspect, the determination in the target echo fingerprint database and the to-be-matched The echo eigenvectors match the echo eigenvectors, including:
将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint database, and use the echo feature vector with the closest result as the echo feature vector matched with the echo feature vector to be matched.
第六方面,本发明实施例提供一种待定位设备,包括:In a sixth aspect, an embodiment of the present invention provides a device to be positioned, including:
回声采集模块,用于处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;The echo acquisition module is used to play the space detection sound signal on the indoor device to be positioned, and simultaneously record and obtain the echo signal of the space detection sound signal;
定位模块,用于根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,根据用于表示所述待定位设备当前的设备姿态的姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;A positioning module, configured to obtain a corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal, and determine it in a plurality of echo fingerprint libraries according to a posture identifier representing the current posture of the device to be positioned A target echo fingerprint library, and determine the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and use the reference point in the room corresponding to the echo feature vector as the pending The current position of the bit device;
其中,所述待定位设备中存储有多个回声指纹库,各回声指纹库与用于表示所述待定位设备的设备姿态的姿态标识一一对应,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获得的所述空间探测声音信号的回声信号而获取到的。Wherein, the device to be positioned is stored with a plurality of echo fingerprint databases, and each echo fingerprint database is in one-to-one correspondence with a posture identifier used to represent the posture of the device to be positioned, and the posture of the device is determined by the posture of the device to be positioned. The three dimensions of azimuth, pitch angle and roll angle are jointly represented; each echo fingerprint library includes multiple echo feature vectors, and each echo feature vector in each echo fingerprint library is in one-to-one correspondence with multiple reference points in the room The reference point is a reference position set in advance in the room, and each echo feature vector in each echo fingerprint library is obtained according to the played spatial detection sound signal and recording when the device to be positioned is at the corresponding reference point obtained from the echo signal of the space detection sound signal.
结合第六方面,在第六方面的第一种可能实现的方式中,所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量包括:With reference to the sixth aspect, in a first possible implementation manner of the sixth aspect, the acquiring, by the device to be located, a corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal includes:
所述待定位设备将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;The device to be positioned performs a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal and takes an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , Len tx is the length of Seq tx ;
在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;The cross-correlation sequence R' of the effective echo part starting from I start is intercepted in the cross-correlation sequence R, wherein, I start is the index where R takes the maximum value;
根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。According to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), where echoE i is the i-th distance interval The average echo energy of i=1,2,...,M.
结合第六方面第一种可能实现的方式,在第六方面的第二种可能实现的方式中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),包括:In combination with the first possible implementation of the sixth aspect, in the second possible implementation of the sixth aspect, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo Eigenvector EV=(echoE 1 , echoE 2 ,...,echoE M ), including:
对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为 For the distance interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is
分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
结合第六方面,第六方面第一至第二任一种可能实现的方式,在第六方面的第三种可能实现的方式中,所述进行录音获得所述空间探测声音信号的回声信号包括:With reference to the sixth aspect, any one of the first to second possible implementation manners of the sixth aspect, in the third possible implementation manner of the sixth aspect, the recording to obtain the echo signal of the spatial detection sound signal includes :
进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt>tA,tA=dmax·2/fsound,dmax为所述空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度。Carry out the recording until the time of delaying at least Δt after the playback ends; wherein, Δt>t A , t A =d max 2/f sound , d max is the farthest distance that the space detection sound signal can return to the echo signal, f sound is the speed of sound in air.
结合第六方面,第六方面第一至第二任一种可能实现的方式,在第六方面的第四种可能实现的方式中,所述在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,包括:With reference to the sixth aspect, any one of the first to second possible implementation manners of the sixth aspect, in the fourth possible implementation manner of the sixth aspect, the determination in the target echo fingerprint library and the to-be Matching echo eigenvectors matches echo eigenvectors, including:
将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint database, and use the echo feature vector with the closest result as the echo feature vector matched with the echo feature vector to be matched.
第七方面,本发明实施例提供一种待定位设备,包括:In a seventh aspect, an embodiment of the present invention provides a device to be positioned, including:
获取模块,用于处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态;其中,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The acquisition module is used for the indoor device to be positioned to play the space detection sound signal, and simultaneously perform recording to obtain the echo signal of the space detection sound signal; obtain the corresponding echo to be matched according to the space detection sound signal and the echo signal eigenvector, and determine the posture identifier of the device to be positioned, the posture identifier is used to represent the current device posture of the device to be positioned; wherein, the device posture is composed of the azimuth angle, pitch angle and Joint representation of three dimensions of roll angle;
发送模块,用于向定位服务器发送定位请求,所述定位请求中包括所述待匹配回声特征向量和所述姿态标识,以供所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;A sending module, configured to send a positioning request to a positioning server, wherein the positioning request includes the echo feature vector to be matched and the gesture identifier, so that the positioning server can determine in multiple echo fingerprint libraries according to the gesture identifier A target echo fingerprint library, wherein an echo feature vector matching the echo feature vector to be matched is determined in the target echo fingerprint library, and the reference point in the room corresponding to the echo feature vector is used as the to-be-located the current location of the device;
接收模块,用于接收所述定位服务器返回的包括所述当前位置的定位结果;a receiving module, configured to receive a positioning result including the current position returned by the positioning server;
其中,所述参考点为预先在所述室内设置的参考位置。Wherein, the reference point is a reference position pre-set in the indoor.
结合第七方面,在第七方面的第一种可能实现的方式中,所述根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量包括:With reference to the seventh aspect, in the first possible implementation manner of the seventh aspect, the obtaining the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal includes:
所述待定位设备将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;The device to be positioned performs a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal and takes an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , Len tx is the length of Seq tx ;
在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;The cross-correlation sequence R' of the effective echo part starting from I start is intercepted in the cross-correlation sequence R, wherein, I start is the index where R takes the maximum value;
根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。According to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), where echoE i is the i-th distance interval The average echo energy of i=1,2,...,M.
结合第七方面第一种可能实现的方式,在第七方面的第二种可能实现的方式中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),包括:In combination with the first possible implementation manner of the seventh aspect, in the second possible implementation manner of the seventh aspect, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo Eigenvector EV=(echoE 1 , echoE 2 ,...,echoE M ), including:
对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为 For the distance interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is
分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
结合第七方面,第七方面第一至第二任一种可能实现的方式,在第七方面的第三种可能实现的方式中,所述进行录音获得回声信号包括:With reference to the seventh aspect, any one of the first to second possible implementation manners of the seventh aspect, in the third possible implementation manner of the seventh aspect, the recording to obtain the echo signal includes:
进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt>tA,tA=dmax·2/fsound,dmax为所述空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度。Carry out the recording until the time of delaying at least Δt after the playback ends; wherein, Δt>t A , t A =d max 2/f sound , d max is the farthest distance that the space detection sound signal can return to the echo signal, f sound is the speed of sound in air.
第八方面,本发明实施例提供一种定位服务器,包括:In an eighth aspect, an embodiment of the present invention provides a positioning server, including:
接收模块,用于接收处于室内的待定位设备发送的定位请求,所述定位请求中包括待匹配回声特征向量和姿态标识;其中,所述待匹配回声特征向量是由所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述空间探测声音信号和所述回声信号获取的;所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The receiving module is configured to receive a positioning request sent by a device to be positioned indoors, and the positioning request includes an echo feature vector to be matched and a gesture identifier; wherein, the echo feature vector to be matched is a space played by the device to be positioned Detect the sound signal, and record at the same time to obtain the echo signal of the space detection sound signal, and obtain it according to the space detection sound signal and the echo signal; the attitude identification is determined by the device to be positioned, so The attitude identifier is used to represent the current equipment attitude of the equipment to be positioned; the equipment attitude is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the equipment to be positioned;
定位模块,用于根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应,各回声指纹库中包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应,所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号而获取并发送给定位服务器的;A positioning module, configured to determine a target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, determine an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and convert the The indoor reference point corresponding to the echo feature vector is used as the current position of the device to be positioned; wherein, the positioning server stores a plurality of echo fingerprint databases, and each echo fingerprint database corresponds to the attitude identification one by one , each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library is in one-to-one correspondence with a plurality of reference points in the room, and the reference points are reference points set in the room in advance. Each echo feature vector in each echo fingerprint library is obtained and sent according to the echo signal of the spatial detection sound signal played and the sound signal of the space detection acquired by recording when the device to be positioned is at the corresponding reference point given to the location server;
发送模块,用于向所述待定位设备发送包括所述当前位置的定位结果。A sending module, configured to send a positioning result including the current location to the device to be positioned.
结合第八方面,在第八方面的第一种可能实现的方式中,所述在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,包括:With reference to the eighth aspect, in the first possible implementation manner of the eighth aspect, the determining the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library includes:
将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint database, and use the echo feature vector with the closest result as the echo feature vector matched with the echo feature vector to be matched.
第九方面,本发明实施例提供一种待定位设备,包括:In a ninth aspect, an embodiment of the present invention provides a device to be positioned, including:
确定模块,用于处于室内的待定位设备播放空间探测声音信号,同时进行录音获得所述空间探测声音信号的回声信号;并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The determination module is used for the indoor device to be positioned to play the space detection sound signal, and record at the same time to obtain the echo signal of the space detection sound signal; Describe the current equipment posture of the equipment to be positioned; the equipment posture is jointly represented by three dimensions of the azimuth angle, pitch angle and roll angle of the equipment to be positioned;
发送模块,用于向定位服务器发送定位请求,所述定位请求中包括所述空间探测声音信号、所述回声信号和所述姿态标识,以供所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量后,根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述参考点为预先在所述室内设置的参考位置;A sending module, configured to send a positioning request to a positioning server, where the positioning request includes the space detection sound signal, the echo signal, and the gesture identifier, so that the positioning server can use the space detection sound signal and the After the echo signal obtains the corresponding echo feature vector to be matched, determine the target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, and determine in the target echo fingerprint library that matches the echo feature vector to be matched The echo feature vector, and the reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned; wherein, the reference point is a reference position set in advance in the room;
接收模块,用于接收所述定位服务器返回的包括所述当前位置的定位结果。A receiving module, configured to receive a positioning result including the current position returned by the positioning server.
第十方面,本发明实施例提供一种定位服务器,包括:In a tenth aspect, an embodiment of the present invention provides a positioning server, including:
接收模块,用于接收处于室内的待定位设备发送的定位请求,所述定位请求中包括空间探测声音信号、回声信号和姿态标识;其中,所述回声信号是由所述待定位设备播放所述空间探测声音信号的同时进行录音而获得的所述空间探测声音信号的回声信号,所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;The receiving module is configured to receive a positioning request sent by the device to be positioned indoors, the positioning request includes a space detection sound signal, an echo signal, and a gesture identification; wherein, the echo signal is played by the device to be positioned The echo signal of the space detection sound signal obtained by recording the space detection sound signal at the same time, the posture identifier is determined by the device to be positioned, and the posture identifier is used to indicate the current device of the device to be positioned attitude; the equipment attitude is jointly represented by three dimensions of the azimuth, pitch angle and roll angle of the equipment to be positioned;
定位模块,用于根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时将在此处播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号发送给所述定位服务器,由所述定位服务器获取到的。A positioning module, configured to obtain a corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal, and determine a target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, and determine the target echo fingerprint library in the target echo fingerprint library. The echo feature vector matching the echo feature vector to be matched is determined in the echo fingerprint library, and the reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned; wherein, the A plurality of echo fingerprint databases are stored in the positioning server, and each echo fingerprint database corresponds to the posture identification one by one; each echo fingerprint database includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint database corresponds to the One-to-one correspondence between a plurality of reference points in the indoor; the reference point is a reference position set in advance in the indoor, and each echo feature vector in each echo fingerprint library is when the device to be positioned is on the corresponding reference point The space detection sound signal played here and the echo signal of the space detection sound signal acquired by recording are sent to the positioning server, and are obtained by the positioning server.
发送模块,用于向所述待定位设备发送包括所述当前位置的定位结果。A sending module, configured to send a positioning result including the current location to the device to be positioned.
结合第十方面,在第十方面第一种可能实现的方式中,所述根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量包括:With reference to the tenth aspect, in the first possible implementation manner of the tenth aspect, the acquiring the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal includes:
所述定位服务器将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;The positioning server performs a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal and takes an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , Len tx is the length of Seq tx ;
在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;The cross-correlation sequence R' of the effective echo part starting from I start is intercepted in the cross-correlation sequence R, wherein, I start is the index where R takes the maximum value;
根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。According to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), where echoE i is the i-th distance interval The average echo energy of i=1,2,...,M.
结合第十方面第一种可能实现的方式,在第十方面的第二种可能实现的方式中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),包括:In combination with the first possible implementation manner of the tenth aspect, in the second possible implementation manner of the tenth aspect, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo Eigenvector EV=(echoE 1 , echoE 2 ,...,echoE M ), including:
对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为 For the distance interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is
分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
结合第十方面,第十方面第一至第二任一种可能实现的方式,在第十方面的第三种可能实现的方式中,所述在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,包括:With reference to the tenth aspect, any one of the first to second possible implementation manners of the tenth aspect, in the third possible implementation manner of the tenth aspect, the determination in the target echo fingerprint database and the to-be Matching echo eigenvectors matches echo eigenvectors, including:
将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将对结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint library, and use the echo feature vector closest to the result as the echo feature vector matched with the echo feature vector to be matched .
第十一方面,本发明实施例提供一种室内定位系统,包括:In an eleventh aspect, an embodiment of the present invention provides an indoor positioning system, including:
第七方面、第七方面第一种至第三种任一种可能实现的方式的待定位设备,第八方面或者第八方面第一种可能实现的方式的定位服务器。The seventh aspect, the device to be positioned in any one of the first to third possible ways of the seventh aspect, and the positioning server of the eighth aspect or the first possible way of the eighth aspect.
第十二方面,本发明实施例提供一种室内定位系统,包括:In a twelfth aspect, an embodiment of the present invention provides an indoor positioning system, including:
第九方面的待定位设备,第十方面、第十方面第一种至第三种任一种可能实现的方式的定位服务器。The device to be positioned according to the ninth aspect, the tenth aspect, and the positioning server according to any one of the first to third possible implementation manners of the tenth aspect.
本发明实施例室内定位方法,通过处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号,所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,根据用于表示所述待定位设备当前的设备姿态的姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置,其中,所述待定位设备中存储有多个回声指纹库,各回声指纹库与用于表示所述待定位设备的设备姿态的姿态标识一一对应,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获得的所述空间探测声音信号的回声信号而获取到的。使用本发明实施例的室内定位方法实现了在进行设备室内定位时,不需要在室内布置额外辅助设备,使用本实施例的方法成本低、实用性好、易于推广。In the indoor positioning method of the embodiment of the present invention, the equipment to be positioned indoors plays the space detection sound signal, and simultaneously records the echo signal of the space detection sound signal. Acquiring the echo feature vector corresponding to the echo signal to be matched, determining a target echo fingerprint library in multiple echo fingerprint libraries according to the posture identifier used to represent the current device posture of the device to be positioned, and determining the target echo fingerprint library in the target echo fingerprint library Determining an echo feature vector that matches the echo feature vector to be matched, and using the indoor reference point corresponding to the echo feature vector as the current position of the device to be positioned, wherein the device to be positioned A plurality of echo fingerprint databases are stored, and each echo fingerprint database is in one-to-one correspondence with an attitude identifier used to represent the equipment attitude of the device to be located, and the equipment attitude is determined by the azimuth, pitch angle and roll angle of the equipment to be located Joint representation of three dimensions; each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library corresponds to a plurality of reference points in the room; The reference position set in the room, each echo feature vector in each echo fingerprint library is the space detection sound signal obtained according to the played space detection sound signal and the recording when the device to be positioned is at the corresponding reference point obtained from the echo signal. Using the indoor positioning method of the embodiment of the present invention realizes that no additional auxiliary equipment needs to be arranged indoors when performing indoor positioning of equipment, and the method of this embodiment is low in cost, good in practicability, and easy to popularize.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明室内定位方法实施例一的流程图;FIG. 1 is a flow chart of Embodiment 1 of the indoor positioning method of the present invention;
图2为本发明室内定位方法实施例二的流程图;FIG. 2 is a flowchart of Embodiment 2 of the indoor positioning method of the present invention;
图3为本发明室内定位方法实施例三的流程图;3 is a flow chart of Embodiment 3 of the indoor positioning method of the present invention;
图4为本发明室内定位方法实施例四的流程图;4 is a flow chart of Embodiment 4 of the indoor positioning method of the present invention;
图5为本发明室内定位方法实施例五的流程图;FIG. 5 is a flowchart of Embodiment 5 of the indoor positioning method of the present invention;
图6为本发明室内定位方法实施例六的流程图;FIG. 6 is a flow chart of Embodiment 6 of the indoor positioning method of the present invention;
图7为本发明室内定位方法实施例七的流程图;FIG. 7 is a flow chart of Embodiment 7 of the indoor positioning method of the present invention;
图8为本发明室内定位方法实施例八的流程图;FIG. 8 is a flow chart of Embodiment 8 of the indoor positioning method of the present invention;
图9为本发明提供的待定位设备的结构示意图;FIG. 9 is a schematic structural diagram of a device to be positioned according to the present invention;
图10为本发明另一种待定位设备的结构示意图;Fig. 10 is a schematic structural diagram of another device to be positioned according to the present invention;
图11为本发明定位服务器的结构示意图;FIG. 11 is a schematic structural diagram of the positioning server of the present invention;
图12为本发明又一种待定位设备的结构示意图;Fig. 12 is a schematic structural diagram of another device to be positioned according to the present invention;
图13为本发明另一种定位服务器的结构示意图;FIG. 13 is a schematic structural diagram of another positioning server of the present invention;
图14为本发明待定位设备的设备结构示意图;Fig. 14 is a schematic diagram of the device structure of the device to be positioned according to the present invention;
图15为本发明另一种待定位设备的设备结构示意图;Fig. 15 is a schematic diagram of another device to be positioned according to the present invention;
图16为本发明定位服务器的设备结构示意图;FIG. 16 is a schematic diagram of the equipment structure of the positioning server of the present invention;
图17为本发明的又一种待定位设备的设备结构示意图Fig. 17 is a schematic diagram of the device structure of another device to be positioned according to the present invention
图18为本发明的另一种定位服务器的设备结构示意图;FIG. 18 is a schematic structural diagram of another location server according to the present invention;
图19为本发明室内定位系统实施例一的结构示意图;FIG. 19 is a schematic structural diagram of Embodiment 1 of the indoor positioning system of the present invention;
图20为本发明室内定位系统实施例二的结构示意图。FIG. 20 is a schematic structural diagram of Embodiment 2 of the indoor positioning system of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明实施例中所涉及的待定位设备为配备有扬声器、麦克风和方向传感器的设备,该设备可以为智能手机、平板电脑等移动终端,也可以为眼镜、手表、腕带、项链、戒指等形态的穿戴式计算设备。The device to be positioned involved in the embodiment of the present invention is a device equipped with a speaker, a microphone, and a direction sensor. The device can be a mobile terminal such as a smart phone or a tablet computer, or it can be glasses, a watch, a wristband, a necklace, a ring, etc. form of wearable computing devices.
本发明实施例中所述涉及的空间探测声音信号均采用步骤101中的具体生成方法而得到的。The spatial detection sound signals involved in the embodiments of the present invention are all obtained by using the specific generation method in step 101 .
图1为本发明室内定位方法实施例一的流程图,如图1所示,本实施例的方法可以包括:Fig. 1 is a flowchart of Embodiment 1 of the indoor positioning method of the present invention. As shown in Fig. 1, the method of this embodiment may include:
步骤101、处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号。Step 101 , the indoor device to be positioned plays a space detection sound signal, and simultaneously performs recording to obtain an echo signal of the space detection sound signal.
其中,所述空间探测声音信号是一次性生成的,预先存储在待定位设备里的。即在待定位设备生成空间探测声音信号后,将其存储在待定位设备中,以便后续在建立回声指纹库以及计算不同点的待匹配回声特征向量时可以使用相同的空间探测声音信号。具体的生成方法可以为:首先,选取长度为Lentx(例如Lentx=1000)的随机序列Rantx,随机序列可选用M序列、Gold序列等具有较好自相关特性的序列(当两个序列正好对齐时自相关函数出现最大峰值,当偏移时,相关函数曲线很快下降并取得接近0的较小值);利用随机序列Rantx对基频fc进行频率或相位调制得到发送序列Septx,从而获得空间探测声音信号(约0.5s左右)。Wherein, the space detection sound signal is generated once and stored in the device to be positioned in advance. That is, after the device to be positioned generates the spatial detection sound signal, it is stored in the device to be positioned, so that the same spatial detection sound signal can be used later when establishing an echo fingerprint library and calculating echo feature vectors to be matched at different points. The specific generation method can be as follows: First, select a random sequence Ran tx with a length of Len tx (for example, Len tx = 1000), and the random sequence can be a sequence with better autocorrelation characteristics such as an M sequence and a Gold sequence (when two sequences When it is just aligned, the autocorrelation function has the maximum peak value, and when it is offset, the correlation function curve quickly drops and obtains a small value close to 0); use the random sequence Ran tx to perform frequency or phase modulation on the fundamental frequency f c to obtain the transmission sequence Sep tx to obtain the spatial detection sound signal (about 0.5s).
其中,所述回声信号为所述空间探测声音信号在室内经过反射得到的。Wherein, the echo signal is obtained by reflecting the space detection sound signal indoors.
步骤102、所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,根据用于表示所述待定位设备当前的设备姿态的姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。Step 102, the device to be located obtains the corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and the multiple echo fingerprints are obtained according to the posture identification used to represent the current device posture of the device to be positioned Determine the target echo fingerprint library in the library, and determine the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and use the reference point in the room corresponding to the echo feature vector as The current location of the device to be located.
其中,所述待定位设备中存储有多个回声指纹库,各回声指纹库与用于表示所述待定位设备的设备姿态的姿态标识一一对应,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获得的所述空间探测声音信号的回声信号而获取到的。Wherein, the device to be positioned is stored with a plurality of echo fingerprint databases, and each echo fingerprint database is in one-to-one correspondence with a posture identifier used to represent the posture of the device to be positioned, and the posture of the device is determined by the posture of the device to be positioned. The three dimensions of azimuth, pitch angle and roll angle are jointly represented; each echo fingerprint library includes multiple echo feature vectors, and each echo feature vector in each echo fingerprint library corresponds to multiple reference points in the room The reference point is a reference position set in advance in the room, and each echo feature vector in each echo fingerprint library is obtained according to the played spatial detection sound signal and recording when the device to be positioned is at the corresponding reference point obtained from the echo signal of the space detection sound signal.
具体地,方位角的取值范围为[0,360],俯仰角的取值范围为[-180,180],翻滚角的取值范围为[-90,90],设备姿态由这三个维度联合表示,根据设备姿态确定姿态标识,可以选取以下两种方式中任一种方式:Specifically, the value range of the azimuth angle is [0,360], the value range of the pitch angle is [-180,180], and the value range of the roll angle is [-90,90]. The equipment attitude is jointly represented by these three dimensions, Determine the attitude identifier according to the attitude of the device, and you can choose any of the following two methods:
方式一、将设备姿态的三个维度对应的具体的角度值作为其对应的姿态标识,例如,设备姿态为(30,-60,45)相应地其对应的姿态标识为(30,-60,45)。Method 1. The specific angle value corresponding to the three dimensions of the device posture is used as its corresponding posture identification. For example, the device posture is (30, -60, 45) and the corresponding posture identification is (30, -60, 45).
方式二、将方位角、俯仰角和翻滚角这三个维度的各取值范围,划分为不同的区间,每一个区间对应一个编号,设备姿态的三个维度的角度对应的区间编号组合构成其对应的姿态标识,举例说明,可将方位角(0~360)划分为A个区间,各区间编号(1~A),俯仰角(-180~180)划分为B个区间,各区间编号(1~B),翻滚角(-90~90)划分为C个区间,各区间编号(1~C),即设备姿态有A×B×C种组合,可以使用Ori(a,b,c)唯一标识一种设备姿态,其中a∈[1,A],b∈[1,B],c∈[1,C]。Method 2: Divide the value ranges of the three dimensions of azimuth, pitch, and roll into different intervals, each interval corresponds to a number, and the interval number combinations corresponding to the three-dimensional angles of the equipment attitude form its For the corresponding attitude identification, for example, the azimuth (0~360) can be divided into A intervals, each interval number (1~A), and the pitch angle (-180~180) can be divided into B intervals, each interval number ( 1~B), the roll angle (-90~90) is divided into C intervals, and each interval is numbered (1~C), that is, the equipment posture has A×B×C combinations, and Ori(a,b,c) can be used Uniquely identify a device pose, where a∈[1,A],b∈[1,B],c∈[1,C].
其中,所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,具体可以为,所述待定位设备将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,具体的R为:Wherein, the device to be positioned obtains the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal, specifically, the device to be positioned combines the echo sequence Seq rx in the echo signal with the The transmission sequence Seq tx in the above-mentioned space detection sound signal is carried out correlation operation and takes the absolute value to obtain the cross-correlation sequence R, and the specific R is:
其中,R的每一项为两个序列的移位相乘的和的绝对值,具体可以为:Among them, each item of R is the absolute value of the sum of the shift multiplication of the two sequences, which can be specifically:
其中,len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;Wherein, len=Len rx +Len tx ; Len rx is the length of Seq rx , and Len tx is the length of Seq tx ;
在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中R'具体为:Intercept the cross-correlation sequence R' of the effective echo part starting from I start in the cross-correlation sequence R, wherein R' is specifically:
其中,Istart为R取最大值的索引,由于Istart所对应时域时刻有可能为播放空间探测声音信号结束与开始接收到回声信号重合的时刻,所以这里选取Istart后的R作为有效回声部分的互相关序列R',根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体为:Among them, I start is the index at which R takes the maximum value. Since the time domain time corresponding to I start may be the time when the playback space detection sound signal ends and the echo signal starts to coincide, so the R after I start is selected here as the effective echo Part of the cross-correlation sequence R', according to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV, specifically:
EV=(echoE1,echoE2,...,echoEM) (4)EV=(echoE 1 ,echoE 2 ,...,echoE M ) (4)
其中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,选定回声特征向量测量范围(dmin,dmax1)和分辨率Δd,由于则可以得到M个距离区间。Wherein, according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. Specifically, the echo feature vector measurement range (d min , d max1 ) and the resolution rate Δd, due to Then M distance intervals can be obtained.
其中,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引。Wherein, for the distance interval D i =(d i ,d i+1 ), the position index of d i is obtained according to formula (5).
根据公式(6)获得di+1位置索引。The d i+1 position index is obtained according to formula (6).
其中,fs为采样频率,fsound为声音在空气中的传播速度。Among them, f s is the sampling frequency, and f sound is the propagation speed of sound in the air.
距离区间Di=(di,di+1)的回声平均能量为echoEi,可以根据公式(7)进行计算。The average energy of the echo in the distance interval D i =(d i , d i+1 ) is echoE i , which can be calculated according to formula (7).
根据公式(7)分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV。According to the formula (7), the echo average energy of the corresponding distance intervals when i=1, 2, . . . , M are respectively calculated to obtain the echo feature vector EV.
其中,所述进行录音获得回声信号,具体为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足如下条件:Wherein, the recording is performed to obtain the echo signal, specifically, the recording is performed until the time of delaying at least Δt after the end of the playback; wherein, Δt needs to meet the following conditions:
Δt>tA tA=dmax·2/fsound (8)Δt>t A t A =d max 2/f sound (8)
其中,dmax为空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度。Among them, d max is the farthest distance that the space detection sound signal can travel back to the echo signal, and f sound is the propagation speed of sound in the air.
进一步地,所述在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,具体可以为,将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Further, the determining the echo feature vector that matches the echo feature vector to be matched in the target echo fingerprint library may specifically be: combining the echo feature vector to be matched with each echo feature in the target echo fingerprint library The similarity calculation is performed on the vectors, and the echo feature vector that is the closest to the result is used as the echo feature vector that matches the echo feature vector to be matched.
本实施例,通过处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号,所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,根据用于表示所述待定位设备当前的设备姿态的姿态标识在多个回声指纹库中确定目标回声指纹库,并在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置,从而实现在进行设备室内定位时,不需要在室内布置额外辅助设备,使用本实施例的室内定位方法成本低、实用性好、易于推广。In this embodiment, the device to be positioned indoors plays the space detection sound signal and simultaneously performs recording to obtain the echo signal of the space detection sound signal, and the device to be positioned obtains the sound signal according to the space detection sound signal and the echo signal. For the corresponding echo feature vector to be matched, determine the target echo fingerprint library in multiple echo fingerprint libraries according to the posture identifier used to represent the current device posture of the device to be positioned, and determine the target echo fingerprint library that matches the target echo fingerprint library. The echo feature vector matched with the echo feature vector, and the indoor reference point corresponding to the echo feature vector is used as the current position of the device to be positioned, so that when the device is positioned indoors, it does not need to be arranged indoors For additional auxiliary equipment, using the indoor positioning method of this embodiment is low in cost, good in practicability, and easy to popularize.
下面采用一个具体的实施例,对图1所示方法实施例的技术方案进行详细说明。图2为本发明室内定位方法实施例二的流程图,如图2所示,本实施例的方法可以包括:A specific embodiment is used below to describe the technical solution of the method embodiment shown in FIG. 1 in detail. Fig. 2 is a flow chart of Embodiment 2 of the indoor positioning method of the present invention. As shown in Fig. 2, the method of this embodiment may include:
S201:离线测量阶段,即建立待定位设备中存储的多个回声指纹库。S201: Offline measurement phase, that is, establishing multiple echo fingerprint libraries stored in the device to be positioned.
在室内各个参考点上,通过多次测量待定位设备在一种设备姿态下某一个参考点的回声特征向量,取其平均值作为该参考点在该设备姿态下的回声特征向量,将在该设备姿态下各个参考点的回声特征向量构成集合作为该设备姿态下的回声指纹库,将不同设备姿态下的回声指纹库预先存储在待定位设备里,具体步骤可以包括:At each reference point in the room, by measuring the echo eigenvector of a certain reference point of the device to be positioned in a device attitude for many times, taking the average value as the echo eigenvector of the reference point in the device attitude, the The echo feature vectors of each reference point under the device attitude form a set as the echo fingerprint database under the equipment attitude, and the echo fingerprint databases under different equipment attitudes are pre-stored in the device to be positioned. The specific steps may include:
a、将室内划分为N个位置区域,位置区域的中心点定义为参考点;a. Divide the room into N location areas, and define the center point of the location area as a reference point;
即该室内有N个参考点。That is, there are N reference points in the room.
b、在每个参考点上,对于特定的某种设备姿态,多次采集空间探测声音信号的回声信号;b. At each reference point, for a specific equipment attitude, collect the echo signal of the space detection sound signal multiple times;
待定位设备的设备姿态可以由方位角、俯仰角和翻滚角三个维度联合表示。为了减少回声指纹库采集工作量,本实施例可将方位角(0~360)划分为A个区间、俯仰角(-180~180)划分为B个区间、翻滚角(-90~90)划分为C个区间,即设备姿态有A×B×C种组合,可以使用Ori(a,b,c)唯一标识一种设备姿态,其中a∈[1,A],b∈[1,B],c∈[1,C]。The device attitude of the device to be positioned can be jointly represented by the three dimensions of azimuth, pitch and roll. In order to reduce the collection workload of the echo fingerprint database, in this embodiment, the azimuth (0-360) can be divided into A intervals, the pitch angle (-180-180) can be divided into B intervals, and the roll angle (-90-90) can be divided into B intervals. There are C intervals, that is, the device posture has A×B×C combinations, and Ori(a,b,c) can be used to uniquely identify a device posture, where a∈[1,A],b∈[1,B] ,c∈[1,C].
c、根据空间探测声音信号和回声信号计算回声特征向量,取多次测量的平均值作为参考点的回声特征向量,其中,回声特征向量的计算方法可以采用S202中步骤a~步骤f的具体步骤;c. Calculate the echo feature vector according to the space detection sound signal and the echo signal, and take the average value of multiple measurements as the echo feature vector of the reference point, wherein the calculation method of the echo feature vector can adopt the specific steps of steps a to f in S202 ;
d、在一种设备姿态下,将不同参考点的回声特征向量集合定义为该设备姿态下的回声指纹库;例如,姿态标识为Ori(a,b,c)的回声指纹库表示为FBOri(a,b,c),该回声指纹库具体为:d. Under a device attitude, define the echo feature vector set of different reference points as the echo fingerprint library under the device attitude; for example, the echo fingerprint library whose attitude is identified as Ori(a,b,c) is represented as FB Ori (a,b,c) , the echo fingerprint library is specifically:
其中,L1为参考点1的标识,同样地L2…LN为不同参考点标识,M为回声特征向量维数,为参考点L1的特征向量,该回声指纹库FBOri(a,b,c)包含了在设备姿态标识Ori(a,b,c)下的所有参考点的回声特征向量。Among them, L 1 is the identification of reference point 1, similarly L 2 ... L N is the identification of different reference points, M is the dimension of the echo feature vector, is the feature vector of the reference point L 1 , the echo fingerprint library FB Ori(a,b,c) contains the echo feature vectors of all reference points under the device attitude identifier Ori(a,b,c).
根据S201中步骤a~步骤d计算不同设备姿态对应的回声指纹库,各回声指纹库与待定位设备的设备姿态一一对应,各回声指纹库中均包括多个回声特征向量,各回声特征向量与室内的多个参考点一一对应,并将计算所得到的多个回声指纹库存储于待定位设备中。According to steps a to d in S201, the echo fingerprint databases corresponding to different device postures are calculated. Each echo fingerprint database corresponds to the device posture of the device to be positioned one by one. Each echo fingerprint database includes multiple echo feature vectors. Each echo feature vector One-to-one correspondence with multiple reference points in the room, and store the calculated multiple echo fingerprint libraries in the device to be positioned.
S202:在线判定阶段,即获取待定位设备的待匹配回声特征向量,具体获取待匹配回声特征向量可以采用如下计算回声特征向量的步骤。S202: In the online determination stage, the echo feature vector to be matched is obtained for the device to be located. Specifically, the echo feature vector to be matched can be obtained by the following steps of calculating the echo feature vector.
a、采集空间探测声音信号的回声信号:处于室内的待定位设备通过扬声器播放空间探测声音信号,在播放的同时开始进行录音,直到播放结束后至少延迟Δt的时间,结束录音从而获取到回声信号,其中,Δt>tA,tA=dmax·2/fsound,dmax为空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度,并且待定位设备播放空间探测声音信号的音量与S201中离线测量阶段播放时的音量相同,进行录音获取回声信号和空间探测声音信号音频文件统一采用采样频率fs。a. Collect the echo signal of the space detection sound signal: the indoor device to be positioned plays the space detection sound signal through the loudspeaker, and starts recording at the same time as the playback, until the end of the playback is delayed by at least Δt time, and the recording is ended to obtain the echo signal , where, Δt>t A , t A =d max 2/f sound , d max is the farthest distance that the spatial detection sound signal can travel back to the echo signal, f sound is the propagation speed of the sound in the air, and to be located The volume of the space detection sound signal played by the device is the same as the volume during the offline measurement stage in S201, and the echo signal and the audio file of the space detection sound signal are uniformly used for recording to obtain the sampling frequency f s .
其中,空间探测声音信号是一次性生成,预先存储在待定位设备里的。具体的生成方法与步骤101中使用的方法相同,此处不再赘述。Wherein, the spatial detection sound signal is generated once and stored in the device to be positioned in advance. The specific generation method is the same as the method used in step 101, and will not be repeated here.
b、提取回声特征向量:b. Extract the echo feature vector:
待定位设备将回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,R具体形式如公式(1)所示,R中的每一项如公式(2)所示。The device to be positioned performs a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal to obtain an absolute value to obtain a cross-correlation sequence R. The specific form of R is shown in formula (1), where R Each item of is shown in formula (2).
c、从互相关序列R中找到回声起始点索引Istart,其中Istart为R取最大值的索引,即如公式(10)所示。c. Find the echo starting point index I start from the cross-correlation sequence R, where I start is the index at which R takes the maximum value, as shown in formula (10).
d、在互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中R'具体为公式(11)。d. Intercept the cross-correlation sequence R' of the effective echo part starting from I start from the cross-correlation sequence R, where R' is specifically formula (11).
具体地,由于Istart为R取最大值的索引,Istart所对应时域时刻有可能为播放空间探测声音信号结束与开始接收到回声信号重合的时刻,所以这里选取Istart后的R作为有效回声部分的互相关序列R'。Specifically, since I start is the index at which R takes the maximum value, the time domain time corresponding to I start may be the time when the end of playing the space detection sound signal coincides with the start of receiving the echo signal, so the R after I start is selected here as an effective The cross-correlation sequence R' of the echo section.
e、选定回声特征向量测量范围(dmin,dmax1)和分辨率Δd,则根据公式(12)可以得到M个距离区间。e. Select the echo feature vector measurement range (d min , d max1 ) and resolution Δd, then M distance intervals can be obtained according to formula (12).
f、计算不同距离区间内的回声平均能量,得到回声特征向量,具体的,对于距离区间Di=(di,di+1),其中,di+1=di+Δd,根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;根据公式(7)计算得到距离区间Di=(di,di+1)的回声平均能量为echoEi;f. Calculate the average energy of the echo in different distance intervals to obtain the echo feature vector. Specifically, for the distance interval D i =(d i ,d i+1 ), where d i+1 =d i +Δd, according to the formula (5) Obtain the position index of d i , and obtain the position index of d i+1 according to the formula (6); calculate the average energy of the echo in the distance interval D i =(d i ,d i+1 ) according to the formula (7) as echoE i ;
根据上述方法计算测量范围(dmin,dmax1)中所有距离区间的回声平均能量,即分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Calculate the average echo energy of all distance intervals in the measurement range (d min ,d max1 ) according to the above method, that is, calculate the average echo energy of M distance intervals respectively, and obtain the echo feature vector EV=(echoE 1 ,echoE 2 ,... , echo E M ).
S203、回声指纹库相似性匹配,即在待定位设备中存储的回声指纹库中确定与待匹配回声特征向量相匹配的回声特征向量,并将该回声特征向量所对应的室内参考点作为该待定位设备的当前位置,具体过程可以采用如下步骤获得:S203. Echo fingerprint library similarity matching, that is, determine the echo feature vector that matches the echo feature vector to be matched in the echo fingerprint library stored in the device to be positioned, and use the indoor reference point corresponding to the echo feature vector as the pending The current location of the bit device, the specific process can be obtained by the following steps:
a、通过方向传感器获取当前待定位设备的设备姿态,例如当前设备姿态标识为Ori(a,b,c),从而确定使用待定位设备中存储的回声指纹库FBOri(a,b,c),将目标回声指纹库设置为FBOri(a,b,c)。a. Obtain the device posture of the current device to be positioned through the direction sensor, for example, the current device posture is identified as Ori(a,b,c), so as to determine the use of the echo fingerprint library FB Ori(a,b,c) stored in the device to be positioned , set the target echo fingerprint bank to FB Ori(a,b,c) .
b、将S202中获得的待匹配回声特征向量EV与FBOri(a,b,c)中各个参考点的回声特征向量进行相似性计算(欧式距离、余弦夹角等),并将结果最相近的回声特征向量作为与待匹配回声特征向量相匹配的回声特征向量,将该特征向量对应的参考点作为本次定位的结果。b. Carry out similarity calculation (Euclidean distance, cosine angle, etc.) between the echo feature vector EV to be matched obtained in S202 and the echo feature vectors of each reference point in FB Ori (a, b, c) , and the result is the closest The echo feature vector of is used as the echo feature vector matched with the echo feature vector to be matched, and the reference point corresponding to the feature vector is taken as the result of this positioning.
举例而言,使用欧式距离进行相似性计算如公式(13),根据公式(14)获取定位结果L。For example, Euclidean distance is used to perform similarity calculation as formula (13), and the positioning result L is obtained according to formula (14).
本实施例,通过离线测量阶段,建立存储于待定位设备中存储的多个回声指纹库,进而,当处于室内的待定位设备需要定位时,通过在线判定阶段,根据空间探测声音信号和空间探测声音信号的回声信号获取待匹配回声特征向量,将待匹配回声特征向量与目标回声指纹库中的特征向量进行相似性匹配,从而得到本次定位的结果,其中目标回声指纹库是根据待定位设备的姿态标识确定的,并且存储于待定位设备中的回声指纹库中的特征向量以及在线判定阶段的待匹配回声特征向量均根据将空间探测声音信号与空间探测声音信号的回声信号进行相关运算,取其有效回声部分的互相关序列,根据该互相关序列计算回声平均能量进而获取回声特征向量。本实施例的室内定位方法不需要在室内布置额外辅助设备,易于推广,对设备要求低,并且由于空间探测声音信号采用具有较强自相关特性的序列,使得本实施例的室内定位方法具有较强的抗噪音干扰能力,能有效区分回声和日常生活中的背景噪声,从而可以实现利用声波反射主动探测空间环境特征进行定位。In this embodiment, through the offline measurement stage, multiple echo fingerprint libraries stored in the device to be positioned are established, and then, when the device to be positioned indoors needs to be positioned, through the online determination stage, according to the spatial detection sound signal and the spatial detection The echo signal of the sound signal obtains the echo eigenvector to be matched, and performs similarity matching between the echo eigenvector to be matched and the eigenvector in the target echo fingerprint library, so as to obtain the result of this positioning, wherein the target echo fingerprint library is based on the target echo fingerprint database. Determined by the gesture identification, and the feature vector stored in the echo fingerprint library in the device to be positioned and the echo feature vector to be matched in the online determination stage are all calculated according to the spatial detection sound signal and the echo signal of the space detection sound signal. The cross-correlation sequence of the effective echo part is taken, and the average energy of the echo is calculated according to the cross-correlation sequence to obtain the echo feature vector. The indoor positioning method of this embodiment does not need to arrange additional auxiliary equipment indoors, is easy to popularize, and has low requirements for equipment, and because the spatial detection sound signal adopts a sequence with strong autocorrelation characteristics, the indoor positioning method of this embodiment has relatively high performance. Strong anti-noise interference ability, can effectively distinguish the echo and background noise in daily life, so that it can realize the active detection of spatial environment characteristics for positioning by using sound wave reflection.
图3为本发明室内定位方法实施例三的流程图,如图3所示,本实施例与图1所示实施例的区别在于定位过程中设置定位服务器,定位服务器中存储多个回声指纹库,由待定位设备获取待匹配回声特征向量发送给定位服务器,由定位服务器对待定位设备进行定位,本实施例的执行主体为待定位设备,本实施例的方法可以包括:Fig. 3 is a flow chart of the third embodiment of the indoor positioning method of the present invention. As shown in Fig. 3, the difference between this embodiment and the embodiment shown in Fig. 1 is that a positioning server is set during the positioning process, and multiple echo fingerprint databases are stored in the positioning server , the echo feature vector to be matched is acquired by the device to be positioned and sent to the positioning server, and the positioning server locates the device to be positioned. The execution subject of this embodiment is the device to be positioned. The method of this embodiment may include:
步骤301、处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态。Step 301, the indoor device to be positioned plays the space detection sound signal, and simultaneously records to obtain the echo signal of the space detection sound signal; obtains the corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal , and determine an attitude identifier of the device to be positioned, where the attitude identifier is used to represent the current posture of the device to be positioned.
其中所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示。The attitude of the device is jointly represented by the three dimensions of the azimuth angle, pitch angle and roll angle of the device to be positioned.
其中,所述空间探测声音信号可以采用步骤101中的生成方法生成并存储于待定位设备里,所述空间探测声音信号具有较强自相关特性。所述回声信号为所述空间探测声音信号在室内经过反射得到的。Wherein, the spatial detection sound signal may be generated by the generation method in step 101 and stored in the device to be positioned, and the spatial detection sound signal has a strong autocorrelation characteristic. The echo signal is obtained by reflecting the space detection sound signal indoors.
具体地,方位角的取值范围为[0,360],俯仰角的取值范围为[-180,180],翻滚角的取值范围为[-90,90],设备姿态由这三个维度联合表示,根据设备姿态确定姿态标识,可以选取以下两种方式中任一种方式:Specifically, the value range of the azimuth angle is [0,360], the value range of the pitch angle is [-180,180], and the value range of the roll angle is [-90,90]. The equipment attitude is jointly represented by these three dimensions, Determine the attitude identifier according to the attitude of the device, and you can choose any of the following two methods:
方式一、将设备姿态的三个维度对应的具体的角度值作为其对应的姿态标识,例如,设备姿态为(30,-60,45)相应地其对应的姿态标识为(30,-60,45)。Method 1. The specific angle value corresponding to the three dimensions of the device posture is used as its corresponding posture identification. For example, the device posture is (30, -60, 45) and the corresponding posture identification is (30, -60, 45).
方式二、将方位角、俯仰角和翻滚角这三个维度的各取值范围,划分为不同的区间,每一个区间对应一个编号,设备姿态的三个维度的角度对应的区间编号组合构成其对应的姿态标识,举例说明,可将方位角(0~360)划分为A个区间,各区间编号(1~A),俯仰角(-180~180)划分为B个区间,各区间编号(1~B),翻滚角(-90~90)划分为C个区间,各区间编号(1~C),即设备姿态有A×B×C种组合,可以使用Ori(a,b,c)唯一标识一种设备姿态,其中a∈[1,A],b∈[1,B],c∈[1,C]。Method 2: Divide the value ranges of the three dimensions of azimuth, pitch, and roll into different intervals, each interval corresponds to a number, and the interval number combinations corresponding to the three-dimensional angles of the equipment attitude form its For the corresponding attitude identification, for example, the azimuth (0~360) can be divided into A intervals, each interval number (1~A), and the pitch angle (-180~180) can be divided into B intervals, each interval number ( 1~B), the roll angle (-90~90) is divided into C intervals, and each interval is numbered (1~C), that is, the equipment posture has A×B×C combinations, and Ori(a,b,c) can be used Uniquely identify a device pose, where a∈[1,A],b∈[1,B],c∈[1,C].
步骤302、所述待定位设备向定位服务器发送定位请求,所述定位请求中包括所述待匹配回声特征向量和所述姿态标识,以供所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。Step 302. The device to be positioned sends a positioning request to a positioning server, and the positioning request includes the echo feature vector to be matched and the gesture identifier, so that the positioning server can identify multiple echo fingerprints according to the gesture identifier. The target echo fingerprint library is determined in the library, the echo feature vector matching the echo feature vector to be matched is determined in the target echo fingerprint library, and the reference point in the room corresponding to the echo feature vector is used as the reference point. Describe the current location of the device to be located.
步骤303、接收所述定位服务器返回的包括所述当前位置的定位结果。Step 303: Receive a positioning result including the current position returned by the positioning server.
其中,多个回声指纹库存储于所述定位服务器中,各回声指纹库与所述待定位设备的姿态标识一一对应,所述目标回声指纹库是由所述定位服务器根据所述待定位设备发送的所述姿态标识确定的;各回声指纹库中均包括多个回声特征向量,各回声特征向量与所述室内的多个参考点一一对应;各回声特征向量是由所述待定位设备处于对应的参考点上时根据此处的空间探测声音信号和回音信号而获取到的,待定位设备获取到一种姿态标识对应的各各参考点的回声特征向量,将该姿态标识以及该姿态标识对应的各参考点的回声特征向量发送给定位服务器,由定位服务器建立回声指纹库。Wherein, a plurality of echo fingerprint databases are stored in the positioning server, and each echo fingerprint database is in one-to-one correspondence with the gesture identification of the device to be positioned, and the target echo fingerprint database is generated by the positioning server according to the position identification of the device to be positioned. The attitude identification sent is determined; each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector is in one-to-one correspondence with a plurality of reference points in the room; each echo feature vector is determined by the device to be positioned When it is at the corresponding reference point, it is obtained according to the space detection sound signal and the echo signal here. The device to be positioned obtains the echo feature vector of each reference point corresponding to a posture identifier, and the posture identifier and the posture identifier The echo feature vectors identifying the corresponding reference points are sent to the positioning server, and the positioning server establishes an echo fingerprint database.
其中,所述根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,可以为,所述待定位设备将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,R具体为公式(1),其中R的每一项为两个序列的移位相乘的和的绝对值,具体公式为公式(2);在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,R'具体为公式(3),Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,EV具体可参照公式(4)。Wherein, the acquisition of the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal may be that the device to be positioned combines the echo sequence Seq rx in the echo signal with the spatial detection sound The transmission sequence Seq tx in the signal is correlated to take the absolute value to obtain the cross-correlation sequence R, R is specifically formula (1), where each item of R is the absolute value of the sum of the shift multiplication of the two sequences, the specific formula Be formula (2); Intercept the cross-correlation sequence R' of the effective echo part starting from I start in described cross-correlation sequence R, wherein, R' is specifically formula (3), and I start is that R gets the maximum value Index; according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo feature vector EV, EV can refer to formula (4) for details.
进一步地,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;根据公式(7)计算距离区间Di=(di,di+1)的回声平均能量echoEi;i=1,2,...,M分别计算M个距离区间的回声平均能量,获得回声特征向量EV。Further, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo feature vector EV, specifically, for the distance interval D i =(d i , d i+1 ) , get the position index of d i according to formula (5), and get the position index of d i+1 according to formula (6); among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; calculated according to formula (7) Distance interval D i = (d i , d i+1 ) average echo energy echoE i ; i=1, 2, .
进一步地,所述进行录音获得回声信号具体可以为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足公式(8)所示条件。Further, the recording to obtain the echo signal may specifically be recording, and delaying at least Δt after the end of the playback; where Δt needs to meet the conditions shown in formula (8).
本实施例,处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并根据所述待定位设备当前的设备姿态确定对应的姿态标识;所述待定位设备向定位服务器发送定位请求,所述定位请求中包括所述待匹配回声特征向量和所述姿态标识,以供所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;接收所述定位服务器返回的包括所述当前位置的定位结果。从而实现在进行设备室内定位时,通过播放空间探测声音信号获取回声信号,利用声波反射主动探测空间环境特征进行定位,使用本实施例的室内定位方法成本低、实用性好、易于推广。In this embodiment, the indoor device to be positioned plays a space detection sound signal, and simultaneously performs recording to obtain an echo signal of the space detection sound signal; obtains the corresponding echo feature to be matched according to the space detection sound signal and the echo signal vector, and determine the corresponding posture identifier according to the current device posture of the device to be positioned; the device to be positioned sends a positioning request to the positioning server, and the positioning request includes the echo feature vector to be matched and the posture identifier, for the positioning server to determine a target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, determine an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and set The reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned; and the positioning result including the current position returned by the positioning server is received. In this way, when performing indoor positioning of the equipment, the echo signal is obtained by playing the spatial detection sound signal, and the acoustic wave reflection is used to actively detect the characteristics of the space environment for positioning. The indoor positioning method of this embodiment is low in cost, good in practicability, and easy to popularize.
图4为本发明室内定位方法实施例四的流程图,如图4所示,本实施例与图1所示实施例的区别在于定位过程中设置定位服务器,定位服务器中存储多个回声指纹库,由待定位设备获取待匹配回声特征向量发送给定位服务器,由定位服务器对待定位设备进行定位,本实施例执行主体为定位服务器,本实施例的方法可以包括:Fig. 4 is a flow chart of Embodiment 4 of the indoor positioning method of the present invention. As shown in Fig. 4, the difference between this embodiment and the embodiment shown in Fig. 1 is that a positioning server is set during the positioning process, and multiple echo fingerprint databases are stored in the positioning server The echo feature vector to be matched is acquired by the device to be positioned and sent to the positioning server, and the positioning server locates the device to be positioned. The execution subject of this embodiment is the positioning server. The method of this embodiment may include:
步骤401、定位服务器接收处于室内的待定位设备发送的定位请求,所述定位请求中包括待匹配回声特征向量和姿态标识;其中,所述待匹配回声特征向量是由所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述空间探测声音信号和所述回声信号获取的;所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态。Step 401, the positioning server receives the positioning request sent by the device to be positioned indoors, and the positioning request includes the echo feature vector to be matched and the posture identifier; wherein, the echo feature vector to be matched is the space played by the device to be positioned Detect the sound signal, and record at the same time to obtain the echo signal of the space detection sound signal, and obtain it according to the space detection sound signal and the echo signal; the attitude identification is determined by the device to be positioned, so The posture identifier is used to represent the current device posture of the device to be positioned.
其中,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示,具体根据所述设备姿态确定所述姿态标识的具体方式可以参见步骤101中的根据设备姿态确定姿态标识方式一和方式二。由所述待定位设备完成根据设备姿态确定姿态标识。Wherein, the device posture is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned. For a specific method of determining the posture identifier according to the device posture, please refer to step 101 according to the device posture Determine the posture identification method 1 and method 2. The device to be positioned determines the pose identifier according to the pose of the device.
所述定位服务器可以为云端服务器,具备存储、计算处理以及无线通信功能。The positioning server may be a cloud server, which has functions of storage, calculation and processing, and wireless communication.
步骤402、所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。Step 402, the positioning server determines a target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identifier, determines an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and The reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned.
步骤403、所述定位服务器向所述待定位设备发送包括所述当前位置的定位结果。Step 403, the positioning server sends a positioning result including the current position to the device to be positioned.
其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述待定位设备的姿态标识一一对应,所述目标回声指纹库是根据所述姿态标识确定的;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号而获取并发送给定位服务器的。Wherein, a plurality of echo fingerprint databases are stored in the positioning server, and each echo fingerprint database is in one-to-one correspondence with the posture identification of the device to be positioned, and the target echo fingerprint database is determined according to the posture identification; each echo fingerprint database Each library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library is in one-to-one correspondence with a plurality of reference points in the room; the reference points are pre-set reference positions in the room. Each echo eigenvector in each echo fingerprint library is obtained and sent to the positioning server according to the echo signal of the spatial detection sound signal obtained by playing the spatial detection sound signal and recording when the device to be positioned is at the corresponding reference point of.
进一步地,所述待匹配回声特征向量是由所述待定位设备播放空间探测声音信号,并同时进行录音获得回声信号后,根据所述空间探测声音信号和所述回声信号获取的,具体可以为,将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,其中R中的每一项为两个序列的移位相乘的和的绝对值,具体可参见公式(2);在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,R'具体参见公式(3),Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,EV具体可参见公式(4)。Further, the echo feature vector to be matched is obtained from the spatial detection sound signal and the echo signal after the device to be positioned plays the spatial detection sound signal and simultaneously records the echo signal, and may specifically be , performing a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal and taking the absolute value to obtain a cross-correlation sequence R, wherein each item in R is the shift of two sequences The absolute value of the sum of bit multiplication, specifically can refer to formula (2); Intercept the cross-correlation sequence R' of the effective echo part starting from I start in described cross-correlation sequence R, wherein, R' specifically see formula ( 3), I start is the index of the maximum value of R; according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. For EV, see formula (4) for details.
其中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;距离区间Di=(di,di+1)根据公式(7)计算得到所述距离区间的回声平均能量echoEi;分别计算M个距离区间的回声平均能量,获得回声特征向量EV。Wherein, according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. Specifically, for the distance interval D i =(d i , d i+1 ), The position index of d i is obtained according to formula (5), and the position index of d i+1 is obtained according to formula (6); the distance interval D i = (d i , d i+1 ) is calculated according to formula (7) to obtain the distance interval Echo average energy echoE i ; respectively calculate the echo average energy of the M distance intervals to obtain the echo feature vector EV.
进一步地,所述进行录音获得回声信号具体可以为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足公式(8)的条件。Further, the recording to obtain the echo signal may specifically be recording until at least a delay of Δt after the end of playback; where Δt needs to satisfy the condition of formula (8).
进一步地,所述在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,具体可以为,将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Further, the determining the echo feature vector that matches the echo feature vector to be matched in the target echo fingerprint library may specifically be: combining the echo feature vector to be matched with each echo feature in the target echo fingerprint library The similarity calculation is performed on the vectors, and the echo feature vector that is the closest to the result is used as the echo feature vector that matches the echo feature vector to be matched.
本实施例,通过定位服务器接收处于室内的待定位设备发送的定位请求,所述定位请求中包括待匹配回声特征向量和姿态标识;其中,所述待匹配回声特征向量是由所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述回声信号获取的;所述姿态标识是由所述待定位设备根据当前的设备姿态而确定得的。所述定位服务器在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。所述定位服务器向所述待定位设备发送包括所述当前位置的定位结果。从而实现在待定位设备发送定位请求时,根据该定位请求中的回声特征向量对待定位设备进行定位,使用本实施例的室内定位方法成本低、实用性好、易于推广。In this embodiment, the positioning server receives a positioning request sent by a device to be positioned indoors, and the positioning request includes an echo feature vector to be matched and a posture identifier; wherein, the echo feature vector to be matched is obtained from the device to be positioned After playing the space detection sound signal and recording at the same time to obtain the echo signal of the space detection sound signal, it is obtained according to the echo signal; the posture identification is determined by the device to be positioned according to the current device posture . The positioning server determines the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and uses the indoor reference point corresponding to the echo feature vector as the current location of the device to be positioned. Location. The positioning server sends a positioning result including the current position to the device to be positioned. Therefore, when the device to be positioned sends a positioning request, the device to be positioned is positioned according to the echo feature vector in the positioning request, and the indoor positioning method of this embodiment is low in cost, good in practicability, and easy to popularize.
图5为本发明室内定位方法实施例五的流程图,如图5所示,本实施例包括待定位设备和定位服务器,本实施例的方法可以包括:Fig. 5 is a flow chart of Embodiment 5 of the indoor positioning method of the present invention. As shown in Fig. 5, this embodiment includes a device to be positioned and a positioning server, and the method of this embodiment may include:
S501:待定位设备计算回声特征向量,将不同设备姿态在不同参考点对应的回声特征向量发送给定位服务器。S501: The device to be positioned calculates an echo feature vector, and sends echo feature vectors corresponding to different device postures at different reference points to the positioning server.
具体地,在室内各个参考点上,待定位设备通过多次测量计算该待定位设备在一种设备姿态下某一个参考点的回声特征向量,取其平均值作为该参考点在该设备姿态下的回声特征向量,将该回声特征向量发送给定位服务器。Specifically, at each reference point in the room, the device to be positioned calculates the echo feature vector of a certain reference point of the device to be positioned at a device posture through multiple measurements, and takes the average value as the reference point at the device posture. The echo feature vector of , and send the echo feature vector to the positioning server.
具体步骤可以包括:Specific steps can include:
a、将室内划分为N个位置区域,位置区域的中心点定义为参考点;a. Divide the room into N location areas, and define the center point of the location area as a reference point;
即该室内有N个参考点。That is, there are N reference points in the room.
b、待定位设备在每个参考点上,对于特定的某种设备姿态,多次采集空间探测声音信号的回声信号;b. The equipment to be positioned is at each reference point, and for a specific equipment attitude, collect the echo signal of the space detection sound signal multiple times;
待定位设备的设备姿态可以由方位角、俯仰角和翻滚角三个维度联合表示。为了减少回声指纹库采集工作量,本实施例可将方位角(0~360)划分为A个区间、俯仰角(-180~180)划分为B个区间、翻滚角(-90~90)划分为C个区间,即设备姿态有A×B×C种组合,可以使用Ori(a,b,c)唯一标识一种设备姿态,其中a∈[1,A],b∈[1,B],c∈[1,C]。The device attitude of the device to be positioned can be jointly represented by the three dimensions of azimuth, pitch and roll. In order to reduce the collection workload of the echo fingerprint database, in this embodiment, the azimuth (0-360) can be divided into A intervals, the pitch angle (-180-180) can be divided into B intervals, and the roll angle (-90-90) can be divided into B intervals. There are C intervals, that is, the device posture has A×B×C combinations, and Ori(a,b,c) can be used to uniquely identify a device posture, where a∈[1,A],b∈[1,B] ,c∈[1,C].
c、待定位设备根据空间探测声音信号和回声信号计算回声特征向量,取多次测量的平均值作为参考点的回声特征向量,并发送给定位服务器,其中,回声特征向量的计算方法可以采用S202中步骤a~步骤f的具体步骤。c. The device to be positioned calculates the echo feature vector according to the space detection sound signal and the echo signal, takes the average value of multiple measurements as the echo feature vector of the reference point, and sends it to the positioning server, wherein the echo feature vector can be calculated using S202 The specific steps of step a to step f in the above.
待定位设备根据S501中步骤a~步骤c计算不同设备姿态在不同参考点对应的回声特征向量,并发送给定位服务器。The device to be positioned calculates echo feature vectors corresponding to different device postures at different reference points according to steps a to c in S501, and sends them to the positioning server.
S502:定位服务器将在一种设备姿态下各个参考点的回声特征向量构成集合作为一种设备姿态下的回声指纹库,将不同设备姿态下的回声指纹库预先存储在定位服务器里。S502: The positioning server sets the echo feature vectors of each reference point in one device posture as an echo fingerprint library in one device posture, and pre-stores the echo fingerprint libraries in different device postures in the positioning server.
具体地,定位服务器将在一种设备姿态下,不同参考点的回声特征向量集合定义为该设备姿态下的回声指纹库;例如,姿态标识为Ori(a,b,c)的回声指纹库表示为FBOri(a,b,c),该回声指纹库具体为:Specifically, the positioning server defines the set of echo feature vectors of different reference points under a device posture as the echo fingerprint library under the device posture; for example, the echo fingerprint library with the posture ID Ori(a,b,c) represents is FB Ori(a,b,c) , the echo fingerprint library is specifically:
其中,L1为参考点1的标识,同样地L2…LN为不同参考点标识,M为回声特征向量维数,为参考点L1的特征向量,该回声指纹库FBOri(a,b,c)包含了在设备姿态Ori(a,b,c)下的所有参考点的回声特征向量。Among them, L 1 is the identification of reference point 1, similarly L 2 ... L N is the identification of different reference points, M is the dimension of the echo feature vector, is the feature vector of the reference point L 1 , the echo fingerprint library FB Ori(a,b,c) contains the echo feature vectors of all reference points under the device posture Ori(a,b,c).
定位服务器建立不同设备姿态对应的回声指纹库,各回声指纹库与待定位设备的设备姿态一一对应,各回声指纹库中均包括多个回声特征向量,各回声特征向量与室内的多个参考点一一对应。The positioning server establishes echo fingerprint databases corresponding to different device postures. Each echo fingerprint database corresponds to the device posture of the device to be positioned. Each echo fingerprint database includes multiple echo feature vectors, and each echo feature vector corresponds to multiple indoor references One-to-one correspondence.
S503:处于室内的待定位设备向定位服务器发送定位请求,所述定位请求中包括所述待匹配回声特征向量和所述姿态标识。S503: The indoor device to be positioned sends a positioning request to a positioning server, where the positioning request includes the echo feature vector to be matched and the gesture identifier.
具体地,待定位设备获取待匹配特征向量可以采用S202中步骤a~步骤f的计算回声特征向量的步骤。同时,待定位设备通过方向传感器获取待定位设备的设备姿态。并将待匹配回声特征向量EV和该姿态标识Ori(a,b,c)发送给定位服务器。Specifically, the device to be located may use the steps of calculating the echo feature vector in steps a to f in S202 to obtain the feature vector to be matched. At the same time, the device to be positioned obtains the device posture of the device to be positioned through the direction sensor. And send the to-be-matched echo feature vector EV and the posture identifier Ori(a, b, c) to the positioning server.
S504:定位服务器在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。S504: The positioning server determines the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint database, and uses the indoor reference point corresponding to the echo feature vector as the current location of the device to be positioned. Location.
定位服务器根据姿态标识Ori(a,b,c)获取与该姿态标识对应的回声指纹库FBOri(a,b,c),将FBOri(a,b,c)作为目标回声指纹库,定位服务器将接收到的待匹配回声特征向量EV与FBOri(a,b,c)中各个参考点的回声特征向量进行相似性计算(欧式距离、余弦夹角等),并将结果最相近的回声特征向量作为与待匹配回声特征向量相匹配的回声特征向量,将该特征向量对应的参考点作为本次定位的结果。The positioning server obtains the echo fingerprint database FB Ori(a,b,c) corresponding to the posture identifier according to the posture identifier Ori(a,b,c) , and uses FB Ori(a,b,c) as the target echo fingerprint database, and locates The server calculates the similarity (Euclidean distance, cosine angle, etc.) between the received echo feature vector EV and the echo feature vectors of each reference point in FB Ori(a,b,c) , and calculates the closest echo The feature vector is used as the echo feature vector matched with the echo feature vector to be matched, and the reference point corresponding to the feature vector is taken as the result of this positioning.
举例而言,使用欧式距离进行相似性计算如公式(13),根据公式(14)获取定位结果L。For example, Euclidean distance is used to perform similarity calculation as formula (13), and the positioning result L is obtained according to formula (14).
S505:定位服务器向待定位设备返回包括当前位置的定位结果L。S505: The positioning server returns a positioning result L including the current position to the device to be positioned.
本实施例,通过在定位服务器中存储多个回声指纹库,当处于室内的待定位设备需要定位时,待定位设备向定位服务器发送定位请求,该定位请求中包含待匹配回声特征向量以及根据设备姿态确定的姿态标识,定位服务器根据该姿态标识获取与其对应的目标回声指纹库,将待匹配特征向量与目标回声指纹库中的特征向量进行相似性匹配,确定与该待匹配回声特征向量相匹配的回声特征向量,并将该回声特征向量所对应的室内的参考点作为该待定位设备的当前位置,并向待定位设备返回包括该当前位置的定位结果。本实施例的室内定位方法不需要额外辅助设备,易于推广,对设备要求低,并且由于空间探测声音信号采用具有较强自相关特性的序列,使得本实施例的室内定位方法具有较强的抗噪音干扰能力,能有效区分回声和日常生活中的背景噪声,从而可以实现利用声波反射主动探测空间环境特征进行定位。In this embodiment, by storing multiple echo fingerprint libraries in the positioning server, when the indoor device to be positioned needs to be positioned, the device to be positioned sends a positioning request to the positioning server, and the positioning request includes the echo feature vector to be matched and the The attitude identification of the attitude determination, the positioning server obtains the corresponding target echo fingerprint library according to the attitude identification, performs similarity matching between the feature vector to be matched and the feature vector in the target echo fingerprint library, and determines that it matches the echo feature vector to be matched The echo feature vector of the echo feature vector is used as the current position of the device to be positioned as the reference point in the room corresponding to the echo feature vector, and a positioning result including the current position is returned to the device to be positioned. The indoor positioning method of this embodiment does not require additional auxiliary equipment, is easy to popularize, and has low requirements for equipment, and because the spatial detection sound signal adopts a sequence with strong autocorrelation characteristics, the indoor positioning method of this embodiment has strong anti-correlation characteristics. The ability to interfere with noise can effectively distinguish between echoes and background noise in daily life, so that the use of sound wave reflection to actively detect the characteristics of the space environment for positioning.
图6为本发明室内定位方法实施例六的流程图,如图6所示,本实施例与图1所示实施例的区别在于定位过程中设置定位服务器,由待定位设备将包含空间探测声音信号、回声信号以及设备姿态标识的定位请求,发送给定位服务器,由定位服务器获取待匹配回声特征向量,对待定位设备进行定位,本实施例执行主体为待定位设备,本实施例的方法可以包括:Fig. 6 is a flow chart of Embodiment 6 of the indoor positioning method of the present invention. As shown in Fig. 6, the difference between this embodiment and the embodiment shown in Fig. 1 is that a positioning server is set during the positioning process, and the device to be positioned will include the spatial detection sound The signal, the echo signal, and the positioning request of the device posture identifier are sent to the positioning server, and the positioning server obtains the echo feature vector to be matched, and locates the device to be positioned. The execution subject of this embodiment is the device to be positioned. The method of this embodiment may include :
步骤601、处于室内的待定位设备播放空间探测声音信号,同时进行录音获得所述空间探测声音信号的回声信号;并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态。Step 601: The indoor device to be positioned plays a space detection sound signal, and at the same time performs recording to obtain an echo signal of the space detection sound signal; The current device attitude of the bit device.
其中,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;Wherein, the posture of the device is jointly represented by the three dimensions of the azimuth, pitch and roll of the device to be positioned;
步骤602、所述待定位设备向定位服务器发送定位请求,所述定位请求中包括所述空间探测声音信号、所述回声信号和所述姿态标识,以供所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量后,根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。Step 602, the device to be positioned sends a positioning request to a positioning server, and the positioning request includes the space detection sound signal, the echo signal and the gesture identification, for the positioning server to use the space detection sound After the signal and the echo signal obtain the corresponding echo feature vector to be matched, determine the target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, and determine the echo feature vector to be matched in the target echo fingerprint library. The echo feature vector matched with the echo feature vector, and the reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned.
其中,所述参考点为预先在所述室内设置的参考位置。Wherein, the reference point is a reference position pre-set in the indoor.
步骤603、接收所述定位服务器返回的包括所述当前位置的定位结果。Step 603: Receive a positioning result including the current position returned by the positioning server.
其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述待定位设备的姿态标识一一对应,所述目标回声指纹库是根据所述姿态标识确定的;各回声指纹库中均包括多个回声特征向量,各回声特征向量与所述室内的多个参考点一一对应;各回声特征向量是所述待定位设备处于对应的参考点上时根据此处的空间探测声音信号和回音信号而获取到的。Wherein, a plurality of echo fingerprint databases are stored in the positioning server, and each echo fingerprint database is in one-to-one correspondence with the posture identification of the device to be positioned, and the target echo fingerprint database is determined according to the posture identification; each echo fingerprint database Each library includes a plurality of echo feature vectors, and each echo feature vector is in one-to-one correspondence with multiple reference points in the room; each echo feature vector is based on the spatial detection here when the device to be positioned is at the corresponding reference point. Acquired by sound signal and echo signal.
其中,由定位服务器根据所述回声信号获取对应的待匹配回声特征向量具体可以为,将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,R具体为公式(1),其中R的每一项为两个序列的移位相乘的和的绝对值,具体公式为公式(2);在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,R'具体为公式(3),Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,EV具体可参照公式(4)。Wherein, the acquisition of the corresponding echo feature vector to be matched by the positioning server according to the echo signal may be specifically, performing a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the spatial detection sound signal to obtain The absolute value obtains the cross-correlation sequence R, and R is specifically formula (1), wherein each item of R is the absolute value of the sum of the displacement multiplication of two sequences, and the specific formula is formula (2); in the cross-correlation Intercept the cross-correlation sequence R' of the effective echo part starting from I start in the sequence R, wherein, R' is specifically formula (3), and I start is the index of R taking the maximum value; according to the cross-correlation sequence R', Calculate the average echo energy of the M distance intervals respectively to obtain the echo feature vector EV. For details of EV, refer to formula (4).
进一步地,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;根据公式(7)计算距离区间Di=(di,di+1)的回声平均能量echoEi;分别计算M个距离区间的回声平均能量,获得回声特征向量EV。Further, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo feature vector EV, specifically, for the distance interval D i =(d i , d i+1 ) , get the position index of d i according to formula (5), and get the position index of d i+1 according to formula (6); among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; calculated according to formula (7) The average echo energy echoE i of the distance interval D i =(d i , d i+1 ); the average echo energy of the M distance intervals is calculated respectively to obtain the echo feature vector EV.
进一步地,由所述待定位设备进行录音获得回声信号具体可以为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足公式(8)所示条件。Further, the recording by the device to be positioned to obtain the echo signal may specifically be recording until the end of playback and delaying at least Δt; where Δt needs to meet the conditions shown in formula (8).
进一步地,由定位服务器在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,具体可以为,将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Further, the positioning server determines the echo feature vector that matches the echo feature vector to be matched in the target echo fingerprint library. Specifically, the echo feature vector to be matched can be compared with each echo feature vector in the target echo fingerprint library. The similarity calculation is performed on the feature vectors, and the echo feature vector that is the closest to the result is used as the echo feature vector that matches the echo feature vector to be matched.
其中所述相似性计算可以采用欧式距离法、夹角余弦法等方法。Wherein, the similarity calculation may adopt methods such as the Euclidean distance method, the included angle cosine method, and the like.
本实施例,处于室内的待定位设备播放空间探测声音信号,同时进行录音获得所述空间探测声音信号的回声信号,并根据所述待定位设备当前的设备姿态确定对应的姿态标识,进而向定位服务器发送定位请求,所述定位请求中包括所述空间探测声音信号、所述回声信号和所述设备姿态标识,以供定位服务器根据所述回声信号获取对应的待匹配回声特征向量后,根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置,进而接收所述定位服务器返回的包括所述当前位置的定位结果。从而实现在进行设备室内定位时,通过播放空间探测声音信号获取回声信号,利用声波反射主动探测空间环境特征进行定位,使用本实施例的室内定位方法成本低、实用性好、易于推广。In this embodiment, the indoor device to be positioned plays the space detection sound signal, and at the same time performs recording to obtain the echo signal of the space detection sound signal, and determines the corresponding posture identifier according to the current device posture of the device to be positioned, and then provides positioning The server sends a positioning request, and the positioning request includes the space detection sound signal, the echo signal and the device posture identifier, so that the positioning server obtains the corresponding echo feature vector to be matched according to the echo signal, and then according to the The posture identification determines a target echo fingerprint library in a plurality of echo fingerprint libraries, determines an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and sets the echo feature vector corresponding to The indoor reference point is used as the current position of the device to be positioned, and then the positioning result including the current position returned by the positioning server is received. In this way, when performing indoor positioning of the equipment, the echo signal is obtained by playing the spatial detection sound signal, and the acoustic wave reflection is used to actively detect the characteristics of the space environment for positioning. The indoor positioning method of this embodiment is low in cost, good in practicability, and easy to popularize.
图7为本发明室内定位方法实施例七的流程图,如图7所示,本实施例与图1所示实施例的区别在于定位过程中设置定位服务器,由待定位设备将包含空间探测声音信号、回声信号以及设备的姿态标识的定位请求,发送给定位服务器,由定位服务器获取待匹配回声特征向量,对待定位设备进行定位,本实施例执行主体为定位服务器,本实施例的方法可以包括:Fig. 7 is a flow chart of Embodiment 7 of the indoor positioning method of the present invention. As shown in Fig. 7, the difference between this embodiment and the embodiment shown in Fig. 1 is that a positioning server is set during the positioning process, and the device to be positioned will include the spatial detection sound The positioning request of the signal, the echo signal, and the posture identification of the device is sent to the positioning server, and the positioning server obtains the echo feature vector to be matched, and locates the positioning device. The execution subject of this embodiment is the positioning server. The method of this embodiment may include :
步骤701、定位服务器接收处于室内的待定位设备发送的定位请求,所述定位请求中包括空间探测声音信号、回声信号和姿态标识;其中,所述回声信号是由所述待定位设备播放所述空间探测声音信号的同时进行录音而获得的所述空间探测声音信号的回声信号,所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态。Step 701, the positioning server receives a positioning request sent by the device to be positioned indoors, the positioning request includes a space detection sound signal, an echo signal, and a posture indicator; wherein, the echo signal is played by the device to be positioned The echo signal of the space detection sound signal obtained by recording the space detection sound signal at the same time, the posture identifier is determined by the device to be positioned, and the posture identifier is used to indicate the current device of the device to be positioned attitude.
其中,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;Wherein, the posture of the device is jointly represented by the three dimensions of the azimuth, pitch and roll of the device to be positioned;
步骤702、所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。Step 702, the positioning server obtains the corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and determines the target echo fingerprint library in multiple echo fingerprint libraries according to the posture identification, and in the Determine the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and use the reference point in the room corresponding to the echo feature vector as the current position of the device to be positioned.
步骤703、所述定位服务器向所述待定位设备发送包括所述当前位置的定位结果。Step 703, the positioning server sends a positioning result including the current position to the device to be positioned.
其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时将在此处播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号发送给所述定位服务器,由所述定位服务器获取到的。Wherein, a plurality of echo fingerprint databases are stored in the positioning server, and each echo fingerprint database is in one-to-one correspondence with the posture identification; each echo fingerprint database includes a plurality of echo feature vectors, and each echo fingerprint database in each echo fingerprint database The feature vectors are in one-to-one correspondence with a plurality of reference points in the room; the reference points are preset reference positions in the room, and each echo feature vector in each echo fingerprint library is the corresponding location of the device to be positioned. When the reference point is on, the space detection sound signal played here and the echo signal of the space detection sound signal obtained by recording are sent to the positioning server, and are obtained by the positioning server.
其中定位服务器根据待定位设备处于对应的参考点上时此处的空间探测声音信号和所述空间探测声音信号的回声信号获取该参考点对应的回声特征向量所使用的方法,可以参照以下根据空间探测声音信号和回声信号获取对应的待匹配回声特征向量的步骤。The method used by the positioning server to obtain the echo feature vector corresponding to the reference point according to the spatial detection sound signal and the echo signal of the space detection sound signal when the device to be positioned is at the corresponding reference point can refer to the following according to the space A step of acquiring the corresponding echo feature vector to be matched by detecting the sound signal and the echo signal.
进一步地,所述根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量具体可以为,将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,R具体为公式(1),其中R的每一项为两个序列的移位相乘的和的绝对值,具体公式为公式(2);在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,R'具体为公式(3),Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,EV具体可参照公式(4)。Further, the acquisition of the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal may be specifically, combining the echo sequence Seq rx in the echo signal with the sending Sequence Seq tx carries out the correlation operation and takes the absolute value to obtain the cross-correlation sequence R, and R is specifically formula (1), wherein each item of R is the absolute value of the sum of shift multiplication of two sequences, and the specific formula is formula (2 ); In the cross-correlation sequence R, intercept the cross-correlation sequence R' of the effective echo part starting from I start , wherein, R' is specifically formula (3), and I start is the index that R gets the maximum value; According to the The cross-correlation sequence R' is used to calculate the average echo energy of M distance intervals to obtain the echo feature vector EV. For details of EV, refer to formula (4).
进一步地,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;根据公式(7)计算距离区间Di=(di,di+1)的回声平均能量echoEi;分别计算M个距离区间的回声平均能量,获得回声特征向量EV。Further, according to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals to obtain the echo feature vector EV, specifically, for the distance interval D i =(d i , d i+1 ) , get the position index of d i according to formula (5), and get the position index of d i+1 according to formula (6); among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; calculated according to formula (7) The average echo energy echoE i of the distance interval D i =(d i , d i+1 ); the average echo energy of the M distance intervals is calculated respectively to obtain the echo feature vector EV.
进一步地,所述进行录音获得回声信号具体可以为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足公式(8)所示条件。Further, the recording to obtain the echo signal may specifically be recording, and delaying at least Δt after the end of the playback; where Δt needs to meet the conditions shown in formula (8).
进一步地,所述在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,具体可以为,将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Further, the determining the echo feature vector that matches the echo feature vector to be matched in the target echo fingerprint library may specifically be: combining the echo feature vector to be matched with each echo feature in the target echo fingerprint library The similarity calculation is performed on the vectors, and the echo feature vector that is the closest to the result is used as the echo feature vector that matches the echo feature vector to be matched.
其中所述相似性计算可以采用欧式距离法、夹角余弦法等方法。Wherein, the similarity calculation may adopt methods such as the Euclidean distance method, the included angle cosine method, and the like.
本实施例,通过定位服务器接收处于室内的待定位设备发送的定位请求,所述定位请求中包括空间探测声音信号、回声信号和姿态标识;其中,所述回声信号是根据所述待定位设备播放所述空间探测声音信号的同时进行录音而获得的所述空间探测声音信号的回声信号,所述姿态标识是根据所述待定位设备当前的设备姿态而确定得的。所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置,所述定位服务器向所述待定位设备发送包括所述当前位置的定位结果。从而实现在进行设备室内定位时,通过播放空间探测声音信号获取回声信号,由所述定位服务器利用声波反射主动探测空间环境特征进行定位,使用本实施例的室内定位方法成本低、实用性好、易于推广。In this embodiment, the positioning server receives the positioning request sent by the device to be positioned indoors, and the positioning request includes a space detection sound signal, an echo signal, and a posture indicator; wherein, the echo signal is played according to the device to be positioned The echo signal of the space detection sound signal is obtained by simultaneously recording the space detection sound signal, and the posture identifier is determined according to the current device posture of the device to be positioned. The positioning server obtains the corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and determines the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and The indoor reference point corresponding to the echo feature vector is used as the current position of the device to be positioned, and the positioning server sends a positioning result including the current position to the device to be positioned. In this way, when performing indoor positioning of equipment, echo signals are obtained by playing space detection sound signals, and the positioning server utilizes sound wave reflection to actively detect space environment characteristics for positioning. The indoor positioning method of this embodiment is low in cost, good in practicability, and Easy to promote.
图8为本发明室内定位方法实施例八的流程图,如图8所示,本实施例包括待定位设备和定位服务器,本实施例与实施例五的区别在于,待定位设备仅播放空间探测声音信号,获取回声信号以及根据该待定位设备的设备姿态确定姿态标识,待定位设备向定位服务器发送定位请求,该定位请求包含上述信息,定位服务器根据定位请求中所携带的空间探测声音信号和回声信号,计算获取待匹配回声特征向量,进而完成定位。本实施例的方法可以包括:Fig. 8 is a flow chart of Embodiment 8 of the indoor positioning method of the present invention. As shown in Fig. 8, this embodiment includes a device to be positioned and a positioning server. The difference between this embodiment and Embodiment 5 is that the device to be positioned only plays space detection Acoustic signal, obtain the echo signal and determine the attitude mark according to the equipment attitude of the device to be positioned, the device to be positioned sends a positioning request to the positioning server, the positioning request contains the above information, and the positioning server detects the sound signal according to the space carried in the positioning request and The echo signal is calculated to obtain the echo feature vector to be matched, and then the positioning is completed. The method of this embodiment may include:
S801:待定位设备在一种设备姿态下某一个参考点播放空间探测声音信号,同时进行录音获取所述空间探测声音信号的回声信号,并根据设备姿态确定对应的姿态标识,并将该空间探测声音信号、回声信号以及姿态标识发送给定位服务器,定位服务器根据上述信息采用S202中步骤a~步骤f的具体步骤计算回声特征向量,待定位设备在该设备姿态下该参考点进行多次信息采集并发送给定位服务器,定位服务器经过多次计算取其平均值作为该参考点在该设备姿态下的回声特征向量。S801: The device to be positioned plays a space detection sound signal at a certain reference point under a device posture, and at the same time performs recording to obtain the echo signal of the space detection sound signal, and determines the corresponding posture identification according to the device posture, and sends the space detection The sound signal, the echo signal and the attitude mark are sent to the positioning server, and the positioning server calculates the echo feature vector according to the above-mentioned information using the specific steps of step a to step f in S202, and the device to be positioned performs multiple information collection at the reference point under the attitude of the device And send to the positioning server, the positioning server takes the average value after multiple calculations as the echo feature vector of the reference point under the attitude of the device.
具体步骤可以包括:Specific steps can include:
a、将室内划分为N个位置区域,位置区域的中心点定义为参考点;a. Divide the room into N location areas, and define the center point of the location area as a reference point;
即该室内有N个参考点。That is, there are N reference points in the room.
b、待定位设备在每个参考点上,对于特定的某种设备姿态,多次采集空间探测声音信号的回声信号;b. The equipment to be positioned is at each reference point, and for a specific equipment attitude, collect the echo signal of the space detection sound signal multiple times;
待定位设备的设备姿态可以由方位角、俯仰角和翻滚角三个维度联合表示。为了减少回声指纹库采集工作量,本实施例可将方位角(0~360)划分为A个区间、俯仰角(-180~180)划分为B个区间、翻滚角(-90~90)划分为C个区间,即设备姿态有A×B×C种组合,可以使用Ori(a,b,c)唯一标识一种设备姿态,其中a∈[1,A],b∈[1,B],c∈[1,C]。The device attitude of the device to be positioned can be jointly represented by the three dimensions of azimuth, pitch and roll. In order to reduce the collection workload of the echo fingerprint database, in this embodiment, the azimuth (0-360) can be divided into A intervals, the pitch angle (-180-180) can be divided into B intervals, and the roll angle (-90-90) can be divided into B intervals. There are C intervals, that is, the device posture has A×B×C combinations, and Ori(a,b,c) can be used to uniquely identify a device posture, where a∈[1,A],b∈[1,B] ,c∈[1,C].
c、待定位设备将空间探测声音信号、回声信号以及姿态标识发送给定位服务器,定位服务器计算回声特征向量,取多次测量的平均值作为参考点的回声特征向量,其中,回声特征向量的计算方法可以采用S202中步骤a~步骤f的具体步骤。c. The device to be positioned sends the space detection sound signal, echo signal and attitude identification to the positioning server. The positioning server calculates the echo feature vector, and takes the average value of multiple measurements as the echo feature vector of the reference point. Among them, the calculation of the echo feature vector The method may adopt specific steps from step a to step f in S202.
S802:定位服务器将在一种设备姿态下各个参考点的回声特征向量构成集合作为一种设备姿态下的回声指纹库,将不同设备姿态下的回声指纹库预先存储在定位服务器里。S802: The positioning server sets the echo feature vectors of each reference point in a device posture as an echo fingerprint library in a device posture, and pre-stores the echo fingerprint libraries in different device postures in the positioning server.
具体地,定位服务器将在一种设备姿态下,将不同参考点的回声特征向量集合定义为该设备姿态下的回声指纹库,一种设备姿态对应一姿态标识,因此,回声指纹库与姿态标识一一对应;例如,姿态标识为Ori(a,b,c)的回声指纹库表示为FBOri(a,b,c),该回声指纹库具体为:Specifically, the positioning server will define the set of echo feature vectors of different reference points as an echo fingerprint database under a device posture, and a device posture corresponds to a posture identifier. Therefore, the echo fingerprint library and the posture identifier One-to-one correspondence; for example, the echo fingerprint library whose attitude is identified as Ori(a,b,c) is expressed as FB Ori(a,b,c) , and the echo fingerprint library is specifically:
其中,L1为参考点1的标识,同样地L2…LN为不同参考点标识,M为回声特征向量维数,为参考点L1的特征向量,该回声指纹库FBOri(a,b,c)包含了在姿态标识Ori(a,b,c)下的所有参考点的回声特征向量。Among them, L 1 is the identification of reference point 1, similarly L 2 ... L N is the identification of different reference points, M is the dimension of the echo feature vector, is the feature vector of the reference point L 1 , the echo fingerprint library FB Ori(a,b,c) contains the echo feature vectors of all reference points under the attitude label Ori(a,b,c).
定位服务器建立不同设备姿态对应的回声指纹库,各回声指纹库与待定位设备的设备姿态一一对应,各回声指纹库中均包括多个回声特征向量,各回声特征向量与室内的多个参考点一一对应。The positioning server establishes echo fingerprint databases corresponding to different device postures. Each echo fingerprint database corresponds to the device posture of the device to be positioned. Each echo fingerprint database includes multiple echo feature vectors, and each echo feature vector corresponds to multiple indoor references One-to-one correspondence.
S803:处于室内的待定位设备向定位服务器发送定位请求,所述定位请求中包括空间探测声音信号、回声信号以及姿态标识。S803: The indoor device to be positioned sends a positioning request to the positioning server, where the positioning request includes a space detection sound signal, an echo signal, and a gesture identifier.
处于室内的待定位设备播放空间探测声音信号,同时进行录音获得回声信号;并通过方向传感器获取待定位设备的设备姿态,根据获取到的待定位设备的设备姿态确定姿态标识Ori(a,b,c)。The indoor device to be positioned plays the space detection sound signal, and at the same time records to obtain the echo signal; and obtains the device attitude of the device to be positioned through the direction sensor, and determines the attitude mark Ori(a,b, c).
S804:定位服务器根据所述定位请求获取待匹配回声特征向量EV。S804: The positioning server acquires an echo feature vector EV to be matched according to the positioning request.
具体地,定位服务器获取待匹配回声特征向量可以采用S202中步骤a~步骤f的方法计算待匹配回声特征向量。Specifically, the positioning server may calculate the echo feature vector to be matched by using the method of step a to step f in S202 to obtain the feature vector of the echo to be matched.
S805:定位服务器在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置。S805: The positioning server determines the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and uses the indoor reference point corresponding to the echo feature vector as the current location of the device to be positioned. Location.
定位服务器根据姿态标识Ori(a,b,c)获取与该姿态标识对应的回声指纹库FBOri(a,b,c),将FBOri(a,b,c)作为目标回声指纹库,定位服务器将待匹配回声特征向量EV与FBOri(a,b,c)中各个参考点的回声特征向量进行相似性计算(欧式距离、余弦夹角等),并将结果最相近的回声特征向量作为与待匹配回声特征向量相匹配的回声特征向量,将该特征向量对应的参考点作为本次定位的结果。The positioning server obtains the echo fingerprint database FB Ori(a,b,c) corresponding to the posture identifier according to the posture identifier Ori(a,b,c) , and uses FB Ori(a,b,c) as the target echo fingerprint database, and locates The server calculates the similarity (Euclidean distance, cosine angle, etc.) between the echo feature vector EV to be matched and the echo feature vectors of each reference point in FB Ori(a,b,c) , and uses the echo feature vector with the closest result as For the echo feature vector matched with the echo feature vector to be matched, the reference point corresponding to the feature vector is taken as the result of this positioning.
举例而言,使用欧式距离进行相似性计算如公式(13),根据公式(14)获取定位结果L。For example, Euclidean distance is used to perform similarity calculation as formula (13), and the positioning result L is obtained according to formula (14).
S806:定位服务器向待定位设备返回包括当前位置的定位结果L。S806: The positioning server returns a positioning result L including the current position to the device to be positioned.
本实施例,通过在定位服务器中存储多个回声指纹库,当处于室内的待定位设备需要定位时,待定位设备向定位服务器发送定位请求,该定位请求中包含空间探测声音信号、回声信号以及姿态标识,定位服务器根据所述空间探测声音信号和回声信号获取待匹配特征向量,同时定位服务器根据该姿态标识获取与其对应的目标回声指纹库,将待匹配特征向量与目标回声指纹库中的特征向量进行相似性匹配,确定与该待匹配回声特征向量相匹配的回声特征向量,并将该回声特征向量所对应的室内的参考点作为该待定位设备的当前位置,并向待定位设备返回包括该当前位置的定位结果。本实施例的室内定位方法不需要在室内布置额外辅助设备,易于推广,对设备要求低,并且由于空间探测声音信号采用具有较强自相关特性的序列,使得本实施例的室内定位方法具有较强的抗噪音干扰能力,能有效区分回声和日常生活中的背景噪声,从而可以实现利用声波反射主动探测空间环境特征进行定位。In this embodiment, by storing multiple echo fingerprint databases in the positioning server, when a device to be positioned indoors needs to be positioned, the device to be positioned sends a positioning request to the positioning server, and the positioning request includes a spatial detection sound signal, an echo signal and Attitude identification, the positioning server obtains the feature vector to be matched according to the space detection sound signal and the echo signal, and at the same time the positioning server obtains the target echo fingerprint database corresponding to it according to the posture identification, and combines the feature vector to be matched with the feature in the target echo fingerprint database Vector similarity matching is performed to determine the echo feature vector that matches the echo feature vector to be matched, and the reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned, and returns to the device to be positioned including The fix result for this current location. The indoor positioning method of this embodiment does not need to arrange additional auxiliary equipment indoors, is easy to popularize, and has low requirements for equipment, and because the spatial detection sound signal adopts a sequence with strong autocorrelation characteristics, the indoor positioning method of this embodiment has relatively high performance. Strong anti-noise interference ability, can effectively distinguish the echo and background noise in daily life, so that it can realize the active detection of spatial environment characteristics for positioning by using sound wave reflection.
图9为本发明提供的待定位设备的结构示意图,如图9所示,本实施例的待定位设备可以包括:回声采集模块901和定位模块902。其中,回声采集模块901,用于处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;定位模块902,用于所述待定位设备根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,根据用于表示所述待定位设备当前的设备姿态的姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述待定位设备中存储有多个回声指纹库,各回声指纹库与用于表示所述待定位设备的设备姿态的姿态标识一一对应,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获得的所述空间探测声音信号的回声信号而获取到的。FIG. 9 is a schematic structural diagram of a device to be positioned according to the present invention. As shown in FIG. 9 , the device to be positioned in this embodiment may include: an echo collection module 901 and a positioning module 902 . Among them, the echo collection module 901 is used for the indoor device to be positioned to play the space detection sound signal, and simultaneously record to obtain the echo signal of the space detection sound signal; the positioning module 902 is used for the device to be positioned according to the The spatial detection sound signal and the echo signal obtain the corresponding echo feature vector to be matched, and determine the target echo fingerprint library in multiple echo fingerprint libraries according to the posture identifier used to represent the current device posture of the device to be positioned, and in the Determine the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and use the reference point in the room corresponding to the echo feature vector as the current position of the device to be positioned; wherein, A plurality of echo fingerprint libraries are stored in the device to be positioned, and each echo fingerprint library is in one-to-one correspondence with a posture identifier used to indicate the posture of the device to be positioned, and the posture of the device is determined by the azimuth angle of the device to be positioned. , pitch angle and roll angle are jointly represented in three dimensions; each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library is in one-to-one correspondence with multiple reference points in the room; The reference point is a reference position set in advance in the room, and each echo feature vector in each echo fingerprint library is obtained according to the played spatial detection sound signal and recording when the device to be positioned is at the corresponding reference point. It is obtained by the echo signal of the above-mentioned space detection sound signal.
进一步地,所述待匹配回声特征向量是所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述空间探测声音信号和所述回声信号获取的,具体可以为,将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,其中R中的每一项为两个序列的移位相乘的和的绝对值,具体可参见公式(2);在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,R'具体参见公式(3),Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,EV具体可参见公式(4)。Further, the echo feature vector to be matched is that the device to be positioned plays the spatial detection sound signal and simultaneously performs recording to obtain the echo signal of the spatial detection sound signal, according to the spatial detection sound signal and the echo signal Acquired, specifically, performing a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal to obtain an absolute value to obtain a cross-correlation sequence R, wherein each item in R Be the absolute value of the sum of the displacement multiplication of two sequences, specifically can refer to formula (2); Intercept the cross-correlation sequence R' of the effective echo part starting from I start in described cross-correlation sequence R, wherein, Refer to formula (3) for details of R', I start is the index of the maximum value of R; according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. For details of EV, refer to the formula (4).
其中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;距离区间Di=(di,di+1)根据公式(7)计算得到所述距离区间的回声平均能量echoEi;分别计算M个距离区间的回声平均能量,获得回声特征向量EV。Wherein, according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. Specifically, for the distance interval D i =(d i , d i+1 ), The position index of d i is obtained according to formula (5), and the position index of d i+1 is obtained according to formula (6); the distance interval D i = (d i , d i+1 ) is calculated according to formula (7) to obtain the distance interval Echo average energy echoE i ; respectively calculate the echo average energy of the M distance intervals to obtain the echo feature vector EV.
进一步地,所述进行录音获得回声信号具体可以为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足公式(8)的条件。Further, the recording to obtain the echo signal may specifically be recording until at least a delay of Δt after the end of playback; where Δt needs to satisfy the condition of formula (8).
进一步地,所述在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,具体可以为,将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Further, the determining the echo feature vector that matches the echo feature vector to be matched in the target echo fingerprint library may specifically be: combining the echo feature vector to be matched with each echo feature in the target echo fingerprint library The similarity calculation is performed on the vectors, and the echo feature vector that is the closest to the result is used as the echo feature vector that matches the echo feature vector to be matched.
本实施例的待定位设备,可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device to be positioned in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 1 , and its implementation principle and technical effect are similar, and will not be repeated here.
图10为本发明另一种待定位设备的结构示意图,如图10所示,本实施例的待定位设备可以包括:获取模块101、发送模块102以及接收模块103,其中,获取模块101,用于处于室内的待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号;根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态;其中,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;发送模块102,用于向定位服务器发送定位请求,所述定位请求中包括所述待匹配回声特征向量和所述姿态标识,以供所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;接收模块103,用于接收所述定位服务器返回的包括所述当前位置的定位结果。其中,所述参考点为预先在所述室内设置的参考位置。FIG. 10 is a schematic structural diagram of another device to be positioned according to the present invention. As shown in FIG. 10 , the device to be positioned in this embodiment may include: an acquisition module 101, a sending module 102, and a receiving module 103, wherein the acquisition module 101 uses Playing a space detection sound signal on a device to be positioned indoors, and recording at the same time to obtain an echo signal of the space detection sound signal; obtaining a corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and Determining an attitude identifier of the device to be positioned, where the attitude identifier is used to represent the current posture of the device to be positioned; wherein, the posture of the device is composed of the azimuth angle, pitch angle and roll angle of the device to be positioned Joint representation of dimensions; sending module 102, configured to send a positioning request to a positioning server, wherein the positioning request includes the echo feature vector to be matched and the gesture identifier, so that the positioning server can perform multiple tasks according to the gesture identifier. Determining a target echo fingerprint library in the echo fingerprint library, determining an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and setting the reference point in the room corresponding to the echo feature vector As the current position of the device to be positioned; the receiving module 103 is configured to receive a positioning result including the current position returned by the positioning server. Wherein, the reference point is a reference position pre-set in the indoor.
进一步地,所述获取模块101具体用于,所述待定位设备将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,其中R中的每一项为两个序列的移位相乘的和的绝对值,具体可参见公式(2);在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,R'具体参见公式(3),Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,EV具体可参见公式(4)。Further, the acquisition module 101 is specifically configured to perform a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the spatial detection sound signal by the device to be positioned, and obtain an absolute value to obtain a cross-correlation Sequence R, wherein each item in R is the absolute value of the sum of the displacement multiplication of two sequences, specifically can refer to formula (2); Intercept the effective echo that starts from I start in described cross-correlation sequence R Part of the cross-correlation sequence R', wherein, R' is specifically referring to formula (3), and I start is the index of the maximum value of R; according to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain Echo eigenvector EV, see formula (4) for details of EV.
其中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;距离区间Di=(di,di+1)根据公式(7)计算得到所述距离区间的回声平均能量echoEi;分别计算M个距离区间的回声平均能量,获得回声特征向量EV。Wherein, according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. Specifically, for the distance interval D i =(d i , d i+1 ), The position index of d i is obtained according to formula (5), and the position index of d i+1 is obtained according to formula (6); the distance interval D i = (d i , d i+1 ) is calculated according to formula (7) to obtain the distance interval Echo average energy echoE i ; respectively calculate the echo average energy of the M distance intervals to obtain the echo feature vector EV.
进一步地,所述进行录音获得回声信号具体可以为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足公式(8)的条件。Further, the recording to obtain the echo signal may specifically be recording until at least a delay of Δt after the end of playback; where Δt needs to satisfy the condition of formula (8).
本实施例的待定位设备,可以用于执行图3所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device to be positioned in this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 3 , and its implementation principle and technical effect are similar, and will not be repeated here.
图11为本发明定位服务器的结构示意图,如图11所示,本实施例的定位服务器可以包括:接收模块111、定位模块112以及发送模块113,其中接收模块111,用于接收处于室内的待定位设备发送的定位请求,所述定位请求中包括待匹配回声特征向量和姿态标识;其中,所述待匹配回声特征向量是由所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述空间探测声音信号和所述回声信号获取的;所述姿态标识是由所述待定位设备根据当前的设备姿态而确定得的;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;定位模块112,用于根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应,各回声指纹库中包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应,所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获取的回声信号而获取并发送给所述定位服务器的;发送模块113,用于向所述待定位设备发送包括所述当前位置的定位结果;FIG. 11 is a schematic structural diagram of the positioning server of the present invention. As shown in FIG. 11, the positioning server of this embodiment may include: a receiving module 111, a positioning module 112, and a sending module 113, wherein the receiving module 111 is used to receive indoor pending The positioning request sent by the positioning device, the positioning request includes the echo feature vector to be matched and the gesture identification; wherein, the echo feature vector to be matched is obtained by playing a space detection sound signal and recording at the same time by the device to be positioned After the echo signal of the space detection sound signal, it is obtained according to the space detection sound signal and the echo signal; the posture identification is determined by the device to be positioned according to the current device posture; the device posture It is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned; the positioning module 112 is used to determine the target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, and the target echo Determine the echo feature vector matching the echo feature vector to be matched in the fingerprint library, and use the reference point in the room corresponding to the echo feature vector as the current position of the device to be positioned; wherein, the positioning Multiple echo fingerprint databases are stored in the server, and each echo fingerprint database is in one-to-one correspondence with the posture identification. Each echo fingerprint database includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint database is related to the indoor The multiple reference points correspond one-to-one, the reference point is the reference position set in the room in advance, and each echo feature vector in each echo fingerprint library is based on the playback when the device to be positioned is at the corresponding reference point. The spatial detection sound signal and the echo signal obtained by the recording are obtained and sent to the positioning server; the sending module 113 is used to send the positioning result including the current position to the device to be positioned;
其中,所述定位模块112具体用于将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Wherein, the positioning module 112 is specifically configured to perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint library, and use the echo feature vector with the closest result as the echo feature vector to be matched. The echo eigenvector matches the echo eigenvector.
本实施例的定位服务器,可以用于执行图4所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The positioning server of this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 4 , and its implementation principle and technical effect are similar, and will not be repeated here.
图12为本发明又一种待定位设备的结构示意图,如图12所示,本实施例的待定位设备包括:确定模块121、发送模块122以及接收模块123,其中,确定模块121,用于处于室内的待定位设备播放空间探测声音信号,同时进行录音获得所述空间探测声音信号的回声信号;并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;发送模块122,用于向定位服务器发送定位请求,所述定位请求中包括所述空间探测声音信号、所述回声信号和所述姿态标识,以供所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量后,根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;其中,所述参考点为预先在所述室内设置的参考位置;接收模块123,用于接收所述定位服务器返回的包括所述当前位置的定位结果。Fig. 12 is a schematic structural diagram of another device to be positioned according to the present invention. As shown in Fig. 12, the device to be positioned in this embodiment includes: a determining module 121, a sending module 122 and a receiving module 123, wherein the determining module 121 is used for The device to be positioned indoors plays the space detection sound signal, and at the same time performs recording to obtain the echo signal of the space detection sound signal; and determines the attitude mark of the device to be positioned, and the posture mark is used to indicate that the device to be positioned is currently The device posture; the device posture is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned; the sending module 122 is configured to send a positioning request to the positioning server, and the positioning request includes the The space detection sound signal, the echo signal, and the attitude identifier are used for the positioning server to obtain the corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and then according to the attitude identifier in multiple Determine the target echo fingerprint library in an echo fingerprint library, determine the echo feature vector that matches the echo feature vector to be matched in the target echo fingerprint library, and use the indoor reference corresponding to the echo feature vector point as the current position of the device to be positioned; wherein, the reference point is a reference position set in advance in the indoor; the receiving module 123 is configured to receive the positioning result including the current position returned by the positioning server.
本实施例的待定位设备,可以用于执行图6所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device to be positioned in this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 6 , and its implementation principle and technical effect are similar, and will not be repeated here.
图13为本发明另一种定位服务器的结构示意图,如图13所示,本实施例的定位服务器包括:接收模块131、定位模块132以及发送模块133,其中,接收模块131,用于接收处于室内的待定位设备发送的定位请求,所述定位请求中包括空间探测声音信号、回声信号和姿态标识;其中,所述回声信号是由根据所述待定位设备播放所述空间探测声音信号的同时进行录音而获得的所述空间探测声音信号的回声信号,所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;定位模块132,用于根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的锚节点作为所述待定位设备的当前位置;发送模块133,用于向所述待定位设备发送包括所述当前位置的定位结果;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时将此处播放的空间探测声音信号和回声信号发送给所述定位服务器,由所述定位服务器获取到的。FIG. 13 is a schematic structural diagram of another positioning server of the present invention. As shown in FIG. 13, the positioning server of this embodiment includes: a receiving module 131, a positioning module 132, and a sending module 133, wherein the receiving module 131 is used to receive A positioning request sent by an indoor device to be positioned, the positioning request includes a space detection sound signal, an echo signal, and an attitude indicator; The echo signal of the space detection sound signal obtained by recording, the posture identifier is determined by the device to be positioned, and the posture identifier is used to represent the current device posture of the device to be positioned; the device posture It is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned; the positioning module 132 is used to obtain the corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal, and according to The posture identification determines a target echo fingerprint library in a plurality of echo fingerprint libraries, and determines an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and converts the echo feature vector into The corresponding indoor anchor node is used as the current position of the device to be positioned; the sending module 133 is configured to send a positioning result including the current position to the device to be positioned; wherein, how many Each echo fingerprint library is in one-to-one correspondence with the attitude identification; each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library is associated with multiple references in the room. One-to-one correspondence; the reference point is a reference position set in advance in the room, and each echo feature vector in each echo fingerprint library is the space played here when the device to be positioned is at the corresponding reference point The detection sound signal and the echo signal are sent to the positioning server and obtained by the positioning server.
进一步地,所述待匹配回声特征向量是所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述空间探测声音信号和所述回声信号获取的,具体可以为,将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列R,其中R中的每一项为两个序列的移位相乘的和的绝对值,具体可参见公式(2);在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,R'具体参见公式(3),Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,EV具体可参见公式(4)。Further, the echo feature vector to be matched is that the device to be positioned plays the spatial detection sound signal and simultaneously performs recording to obtain the echo signal of the spatial detection sound signal, according to the spatial detection sound signal and the echo signal Acquired, specifically, performing a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the space detection sound signal to obtain an absolute value to obtain a cross-correlation sequence R, wherein each item in R Be the absolute value of the sum of the displacement multiplication of two sequences, specifically can refer to formula (2); Intercept the cross-correlation sequence R' of the effective echo part starting from I start in described cross-correlation sequence R, wherein, Refer to formula (3) for details of R', I start is the index of the maximum value of R; according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. For details of EV, refer to the formula (4).
其中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV,具体可以为,对于距离区间Di=(di,di+1),根据公式(5)获得di位置索引,根据公式(6)获得di+1位置索引;距离区间Di=(di,di+1)根据公式(7)计算得到所述距离区间的回声平均能量echoEi;分别计算M个距离区间的回声平均能量,获得回声特征向量EV。Wherein, according to the cross-correlation sequence R', the average echo energy of M distance intervals is calculated respectively, and the echo feature vector EV is obtained. Specifically, for the distance interval D i =(d i , d i+1 ), The position index of d i is obtained according to formula (5), and the position index of d i+1 is obtained according to formula (6); the distance interval D i = (d i , d i+1 ) is calculated according to formula (7) to obtain the distance interval Echo average energy echoE i ; respectively calculate the echo average energy of the M distance intervals to obtain the echo feature vector EV.
进一步地,所述进行录音获得回声信号具体可以为,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt需要满足公式(8)的条件。Further, the recording to obtain the echo signal may specifically be recording until at least a delay of Δt after the end of playback; where Δt needs to satisfy the condition of formula (8).
进一步地,所述在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,具体可以为,将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Further, the determining the echo feature vector that matches the echo feature vector to be matched in the target echo fingerprint library may specifically be: combining the echo feature vector to be matched with each echo feature in the target echo fingerprint library The similarity calculation is performed on the vectors, and the echo feature vector that is the closest to the result is used as the echo feature vector that matches the echo feature vector to be matched.
本实施例的定位服务器,可以用于执行图8所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The positioning server of this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 8 , and its implementation principle and technical effect are similar, and will not be repeated here.
图14为本发明待定位设备的设备结构示意图,如图14所示,本实施例的待定位设备包括:发送器141、接收器142、处理器143以及存储器144。其中发送器141,用于播放空间探测声音信号;接收器142,用于在所述发送器141播放空间探测声音信号的同时,进行录音获得所述空间探测声音信号的回声信号;处理器143,用于根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,根据用于表示所述待定位设备当前的设备姿态的姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;存储器144,用于存储多个回声指纹库,各回声指纹库与用于表示所述待定位设备的设备姿态的姿态标识一一对应,所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获得的所述空间探测声音信号的回声信号而获取到的。FIG. 14 is a schematic diagram of the device structure of the device to be located in the present invention. As shown in FIG. 14 , the device to be located in this embodiment includes: a transmitter 141 , a receiver 142 , a processor 143 and a memory 144 . Wherein the transmitter 141 is used to play the space detection sound signal; the receiver 142 is used to record and obtain the echo signal of the space detection sound signal while the transmitter 141 is playing the space detection sound signal; the processor 143, It is used to obtain the corresponding echo feature vector to be matched according to the space detection sound signal and the echo signal, and determine the target echo fingerprint in multiple echo fingerprint libraries according to the posture identifier used to represent the current posture of the device to be positioned. library, and determine the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and use the reference point in the room corresponding to the echo feature vector as the device to be positioned Current position; memory 144, used to store a plurality of echo fingerprint databases, each echo fingerprint database is in one-to-one correspondence with the posture identifier used to represent the posture of the device to be positioned, and the posture of the device is determined by the orientation of the device to be positioned Angle, pitch angle, and roll angle are jointly represented in three dimensions; each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library corresponds to a plurality of reference points in the room; The echo feature vectors in each echo fingerprint library are obtained when the device to be positioned is at the corresponding reference point according to the played spatial detection sound signal and the echo signal of the spatial detection sound signal obtained through recording.
其中,所述处理器143具体用于将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。Wherein, the processor 143 is specifically configured to perform a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the spatial detection sound signal to obtain an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , and Len tx is the length of Seq tx ; Intercept the cross-correlation sequence R' of the effective echo part starting from I start in the cross-correlation sequence R, wherein , I start is the index of the maximum value of R; according to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ) , where echoE i is the average echo energy of the i-th distance interval, i=1,2,...,M.
其中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),具体为:对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Wherein, according to the cross-correlation sequence R', the average echo energy of M distance intervals is respectively calculated to obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), specifically: for the distance Interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
进一步地,所述接收器142具体用于,进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt>tA,tA=dmax·2/fsound,dmax为所述空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度。Further, the receiver 142 is specifically used to perform recording until at least a delay of Δt after the end of playback; wherein, Δt>t A , t A =d max ·2/f sound , and d max is the spatial detection The farthest distance that the sound signal can travel back to the echo signal, f sound is the propagation speed of the sound in the air.
所述处理器143具体还用于,将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。The processor 143 is further configured to perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint library, and use the echo feature vector with the closest result as the echo feature vector to be matched. The echo eigenvector matches the echo eigenvector.
本实施例提供的待定位设备,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device to be positioned provided in this embodiment can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
图15为本发明另一种待定位设备的设备结构示意图,如图15所示,本实施例的待定位设备包括:发送器151、接收器152以及处理器153。其中,发送器151,用于播放空间探测声音信号;接收器152,用于在发送器151播放空间探测声音信号的同时进行录音获得所述空间探测声音信号的回声信号;处理器153,用于根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并确定所述待定位设备的姿态标识,所述姿态标识用于表示所述待定位设备当前的设备姿态;其中所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;其中,所述发送器151,还用于向定位服务器发送定位请求,所述定位请求中包括所述待匹配回声特征向量和所述姿态标识,以供所述定位服务器根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的锚节点作为所述待定位设备的当前位置;所述接收器152,还用于接收所述定位服务器返回的包括所述当前位置的定位结果。FIG. 15 is a schematic diagram of another device to be positioned according to the present invention. As shown in FIG. 15 , the device to be positioned in this embodiment includes: a transmitter 151 , a receiver 152 and a processor 153 . Wherein, the transmitter 151 is used to play the space detection sound signal; the receiver 152 is used to record and obtain the echo signal of the space detection sound signal while the transmitter 151 is playing the space detection sound signal; the processor 153 is used to Acquiring a corresponding echo feature vector to be matched according to the spatial detection sound signal and the echo signal, and determining an attitude identifier of the device to be positioned, where the attitude identifier is used to represent the current posture of the device to be positioned; wherein The device posture is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned; wherein, the transmitter 151 is also used to send a positioning request to the positioning server, and the positioning request includes the The echo feature vector to be matched and the attitude identifier are used for the positioning server to determine a target echo fingerprint database in a plurality of echo fingerprint databases according to the attitude identifier, and determine in the target echo fingerprint database that matches the to-be-matched The echo feature vector matched with the echo feature vector, and the anchor node in the room corresponding to the echo feature vector is used as the current position of the device to be positioned; the receiver 152 is also used to receive the location server The returned positioning result includes the current position.
其中,所述参考点为预先在所述室内设置的参考位置。Wherein, the reference point is a reference position pre-set in the indoor.
进一步地,所述处理器153,具体用于将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。Further, the processor 153 is specifically configured to perform a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the spatial detection sound signal to obtain an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , and Len tx is the length of Seq tx ; Intercept the cross-correlation sequence R' of the effective echo part starting from I start in the cross-correlation sequence R, wherein , I start is the index of the maximum value of R; according to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ) , where echoE i is the average echo energy of the i-th distance interval, i=1,2,...,M.
其中,所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),具体为:对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。Wherein, according to the cross-correlation sequence R', the average echo energy of M distance intervals is respectively calculated to obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), specifically: for the distance Interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
所述进行录音获得所述空间探测声音信号的回声信号具体为:进行录音,直到播放结束后至少延迟Δt的时间;其中,Δt>tA,tA=dmax·2/fsound,dmax为所述空间探测声音信号可以返回回声信号的传播最远距离,fsound为声音在空气中的传播速度。The recording to obtain the echo signal of the space detection sound signal specifically includes: recording until at least a delay of Δt after the end of playback; wherein, Δt>t A , t A =d max 2/f sound , d max The maximum propagation distance of the echo signal that can be returned by the space detection sound signal, f sound is the propagation speed of the sound in the air.
本实施例提供的待定位设备,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device to be positioned provided in this embodiment can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
图16为本发明定位服务器的设备结构示意图,如图16所示,本实施的定位服务器包括:接收器161、处理器162和发送器163。其中,接收器161,用于接收处于室内的待定位设备发送的定位请求,所述定位请求中包括待匹配回声特征向量和姿态标识;其中,所述待匹配回声特征向量是由所述待定位设备播放空间探测声音信号,并同时进行录音获得所述空间探测声音信号的回声信号后,根据所述空间探测声音信号和所述回声信号获取的;所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;处理器162,用于根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的锚节点作为所述待定位设备的当前位置;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应,各回声指纹库中包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应,所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时根据播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号而获取并发送给定位服务器的;发送器163,用于向所述待定位设备发送包括所述当前位置的定位结果。FIG. 16 is a schematic diagram of the device structure of the positioning server of the present invention. As shown in FIG. 16 , the positioning server of this embodiment includes: a receiver 161 , a processor 162 and a transmitter 163 . Wherein, the receiver 161 is used to receive a positioning request sent by a device to be positioned indoors, and the positioning request includes an echo feature vector to be matched and a posture identifier; wherein, the echo feature vector to be matched is determined by the device to be positioned After the device plays the space detection sound signal and simultaneously performs recording to obtain the echo signal of the space detection sound signal, it is obtained according to the space detection sound signal and the echo signal; the posture identification is determined by the device to be positioned Yes, the attitude identifier is used to indicate the current equipment attitude of the equipment to be positioned; the equipment attitude is jointly represented by the three dimensions of the azimuth angle, pitch angle and roll angle of the equipment to be positioned; the processor 162 is used to Determine a target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, determine an echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library, and set the echo feature vector to The corresponding indoor anchor node is used as the current position of the device to be positioned; wherein, the positioning server stores a plurality of echo fingerprint databases, each echo fingerprint database corresponds to the posture identification one by one, and each echo fingerprint database includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library corresponds to a plurality of reference points in the room, and the reference points are pre-set reference positions in the room, and each echo Each echo eigenvector in the fingerprint library is obtained and sent to the positioning server according to the echo signal of the spatial detection sound signal obtained by playing the spatial detection sound signal and the recording when the device to be positioned is at the corresponding reference point; The transmitter 163 is configured to send a positioning result including the current position to the device to be positioned.
其中,处理器162具体用于将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Wherein, the processor 162 is specifically configured to perform similarity calculation between the echo feature vector to be matched and each echo feature vector in the target echo fingerprint library, and use the echo feature vector with the closest result as the echo feature vector to be matched. Vector to match the echo feature vector.
本实施例提供的定位服务器,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The positioning server provided in this embodiment can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
图17为本发明的又一种待定位设备的设备结构示意图,如图17所示,本实施例的待定位设备包括:发送器171、接收器172和处理器173。其中,发送器171,用于播放空间探测声音信号;接收器172,用于在发送器171播放空间探测声音信号的同时进行录音获得所述空间探测声音信号的回声信号;处理器173,确定所述待定位设备的姿态标识,所述姿态标识用于标识所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;所述发送器171,还用于向定位服务器发送定位请求,所述定位请求中包括所述空间探测声音信号、所述回声信号和所述姿态标识,以供所述定位服务器根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量后,根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的参考点作为所述待定位设备的当前位置;所述接收器172,还用于接收所述定位服务器返回的包括所述当前位置的定位结果。其中,所述参考点为预先在所述室内设置的参考位置。FIG. 17 is a schematic diagram of another device to be positioned according to the present invention. As shown in FIG. 17 , the device to be positioned in this embodiment includes: a transmitter 171 , a receiver 172 and a processor 173 . Wherein, the transmitter 171 is used to play the space detection sound signal; the receiver 172 is used to perform recording while the transmitter 171 plays the space detection sound signal to obtain the echo signal of the space detection sound signal; the processor 173 determines the The posture identification of the device to be positioned, the posture logo is used to identify the current device posture of the device to be positioned; the device posture is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned; The transmitter 171 is further configured to send a positioning request to a positioning server, the positioning request includes the space detection sound signal, the echo signal and the gesture identification, so that the positioning server can After the sound signal and the echo signal obtain corresponding echo feature vectors to be matched, a target echo fingerprint library is determined in a plurality of echo fingerprint libraries according to the posture identification, and the target echo fingerprint library is determined in the target echo fingerprint library. The echo feature vector matched with the feature vector, and the reference point in the room corresponding to the echo feature vector is used as the current position of the device to be positioned; the receiver 172 is also used to receive the return from the positioning server The positioning results including the current location. Wherein, the reference point is a reference position pre-set in the indoor.
本实施例提供的定位服务器,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The positioning server provided in this embodiment can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
图18为本发明的另一种定位服务器的设备结构示意图,如图18所示,本实施例的定位服务器包括:接收器181、处理器182和发送器183。其中,接收器181,用于接收处于室内的待定位设备发送的定位请求,所述定位请求中包括空间探测声音信号、回声信号和姿态标识;其中,所述回声信号是由所述待定位设备播放所述空间探测声音信号的同时进行录音而获得的所述空间探测声音信号的回声信号,所述姿态标识是由所述待定位设备确定的,所述姿态标识用于表示所述待定位设备当前的设备姿态;所述设备姿态由所述待定位设备的方位角、俯仰角和翻滚角三个维度联合表示;处理器182,用于根据所述空间探测声音信号和所述回声信号获取对应的待匹配回声特征向量,并根据所述姿态标识在多个回声指纹库中确定目标回声指纹库,并在所述目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,并将所述回声特征向量所对应的所述室内的锚节点作为所述待定位设备的当前位置;其中,所述定位服务器中存储有多个回声指纹库,各回声指纹库与所述姿态标识一一对应;各回声指纹库中均包括多个回声特征向量,每个回声指纹库中的各回声特征向量与所述室内的多个参考点一一对应;所述参考点为预先在所述室内设置的参考位置,每个回声指纹库中的各回声特征向量是所述待定位设备处于对应的参考点上时将此处播放的空间探测声音信号和录音获取的所述空间探测声音信号的回声信号发送给所述定位服务器,由所述定位服务器获取到的;发送器,用于向所述待定位设备发送包括所述当前位置的定位结果。FIG. 18 is a schematic structural diagram of another positioning server according to the present invention. As shown in FIG. 18 , the positioning server of this embodiment includes: a receiver 181 , a processor 182 and a transmitter 183 . Wherein, the receiver 181 is used to receive a positioning request sent by a device to be positioned indoors, and the positioning request includes a space detection sound signal, an echo signal and an attitude indicator; wherein, the echo signal is generated by the device to be positioned The echo signal of the space detection sound signal obtained by recording the space detection sound signal while playing the space detection sound signal, the attitude identifier is determined by the device to be positioned, and the posture identifier is used to represent the device to be positioned The current device posture; the device posture is jointly represented by the three dimensions of the azimuth, pitch angle and roll angle of the device to be positioned; the processor 182 is configured to obtain the corresponding The echo feature vector to be matched, and determine the target echo fingerprint library in a plurality of echo fingerprint libraries according to the posture identification, and determine the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library , and the indoor anchor node corresponding to the echo feature vector is used as the current position of the device to be positioned; wherein, the positioning server stores a plurality of echo fingerprint databases, and each echo fingerprint database is related to the attitude One-to-one correspondence of identification; each echo fingerprint library includes a plurality of echo feature vectors, and each echo feature vector in each echo fingerprint library is in one-to-one correspondence with a plurality of reference points in the room; Each echo feature vector in each echo fingerprint library is the spatial detection sound signal played here and the spatial detection sound signal obtained by recording when the device to be positioned is at the corresponding reference point The echo signal obtained by the positioning server is sent to the positioning server; the transmitter is configured to send a positioning result including the current position to the device to be positioned.
其中,所述处理器182,具体用于将所述回声信号中的回声序列Seqrx与所述空间探测声音信号中的发送序列Seqtx进行相关运算取绝对值获得互相关序列其中的每一项为两个序列的移位相乘的和的绝对值,具体公式为len=Lenrx+Lentx;Lenrx为Seqrx的长度,Lentx为Seqtx的长度;在所述互相关序列R中截取出从Istart开始的有效回声部分的互相关序列R',其中,Istart为R取最大值的索引;根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),其中echoEi为第i个距离区间的回声平均能量,i=1,2,...,M。Wherein, the processor 182 is specifically configured to perform a correlation operation on the echo sequence Seq rx in the echo signal and the transmission sequence Seq tx in the spatial detection sound signal and obtain an absolute value to obtain a cross-correlation sequence Each of them is the absolute value of the sum of the shift multiplication of the two sequences, and the specific formula is len=Len rx +Len tx ; Len rx is the length of Seq rx , and Len tx is the length of Seq tx ; Intercept the cross-correlation sequence R' of the effective echo part starting from I start in the cross-correlation sequence R, wherein , I start is the index of the maximum value of R; according to the cross-correlation sequence R', respectively calculate the echo average energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ) , where echoE i is the average echo energy of the i-th distance interval, i=1,2,...,M.
所述根据所述互相关序列R',分别计算M个距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM),具体为:对于距离区间Di=(di,di+1),根据公式获得di位置索引,根据公式获得di+1位置索引;其中,fs为采样频率,fsound为声音在空气中的传播速度;距离区间Di=(di,di+1)的回声平均能量为分别计算i=1,2,...,M时对应的距离区间的回声平均能量,获得回声特征向量EV=(echoE1,echoE2,...,echoEM)。According to the cross-correlation sequence R', respectively calculate the average echo energy of M distance intervals, and obtain the echo feature vector EV=(echoE 1 , echoE 2 ,...,echoE M ), specifically: for the distance interval D i =(d i ,d i+1 ), according to the formula Get the position index of d i , according to the formula Obtain the position index of d i+1 ; among them, f s is the sampling frequency, f sound is the propagation speed of sound in the air; the average energy of the echo in the distance interval D i =(d i ,d i+1 ) is Calculate the average echo energy of the corresponding distance intervals when i=1, 2, ..., M respectively, and obtain the echo feature vector EV=(echoE 1 , echoE 2 , ..., echoE M ).
其中,所述在目标回声指纹库中确定与所述待匹配回声特征向量相匹配的回声特征向量,具体为:将所述待匹配回声特征向量与所述目标回声指纹库中各回声特征向量进行相似性计算,并将结果最相近的回声特征向量作为与所述待匹配回声特征向量相匹配的回声特征向量。Wherein, the determining the echo feature vector matching the echo feature vector to be matched in the target echo fingerprint library is specifically: performing the echo feature vector to be matched with each echo feature vector in the target echo fingerprint library The similarity is calculated, and the echo feature vector with the closest result is used as the echo feature vector matched with the echo feature vector to be matched.
本实施例提供的定位服务器,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The positioning server provided in this embodiment can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
图19为本发明室内定位系统实施例一的结构示意图,如图19所示,所述室内定位系统包括待定位设备191和定位服务器192。FIG. 19 is a schematic structural diagram of Embodiment 1 of the indoor positioning system of the present invention. As shown in FIG. 19 , the indoor positioning system includes a device to be positioned 191 and a positioning server 192 .
其中,待定位设备191可以采用图10的装置实施例的结构,其对应地,可以执行其方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Wherein, the device to be positioned 191 can adopt the structure of the apparatus embodiment in FIG. 10 , and correspondingly, can implement the technical solution of the method embodiment. The implementation principles and technical effects are similar, and will not be repeated here.
定位服务器192可以采用图11的装置实施例的结构,其对应地,可以执行其方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The positioning server 192 may adopt the structure of the device embodiment in FIG. 11 , and correspondingly, may implement the technical solution of the method embodiment. The implementation principles and technical effects are similar, and will not be repeated here.
图20为本发明室内定位系统实施例二的结构示意图,如图20所示,所述室内定位系统包括待定位设备201和定位服务器202。FIG. 20 is a schematic structural diagram of Embodiment 2 of the indoor positioning system of the present invention. As shown in FIG. 20 , the indoor positioning system includes a device to be positioned 201 and a positioning server 202 .
其中,待定位设备201可以采用图12的装置实施例的结构,其对应地,可以执行其方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Wherein, the device to be positioned 201 can adopt the structure of the device embodiment in FIG. 12 , and correspondingly, can implement the technical solution of the method embodiment. The implementation principles and technical effects are similar, and will not be repeated here.
定位服务器202可以采用图13的装置实施例的结构,其对应地,可以执行其方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The positioning server 202 may adopt the structure of the apparatus embodiment in FIG. 13 , and correspondingly, may implement the technical solution of the method embodiment. The implementation principles and technical effects are similar, and details are not repeated here.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by program instructions and related hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (34)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410070178.3A CN104880693B (en) | 2014-02-27 | 2014-02-27 | Indoor orientation method and device |
PCT/CN2015/072673 WO2015127858A1 (en) | 2014-02-27 | 2015-02-10 | Indoor positioning method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410070178.3A CN104880693B (en) | 2014-02-27 | 2014-02-27 | Indoor orientation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104880693A CN104880693A (en) | 2015-09-02 |
CN104880693B true CN104880693B (en) | 2018-07-20 |
Family
ID=53948259
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410070178.3A Expired - Fee Related CN104880693B (en) | 2014-02-27 | 2014-02-27 | Indoor orientation method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104880693B (en) |
WO (1) | WO2015127858A1 (en) |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105204002B (en) * | 2015-10-19 | 2019-01-04 | Tcl集团股份有限公司 | A kind of sound localization method and system |
CN107544056A (en) * | 2016-06-28 | 2018-01-05 | 南京中兴软件有限责任公司 | Method of locating terminal and device, and terminal |
CN106646377B (en) * | 2016-12-29 | 2019-02-22 | 西安科技大学 | Vibration target localization method based on time series similarity search |
CN106650680B (en) * | 2016-12-29 | 2019-02-01 | 西安科技大学 | Vibration target identification method based on time series similarity |
US10219098B2 (en) * | 2017-03-03 | 2019-02-26 | GM Global Technology Operations LLC | Location estimation of active speaker |
DE102017205278A1 (en) * | 2017-03-29 | 2018-10-04 | Robert Bosch Gmbh | Method for localization and localization system with a device set up for localization |
CN108966341B (en) * | 2017-05-27 | 2021-04-27 | 中国移动通信有限公司研究院 | A positioning method and positioning device |
CN108896962B (en) * | 2018-06-14 | 2022-02-08 | 河北工业大学 | Iterative localization method based on sound location fingerprint |
CN109146617A (en) * | 2018-07-27 | 2019-01-04 | 重庆小雨点小额贷款有限公司 | A kind of business approval method, server, client and storage medium |
CN110501674A (en) * | 2019-08-20 | 2019-11-26 | 长安大学 | A non-line-of-sight recognition method for acoustic signals based on semi-supervised learning |
CN111965600A (en) * | 2020-08-14 | 2020-11-20 | 长安大学 | Indoor positioning method based on sound fingerprints in strong shielding environment |
CN113589231B (en) * | 2021-07-09 | 2024-02-02 | 南京航空航天大学 | A multi-mobile phone positioning method based on sound waves |
CN113721213B (en) * | 2021-07-26 | 2023-10-10 | 森思泰克河北科技有限公司 | Living body detection method, terminal and storage medium |
CN115038221B (en) * | 2022-08-09 | 2022-11-01 | 深圳市润东来科技有限公司 | Lighting lamp control method, device, equipment and medium based on environment analysis |
CN115494487B (en) * | 2022-11-18 | 2023-03-24 | 成都太阳神鸟智能控制有限公司 | Wireless positioning and ranging method |
CN115665852B (en) * | 2022-12-14 | 2023-05-05 | 深圳开鸿数字产业发展有限公司 | Indoor positioning method, device, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7400291B2 (en) * | 2003-12-04 | 2008-07-15 | Sony Corporation | Local positioning system which operates based on reflected wireless signals |
CN102821194A (en) * | 2012-07-17 | 2012-12-12 | 西安电子科技大学 | Cellphone indoor positioning device and cellphone indoor positioning method on basis of various sensors |
CN103456301A (en) * | 2012-05-28 | 2013-12-18 | 中兴通讯股份有限公司 | Ambient sound based scene recognition method and device and mobile terminal |
CN103503503A (en) * | 2011-02-23 | 2014-01-08 | 数字标记公司 | Audio localization using audio signal encoding and recognition |
-
2014
- 2014-02-27 CN CN201410070178.3A patent/CN104880693B/en not_active Expired - Fee Related
-
2015
- 2015-02-10 WO PCT/CN2015/072673 patent/WO2015127858A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7400291B2 (en) * | 2003-12-04 | 2008-07-15 | Sony Corporation | Local positioning system which operates based on reflected wireless signals |
CN103503503A (en) * | 2011-02-23 | 2014-01-08 | 数字标记公司 | Audio localization using audio signal encoding and recognition |
CN103456301A (en) * | 2012-05-28 | 2013-12-18 | 中兴通讯股份有限公司 | Ambient sound based scene recognition method and device and mobile terminal |
CN102821194A (en) * | 2012-07-17 | 2012-12-12 | 西安电子科技大学 | Cellphone indoor positioning device and cellphone indoor positioning method on basis of various sensors |
Also Published As
Publication number | Publication date |
---|---|
WO2015127858A1 (en) | 2015-09-03 |
CN104880693A (en) | 2015-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104880693B (en) | Indoor orientation method and device | |
Cai et al. | Ubiquitous acoustic sensing on commodity IoT devices: A survey | |
Subedi et al. | A survey of smartphone-based indoor positioning system using RF-based wireless technologies | |
Mao et al. | Rnn-based room scale hand motion tracking | |
Wang et al. | Light positioning: A high-accuracy visible light indoor positioning system based on attitude identification and propagation model | |
US20170328983A1 (en) | Systems and methods for transient acoustic event detection, classification, and localization | |
US8493206B2 (en) | Augmented reality and location determination methods and apparatus | |
US8519844B2 (en) | Augmented reality and location determination methods and apparatus | |
CN111684293B (en) | Apparatus and method for tracking movement of electronic device | |
Namiot | On indoor positioning | |
US8502659B2 (en) | Augmented reality and location determination methods and apparatus | |
Ens et al. | Acoustic Self‐Calibrating System for Indoor Smart Phone Tracking | |
Cai et al. | Self-deployable indoor localization with acoustic-enabled IoT devices exploiting participatory sensing | |
JP2010522879A (en) | System and method for positioning | |
KR102791556B1 (en) | System and method for determining user position | |
CN108828501A (en) | The method that real-time tracking positioning is carried out to moving sound in sound field environment indoors | |
CN108882171A (en) | A kind of personnel's trace tracking method based on CSI | |
Huang et al. | Ubiquitous WiFi and acoustic sensing: Principles, technologies, and applications | |
Kashimoto et al. | Floor vibration type estimation with piezo sensor toward indoor positioning system | |
Nishimura et al. | A proposal on direction estimation between devices using acoustic waves | |
US20220018661A1 (en) | Target Localization Using AC Magnetic Fields | |
Pei et al. | Sound positioning using a small-scale linear microphone array | |
WO2024007352A1 (en) | Audio-based positioning and object finding method, system and device | |
CN114863936B (en) | A wake-up method and electronic device | |
Liu et al. | Toward device-free micro-gesture tracking via accurate acoustic doppler-shift detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20191225 Address after: Room 409-02, building e, No. 532-2, Zhongshan East Road, Qinhuai District, Nanjing City, Jiangsu Province 210001 Patentee after: Nanjing jinshuiniu Data Technology Co.,Ltd. Address before: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd. Effective date of registration: 20191225 Address after: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
TR01 | Transfer of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180720 Termination date: 20210227 |
|
CF01 | Termination of patent right due to non-payment of annual fee |