当前位置:主页 > 科技论文 > 网络通信论文 >

基于代码差异的无线传感器网络重编程方法研究

发布时间:2018-04-26 03:29

  本文选题:无线传感器网络 + 重编程 ; 参考:《南京航空航天大学》2014年硕士论文


【摘要】:无线传感器网络(WSNs)在环境监测、军事战场、工业控制等领域的应用非常广泛。在真实的WSNs中,通常需要部署成百上千个节点。随着时间推移和环境变化,可能需对运行的节点增加、关闭一些功能或者修复软件中存在的问题,即节点运行的程序需要进行重编程以实现版本更新。传统手动的更新方式效率低下,甚至某些部署在环境恶劣或人类无法到达区域的节点不能实现更新,因此研究者提出无线远程更新方式。但是,大部分代码更新操作,新版本程序代码相对于旧版本需要更新的部分远小于整个新版本程序代码。此外,鉴于传感器节点自身的资源限制,所以节点通过无线方式远程进行更新时,需要减小重编程过程中分发的代码量,提高重编程效率并降低节点能耗。本文以MeshSPAIS智能精准农业信息系统为背景对基于差异的WSNs重编程进行深入研究,提出基于代码克隆检测技术的WSNs重编程方法(RePCCDT)和总体架构,主要工作如下:首先,对WSNs重编程的两个部分即代码分发协议和重编程方法进行研究,重点分析Deluge、Zephyr/Hermes、Elon、R2几种具有代表性的重编程方法,指出它们在代码分发量和能耗方面存在的不足及待改进之处。其次,针对基于差异的WSNs重编程的新旧版本程序代码相似度的保护问题,提出BGIR代码相似度保护方法。该方法从分支、全局变量、间接寻址、相对跳转四个方面分别处理其变化所带来的影响,以提高新旧版本程序的相似性,为后续差异补丁生成算法生成较小的差异补丁做准备。通过理论分析和实例分析验证该方法能够提高新旧版本程序代码相似性从而减小差异补丁的大小。然后,针对基于差异的WSNs重编程的差异补丁生成问题,提出基于代码克隆检测技术的差异补丁生成算法CCDTDiff。将基于Token序列的代码克隆检测技术引入到差异补丁生成算法中,寻找新旧版本程序代码的公共代码段,用本文设计的差异补丁计算算法生成最小化的差异补丁。从算法的执行效率和差异补丁生成大小两个方面分析该算法的性能。最后,设计基于代码克隆检测技术的WSNs重编程总体架构和引导装载程序Bootloader。总体架构主要包括三个模块:差异补丁生成、代码分发和构建程序镜像,接着改进默认的Bootloader使节点通过软件重启来执行更新后的程序。通过TOSSIM仿真实验验证该架构的可行性,差异补丁生成模块能够生成最小化的补丁,减少重编程过程中下载代码耗费的时间和消耗的能量。
[Abstract]:Wireless sensor network (WSNs) is widely used in environmental monitoring, military battlefield, industrial control and other fields. In real WSNs, it is usually necessary to deploy hundreds of nodes. As time goes by and the environment changes, it may be necessary to increase the number of running nodes, turn off some functions or fix problems in the software, that is, the programs run by the nodes need to be reprogrammed to achieve version updates. The traditional manual updating method is inefficient, and even some nodes deployed in harsh environment or unable to reach the area can not realize the update, so the wireless remote update method is proposed by researchers. However, most code update operations, the new version of the program code relative to the old version of the need to update the part of the whole new version of the program code. In addition, due to the resource limitation of sensor nodes themselves, it is necessary to reduce the amount of code distributed in the reprogramming process, improve the efficiency of reprogramming and reduce the energy consumption of nodes when the nodes are remotely updated by wireless mode. In this paper, based on MeshSPAIS intelligent precision agriculture information system, the WSNs reprogramming based on difference is deeply studied, and the WSNs reprogramming method based on code clone detection technology is proposed. The main work is as follows: first, In this paper, two parts of WSNs reprogramming, code distribution protocol and reprogramming method, are studied. Several representative reprogramming methods are analyzed, and their shortcomings and improvements in code distribution and energy consumption are pointed out. Secondly, aiming at the problem of code similarity protection of new and old versions of WSNs reprogramming based on difference, a method of BGIR code similarity protection is proposed. In order to improve the similarity of the new and old versions, the method deals with the effects of the changes from four aspects: branch, global variable, indirect addressing, and relative jump, so as to prepare for the subsequent difference patch generation algorithm to generate smaller difference patches. Theoretical analysis and example analysis show that this method can improve the similarity of the new and old versions of the program code and reduce the size of the differential patches. Then, aiming at the problem of differential patch generation for WSNs reprogramming based on difference, a differential patch generation algorithm based on code clone detection technique is proposed. The code clone detection technique based on Token sequence is introduced into the algorithm of generating differential patch, and the common code segment of the new and old versions of the code is found. The differential patch calculation algorithm designed in this paper is used to generate the minimized differential patch. The performance of the algorithm is analyzed from two aspects: the efficiency of the algorithm and the size of the difference patch generation. Finally, the WSNs reprogramming architecture based on code clone detection technology and bootloader are designed. The overall architecture consists of three modules: difference patch generation, code distribution and build program mirroring. Then the default Bootloader is improved to enable nodes to execute the updated program through software restart. The feasibility of the architecture is verified by TOSSIM simulation. The differential patch generation module can generate a minimal patch and reduce the time and energy consumption of downloading code in the process of reprogramming.
【学位授予单位】:南京航空航天大学
【学位级别】:硕士
【学位授予年份】:2014
【分类号】:TP212.9;TN929.5


本文编号:1804313

资料下载
论文发表

本文链接:https://www.wllwen.com/kejilunwen/wltx/1804313.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户b8456***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com