SCI论文(www.lunwensci.com)
摘 要:为解决水质污染物数据采集传输系统中多任务事件响应及数据传输不稳定问题,将数据采集传输功能分为若干子 任务模块,引入状态机理论作为多任务调度研究理论基础,设计线程级多任务并行模型作为调度研究支持,由状态机维护多任 务、多线程数据请求,基于实际数据采集过程中建立采集传输事件与控制任务的关联关系,实现对采集传输事件的快速响应。 采用基于线程级多任务并行模型调度方法实现自检、告警、配置和通信等功能,利用互斥锁达到通道隔离目的,提高系统的抗 干扰性。最后对采集传输系统进行实地污染物数据采集监测实验。实验表明 :基于状态机与线程级多任务并行模型的调度方法 可以有效稳定地完成数据的采集和传输。
关键词:环保专用,多线程,多任务调度,任务判别状态机,线程级多任务并行模型
Data Acquisition Transmission Scheduling Design Based on State Machine and Thread-level Multitasking Parallel Model
WANG Rongjie, SUN Yu, LIU Wenjun, CHEN Genhua, FENG Xiangsheng, HUANG Zhikai
(Nanchang Institute of Technology, School of Information Engineering, Nanchang Jiangxi 330224;Jiangxi Yishan Environmental Protection Co., Ltd., Nanchang Jiangxi 330224)
【Abstract】: To solve the problem of multi-task event response and data transmission instability in the water quality pollutant data collection and transmission system, the data collection and transmission function are divided into several sub-task modules, and the state machine theory is introduced as the theoretical basis for multi-task scheduling research, the thread-level multi-task parallel model is designed as scheduling research support, and the correlation between the collection and transmission events and control tasks is established based on the actual data collection process by the state machine maintains multi-task and multi-thread data requests to achieve fast response to acquisition and transmission events. The thread-level multi-task parallel model scheduling method is used to realize the functions of self-test, alarm, configuration, and communication, and the use of mutual exclusion lock to achieve the purpose of channel isolation and improve the anti-interference of the system. Finally, field pollutant data collection and monitoring experiments are conducted on the collection and transmission system. The experiments show that the scheduling method based on a state machine and thread-level multitasking parallel model can effectively and stably complete the data acquisition and transmission.
【Key words】: special for environmental protection;multi-threaded;multitasking;task discriminative state machine; thread-level multitasking parallel model
0 引言
水质的在线自动监测技术是现代水质安全装备的重 要支持技术之一。针对水质在线自动监测装备中关于数 据如何高效、稳定传输的问题展开研究具有典型意义和 实用价值。
1 水质在线监测系统简介
1.1 整体系统结构
水质在线监测系统自下而上分为物理层、驱动层、 表示层,如图 1 所示。
1.2 软件结构
水质在线监测软件系统主要由如图 2 所示功能模块 组成。
2 基于状态机的多任务调度研究
水质在线监测系统在数据监测传输过程中会处于很 多不同的运行状态,根据实际监测传输过程可以大致分 为如表 1、表 2 所示的 6 种运行状态及其对应关系。
根据实际水质监测过程总结出如图 3 所示的状态转 移和命令发起、接收图。
3 多任务调度方案的性能分析
3.1 数据延迟问题分析
为了解决监测数据延迟问题,论文设计采用线程级多任务并行模型的调度方法实现监测数据低延迟,高精 度目的。从线程调度方面考虑,论文提出的基于线程级多任务并行模型方案,通过优化线程的执行,最大限的 提高线程的执行数,同时通过将任务队列放入线程队列 中,在启停线程过程中完成任务的访问和执行,提升系 统资源利用率,以降低数据传输的延迟问题。
如图 4 所示的线程级多任务并行模型可以巧妙的将 多任务调度延迟问题转为优化多线程执行数和执行顺序 问题。可有效解决如何优化各类监测任务执行过程中出 现的线程执行顺序和执行数目问题。如图 5 所示。
3.2 监测事件响应速度分析
采用在逐个线程中将监测事件与控制任务绑定,在 每个线程执行过程中设有互斥锁管理线程资源,并对每 个子任务设有状态机的方式对监测事件进行响应,由状 态机维护事件下达给子任务的命令来源。将标志以特征 字段的形式放入数据包中与具体任务绑定,当接收数据 的调用者收到监测控制命令后则不需要单独查询标志直接执行与该监测事件绑定的线程任务。
4 水质在线监测系统监测实况
实验中为验证论文提出的调度方案,通过监测总 磷、总氮、氨氮、化学需氧量等污染因子模拟多任务环 境,验证论文提出的多线程、多任务调度方案, 实验结 果表明 :数据实时性好,数据量大时,丢包率低,传输 稳定性高。如图 6 所示。
5 结论
(1)提出一种基于任务判别状态机的水质在线监系 统多任务调度方法。通过研究分析,论文方法采用将监 测事件与监测子任务以特征字段标志的形式绑定,在每 个线程中均以状态机的形式维护事件命令,解决水质监测事件响应延迟与数据延迟问题。
(2)提出一种线程级多任务并行模型,可以有效解 决数据传输中存在的数据延迟问题。
参考文献
[1] 谢凯,赵转社,胡少英,等.水调自动化系统高性能数据处理软 件设计[J].水电自动化与大坝监测,2012.36(1):23-25.
[2] 陈玥,王海峰,贾建鑫,等.基于海量异构传感器的物联网水质 监测系统[J].计算机应用与软件,2020.37(5):1-8+37.
[3] 黄智雯.无人船水质参数采集与分析软件系统的设计与开发 [D].海口:海南大学,2019.
[4] 刘应明,廉东本.数据交换平台的任务调度模型设计[J].小型 微型计算机系统,2013.34(7):1543-1547.
[5] 何琨.多任务调度问题的研究与实现[D].武汉:华中科技大 学,2006.
[6] 贾燚星,陈梦东,刘连忠.基于任务的数据交换平台[J].计算机 工程,2008(19):61-63+66.
[7] CHEN Z,JIANG P,ZHENG S,et al.An Adaptive Data Cleaning Framework:A Case Study of the Water QualityMonitoring System in China[J].Hydrological Sciences Journal,2022.67(7).
[8] Thakur Anupma,Devi Pooja.A Comprehensive Review on Water Quality Monitoring Devices: Materials Advances,Current Status,and Future Perspective[J]. Critical reviews in analytical chemistry,2022.
[9] DUAN H S,XIE D.Design and Development of Smart Water Quality Early Warning System[J].Environment, Resource and Ecology Journal,2022.6(2).
[10] Kelefouras Vasilios,Djemame Karim.Workflow simulation and Multi-threading Aware Task Scheduling for Heterogeneous Computing[J].Journal of Parallel and Distributed Computing,2022.168.
[11] Mohammed Yousuf Uddin,Hikmat Awad Abdeljaber, Tariq Ahamed Ahanger.Development of a Hybrid Algorithm for efficient Task Scheduling in Cloud Computing environment using Artificial Intelligence[J]. International Journal of Computers Communications & Control,2021.16(5).
关注SCI论文创作发表,寻求SCI论文修改润色、SCI论文代发表等服务支撑,请锁定SCI论文网!
文章出自SCI论文网转载请注明出处:https://www.lunwensci.com/jisuanjilunwen/53211.html