摘要
基于多源海洋数据的信息平台开发与应用研究
科教兴国,海洋强国。中国是一个正在高速发展的沿海大国,具有丰富海洋
资源和海洋科学数据,作为国家基础战略资源,是认识海洋,发展海洋的重要战
略前提。但是海洋数据丰富和繁杂,公众如何根据自己所需要的信息从海量的数
据文件中获取有效的数据文件,以及如何保证信息的实时性,成为了当今海洋数
据共享的一大重点课题。
论文围绕着多源海洋数据的信息平台的开发,首先分析了 B/S 与 C/S 架构对
平台建设的基础性方向的决定性、不同开发语言对于所选择架构的支持性、开发
语言的已有框架等平台开发的相关技术,同时对平台相关流程及数据库建设进行
了具体研究。
在确定平台架构,开发语言,所选框架的基础上,选取了最为合适的主流数
据库,并根据海洋数据的时效性和多样性等特点,采取了最为合理的数据组织与
管理方式,建立了符合当前海洋数据文件的数据库;设计并实现了海洋数据分类
展示,海洋数据分类查找,时效性更新,海洋数据文件及时下载等功能。
结合实际的现有海洋数据文件,根据不同类型分类展示,对海洋数据关键要
素进行了直接展示,方便公众获取直接有效地海洋数据,主要工作如下:
1.对平台所采用的相关技术进行研究,包括 Bootstrap 前端框架、Web 服务器
网关接口、B/S 架构模型、MySQL 数据、Python-flask Web 框架及关键模块。研究
结果为使用 B/S 三层架构模型,以网站的形式,降低了海洋数据的获取门槛,使
大量基础数据向公众进行开放。采用 MySQL 将海量的数据文件存储在云端,保障
数据的安全性与及时的有效性,不同类别的海洋数据以模型的方式,利用 Python-
flask 框架映射至 MySQL 数据,各类海洋数据文件独立性强,耦合性低,方便用
户下载。
2.对海洋数据信息平台的需求进行分析,涵盖业务功能需求及性能需求,给出
了平台的需求用例,最后得出开发此平台的可行性。
3.通过对平台的总体设计,从宏观的角度分析平台的开发,包括平台的架构设
计、框架设计、模块设计、数据库设计等。根据对平台的总体设计着手开发与实
现平台的工作,对平台主要功能模块的具体实现代码与最终效果进行了解释与说
明,最后根据平台的运行环境及其他要求进行了部分关键环节的测试。
经过严谨的分析与开发实现,目前平台最初的设计目前已经基本达到,后期
还要不断的完善平台功能,更好地服务于海洋数据信息的广阔领域。
关键词:海洋数据 信息平台 Python B/S 架构 Python-flask 框架
Abstract
Development and Application of Information Platform Based on
Multi-source Ocean Data
Science and education rejuvenate the country, the ocean powers. China is a coastal
country with rapid development. It is rich in marine resources and marine scientific data.
As a national basic strategic resource, it is an important strategic premise for
understanding the ocean and developing the ocean. However, ocean data is rich and
cumbersome. How the public can obtain effective data files from massive data files
according to the information they need, and how to ensure the real-time information, has
become a major issue in marine data sharing.
The paper revolves around the development of information platform for multi-source
ocean data. Firstly, it analyzes the decisiveness of B/S and C/S architecture on the basic
direction of platform construction. The support language of different development
languages supports the selected architecture. Relevant technologies for platform
development such as frameworks, and specific research on platform-related processes and
database construction.
On the basis of determining the platform architecture, development language, and
selected framework, the most suitable mainstream database was selected, and according
to the timeliness and diversity of marine data, the most reasonable data organization and
management methods were adopted, and the conformity was established. The current
database of marine data files; designed and implemented marine data classification
display, marine data classification and search, time-sensitive update, and timely
download of marine data files.
Combined with the actual existing marine data files, according to different types of
classification and display, the key elements of marine data are directly displayed to
facilitate the public to obtain direct and effective marine data. The main work is as follows:
1. Research on related technologies used by the platform, including Bootstrap front-
end framework, Web server gateway interface, B / S architecture model, MySQL data,
Python-flask network framework and key modules. The result of the study is that using
the B/S three-tier architecture model, in the form of a website, the threshold for obtaining
ocean data is lowered, and a large amount of basic data is opened to the public. MySQL
is used to store massive data files in the cloud to ensure data security and timely validity.
Different types of ocean data are modeled, using Python's flask framework to map to
MySQL data, and various ocean data files are independent. Strong, low coupling, easy
for users to download.
2. Analyze the requirements of the marine data information platform, cover the
business function requirements and performance requirements, give the use cases of the
platform, and finally draw the feasibility of developing this platform.
3. Through the overall design of the platform, analyze the development of the
platform from a macro perspective, including platform architecture design, framework
design, module design, database design and so on. According to the overall design of the
platform, the development and implementation of the platform was started. The specific
implementation code and final effect of the main functional modules of the platform were
explained and explained. Finally, some key links were tested according to the operating
environment of the platform and other requirements.
After rigorous analysis and development, the initial design of the platform has been
basically achieved, and the platform function will be continuously improved in the later
stage to better serve the broad field of marine data information.
Key words: Ocean Data,Information platform,B/S Framework,Python-
flask Frame,Python
目 录
第 1 章 绪论 .....................................................................................................................................1
1.1 研究背景 ...........................................................................................................................1
1.2 研究的目的与意义.........................................................................................................2
1.3 国内外研究现状 .............................................................................................................3
1.4 研究内容 ...........................................................................................................................5
第 2 章 平台相关技术研究 ..........................................................................................................6
2.1 Bootstrap 前端框架 .........................................................................................................6
2.2 Web 服务器网关接口.....................................................................................................7
2.3 B/S 架构模型 ....................................................................................................................8
2.3.1 B/S 架构模型与 C/S 架构模型的介绍与比较 ............................................8
2.3.2 B/S 结构的特点和优势......................................................................................9
2.4 MySQL 数据库.................................................................................................................9
2.4.1 MySQL 数据库介绍 ...........................................................................................9
2.4.2 MySQL 数据库所需关键知识 ......................................................................10
2.5 Python-flask web 框架及关键模块...........................................................................11
2.5.1 Python-flask 框架介绍.....................................................................................11
2.5.2 Flask-Uploads 模块...........................................................................................12