[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111256684A - Geomagnetic indoor positioning method based on multilayer gate control circulation unit network - Google Patents

Geomagnetic indoor positioning method based on multilayer gate control circulation unit network Download PDF

Info

Publication number
CN111256684A
CN111256684A CN202010059363.8A CN202010059363A CN111256684A CN 111256684 A CN111256684 A CN 111256684A CN 202010059363 A CN202010059363 A CN 202010059363A CN 111256684 A CN111256684 A CN 111256684A
Authority
CN
China
Prior art keywords
geomagnetic
layer
sequence
unit network
indoor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010059363.8A
Other languages
Chinese (zh)
Inventor
颜成钢
巩鹏博
陈利
孙垚棋
张继勇
张勇东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202010059363.8A priority Critical patent/CN111256684A/en
Publication of CN111256684A publication Critical patent/CN111256684A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/04Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means
    • G01C21/08Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means involving use of the magnetic field of the earth
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Environmental & Geological Engineering (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • Geology (AREA)
  • Artificial Intelligence (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention provides a geomagnetic indoor positioning method based on a multilayer gating circulation unit network. The method comprises two stages of building a geomagnetic indoor database and performing network learning and positioning by a multi-layer gating circulating unit. The geomagnetic indoor database is built in two aspects, namely, dividing indoor map landmarks and collecting geomagnetic data. In the stage of multilayer gating circulation unit network learning and positioning, the multilayer gating circulation unit network is mainly used for learning and training a geomagnetic indoor database, and the trained multilayer gating circulation unit network is used for online classification and positioning. The invention carries out classified positioning by utilizing the geomagnetism, does not need to build and maintain any infrastructure, saves the cost and is convenient for acquiring the geomagnetism data. In the real-time positioning process, only the geomagnetic data needs to be collected in real time, and the positioning result is output through the trained multilayer gating circulation unit model, so that too much computing power is not needed.

Description

一种基于多层门控循环单元网络的地磁室内定位方法A Geomagnetic Indoor Localization Method Based on Multilayer Gated Recurrent Unit Network

技术领域technical field

本发明属于室内定位领域,具体涉及一种室内地图划分地标和采集数据搭建地磁数据库的方法,并利用多层门控循环单元网络进行分类定位。The invention belongs to the field of indoor positioning, in particular to a method for dividing landmarks on an indoor map and collecting data to build a geomagnetic database, and using a multi-layer gated cyclic unit network for classification and positioning.

背景技术Background technique

室内定位技术在日常生活中具有非常重大的作用,并在许多场景中能发挥巨大应用价值,例如在商城中找到指定店铺和查询所在位置,在停车场中帮助车辆找到停车位。Indoor positioning technology plays a very important role in daily life, and can play a huge application value in many scenarios, such as finding a designated store and querying the location in a shopping mall, and helping vehicles find a parking space in a parking lot.

在室外环境中,人们主要利用全球卫星定位系统(GNSS,Global NavigationSatellite System,包括GPS/GLONASS/BDS/GALLEO)来进行定位。但在室内环境中,GNSS够。地磁具有无需搭建基础设施,低成本,全天候的优点,所以常常被作为室内定位的一种信号源。受钢筋水泥等室内材料的影响,地磁在室内环境中会表现出独特性,从而带来定位的优势。门控循环神经网络是一种循环神经网络,对序列的非线性特征学习具有一定优势,用于对地磁信号序列的学习并进行分类定位。In the outdoor environment, people mainly use the Global Navigation Satellite System (GNSS, Global Navigation Satellite System, including GPS/GLONASS/BDS/GALLEO) for positioning. But in indoor environments, GNSS is sufficient. Geomagnetic has the advantages of no need to build infrastructure, low cost, and all-weather, so it is often used as a signal source for indoor positioning. Affected by indoor materials such as reinforced concrete, geomagnetism will show uniqueness in the indoor environment, which brings the advantage of positioning. Gated recurrent neural network is a kind of recurrent neural network, which has certain advantages in learning nonlinear features of sequences, and is used for learning, classification and positioning of geomagnetic signal sequences.

发明内容SUMMARY OF THE INVENTION

针对现有技术中存在的不足,本发明提供一种基于多层门控循环单元网络的地磁室内定位方法。本发明提出一种室内地图划分地标的方法,将室内路径划分为一块块区域,并在对每块区域分配一个标签作为地标,为门控循环神经网络行分类定位。In view of the deficiencies in the prior art, the present invention provides a geomagnetic indoor positioning method based on a multi-layer gated cyclic unit network. The invention proposes a method for dividing landmarks in an indoor map, which divides the indoor path into blocks, and assigns a label to each block as a landmark for classification and positioning of the gated cyclic neural network.

本发明提出了一个利用多层门控循环单元网络对地磁序列进行地标分类来进行定位的方法。该方法分为地磁室内数据库的搭建和多层门控循环单元网络学习并进行定位两个阶段。地磁室内数据库的搭建分为两个方面,一是室内地图地标的划分,二是地磁数据的采集。多层门控循环单元网络学习并进行定位阶段主要利用多层门控循环单元网络对地磁室内数据库进行学习训练,训练好的多层门控循环单元网络用于在线分类定位。The invention proposes a method for locating the geomagnetic sequence by using the multi-layer gated cyclic unit network to classify the landmarks. The method is divided into two stages: construction of geomagnetic indoor database and multi-layer gated recurrent unit network learning and localization. The construction of the geomagnetic indoor database is divided into two aspects, one is the division of indoor map landmarks, and the other is the collection of geomagnetic data. The multi-layer gated recurrent unit network is used for learning and localization. The multi-layer gated recurrent unit network is mainly used to learn and train the geomagnetic indoor database. The trained multi-layer gated recurrent unit network is used for online classification and positioning.

一种基于多层门控循环单元网络的地磁室内定位方法,步骤如下:A geomagnetic indoor positioning method based on a multi-layer gated recurrent unit network, the steps are as follows:

步骤1、室内地图地标的划分。Step 1. Division of indoor map landmarks.

(1)测量室内地图所有的路径的长度。(1) Measure the length of all paths on the indoor map.

(2)根据设定的路径长度将室内地图划分为一块块区域,并为每块区域分配一个数字标签作为地标。(2) Divide the indoor map into blocks according to the set path length, and assign a digital label to each block as a landmark.

步骤2、地磁数据的采集和处理。Step 2. Collection and processing of geomagnetic data.

(1)在划分好的每个区域内围绕着区域的中心点采集不同方向的地磁信号,所采集到的地磁信号是一段地磁序列。(1) Collect geomagnetic signals in different directions around the center point of the area in each divided area, and the collected geomagnetic signal is a geomagnetic sequence.

(2)按照设定的序列长度来划分采集的地磁序列。(2) Divide the collected geomagnetic sequence according to the set sequence length.

步骤3、地磁数据库的搭建。Step 3. Build the geomagnetic database.

(1)划分好的地磁序列按照所在区域分配所对应的区域标签即地标。(1) The divided geomagnetic sequence is assigned the corresponding regional label, ie, the landmark, according to the region in which it is located.

(2)将每块区域的地磁序列的80%作为训练集,剩下的20%作为测试集。(2) 80% of the geomagnetic sequences of each area are used as the training set, and the remaining 20% are used as the test set.

步骤4、通过确定好的地磁数据库训练多层门控循环单元网络,选择分类精度最优的模型参数。Step 4: Train the multi-layer gated recurrent unit network through the determined geomagnetic database, and select the model parameters with the best classification accuracy.

(1)通过地磁数据库中划分好的训练集训练多层门控循环单元网络。(1) Train the multi-layer gated recurrent unit network through the divided training set in the geomagnetic database.

(2)通过地磁数据库中的测试集来测试训练的多层门控循环单元网络。(2) Test the trained multi-layer gated recurrent unit network through the test set in the geomagnetic database.

(3)通过多次训练选择分类精度最优的模型参数。(3) Select the model parameters with the best classification accuracy through multiple trainings.

本发明的有益结果如下:The beneficial results of the present invention are as follows:

1、本发明主要利用地磁进行分类定位,地磁不需要任何基础设施的搭建和维护,节省了成本。1. The present invention mainly uses geomagnetism for classification and positioning, and geomagnetism does not require any infrastructure construction and maintenance, which saves costs.

2、本发明主要提出一种室内地图划分地标的方法,该方法适合用于神经网络来进行分类定位,且对于地磁数据的采集比较方便。2. The present invention mainly proposes a method for dividing landmarks on an indoor map, which is suitable for use in neural networks for classification and positioning, and is more convenient for collecting geomagnetic data.

3、本发明会提前训练好用于分类地标来进行定位的多层门控循环单元模型。在实时定位过程中,只需实时采集好地磁数据并通过训练好的多层门控循环单元模型来输出定位结果,不需要太多的计算能力。3. The present invention will pre-train a multi-layer gated recurrent unit model for classifying landmarks for localization. In the real-time positioning process, it is only necessary to collect the geomagnetic data in real time and output the positioning results through the trained multi-layer gated recurrent unit model, which does not require much computing power.

附图说明Description of drawings

图1为本发明方法的框架图;Fig. 1 is the framework diagram of the method of the present invention;

图2为本发明中室内地图的地标划分与地磁数据采集的模板模板图;Fig. 2 is the template template diagram of the landmark division of indoor map and the collection of geomagnetic data in the present invention;

图3为本发明门控循环单元的结构图;Fig. 3 is the structural diagram of the gated circulation unit of the present invention;

图4为本发明多层门控循环单元网络的结构图。FIG. 4 is a structural diagram of a multi-layer gated recurrent unit network according to the present invention.

具体实施方式Detailed ways

下面结合具体实施方式对本发明进行详细的说明。The present invention will be described in detail below with reference to specific embodiments.

本发明提出一种室内地图划分地标和地磁数据库搭建的方法,并利用多层门控循环单元网络对地磁序列进行地标分类来进行定位,大致框架如图1所示。具体按照以下步骤实施。The present invention proposes a method for dividing landmarks in an indoor map and building a geomagnetic database, and uses a multi-layer gated cyclic unit network to classify the geomagnetic sequences to locate the landmarks. The general framework is shown in FIG. Specifically, follow the steps below.

步骤1、室内地图地标的划分Step 1. Division of indoor map landmarks

首先测量好室内路径的长度。如图2所示,根据设定的路径长度将室内路径划分为一个个区域;所述的路径长度设定为3m,即为3m间隔进行划分室内路径,如果室内路径长度有余,则将多余的部分平分给最两侧的区域。对于每一块区域都给定一个数字标签作为地标,地标的数量N等于划分的区域的多少。区域的宽度为室内路径的宽度。First measure the length of the indoor path. As shown in Figure 2, the indoor path is divided into regions according to the set path length; the path length is set to 3m, that is, the indoor path is divided at 3m intervals. Parts are divided equally between the areas on the farthest sides. For each area, a numerical label is given as a landmark, and the number N of landmarks is equal to the number of divided areas. The width of the zone is the width of the indoor path.

步骤2、地磁数据的采集和处理Step 2. Collection and processing of geomagnetic data

地磁数据可以由手机中的地磁传感器采集,地磁数据的结构主要表示为一个七维的向量<Mx,My,Mz,M,Mxrot,Myrot,Mzrot>,其中Mx,My和Mz是由手机的地磁传感器的三个方向轴所采集的地磁强度,M表示的是平均地磁强度,由Mx,My和Mz的二阶范数组成,具体公式如下:The geomagnetic data can be collected by the geomagnetic sensor in the mobile phone. The structure of the geomagnetic data is mainly expressed as a seven-dimensional vector <M x ,M y ,M z ,M,M xrot ,M yrot ,M zrot >, where M x ,M y and M z are the geomagnetic intensities collected by the three direction axes of the geomagnetic sensor of the mobile phone, and M represents the average geomagnetic intensity, which is composed of the second-order norm of M x , My y and M z . The specific formula is as follows:

Figure BDA0002373929650000031
Figure BDA0002373929650000031

Mxrot,Myrot和Mzrot表示的是在全局坐标系下的地磁强度,具体公式如下:M xrot , M yrot and M zrot represent the geomagnetic intensity in the global coordinate system, and the specific formula is as follows:

[Mxrot,Myrot,Mzrot]=R×[Mx,My,Mz]T (2)[M xrot ,M yrot ,M zrot ]=R×[M x ,M y ,M z ] T (2)

其中R是一个旋转矩阵,使手机坐标系下采集的地磁信号转换到全局坐标系下。在采集地磁数据的过程中,围绕着每个区域的中心,采集不同方向的地磁信号,采集的地磁信号是一段地磁序列,该地磁序列包含了采集区域的不同方向的地磁信号。将采集好的地磁序列按序列长度为10进行划分,划分好的地磁序列由10个地磁信号组成。Among them, R is a rotation matrix, which converts the geomagnetic signal collected in the mobile phone coordinate system to the global coordinate system. In the process of collecting geomagnetic data, the geomagnetic signals in different directions are collected around the center of each area. The collected geomagnetic signal is a geomagnetic sequence, and the geomagnetic sequence includes geomagnetic signals in different directions in the collected area. The collected geomagnetic sequence is divided according to the sequence length of 10, and the divided geomagnetic sequence is composed of 10 geomagnetic signals.

步骤3、地磁数据库的搭建Step 3. Construction of geomagnetic database

在划分好地磁序列后,每个地磁序列按照所在区域分配所对应的区域标签即地标。每个地标代表每个对应的区域,地标的分配是为了接下来神经网络的训练,通过多层门控循环单元网络高精度的分类地标,从而达到识别所在区域并定位的目的。每个区域划分好地磁序列后,将每个区域内的地磁序列的80%作为训练集,剩下的20%作为测试集。After the geomagnetic sequence is divided, each geomagnetic sequence is assigned a corresponding regional label, that is, a landmark according to the region in which it is located. Each landmark represents each corresponding area. The assignment of landmarks is for the next training of the neural network, and the multi-layer gated recurrent unit network is used to classify landmarks with high precision, so as to achieve the purpose of identifying and positioning the area. After the geomagnetic sequence is divided into each area, 80% of the geomagnetic sequence in each area is used as the training set, and the remaining 20% is used as the test set.

步骤4、通过确定好的地磁数据库训练多层门控循环单元网络,选择分类精度最优的模型参数Step 4. Train the multi-layer gated recurrent unit network through the determined geomagnetic database, and select the model parameters with the best classification accuracy

门控循环单元网络由一个个门控循环单元组成,门控循环单元用于记忆不定时间长度的信息,控制遗忘过去不重要的信息以及将滤波后的信息与现在的信息融合进行更新。门控循环单元是LSTM中门控记忆单元的简化,也可以解决长依赖问题,性能上与门控记忆单元不分伯仲,但门控循环单元所需参数较少,更易收敛。门控循环单元结构如图3所示,由以下几个部分组成,具体公式如下:The gated recurrent unit network consists of gated recurrent units. The gated recurrent unit is used to memorize information of indeterminate length of time, control the forgetting of unimportant information in the past, and fuse the filtered information with the current information to update. The gated recurrent unit is a simplification of the gated memory unit in LSTM, and it can also solve the long-dependency problem. Its performance is on par with the gated memory unit, but the gated recurrent unit requires fewer parameters and is easier to converge. The structure of the gated cyclic unit is shown in Figure 3, which consists of the following parts, and the specific formula is as follows:

(1)重置门rt控制前一时刻状态有多少信息写入当前候选状态(1) The reset gate rt controls how much information is written into the current candidate state in the previous state

(2)更新门zt控制前一时刻状态信息被带入隐藏状态的程度(2) The update gate z t controls the degree to which the state information at the previous moment is brought into the hidden state

(3)候选状态

Figure BDA0002373929650000043
提供输入到隐藏状态(3) Candidate state
Figure BDA0002373929650000043
Provide input to hidden state

(4)隐藏状态ht控制过去样本所提高的一系列信息(4) The hidden state ht controls a series of information improved by past samples

(5)输出yt为当前时刻的输出(5) The output y t is the output at the current moment

rt=σ(Wr·[ht-1,xt]) (3)r t =σ(W r ·[h t-1 ,x t ]) (3)

zt=σ(Wz·[ht-1,xt]) (4)z t =σ(W z ·[h t-1 ,x t ]) (4)

Figure BDA0002373929650000041
Figure BDA0002373929650000041

Figure BDA0002373929650000042
Figure BDA0002373929650000042

yt=σ(Wo·ht) (7)y t =σ(W o ·h t ) (7)

其中σ表示的是激活函数,Wr是重置门rt权重矩阵,控制着重置门rt的大小来决定前一时刻状态有多少信息写入当前候选状态。Wz是更新门zt权重矩阵,控制着更新门zt的大小来决定前一时刻状态信息被带入隐藏状态的程度。

Figure BDA00023739296500000515
是候选状态
Figure BDA00023739296500000516
权重矩阵,Wo是输出的权重矩阵,控制当前时刻yt的输出。Among them, σ represents the activation function, and W r is the weight matrix of the reset gate rt , which controls the size of the reset gate rt to determine how much information is written into the current candidate state in the previous state. W z is the weight matrix of the update gate z t , which controls the size of the update gate z t to determine the degree to which the state information at the previous moment is brought into the hidden state.
Figure BDA00023739296500000515
is a candidate state
Figure BDA00023739296500000516
Weight matrix, W o is the output weight matrix, which controls the output of the current moment y t .

多层门控循环单元网络如图4所示,多层门控循环单元网络能将输入序列转化成更为抽象的表达形式。在本发明地磁室内定位系统中,多层门控循环单元网络的输入序列为序列长度为10的地磁序列,其离散序列形式表示为(x1,x2,…,x10)。地磁序列分别在时间t(t=1,2,…,10)的时刻下作为输入信息输入至多层门控循环单元网络的第一层中。在初始时刻下,初始隐藏状态

Figure BDA0002373929650000051
的参数设置为零。多层门控循环单元网络的第一层的输出
Figure BDA0002373929650000052
包括在t时刻的地磁信号xt,隐藏状态
Figure BDA0002373929650000053
和前一时刻的隐藏状态
Figure BDA0002373929650000054
具体公式如下:The multi-layer gated recurrent unit network is shown in Figure 4. The multi-layer gated recurrent unit network can convert the input sequence into a more abstract expression. In the geomagnetic indoor positioning system of the present invention, the input sequence of the multi-layer gated cyclic unit network is a geomagnetic sequence with a sequence length of 10, and its discrete sequence form is expressed as (x 1 ,x 2 ,...,x 10 ). The geomagnetic sequence is input into the first layer of the multi-layer gated recurrent unit network as input information at time t (t=1, 2, . . . , 10). At the initial moment, the initial hidden state
Figure BDA0002373929650000051
parameter is set to zero. Output of the first layer of a multilayer gated recurrent unit network
Figure BDA0002373929650000052
includes the geomagnetic signal x t at time t , the hidden state
Figure BDA0002373929650000053
and the hidden state of the previous moment
Figure BDA0002373929650000054
The specific formula is as follows:

Figure BDA0002373929650000055
Figure BDA0002373929650000055

第二层到最后一层的输出

Figure BDA0002373929650000056
包括前一层在t时刻的输出
Figure BDA0002373929650000057
隐藏状态
Figure BDA0002373929650000058
和前一时刻的隐藏状态
Figure BDA0002373929650000059
具体如下:Output from the second layer to the last layer
Figure BDA0002373929650000056
Include the output of the previous layer at time t
Figure BDA0002373929650000057
hidden state
Figure BDA0002373929650000058
and the hidden state of the previous moment
Figure BDA0002373929650000059
details as follows:

Figure BDA00023739296500000510
Figure BDA00023739296500000510

其中l表示的是层数,层数范围为第二层到最后一层。其中每一层的输入都为前一层的输出,即第l层的输入为上一层的输出

Figure BDA00023739296500000511
θl表示多层门控循环单元网络第l层权重矩阵的参数。Where l represents the number of layers, and the number of layers ranges from the second layer to the last layer. The input of each layer is the output of the previous layer, that is, the input of the first layer is the output of the previous layer
Figure BDA00023739296500000511
θ l represents the parameters of the weight matrix of the lth layer of the multi-layer gated recurrent unit network.

多层门控循环单元网络最后一层L的输出为

Figure BDA00023739296500000512
最后只取最后一层的最后时刻的输出
Figure BDA00023739296500000513
经过softmax输出地磁序列的地标的one-hot编码。在实验中多层门控循环单元网络的层数设置为4,即最后一层L=4。在训练前将地磁信号序列的地标转化为向量O∈RN,N表示地标的数量。多层门控循环单元网络的损失函数是交叉熵损失函数,具体公式如下:The output of the last layer L of the multi-layer gated recurrent unit network is
Figure BDA00023739296500000512
Finally, only the output of the last moment of the last layer is taken
Figure BDA00023739296500000513
One-hot encoding of landmarks in the geomagnetic sequence output through softmax. In the experiment, the number of layers of the multi-layer gated recurrent unit network is set to 4, that is, the last layer L=4. Before training, the landmarks of the geomagnetic signal sequence are transformed into a vector O∈R N , where N represents the number of landmarks. The loss function of the multi-layer gated recurrent unit network is the cross-entropy loss function, and the specific formula is as follows:

Figure BDA00023739296500000514
Figure BDA00023739296500000514

其中x表示地磁序列,n表示地磁序列的数量,p(xi)表示地磁序列xi的实际one-hot编码,q(xi)表示地磁序列xi在神经网络下估计的one-hot编码。在训练过程中,采用adam优化器来最小化损失函数,采用dropout作为正则化来减少过拟合。where x is the geomagnetic sequence, n is the number of geomagnetic sequences, p(x i ) is the actual one-hot encoding of the geomagnetic sequence x i , q( xi ) is the one-hot encoding of the geomagnetic sequence x i estimated under the neural network . During training, the adam optimizer is used to minimize the loss function, and dropout is used as regularization to reduce overfitting.

通过地磁数据库中的测试集来测试训练的多层门控循环单元网络。最后通过多次训练选择分类精度最优的模型参数。The trained multi-layer gated recurrent unit network is tested through the test set in the geomagnetic database. Finally, the model parameters with the best classification accuracy are selected through multiple trainings.

Claims (6)

1.一种基于多层门控循环单元网络的地磁室内定位方法,其特征在于,步骤如下:1. a geomagnetic indoor positioning method based on multi-layer gated cyclic unit network, is characterized in that, step is as follows: 步骤1、室内地图地标的划分;Step 1. Division of indoor map landmarks; (1)测量室内地图所有的路径的长度;(1) Measure the length of all paths on the indoor map; (2)根据设定的路径长度将室内地图划分为一块块区域,并为每块区域分配一个数字标签作为地标;(2) Divide the indoor map into blocks according to the set path length, and assign a digital label to each block as a landmark; 步骤2、地磁数据的采集和处理;Step 2. Collection and processing of geomagnetic data; (1)在划分好的每个区域内围绕着区域的中心点采集不同方向的地磁信号,所采集到的地磁信号是一段地磁序列;(1) Collect geomagnetic signals in different directions around the center point of the area in each divided area, and the collected geomagnetic signal is a geomagnetic sequence; (2)按照设定的序列长度来划分采集的地磁序列;(2) Divide the collected geomagnetic sequence according to the set sequence length; 步骤3、地磁数据库的搭建;Step 3. Construction of geomagnetic database; (1)划分好的地磁序列按照所在区域分配所对应的区域标签即地标;(1) The divided geomagnetic sequence is allocated according to the corresponding regional label, that is, the landmark; (2)将每块区域的地磁序列的80%作为训练集,剩下的20%作为测试集;(2) 80% of the geomagnetic sequence of each area is used as the training set, and the remaining 20% is used as the test set; 步骤4、通过确定好的地磁数据库训练多层门控循环单元网络,选择分类精度最优的模型参数;Step 4. Train the multi-layer gated recurrent unit network through the determined geomagnetic database, and select the model parameters with the best classification accuracy; (1)通过地磁数据库中划分好的训练集训练多层门控循环单元网络;(1) Train the multi-layer gated recurrent unit network through the divided training set in the geomagnetic database; (2)通过地磁数据库中的测试集来测试训练的多层门控循环单元网络;(2) Test the trained multi-layer gated recurrent unit network through the test set in the geomagnetic database; (3)通过多次训练选择分类精度最优的模型参数。(3) Select the model parameters with the best classification accuracy through multiple trainings. 2.根据权利要求1所述的一种基于多层门控循环单元网络的地磁室内定位方法,其特征在于,步骤1室内地图地标的划分具体方法如下:2. a kind of geomagnetic indoor positioning method based on multi-layer gated cyclic unit network according to claim 1, is characterized in that, the concrete method of division of step 1 indoor map landmark is as follows: 首先测量好室内路径的长度;根据设定的路径长度将室内路径划分为一个个区域;所述的路径长度设定为3m,即为3m间隔进行划分室内路径,如果室内路径长度有余,则将多余的部分平分给最两侧的区域;对于每一块区域都给定一个数字标签作为地标,地标的数量N等于划分的区域的多少;区域的宽度为室内路径的宽度。First measure the length of the indoor path; divide the indoor path into regions according to the set path length; set the path length to 3m, that is to divide the indoor path at 3m intervals, if the indoor path length is more than The extra part is equally divided into the areas on the two sides; for each area, a digital label is given as a landmark, and the number N of landmarks is equal to the number of divided areas; the width of the area is the width of the indoor path. 3.根据权利要求2所述的一种基于多层门控循环单元网络的地磁室内定位方法,其特征在于,步骤2地磁数据的采集和处理具体方法如下:3. a kind of geomagnetic indoor positioning method based on multi-layer gated cyclic unit network according to claim 2, is characterized in that, the collection of step 2 geomagnetic data and the processing concrete method are as follows: 地磁数据可以由手机中的地磁传感器采集,地磁数据的结构主要表示为一个七维的向量<Mx,My,Mz,M,Mxrot,Myrot,Mzrot>,其中Mx,My和Mz是由手机的地磁传感器的三个方向轴所采集的地磁强度,M表示的是平均地磁强度,由Mx,My和Mz的二阶范数组成,具体公式如下:The geomagnetic data can be collected by the geomagnetic sensor in the mobile phone. The structure of the geomagnetic data is mainly expressed as a seven-dimensional vector <M x ,M y ,M z ,M,M xrot ,M yrot ,M zrot >, where M x ,M y and M z are the geomagnetic intensities collected by the three direction axes of the geomagnetic sensor of the mobile phone, and M represents the average geomagnetic intensity, which is composed of the second-order norm of M x , My y and M z . The specific formula is as follows:
Figure FDA0002373929640000021
Figure FDA0002373929640000021
Mxrot,Myrot和Mzrot表示的是在全局坐标系下的地磁强度,具体公式如下:M xrot , M yrot and M zrot represent the geomagnetic intensity in the global coordinate system, and the specific formula is as follows: [Mxrot,Myrot,Mzrot]=R×[Mx,My,Mz]T (2)[M xrot ,M yrot ,M zrot ]=R×[M x ,M y ,M z ] T (2) 其中R是一个旋转矩阵,使手机坐标系下采集的地磁信号转换到全局坐标系下;在采集地磁数据的过程中,围绕着每个区域的中心,采集不同方向的地磁信号,采集的地磁信号是一段地磁序列,该地磁序列包含了采集区域的不同方向的地磁信号;将采集好的地磁序列按序列长度为10进行划分,划分好的地磁序列由10个地磁信号组成。Among them, R is a rotation matrix, which converts the geomagnetic signals collected in the mobile phone coordinate system into the global coordinate system; in the process of collecting geomagnetic data, the geomagnetic signals in different directions are collected around the center of each area, and the collected geomagnetic signals It is a geomagnetic sequence, which contains geomagnetic signals in different directions of the collection area; the collected geomagnetic sequence is divided into 10 sequences, and the divided geomagnetic sequence consists of 10 geomagnetic signals.
4.根据权利要求3所述的一种基于多层门控循环单元网络的地磁室内定位方法,其特征在于,步骤3地磁数据库的搭建具体方法如下:4. a kind of geomagnetic indoor positioning method based on multi-layer gated cyclic unit network according to claim 3, is characterized in that, the concrete method of building the geomagnetic database of step 3 is as follows: 在划分好地磁序列后,每个地磁序列按照所在区域分配所对应的区域标签即地标;每个区域划分好地磁序列后,将每个区域内的地磁序列的80%作为训练集,剩下的20%作为测试集。After the geomagnetic sequence is divided, each geomagnetic sequence is assigned the corresponding regional label, that is, the landmark; 20% as the test set. 5.根据权利要求4所述的一种基于多层门控循环单元网络的地磁室内定位方法,其特征在于,步骤4通过确定好的地磁数据库训练多层门控循环单元网络,选择分类精度最优的模型参数具体步骤如下:5. a kind of geomagnetic indoor positioning method based on multi-layer gated cyclic unit network according to claim 4, it is characterized in that, step 4 trains multi-layer gated cyclic unit network by the determined geomagnetic database, and selects the highest classification accuracy. The specific steps for optimal model parameters are as follows: 门控循环单元网络由一个个门控循环单元组成,门控循环单元用于记忆不定时间长度的信息,控制遗忘过去不重要的信息以及将滤波后的信息与现在的信息融合进行更新;门控循环单元由以下几个部分组成,具体公式公式如下:The gated recurrent unit network consists of gated recurrent units. The gated recurrent unit is used to memorize information of indeterminate length of time, control the forgetting of unimportant information in the past, and fuse the filtered information with the current information to update; gating The cycle unit consists of the following parts, and the specific formula is as follows: (1)重置门rt控制前一时刻状态有多少信息写入当前候选状态(1) The reset gate rt controls how much information is written into the current candidate state in the previous state (2)更新门zt控制前一时刻状态信息被带入隐藏状态的程度(2) The update gate z t controls the degree to which the state information at the previous moment is brought into the hidden state (3)候选状态
Figure FDA0002373929640000031
提供输入到隐藏状态
(3) Candidate state
Figure FDA0002373929640000031
Provide input to hidden state
(4)隐藏状态ht控制过去样本所提高的一系列信息(4) The hidden state ht controls a series of information improved by past samples (5)输出yt为当前时刻的输出(5) The output y t is the output at the current moment rt=σ(Wr·[ht-1,xt]) (3)r t =σ(W r ·[h t-1 ,x t ]) (3) zt=σ(Wz·[ht-1,xt]) (4)z t =σ(W z ·[h t-1 ,x t ]) (4)
Figure FDA0002373929640000032
Figure FDA0002373929640000032
Figure FDA0002373929640000033
Figure FDA0002373929640000033
yt=σ(Wo·ht) (7)y t =σ(W o ·h t ) (7) 其中σ表示的是激活函数,Wr是重置门rt权重矩阵,控制着重置门rt的大小来决定前一时刻状态有多少信息写入当前候选状态;Wz是更新门zt权重矩阵,控制着更新门zt的大小来决定前一时刻状态信息被带入隐藏状态的程度;
Figure FDA0002373929640000034
是候选状态
Figure FDA0002373929640000035
权重矩阵,Wo是输出的权重矩阵,控制当前时刻yt的输出;
where σ represents the activation function, W r is the weight matrix of the reset gate rt , which controls the size of the reset gate rt to determine how much information is written into the current candidate state at the previous moment; W z is the update gate z t The weight matrix controls the size of the update gate z t to determine the degree to which the state information at the previous moment is brought into the hidden state;
Figure FDA0002373929640000034
is a candidate state
Figure FDA0002373929640000035
Weight matrix, W o is the output weight matrix, which controls the output of the current moment y t ;
多层门控循环单元网络能将输入序列转化成更为抽象的表达形式;在本发明地磁室内定位系统中,多层门控循环单元网络的输入序列为序列长度为10的地磁序列,其离散序列形式表示为(x1,x2,…,x10);地磁序列分别在时间t(t=1,2,…,10)的时刻下作为输入信息输入至多层门控循环单元网络的第一层中;在初始时刻下,初始隐藏状态
Figure FDA0002373929640000036
的参数设置为零;多层门控循环单元网络的第一层的输出
Figure FDA0002373929640000037
包括在t时刻的地磁信号xt,隐藏状态
Figure FDA0002373929640000038
和前一时刻的隐藏状态
Figure FDA0002373929640000039
具体公式如下:
The multi-layer gated cyclic unit network can convert the input sequence into a more abstract expression form; in the geomagnetic indoor positioning system of the present invention, the input sequence of the multi-layer gated cyclic unit network is a geomagnetic sequence with a sequence length of 10, and its discrete The sequence form is expressed as (x 1 , x 2 ,...,x 10 ); the geomagnetic sequence is input to the first layer of the multi-layer gated recurrent unit network as input information at time t (t=1, 2,..., 10), respectively. In one layer; at the initial moment, the initial hidden state
Figure FDA0002373929640000036
The parameters of are set to zero; the output of the first layer of the multi-layer gated recurrent unit network
Figure FDA0002373929640000037
includes the geomagnetic signal x t at time t , the hidden state
Figure FDA0002373929640000038
and the hidden state of the previous moment
Figure FDA0002373929640000039
The specific formula is as follows:
Figure FDA00023739296400000310
Figure FDA00023739296400000310
第二层到最后一层的输出
Figure FDA00023739296400000311
包括前一层在t时刻的输出
Figure FDA00023739296400000312
隐藏状态
Figure FDA00023739296400000313
和前一时刻的隐藏状态
Figure FDA00023739296400000314
具体如下:
Output from the second layer to the last layer
Figure FDA00023739296400000311
Include the output of the previous layer at time t
Figure FDA00023739296400000312
hidden state
Figure FDA00023739296400000313
and the hidden state of the previous moment
Figure FDA00023739296400000314
details as follows:
Figure FDA00023739296400000315
Figure FDA00023739296400000315
其中l表示的是层数,层数范围为第二层到最后一层;其中每一层的输入都为前一层的输出,即第l层的输入为上一层的输出
Figure FDA0002373929640000041
θl表示多层门控循环单元网络第l层权重矩阵的参数;
Among them, l represents the number of layers, and the number of layers ranges from the second layer to the last layer; the input of each layer is the output of the previous layer, that is, the input of the first layer is the output of the previous layer
Figure FDA0002373929640000041
θ l represents the parameters of the weight matrix of the lth layer of the multi-layer gated recurrent unit network;
多层门控循环单元网络最后一层L的输出为
Figure FDA0002373929640000042
最后只取最后一层的最后时刻的输出
Figure FDA0002373929640000043
经过softmax输出地磁序列的地标的one-hot编码;在训练前将地磁信号序列的地标转化为向量O∈RN,N表示地标的数量;多层门控循环单元网络的损失函数是交叉熵损失函数,具体公式如下:
The output of the last layer L of the multi-layer gated recurrent unit network is
Figure FDA0002373929640000042
Finally, only the output of the last moment of the last layer is taken
Figure FDA0002373929640000043
The one-hot encoding of the landmarks of the geomagnetic sequence is output through softmax; the landmarks of the geomagnetic signal sequence are converted into a vector O∈R N before training, where N represents the number of landmarks; the loss function of the multi-layer gated recurrent unit network is the cross entropy loss function, the specific formula is as follows:
Figure FDA0002373929640000044
Figure FDA0002373929640000044
其中x表示地磁序列,n表示地磁序列的数量,p(xi)表示地磁序列xi的实际one-hot编码,q(xi)表示地磁序列xi在神经网络下估计的one-hot编码;在训练过程中,采用adam优化器来最小化损失函数,采用dropout作为正则化来减少过拟合;where x is the geomagnetic sequence, n is the number of geomagnetic sequences, p(x i ) is the actual one-hot encoding of the geomagnetic sequence x i , q( xi ) is the one-hot encoding of the geomagnetic sequence x i estimated under the neural network ;During the training process, the adam optimizer is used to minimize the loss function, and dropout is used as a regularization to reduce overfitting; 通过地磁数据库中的测试集来测试训练的多层门控循环单元网络;最后通过多次训练选择分类精度最优的模型参数。The trained multi-layer gated recurrent unit network is tested through the test set in the geomagnetic database; finally, the model parameters with the best classification accuracy are selected through multiple trainings.
6.根据权利要求5所述的一种基于多层门控循环单元网络的地磁室内定位方法,其特征在于,多层门控循环单元网络的层数设置为4,即最后一层L=4。6. a kind of geomagnetic indoor positioning method based on multi-layer gated cyclic unit network according to claim 5, is characterized in that, the number of layers of multi-layer gated cyclic unit network is set to 4, namely last layer L=4 .
CN202010059363.8A 2020-01-18 2020-01-18 Geomagnetic indoor positioning method based on multilayer gate control circulation unit network Pending CN111256684A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010059363.8A CN111256684A (en) 2020-01-18 2020-01-18 Geomagnetic indoor positioning method based on multilayer gate control circulation unit network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010059363.8A CN111256684A (en) 2020-01-18 2020-01-18 Geomagnetic indoor positioning method based on multilayer gate control circulation unit network

Publications (1)

Publication Number Publication Date
CN111256684A true CN111256684A (en) 2020-06-09

Family

ID=70952353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010059363.8A Pending CN111256684A (en) 2020-01-18 2020-01-18 Geomagnetic indoor positioning method based on multilayer gate control circulation unit network

Country Status (1)

Country Link
CN (1) CN111256684A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113008226A (en) * 2021-02-09 2021-06-22 杭州电子科技大学 Geomagnetic indoor positioning method based on gated cyclic neural network and particle filtering
CN114440888A (en) * 2022-01-14 2022-05-06 中山大学 Indoor positioning method and device based on sequence grouping sliding window

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108120436A (en) * 2017-12-18 2018-06-05 北京工业大学 Real scene navigation method in a kind of iBeacon auxiliary earth magnetism room
CN108629295A (en) * 2018-04-17 2018-10-09 华中科技大学 Corner terrestrial reference identification model training method, the recognition methods of corner terrestrial reference and device
CN108965609A (en) * 2018-08-31 2018-12-07 南京宽塔信息技术有限公司 The recognition methods of mobile terminal application scenarios and device
CN109115205A (en) * 2018-07-20 2019-01-01 上海工程技术大学 A kind of indoor fingerprint positioning method and system based on geomagnetic sensor array
US20190122145A1 (en) * 2017-10-23 2019-04-25 Baidu Online Network Technology (Beijing) Co., Ltd. Method, apparatus and device for extracting information
CN109781094A (en) * 2018-12-24 2019-05-21 上海交通大学 Geomagnetic Positioning System Based on Recurrent Neural Network
CN110388926A (en) * 2019-07-12 2019-10-29 杭州电子科技大学 An indoor positioning method based on mobile phone geomagnetism and scene images

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190122145A1 (en) * 2017-10-23 2019-04-25 Baidu Online Network Technology (Beijing) Co., Ltd. Method, apparatus and device for extracting information
CN108120436A (en) * 2017-12-18 2018-06-05 北京工业大学 Real scene navigation method in a kind of iBeacon auxiliary earth magnetism room
CN108629295A (en) * 2018-04-17 2018-10-09 华中科技大学 Corner terrestrial reference identification model training method, the recognition methods of corner terrestrial reference and device
CN109115205A (en) * 2018-07-20 2019-01-01 上海工程技术大学 A kind of indoor fingerprint positioning method and system based on geomagnetic sensor array
CN108965609A (en) * 2018-08-31 2018-12-07 南京宽塔信息技术有限公司 The recognition methods of mobile terminal application scenarios and device
CN109781094A (en) * 2018-12-24 2019-05-21 上海交通大学 Geomagnetic Positioning System Based on Recurrent Neural Network
CN110388926A (en) * 2019-07-12 2019-10-29 杭州电子科技大学 An indoor positioning method based on mobile phone geomagnetism and scene images

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BIMAL BHATTARAI,等: "Geomagnetic Field Based Indoor Landmark Classification Using Deep Learning", 《IEEE ACCESS》 *
MINH TU HOANG,等: "Recurrent Neural Networks for Accurate RSSI Indoor Localization", 《IEEE INTERNET OF THINGS JOURNAL》 *
张铭坤,等: "基于GRU-RNN 模型的城市主干道交通时间预测", 《北京信息科技大学学报》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113008226A (en) * 2021-02-09 2021-06-22 杭州电子科技大学 Geomagnetic indoor positioning method based on gated cyclic neural network and particle filtering
CN113008226B (en) * 2021-02-09 2022-04-01 杭州电子科技大学 Geomagnetic indoor positioning method based on gated recurrent neural network and particle filter
CN114440888A (en) * 2022-01-14 2022-05-06 中山大学 Indoor positioning method and device based on sequence grouping sliding window
CN114440888B (en) * 2022-01-14 2023-05-16 中山大学 Indoor positioning method and device based on sequence grouping sliding window

Similar Documents

Publication Publication Date Title
Sun et al. RSOD: Real-time small object detection algorithm in UAV-based traffic monitoring
CN111121759B (en) A Geomagnetic Indoor Localization Method Based on Multilayer Long Short-Term Memory Network
CN109948522B (en) A method for interpreting the maturity of X-ray hand bone based on deep neural network
CN109978249A (en) Population spatial distribution method, system and medium based on two-zone model
CN108629978A (en) A kind of traffic trajectory predictions method based on higher-dimension road network and Recognition with Recurrent Neural Network
RU2771515C1 (en) Method and system for determining the location of a high-speed train in a navigation blind spot based on meteorological parameters
CN106022527A (en) Trajectory prediction method and device based on map tiling and LSTM cyclic neural network
CN110536257B (en) Indoor positioning method based on depth adaptive network
CN111985325B (en) Aerial small target rapid identification method in extra-high voltage environment evaluation
CN112949407A (en) Remote sensing image building vectorization method based on deep learning and point set optimization
CN113159403B (en) Intersection pedestrian track prediction method and device
CN112017436B (en) Method and system for predicting urban traffic travel time
CN111256684A (en) Geomagnetic indoor positioning method based on multilayer gate control circulation unit network
CN111783295B (en) Dynamic identification and prediction evaluation method and system for urban community specific human behavior chain
WO2023201938A1 (en) Missing trajectory filling method and system
CN112884014A (en) Traffic speed short-time prediction method based on road section topological structure classification
CN114239821A (en) Selection method of geomagnetic matching adaptation area
CN113671599A (en) A method for identifying landfalling cyclones based on global climate models
CN117079148A (en) Urban functional area identification method, device, equipment and medium
CN106483490A (en) Wireless location method based on support vector cassification
CN107124761B (en) Cellular network wireless positioning method fusing PSO and SS-ELM
CN116543603B (en) A trajectory completion prediction method and device considering airspace situation and local optimization
Cui et al. Application of zigbee location fingerprint method in positioning of railway tunnel staff
Zhan et al. A Multimodal Deep Learning Approach for Typhoon Track Forecast by Fusing CNN and Transformer Structures
Gong et al. DeepNav: A scalable and plug-and-play indoor navigation system based on visual CNN

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200609