基于Apriori算法的智能家居用户行为研究外文翻译资料

 2022-12-25 02:12

Research on Mining Association Behavior of Smart Home Users Based on Apriori Algorithm

Yongjun Zhang1, a, Tingting Qi2,b

1Beijing University of Posts and Telecommunications, Beijing100876, China;

2Beijing University of Posts and Telecommunications, Beijing100876, China.

a yjzhang@bupt.edu.cn, b andrea_tt@163.com

Keywords: Apriori algorithm, Smart home, user behavior preference.

Abstract. This paper mainly studies the improvement of Apriori algorithm based on smart home system. Association rule algorithm has the promotion effect to the analysis of the smart home user behavior. Apriori algorithm is one of the classical algorithms of association rules. However, the efficiency of the Apriori algorithm is not high, there is stillroom for improvement in smart home. Based on the characteristics of smart home system and terminal operation platform, this paper optimizes the Apriori algorithm. By introducing the auxiliary matrix, the number of scanning database is reduced, and the speed of the support solving is accelerated. Simulation experiment results show that the Apriori algorithm optimized is more efficient than the optimal algorithm.

1. Introduction

In rapid advocacy of the Internet of things,with the improvement of peoplersquo;s living standards and housing conditions, digital intelligent have walk into peoplersquo;s life. Smart home products have already entered the vision of ordinary families and greatly simplified peoplersquo;s life. Which make it possible develop a new lifestyle. Smart home products can not just stay in the original remote control mode. Packing multiple behaviors ofusers and concurrent operation will further streamline operations that improve the intelligence level. Custom profile is a manifestation. Technology product is continually improving the experience of users and to simplify user operations, which is the next target of smart products. According to the users behavior,mining high degree of user behavior associatedthrough data mining analysis and then recommended as a personalized user profile. Which replacing the custom profiles of trouble, adding intelligence andmeet user preferences in operation.

In data mining, association ruleis an importantissue. Association rules can find the existence of things that may exist or contactfrom the data behind. Which could be applied to the association study of user behavior in the smart home. The most classical association rule algorithm is Apriori algorithm. Apriori algorithm is an iterative manner based mining method by searching frequent item set. The mining process of Apriori algorithm is complex because of the iterative. Based on the characteristics of smart home system, this paper proposes an improved method of Apriori algorithm, which makes it more suitable for the implementation and application of the terminal platform.

2. User Behavior and Associated Algorithm

Data are mainly from the userrsquo;s command to the smart home in the terminal equipment. The data storage format is in the form of linear linkedlistand circular queue. Data mainly includes deviceid number and status. Data mainly refers to output device data. Data recording processfor frequen to perations considered to be user errors, not record sand finally deleteduplicates. Due to the above operation is the basic procedure, not in thisrepeat, it mainly introduces the algorithm of association rules analysis of user behavior.

2.1 Association rules and Apriori Algorithm

Given a set of itemset , a set of affairs set , where , that means is a sub set of . The so-called association rule is the implication of the form .Association rules havetwo important concepts,which called support and confidence. Support denoted by , is the number of affairs set contain and percentage of the total number of affairs set. Confidence denoted , is the number of affairs set contain and percentage of the number of affairs set contain , which indicate the intensity of . Formula as follows:

(1)

(2)

Apriori is a kind of association rulealgorithm mining frequent itemsets, the idea is that iterative mining frequent itemsetsby generating candidate itemsets and pruning. It used to explore the item set byitem set, finally exhausted all frequent itemsets in dataset.Apriori algorithm flow is shown in Fig.1.

Fig.1

Step as follows:

1) Count the number of each item set by scanning affairs set database, then get the candidate

1-itemset .

2) Determine whether each item set in is greater than the minimum support and result in

the frequent 1-itemset .

3) Connection step: get frequent 2-itemset by connecting item sets in (A_connect).

4) Prune step: count the number of each itemset to get the itemset support by scanning affairs

set database.

5) Delete itemsets which support is less than the minimum support to get frequent 2-itemset .

6) Repeat step 3,4 and step 5 until frequent k 1-itemset doesnrsquo;t match the condition. Then get

the wanted frequent k-itemset.

Through the above steps can be seen that iterative process of two steps connection and pruning in the mining process of Apriori algorithm. It is required to judge the condition that former k-2 item sets are equal and the k-1 itemset is unequal when connecting itemsets in to get . It will generate large set of candidate itemsets that reduces the efficiency of the algorithm. It is also required to get the support of each itemset in by scanning affairs set database after get which is inefficient. Therefore, taking into account the characteristics of the smart home system and the operating background of the mobile platform, the Apriori algorithm could be optimized to improve the efficiency

剩余内容已隐藏,支付完成后下载完整资料


