当前位置: 首页 > 文章 > 基于Web的自动灌溉控制系统数据实时推送设计与开发 农业工程学报 2015,31 (15) 133-139
Position: Home > Articles > Design and development of real time data push in web-based automatic irrigation control system Transactions of the Chinese Society of Agricultural Engineering 2015,31 (15) 133-139

基于Web的自动灌溉控制系统数据实时推送设计与开发

作  者:
李淑华;郝星耀;周清波;潘瑜春
单  位:
中国农业科学院农业资源与农业区划研究所;北京农业信息技术研究中心
关键词:
灌溉;数据采集;设计;灌溉控制;实时;数据推送;观察者模式
摘  要:
基于Web的自动灌溉控制系统是当前农业节水信息技术发展的主流趋势,为了提供定制灌溉控制方案和精准的用水计量,系统需要较高的数据传输实时性能,而基于Web的应用程序在实时性上表现较差,难以满足应用需求。针对这一问题,该文首先分析了基于Web的自动灌溉控制系统的结构和数据传输实时性瓶颈,提出了通过数据推送模式提高实时性的方案,并对数据层与逻辑层、逻辑层与表现层之间的具体数据推送模式进行了设计。通过编程开发完成基于Web的灌溉控制系统的构建,实现了数据实时推送的机制,并对系统数据采集和控制指令发送过程的实时性进行测试。结果表明:数据采集平均延时为1 676 ms,控制数据从发送到结果返回的平均延时为3 378 ms,基本能够满足其设备控制和灌溉决策的需要;软件系统内采集和控制过程的数据库至客户端数据传输的平均延时分别为124和118 ms,消除了数据拉取模式中的延时因素,对提高系统实时性起到了重要作用。该研究为基于Web的实时监测与控制系统的开发提供了方法参考。
译  名:
Design and development of real time data push in web-based automatic irrigation control system
作  者:
Li Shuhua;Hao Xingyao;Zhou Qingbo;Pan Yuchun;Institute of Agricultural Resources and Regional Planning, Chinese Academy of Agricultural Sciences;National Engineering Research Center for Information Technology in Agriculture;Key Laboratory of Agri-informatics,Ministry of Agriculture;Beijing Engineering Research Center of Agricultural Internet of Things;Beijing Research Center for Information Technology in Agriculture;
关键词:
irrigation;;data acquisition;;design;;irrigation control;;real time;;data push;;observer pattern
摘  要:
The automatic irrigation control system based on web is a main trend of current water-saving technology development. In order to provide personalized irrigation control scheme and precise water metering, the system needs higher real-time data transmission performance. The real-time performance of web application is currently poor, and difficult to meet the needs of accurate irrigation control. Aiming at this problem, in this paper, the structure and bottleneck of real-time data transmission of web-based automatic irrigation control system was analyzed, and the data push scheme of improving the real-time performance was proposed. Based on observer pattern, the data push mode between data layer and logic layer, and that between logic layer and presentation layer were specifically designed. In the former data transmission process, the observed object is database table, and the observer is Web server monitoring program. After the data is inserted into the data table, the database immediately triggers the stored procedure to notify the relevant Web service program and executes updating data subject. In the latter data transmit process, the observed object is program object running on the Web server, and the observer is client program object running on the browser. Because the Web service program cannot directly initiate data connection to the client program. Therefore, in order to implement the observer pattern, it is essential to establish a real-time tow-way data connection in the client program loading process. Then through subscribing a group of data subjects, the client program can receive real-time data push as soon as the data subjects are updated. The connection between client and Web server is established and maintained by client connect request, then a streaming connection is evoked by client through which Web server streams data down to the client with no poll overhead. But these client-to-server messages are not sent over the streaming connection, instead an internal HTTP connection was used to send data for the duration of the operation. Through database, server and client programming, the construction of web-based irrigation control system and the realization of the real time data push mechanism were implemented. Then tests were carried out to quantitatively assess real-time performance of data acquisition and instruction sending process. The result showed that: the average delay of the data acquisition process was 1.7 seconds, the average delay of the control process was 3.4 seconds, and the real-time performance could basically meet the needs of equipment control and irrigation decision-making. The average delay of one-way data transmission in the software system was no more than 130 milliseconds. The delay factors of the data pull mode were totally eliminated, and this improvement plays an important role in enhancing overall real-time performance of system. The results of this paper showed that, through the reasonable design and development, the real-time performance of the Web based irrigation control system can reach the level of desktop control system. When the system is accessed through internet or 4G mobile communication network, the delay is on the hundreds milliseconds level, which has little effect on the real-time performance of the system. The data push scheme can also be applied to other related monitoring and control software system in internet of things, which can improve the real-time performance with low cost.

相似文章

计量
文章访问数: 7
HTML全文浏览量: 0
PDF下载量: 0

所属期刊

推荐期刊