«上一篇
 文章快速检索 高级检索

 智能系统学报  2021, Vol. 16 Issue (1): 162-169  DOI: 10.11992/tis.202012035 0

### 引用本文

GUO Maozu, SHAO Shoufei, ZHAO Lingling, et al. Active semantic recognition method based on spatial-temporal period pattern mining[J]. CAAI Transactions on Intelligent Systems, 2021, 16(1): 162-169. DOI: 10.11992/tis.202012035.

### 文章历史

1. 北京建筑大学 电气与信息工程学院，北京 100044;
2. 北京建筑大学 建筑大数据智能处理方法研究北京市重点实验室，北京 100044;
3. 哈尔滨工业大学 计算机科学与技术学院，黑龙江 哈尔滨 150001

Active semantic recognition method based on spatial-temporal period pattern mining
GUO Maozu 1,2, SHAO Shoufei 1,2, ZHAO Lingling 3, LI Yang 1,2
1. School of Electrical and Information Engineering, Beijing University of Civil Engineering and Architecture, Beijing 100044, China;
2. Beijing Key Laboratory of Intelligent Processing for Building Big Data, Beijing University of Civil Engineering and Architecture, Beijing 100044, China;
3. School of Computer Science and Technology, Harbin Institute of Technology, Harbin 150001, China
Abstract: Active semantic recognition aims to mine people’s activities from spatial-temporal data recording through the smart equipment they carry. Traditional studies paid more attention to studying the spatial features of spatial-temporal data but failed to mine temporal features adequately. Considering both features, this work proposes an active semantic recognition method based on period pattern mining. First, trajectories that have already been separated from raw trajectories are clustered based on the spatial distance. The periods of reference spots that are frequently visited by the people are then mined according to the sequence of clustering. Based on the visit period and combined with the residence time at the location and the distribution of interest points nearby, a classification model is constructed to identify the activity semantics of human individuals. The experimental results on the check-in dataset and simulation data show that the valid recognition accuracy of active semantic recognition combined with periodic characteristics increases by 20% more than that without periodic characteristics. Under the same two check-in datasets and compared with other recognition methods, the accuracy is improved by more than 10%.
Key words: spatial-temporal trajectory    spatial-temporal close connection; density clustering; stay time; active semantic recognition    period pattern mining    random forest

1 相关研究

2 周期模式挖掘

 $\begin{split} S =& \left\{ {{S_1},{S_2}, \cdots ,{S_m}} \right\} \\ {S_i} =& \{ ({{\rm{lng}}_{{i_1}}},{{\rm{lat}}_{{i_1}}},{t_{{i_1}}}),({{\rm{lng}}_{{i_2}}},{{\rm{lat}}_{{i_2}}},{t_{{i_2}}}), \cdots , \\ &({{\rm{lng}}_{{i_n}}},{{\rm{lat}}_{{i_n}}},{t_{in}})\} ,i \in [1,m] \end{split}$

2.1 活动地点匹配

 $\begin{split} {\rm{space}\_d}_{ij}=&\sqrt{({\rm{lng}}_{i}-{\rm{lng}}_{j}{)}^{2}+({\rm{lat}}_{i}-{\rm{lat}}_{j}{)}^{2}} \\ {\rm{time}}\_{d}_{ij}=&\left|{\rm{time}}_{i}-{\rm{time}}_{j}\right| \\ {d}_{ij}=&\frac{({\rm{space}}\_i{d}_{ij}+{\rm{time}}\_{d}_{ij})}{2} \end{split}$

1) 初始化核心对象集合 $\varOmega =\varnothing$ ，聚类簇个数 $k=0$ ，未访问的样本集合 $\varGamma =D$ ，簇划分 $C=\varnothing$

2) for $j$ in ${1,2}, \cdots ,n$ do

3) 通过距离度量方式，找到 ${x}_{j}$ $\varepsilon$ 邻域子样本集 ${N}_{\varepsilon }\left({x}_{j}\right)$

4)　if ${N}_{\varepsilon }\left({x}_{j}\right)\geqslant {\rm{MinPts}}$

5)　 $\varOmega =\varOmega \cup \left\{{x}_{j}\right\}$

6)　end for

7)　while $\varOmega \ne \varnothing$ do

8)　随机选取 $\varOmega$ 中的一个核心对象 $o$ ${\varOmega }_{\rm{cur}}=\left\{o\right\}$ $k=k+1$ ${C}_{k}=\left\{o\right\}$ $\varGamma =\varGamma -\left\{o\right\}$

9)　if ${\varOmega }_{\rm{cur}}=\varnothing$

10) $C=\{{C}_{1},{C}_{2}, \cdots ,{C}_{k}\}$ , $\varOmega =\varOmega -{C}_{k}$

continue

11) else

12) $\varOmega =\varOmega -{C}_{k}$

13) end if

14)在 ${\varOmega }_{\rm{cur}}$ 中取出一个核心对象 ${o'}$ 通过邻域距离阈值 $\varepsilon$ 找出所有的 $\varepsilon -$ 邻域 ${N}_{\varepsilon }\left({o'}\right)$ $\varDelta ={N}_{\varepsilon }\left({o'}\right)\cap \varGamma$ ${C}_{k}={C}_{k}\cup \varDelta$ $\varGamma =\varGamma -\varDelta$ ${\varOmega }_{\rm{cur}}={\varOmega }_{\rm{cur}}\cup (\varDelta \cap \varOmega )-{o'}$

15) end while