基于Apriori算法的智能家居用户行为研究

关键字:Apriori算法,智能家居,用户行为偏好。

摘要:本文主要研究基于智能家居系统的Apriori算法的改进。 关联规则算法对智能家居用户行为的分析有促进作用。 Apriori算法是关联规则的经典算法之一。 然而,Apriori算法的效率并不高,智能家居还有待改进。 基于智能家居系统和终端操作平台的特点,本文优化了Apriori算法。 通过引入辅助矩阵,减少扫描数据库的数量,加快支持求解的速度。 仿真实验结果表明,优化的Apriori算法比最优算法更有效。

1.介绍

在物联网的快速宣传中,随着人们生活水平的提高和住房条件的改善,数字智能化已经走入人们的生活。智能家居产品已经进入普通家庭的愿景,大大简化了人们的生活。这有可能开发新的生活方式。智能家居产品不能只停留在原来的遥控模式。包含多个行为的用户和并发操作将进一步简化提高智能水平的操作。自定义配置文件是一种表现形式。技术产品不断提高用户体验,简化用户操作,这是智能产品的下一个目标。根据用户的行为,通过数据挖掘分析挖掘高度的用户行为,然后推荐为个性化用户配置文件。其替代了自定义的故障情况,添加智能和操作用户偏好。

在数据挖掘中,关联规则是重要的组成部分。 关联规则可以找到可能存在的东西的存在或从后面的数据联系。 哪些可以应用于智能家居中用户行为的关联研究。 最经典的关联规则算法是Apriori算法。 Apriori算法是通过搜索频繁项集合的基于迭代方法的挖掘方法。 由于迭代,Apriori算法的挖掘过程很复杂。 基于智能家居系统的特点,本文提出了一种改进的Apriori算法,使其更适合终端平台的实现和应用。

2.用户行为和相关算法

数据主要来自用户对终端设备智能家居的命令。 数据存储格式为线性列表和循环队列的形式。 数据主要包括设备号和状态。 数据主要是指输出设备数据。 数据记录过程被认为是被认为是用户错误的记录,而不是记录砂最终删除重复。 由于上述操作是基本过程,在此不再赘述,主要介绍了用户行为关联规则分析算法。

2.1关联规则和Apriori算法

给定一组项目集,一组事务集,其中,这意味着一个子集。 所谓的关联规则是形式的含义。协会规则涉及重要的概念,称为支持和信心。 支持表示,是事务集包含的数量和占事务集总数的百分比。 信心表示,是事件集包含的数量和事务集合的数量的百分比,这表示强度。 公式如下:

(1)

(2)

Apriori是一种关联规则挖掘频繁项集,其思想是通过生成候选项集和修剪来迭代挖掘频繁项集。 它用于探索项目集合的集合,最终耗尽了数据集中的所有频繁项集.Apriori算法流程如图1所示。

步骤如下:

1)通过扫描事务集数据库计算每个项目集的数量,然后获取候选

1项目集。

2)确定设置的每个项目是否大于最小支持并导致频繁的1项目集。

3)连接步骤:通过连接(A_connect)中的项目集来获得频繁的2项目集。

4)修剪步骤:通过扫描事务来计算每个项目集的数量以获取项目集支持设置数据库。

5)删除支持的项目小于最小支持以获得频繁的2项目集。

6)重复步骤3,4和步骤5,直到频繁的k 1项目集与条件不匹配。然后得到

想要的频繁k项目集。

通过上述步骤可以看出,在Apriori算法的挖掘过程中两步连接和修剪的迭代过程。需要判断前k-2项集合相等的条件,连接项目集的k-1项集不等于。它将生成大量候选项集,从而降低算法的效率。还需要通过扫描事务集数据库得到每个项目集的支持,这是低效的。因此,考虑到智能家居系统的特点和移动平台的运行背景,可以优化Apriori算法,提高效率,减少计算时间。

2.2 Apriori算法改进

根据上述Apriori迭代操作的特点,我们在连接和修剪的两个步骤中优化了Apriori算法的目标。

1)扫描事件集数据库中设置的每个项目,并存储内容并将信息定位到一个n * 2的矩阵中,这个矩阵表示为(n,具体取决于具体情况)。用于记录项目集合的总数,因此从第二行开始的项目集记录。矩阵的第一列用于存储每个项集的内容。第二列用于存储每个项集的位置信息。假设基数为零,加上基数为项目集集中在事务集中。位置信息有助于连接操作。是候选人1项目集。然后根据最小支持修剪获得频繁的1项目集。它只记录频繁项目集的下标,并且在生成频繁的1项目集时不移动项目集的内容。这将节省内存并加快运行速度。这是因为项目集的内容可能很大。然后频繁项目集的下标是矩阵的行数,有助于简化在生成候选项目集时的连接操作。

