Font Size: a A A

Design Of Storage System For Automatic Weather Station Data Collector Based On SQLite

Posted on:2020-08-13Degree:MasterType:Thesis
Country:ChinaCandidate:H XiaoFull Text:PDF
GTID:2370330623457541Subject:Electronics and Communications Engineering
Abstract/Summary:PDF Full Text Request
Data collector is the core of an automatic weather station and is mainly used for data acquisition,data processing,data storage and data transmission.Data collectors have always used ordinary binary files and text files to store various weather element data after processing.With the birth and development of embedded databases,problems such as complex application design,low efficiency,and poor data security performance are gradually highlighted because of using ordinary files to store large amounts of data.More and more embedded devices are beginning to port embedded databases to manage it's data,such as mobile phone et al.This paper analyzes and studies the problems existing in the data storage technology of data collector in current automatic weather station,and discusses three common embedded databases and the feasibility of solving the data storage problem of data collector in several different aspects.After comparison,SQLite is selected to apply in the collector platform.The design of collector data management system based on SQLite embedded database can be divided into two parts:(1)Design of the data storage method.A database file storing meteorological element data is generated every day,and each data table in the database stores meteorological element data of a combined structure of the day.There are two kinds of data tables.The database table in the internal FLASH memory stores entire record as a field in a binary format and one which in the external CF card stores each element as a field in the original type.(2)Design of the data management function.The basic management functions mainly include data storage,reading,deletion,etc.,which are implemented by INSERT,SELECT,and DELETE commands respectively.These commands are invoked through the simple APIs provided by SQLite.At the same time,the database damage repair function is designed by using the backup mechanism of the database.The above functions are finally provided to the collector application in the form of an interface,and the related database operation program is packaged into a dynamic library.This design has been applied to the WUSH-BH data collector and tested in the observation field for three months.The test content includes basic access functions and repair functions in case of abnormal conditions.The test results show that this data storage schemeis simple to implement and has a certain improvement in data access efficiency and data security compared to the traditional method,and it also greatly facilitates the analysis and utilization of data.Therefore,applying embedded database to an automatic weather station data collector is a meaningful attempt in the field of automatic meteorological observation.
Keywords/Search Tags:automatic weather station, data collector, embedded database, SQLite
PDF Full Text Request
Related items