2.2 周期模式挖掘

 \begin{aligned} {P_{\rm{LS}}}\left( f \right) = \frac{1}{{2{\sigma ^2}}}\left\{ \frac{{{{\left[\displaystyle\sum _{j = 1}^N\left( {\left( {{x_j} - \bar x} \right){\rm{cos}}(2{\rm{{\text{π}}}} f\left( {{t_j} - \tau } \right)} \right)\right]}^2}}}{{\displaystyle\sum _{j = 1}^N{\rm{co}}{{\rm{s}}^2}\left(2{\rm{{\text{π}}}} f({t_j} - \tau )\right)}} + \right.\\ \left. \frac{{\left[\displaystyle\sum _{j = 1}^N(({x_j} - \bar x){\rm{sin}}(2{\rm{{\text{π}}}} f({t_j} - \tau ))\right]^2}}{{{\rm{si}}{{\rm{n}}^2}(2{\rm{{\text{π}}}} f({t_j} - \tau ))}} \right\}\quad\quad\quad\quad \end{aligned} (1)

 $\begin{split} \overline {x}&=\frac{1}{N}\sum\limits_{j=1}^{N}{x}_{j}\\ {\sigma ^2} &= \frac{1}{{N - 1}}\sum\limits_{j = 1}^N ( {x_j} - \bar x{)^2} \end{split}$

 ${\rm{tan}}(2\left(2{\rm{{\text{π}} }}f\right)\tau )=\dfrac{\displaystyle\sum\limits_{j=1}^{N}{\rm{sin}}(2\left(2{\rm{{\text{π}} }}f\right){t}_{j})}{\displaystyle\sum\limits_{j=1}^{N}{\rm{cos}}(2\left(2{\rm{{\text{π}} }}f\right){t}_{j})}$

 ${P}_{r}\left({p}_{{\rm{max}}}\right)=1-{\left[1-{\rm{exp}}\left(-{p}_{{\rm{max}}}\right)\right]}^{N}$ (2)

 $z=-{\rm{ln}}\left[1-(1-\alpha {)}^{\frac{1}{N}}\right]$ (3)

1) for ${{p}}_{{i}}$ in $P$ do

2) for ${p}_{j}$ in $P$ do

3) if ${\rm{place}}-{{\rm{id}}}_{j}$ ${\rm{place}}-{{\rm{id}}}_{i}$

4)将 ${p}_{j}$ 加入 $P{'}$

5) end for

6) $P{'}$ 代入式(1)求出 ${P}_{\rm{SL}}$ 的峰值 ${p}_{\rm{max}}$ ,对应频率 ${f}_{i}$ , 取倒数表示周期 ${T}_{i}$

7)按照式(2)求出 ${p}_{\rm{max}}$ 的错误预警概率 ${P}_{ri}$

8) ${q}_{i}={t}_{i},{\rm{place}}-{\rm{id}}_{i},{T}_{i},{P}_{ri}$ ${q}_{i}$ 加入 $Q$

9) end for

3 活动语义识别

 Download: 图 1 本文提出的方法总体流程 Fig. 1 Overall procedure of our proposed method
3.1 特征提取

3.2 模型选择

3.2.1 决策树

1)特征选择。

 ${\rm{Gini}}\left(p\right)=1-\sum\limits_{k=1}^{K}{p}_{k}^{2}$ (4)

 ${\rm{Gini}}\left(D\right)=1-{\sum\limits_{k=1}^{K}\left(\frac{\left|{C}_{k}\right|}{\left|D\right|}\right)}^{2}$ (5)

 ${\rm{Gini}}(D,A)=\frac{\left|{D}_{1}\right|}{\left|D\right|}{\rm{Gini}}\left({D}_{1}\right)+\frac{\left|{D}_{2}\right|}{\left|D\right|}{\rm{Gini}}\left({D}_{2}\right)$ (6)

2)决策树生成。

3)决策树的剪枝。

3.2.2 基于随机森林的活动语义分类

1)将特征矩阵分成训练集 ${{{M}}}_{1}$ 和测试集 ${{{M}}}_{2}$

2)从训练集 ${{{M}}}_{1}$ 中随机有放回选取一定比例的样本 ${{{M}}}_{1i}$ (i表示第i棵决策树)作为一棵决策树的输入样本。

3)通过CART方法构建n个决策树，将所有决策树的分类结果概率最高的作为随机森立分类器的结果。

4) n从1~200变化，得到分类器最好精度时对应的决策树的个数。

5)将训练完成的分类器放在测试集上测试。输出模型的训练和测试精度。

4 实验结果与分析 4.1 实验设置

4.2 实验结果 4.2.1 周期模式的识别

4.2.2 活动语义识别结果

 ${\rm{precison}} = \frac{{{\rm{TP}}}}{{({\rm{TP}} + {\rm{FP}})}}$ (7)
 ${\rm{accuracy}} = \frac{{({\rm{TP}} + {\rm{TN}})}}{{({\rm{TP}} + {\rm{FP}} + {\rm{TN}} + {\rm{FN}})}}$ (8)
 ${\rm{recall}} = \frac{{{\rm{TP}}}}{{({\rm{TP}} + {\rm{FN}})}}$ (9)
 ${{F}}_{1} = \frac{{{\rm{precison}} \times {\rm{recall}}}}{{2({\rm{precison}} + {\rm{recall}})}}$ (10)

 Download: 图 4 某个特定活动对应的LombScargle功率—频率 Fig. 4 LombScargle power-frequency diagram corresponding to a specific activity
 Download: 图 5 有无周期的分类结果 Fig. 5 The histogram without or with period