每个项目集的内容和定位信息应通过扫描事务项目数据库并存储在矩阵中进行统计。例如如果一个项目退出在一个,三个和四个事务设置。它的定位信息应该是。

  1. 当候选项目集由频繁项集合生成时,可以预先确定一些项目集,以便可以直接删除非频繁项集。 哪些可以减少候选项集的数量。 具体原则:每个项目集都是按顺序排列的,因为频繁项目集记录了矩阵中每个项目的下标。 如果任何两个项目组的前k-2项目具有不相同的项目,则可以停止连接操作。 这是因为之后的连接不符合链接条件。 它也减少了连接操作的次数。 例如,在连接的操作中,不必与进行比较,。 由于项目集的顺序,必须小于或等于下列项目集的第一项。 实验结果表明,当事务项目号为50,最小支持度为80%时,连接的运行时间占整个算法的36.2%,而优化算法的4.3%。

3)确定候选项目集后,应计算每个项目集的支持。 哪个是耗时的过程。 为了减少数据库扫描的次数,可以使用矩阵。 例如,项目集是,项目是矩阵的下标。 每个项目的定位信息可以根据相应的下标进行选取。 这些定位信息可以获取新的项目集。 二进制表示中的1数是新项目的支持,计算简单。

一方面,由于优化算法的原理,项目集的数量被限制为大约64个。 但由于智能家居系统的特点,限制数量不会对系统产生影响。 另一方面,由于移动计算能力的限制,事务项目集的数量限制在大约60个。 由于最近的数据请求,这也不会对系统产生影响。

3.仿真实验设计与分析

在仿真实验中实现了Apriori算法和优化算法,并通过仿真比较了两种算法。从智能家居系统应用背景出发,仿真实验环境选择i OS手机终端为平台,Xcode集成 开发环境,编程语言选择混合C和Objective-C语言。

选择Apriori算法的标准测试数据为实验测试数据。由于智能家居系统的特点,其特点是近期数据的特点和手机平台的特点,部分测试数据被选中。

实验一:比较两种算法在不同支持下的实现时间,考虑到设置的数量为60,项目集数为60,处于允许范围内。 实验如图2所示。

从实验的仿真实验结果可以看出,在相同数量的项目集和考察集的前提下,执行时间随着支持的减少而增加。 然而,优化的Apriori算法的执行时间远小于原始Apriori算法,其执行时间的增长速度是等速的。

实验二:比较两种算法的执行时间不同,代码设置不同,考虑最小支持度为0.6,项目数设为60。实验如图3所示。

从实验二的仿真实验结果可以看出,在同一数量的项目集和相同的最小支持的前提下,执行时间随着代办数量的增加而增加。然而,优化的Apriori算法的执行时间远小于原始Apriori算法,其执行时间的增长速度是等速的。

从上述两个实验可以看出,优化的Apriori算法的执行速度更快,更适合在智能家居系统的终端平台下运行。

4.总结

总之,本文以智能家居系统为研究背景,以i OS终端为平台,优化了Apriori算法。通过引入辅助矩阵,减少了扫描数据库的数量,算法的速度为改进,生成代数项减少,以提高算法的效率。实验结果也证明了这一点。这对于用户行为的分析,智能家居系统的智能开发和简化用户的操作具有一定的意义。

参考文献

[1]. Li Xiaocong, Teng Shaohua. Frequent itemset mining improved Apriori algorithm [J]. Jiangxi Normal University Journal (NATURAL SCIENCE EDITION), 2011,05:498-502.

[2]. Liu Huating, Guo Renxiang, Jiang Hao. Research and improvement of Apriori algorithm for association rule mining [J]. computer application and software, 2009,01:146-149.

[3]. Jia Ruiyu, Qian Guangchao, Zhang Ran, Li Longshu. An optimization method for the Apriori algorithm [J]. Computer Engineering, 2008,23:196-198.

[4]. Gong Jing, Fei Fei Zhou, Lu Jia, ChenWei Liu. Based on the content preference of mobile Internet customers access behavior analysis [J]. Computer technology and development, 2012,12:149-152.

[5]. Zhang Deying. The design and implementation of a mobile user preference acquisition system

based on context and user behavior [D]. Beijing University of Posts and Telecommunications, 2012

[6]. Chen Liang. Research and development of smart home client system IOS platform [D]. Wuhan University of Technology, 2014

[7]. Ge Qinghua, Fu Wei, Xue Zhen. Research and implementation of smart home software based on IOS system [J]. world electronic components, 2013,09:43-45.

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[28243],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

课题毕业论文、文献综述、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找。