海水淡化设备相关协议解析及数据转发软件设计

 2022-07-12 09:07

论文总字数:38013字

摘 要

近年来随着全球人口的飞速增长以及人类活动对淡水资源的不断破坏,淡水的短缺已成为影响人类可持续发展的重要因素,世界上有近20亿人口还处于缺乏淡水资源的状态。在我国,淡水资源短缺的形势也不容乐观,我国人均淡水拥有量还不及世界平均水平的百分之三十。而地球上的海水资源十分丰富,利用海水淡化系统将大量的海水转变为可以供人饮用的淡水无疑可以大大缓解淡水资源匮乏的问题。

本研究所设计的“海水淡化系统相关设备数据协议解析及转发软件”,正是用于海水淡化系统设备的数据监控和转发工作,可以帮助工作人员方便地在工控机界面或者后台服务器观察海水淡化系统各设备的工作参数运行状况,从而维护海水淡化系统的正常运行。为此本研究拟设计出一款用于工控机(IPC)的相关数据解析、展示及转发软件,该软件根据实际情况和需求对海水淡化系统相关设备(如风力发电机组,电池管理系统,交直流能量调控装置,反渗透海水淡化装置,微网系统电控柜硬件点表等)与工控机之间相互传输的信息照各相关协议进行解析,得到各个设备的各项工作状态参数,将解析得到的各项有效数据通过软件的图形用户界面(GUI)显示出来,同时软件还会按实际需求转发这些数据至后台服务器的数据库,以便于远程监控海水淡化系统各设备的工作状态。

本设计软件采用Python3.6编程分析用户所选择的PCAPNG Wireshark数据包文件,根据实际协议解析得到各项有效数据;并利用QML语言结合Qt Quick模块创建图形化用户界面;再通过PyQt5将QML设计的界面和Python应用程序结合起来,从而使得基于QML设计的图形用户界面能够动态及时地显示Python脚本中进行的协议解析过程所得到的各项数据;同时软件程序会通过pymysql模块连接到已启动的MySQL5.7.9后台服务器data_repost中已建立的equipment数据库,并且按实际需求将解析得到的数据插入该后台服务器数据库的相应表中。该软件使用便捷,可以高效地对海水淡化系统各设备的数据进行协议解析得到有效数据并将这些数据动态地展示在图形用户界面中,还可以准确地完成数据的后台转发工作,为海水淡化系统各设备的监控和维护工作提供了有力的支持,提高了相关人员的工作效率,帮助整个海水淡化系统持续工作在正常状态。

关键词:海水淡化,数据协议解析,Python3 PyQt5 QML,数据转发,MySQL数据库

Abstract

In recent years, with the rapid growth of the global population and the continuous destruction of freshwater resources by human activities, the shortage of freshwater has become an important factor affecting the sustainable development of humankind. There are nearly 2 billion people in the world still lacking freshwater resources. In China, the issue of shortage of fresh water resources is not optimistic. China’s per capita fresh water possession is still less than 30 percent of the world average. While the sea is rich in water resources on the earth, the use of seawater desalination systems to convert large quantities of seawater into freshwater for human consumption will undoubtedly greatly alleviate the situation of shortage of freshwater resources.

The "Data and Protocol Analysis and Forwarding Software for Seawater Desalination System Equipment" designed in this study is used to monitor and relay equipment data for seawater desalination systems. It can help operators to easily observe the operating parameters of equipment of the seawater desalination system at the IPC graphical interface or background server database to maintain the normal operation of the seawater desalination system. For this purpose, this study intends to design an application software which can analyze, display and forward related data on the IPC. This software analyzes the information transmitted between the equipment(such as wind turbines, battery management systems, AC and DC energy control devices, desalination equipment)and the IPC according to the relevant protocols based on the actual situation and needs of the seawater desalination system .And the parsed items of data are dynamically displayed through the software's graphical user interface (GUI).In the meantime, these data can be forwarded to the background server database by the application software according to actual needs. Therefore it would be possible to monitor the working status of equipment remotely.

The application software uses Python 3.6 programming to analyze the PCAPNG Wireshark data packet which can be selected by the user, and obtains various valid data according to the process of network protocol analysis, and take advantage of the QML language combined with the Qt Quick module to create the graphical user interface, and integrate the interface designed by QML with the Python application software for protocol analysis through PyQt5 in order to show the parsed data in the graphical user interface. At the same time, the software program is connected to the already established equipment database in the background server of the MySQL 5.7.9 through the pymysql module, and insert the parsed data into the corresponding table of the background server database according to actual needs. The software is easy to use and can efficiently analyze the data of each device of seawater desalination system to obtain valid data and display the data in the graphical user interface dynamically. It can also accurately complete the work of relaying parsed data to the background server database. This application software provides strong support for the work of monitoring and maintaining the equipment of the seawater desalination system, which can effectively improve the working efficiency of operators and keep the whole desalination system operating normally.

KEY WORDS: seawater desalination, data and protocol analysis, Python3 PyQt5 QML, data forwarding, MySQL database

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 研究背景 1

1.2 研究意义 2

1.3 研究现状 3

1.4 研究内容 3

第二章 总体设计 5

2.1 需求分析 5

2.1.1 总体功能需求 5

2.1.2 开发环境需求 6

2.2 设计工具及相关平台 6

2.2.1 Python3.6 6

2.2.2 JetBrains PyCharm 2018.1.3 7

2.2.3 PyQt5工具集模块 7

2.2.4 Qt Quick2.5 7

2.2.5 MySQL5.7 7

2.2.6 MySQL管理工具(Navicat for MySQL) 7

2.3 总体设计方案 8

2.4 总体设计方案流程图 8

2.5 软件总体架构设计 9

2.5.1 主程序文件 10

2.5.2 界面设计文件 10

2.5.3 MySQL数据库表文件 11

2.5.4 辅助文件 11

2.5.5 网络数据封包文件 11

第三章 数据协议解析设计 12

3.1 协议解析设计思路 12

3.2 设计方案总结 19

3.3 协议解析核心代码设计 19

第四章 用户界面和数据展示软件设计 22

4.1 用户界面设计 22

4.1.1 Python3 PyQt5 QML设计界面 22

4.1.2 设计文件选择对话框 22

4.1.3 标签式界面设计 23

4.1.4 界面设计效果 24

4.2 数据展示软件设计 29

剩余内容已隐藏,请支付后下载全文,论文总字数:38013字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;