刘层层 杨红丽



摘 要:在对无线传感器网络数据收集协议进行一致性测试时,生成的测试序列往往不够简捷高效。因此,提出了基于FSM模型的无线传感器网络数据收集协议测试方法。采用FSM模型描述数据收集协议规范,在FSM模型的基础上利用UIO算法生成测试序列。研究发现:UIO算法生成的测试序列较长,现有基于UIO的改进算法生成的测试序列较短,但不适用于所有协议,为此进行了优化,使得优化后的算法具有更好的适用性。为了阐明方法的有效性,对一个工业界无线抄表数据收集协议WM2RP进行建模与测试序列生成,并搭建测试环境进行了实际测试。
关键词:无线传感器网络;数据收集协议;FSM模型;测试序列生成;UIO算法
DOI:10.11907/rjdk.171437
中图分类号:TP306 文献标识码:A 文章编号:1672-7800(2017)009-0014-05
Abstract:In the conformance testing of data gathering protocol for Wireless Sensor Network, the test sequences generated is often not simple and efficient. So a testing method of data gathering protocol for WSN based on FSM model was proposed. We used the FSM model to describe the data gathering protocol specification, based on the FSM model, UIO algorithm was used to generate the test sequence. It was found that the test sequence generated by UIO algorithm was long. The improved UIO-based algorithm generated a shorter test sequence but did not apply to all protocols. Then, the algorithm was optimized on the basis of the existing improved algorithm, so that the optimized algorithm had better applicability. The effectiveness of the method was proved by modeling and test sequences generating for a wireless meter reading data gathering protocol in industry. Besides, the test environment for the actual test was built.
Key Words:wireless sensor network; data gathering protocol; FSM model; test sequence generation; UIO algorithm
0 引言
無线传感器网络广泛应用于各个领域的数据收集系统,设计并实现可靠的数据收集协议以保证此类系统的正常运作成为亟待解决的问题之一[1]。协议测试是检验协议可靠性与正确性的一种有效方式,主要包括一致性测试、互操作性测试、可靠性测试、健壮性测试。其中一致性测试是协议测试的基础,作用是检测协议的实现是否符合协议规范。测试序列是一致性测试中的核心部分,好的测试序列可以增加准确性,提高一致性测试效率[2]。如何生成合适的测试序列,是一致性测试中需要解决的关键问题。测试序列可以从协议模型中得到,常见的协议抽象模型主要有Petri网、进程代数、有限状态机等。……