农田无线传感器网络数据处理服务器的设计与实现

    Design and implementation of data processing server in farm wireless sensor network

    • 摘要: 对无线传感器网络采集到的田间信息进行有效的接收、处理是基于无线传感器网络的农田环境监测系统的重要组成部分,该文针对农田无线传感器网络数据采集的特点,对系统的数据处理服务器的构建进行了研究,设计并实现了一个基于非阻塞式Sockets套接口的数据通信服务器。该服务器综合利用静态线程池与I/O复用技术,采用循环队列作为数据缓冲区,较好地解决了农田无线传感器网络对TCP多连接长时间通信,大量田间实时监测数据并发接收、处理性能要求高的问题;采用面向对象设计方法,抽象出类的层次结构,提高了程序代码的复用性。

       

      Abstract: Wireless sensor network is an effective method to gather the remote information and also the important part of whole wireless sensor network application system to accept and process the farmland information which is gathered by wireless sensor network. Aiming at the characteristics of data acquisition using wireless sensor network, the construction of the data processing server for the system was studied. A data processing server based on the non-blocking I/O sockets communication was designed and implemented. The server utilized the technologies of thread pool and I/O multiplexing. Cyclic queue was adopted as the data buffer, which could better solve the problems such as the multi-connection TCP communication and the high-speed concurrent processing performance of a large number of real-time monitoring data. Through using the object-oriented programming method, the class hierarchy was built up to increase the ability of code reuse.

       

    /

    返回文章
    返回