patents.google.com

CN108594330A - Automatic meteorological data monitoring system based on Cloud Server - Google Patents

  • ️Fri Sep 28 2018

CN108594330A - Automatic meteorological data monitoring system based on Cloud Server - Google Patents

Automatic meteorological data monitoring system based on Cloud Server Download PDF

Info

Publication number
CN108594330A
CN108594330A CN201711459860.1A CN201711459860A CN108594330A CN 108594330 A CN108594330 A CN 108594330A CN 201711459860 A CN201711459860 A CN 201711459860A CN 108594330 A CN108594330 A CN 108594330A Authority
CN
China
Prior art keywords
data
cloud server
main control
meteorological
meteorological data
Prior art date
2017-12-28
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711459860.1A
Other languages
Chinese (zh)
Inventor
张颖超
胡全辉
景元
杨星
郝曼
田野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Information Science and Technology
Original Assignee
Nanjing University of Information Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
2017-12-28
Filing date
2017-12-28
Publication date
2018-09-28
2017-12-28 Application filed by Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
2017-12-28 Priority to CN201711459860.1A priority Critical patent/CN108594330A/en
2018-09-28 Publication of CN108594330A publication Critical patent/CN108594330A/en
Status Pending legal-status Critical Current

Links

  • 238000012544 monitoring process Methods 0.000 title claims abstract description 21
  • 240000007651 Rubus glaucus Species 0.000 claims abstract description 15
  • 235000011034 Rubus glaucus Nutrition 0.000 claims abstract description 15
  • 235000009122 Rubus idaeus Nutrition 0.000 claims abstract description 15
  • 238000013515 script Methods 0.000 claims description 16
  • 238000000034 method Methods 0.000 claims description 11
  • WHXSMMKQMYFTQS-UHFFFAOYSA-N Lithium Chemical compound [Li] WHXSMMKQMYFTQS-UHFFFAOYSA-N 0.000 claims description 5
  • 229910052744 lithium Inorganic materials 0.000 claims description 5
  • 238000012545 processing Methods 0.000 claims description 5
  • 230000000295 complement effect Effects 0.000 claims description 4
  • 230000001174 ascending effect Effects 0.000 claims description 3
  • 238000001514 detection method Methods 0.000 claims description 3
  • 238000010586 diagram Methods 0.000 description 8
  • 230000006870 function Effects 0.000 description 7
  • 238000011161 development Methods 0.000 description 5
  • 238000013461 design Methods 0.000 description 4
  • 238000005516 engineering process Methods 0.000 description 4
  • 238000012423 maintenance Methods 0.000 description 4
  • 238000003908 quality control method Methods 0.000 description 4
  • 238000013480 data collection Methods 0.000 description 3
  • 238000004519 manufacturing process Methods 0.000 description 3
  • 238000005259 measurement Methods 0.000 description 3
  • 230000005540 biological transmission Effects 0.000 description 2
  • 238000012546 transfer Methods 0.000 description 2
  • 230000009286 beneficial effect Effects 0.000 description 1
  • 238000004891 communication Methods 0.000 description 1
  • 230000007613 environmental effect Effects 0.000 description 1
  • 238000007689 inspection Methods 0.000 description 1
  • 238000009434 installation Methods 0.000 description 1
  • 230000002452 interceptive effect Effects 0.000 description 1
  • 230000000116 mitigating effect Effects 0.000 description 1
  • 230000002265 prevention Effects 0.000 description 1
  • 230000001737 promoting effect Effects 0.000 description 1
  • 238000004092 self-diagnosis Methods 0.000 description 1
  • 230000003068 static effect Effects 0.000 description 1

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01WMETEOROLOGY
    • G01W1/00Meteorology
    • G01W1/02Instruments for indicating weather conditions by measuring two or more variables, e.g. humidity, pressure, temperature, cloud cover or wind speed
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01WMETEOROLOGY
    • G01W1/00Meteorology
    • G01W1/18Testing or calibrating meteorological apparatus
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J9/00Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting
    • H02J9/04Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source
    • H02J9/06Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems
    • H02J9/061Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems for DC powered loads
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Atmospheric Sciences (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Ecology (AREA)
  • Environmental Sciences (AREA)
  • Signal Processing (AREA)
  • Emergency Management (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Power Engineering (AREA)
  • Business, Economics & Management (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

本发明涉及一种基于云服务器的自动气象数据监测系统,包括数据采集模块、网络共享部分和网络设备,所述数据采集模块包括若干不同的数据采集器和主控芯片,网络共享部分包括树莓派装置和云服务器,数据采集器与主控芯片连接,主控芯片与树莓派装置连接,树莓派装置与云服务器通过无线网络连接,网络设备可通过无线网络访问云服务器,所述数据采集模块用于采集气象数据并将气象数据传输到主控芯片,主控芯片用于将气象数据传输到树莓派装置,树莓派装置用于将气象数据上传至云服务器,该系统能实现气象数据的实时监控,使用户能通过无线网络访问。

The invention relates to an automatic weather data monitoring system based on a cloud server, comprising a data acquisition module, a network sharing part and network equipment, the data acquisition module including several different data collectors and main control chips, and the network sharing part including raspberry Pie device and cloud server, the data collector is connected with the main control chip, the main control chip is connected with the raspberry pie device, the raspberry pie device and the cloud server are connected through the wireless network, and the network equipment can access the cloud server through the wireless network, and the data The acquisition module is used to collect meteorological data and transmit the meteorological data to the main control chip, the main control chip is used to transmit the meteorological data to the Raspberry Pi device, and the Raspberry Pi device is used to upload the meteorological data to the cloud server. The system can realize The real-time monitoring of meteorological data enables users to access it through wireless network.

Description

基于云服务器的自动气象数据监测系统Automatic weather data monitoring system based on cloud server

技术领域technical field

本发明涉及一种基于云服务器的自动气象数据监测系统,属于气象监测技术领域。The invention relates to an automatic meteorological data monitoring system based on a cloud server, belonging to the technical field of meteorological monitoring.

背景技术Background technique

自动气象站是指能自动进行地面气象观测、存储和发送观测数据,并能根据需要将观测数据转换成气象电报和编制成气象报表的地面气象观测设备。地面气象观测是综合气象观测的重要组成部分,是我国各级气象观测站所承担的主要任务之一,它在气象预警、防灾减灾中发挥着不可替代的作用。Automatic weather stations refer to ground meteorological observation equipment that can automatically conduct surface meteorological observations, store and send observation data, and convert observation data into weather telegrams and compile weather reports as needed. Surface meteorological observation is an important part of comprehensive meteorological observation and one of the main tasks undertaken by meteorological observation stations at all levels in my country. It plays an irreplaceable role in meteorological early warning, disaster prevention and mitigation.

随着传感器技术和通信技术的发展,气象观测仪器设备更新换代,气象观测自动化逐渐成为现实。传统的气象站都是在采集到温度、湿度、气压、风速、风向、雨量等气象数据后采用有线方式进行数据的传输,而且传统气象监测仪器体积大、重量重、不易拆卸,运输和安装都有很多困难且设备成本与维护费用偏高。在国家大力推行“中国制造2025”与“互联网+”发展战略的大背景下,将实体制造业与互联网相联接,实现制造业发展的良性循环,因此在气象观测领域,气象仪器的无线化、便捷化、智能化便成为了目前自动气象站的发展方向。With the development of sensor technology and communication technology, meteorological observation instruments and equipment are updated, and the automation of meteorological observation has gradually become a reality. Traditional weather stations use wired methods to transmit data after collecting meteorological data such as temperature, humidity, air pressure, wind speed, wind direction, and rainfall. Moreover, traditional weather monitoring instruments are large in size, heavy in weight, difficult to disassemble, and difficult to transport and install. There are many difficulties and the equipment cost and maintenance cost are high. Under the background of the country vigorously promoting the "Made in China 2025" and "Internet +" development strategies, the physical manufacturing industry is connected with the Internet to realize a virtuous circle of manufacturing development. Therefore, in the field of meteorological observation, wireless meteorological instruments, Convenience and intelligence have become the development direction of automatic weather stations.

发明内容Contents of the invention

本发明为了解决现有技术中存在的问题,提供一种基于云服务器的自动气象站数据监测系统。In order to solve the problems in the prior art, the present invention provides a cloud server-based automatic weather station data monitoring system.

为了达到上述目的,本发明提出的技术方案为:一种基于云服务器的自动气象数据监测系统,包括数据采集模块、网络共享部分和网络设备,所述数据采集模块包括若干不同的数据采集器和主控芯片,网络共享部分包括树莓派装置和云服务器,数据采集器与主控芯片连接,主控芯片与树莓派装置连接,树莓派装置与云服务器通过无线网络连接,网络设备可通过无线网络访问云服务器,所述数据采集模块用于采集气象数据并将气象数据传输到主控芯片,主控芯片用于将气象数据传输到树莓派装置,树莓派装置用于将气象数据上传至云服务器。In order to achieve the above object, the technical solution proposed by the present invention is: a cloud server-based automatic meteorological data monitoring system, including a data acquisition module, a network sharing part and network equipment, and the data acquisition module includes several different data collectors and The main control chip, the network sharing part includes the Raspberry Pi device and the cloud server. The cloud server is accessed through a wireless network, and the data acquisition module is used to collect meteorological data and transmit the meteorological data to the main control chip, the main control chip is used to transmit the meteorological data to the raspberry pie device, and the raspberry pie device is used to The data is uploaded to the cloud server.

对上述技术方案的进一步设计为:所述主控芯片还可对所采集的气象数据进行处理,处理过程为对数据进行解析,按照顺序依次检查、加标识位并计算气象要素的瞬时值、算术平均值、极值与滑动平均值,然后对计算出的数值再次进行质量检查,检查完成后将数据重新写入数据包,然后通过串口将处理过的气象数据传输至树莓派装置。The further design of the above technical solution is: the main control chip can also process the collected meteorological data, the processing process is to analyze the data, check in sequence, add identification bits and calculate the instantaneous value of the meteorological elements, arithmetic Average value, extreme value and sliding average value, and then check the quality of the calculated value again. After the check is completed, the data is rewritten into the data packet, and then the processed weather data is transmitted to the Raspberry Pi device through the serial port.

所述主控芯片为STM32F103系列芯片。The main control chip is an STM32F103 series chip.

所述云服务器内设有MySQL数据库,树莓派装置通过远程访问的方式对MySQL数据库进行访问,并插入处理过的气象数据,完成数据更新。The cloud server is provided with a MySQL database, and the raspberry pie device accesses the MySQL database through remote access, and inserts the processed meteorological data to complete the data update.

所述网络设备通过PHP脚本实现对MySQL数据库的访问;访问时需编写获取MySQL数据库中数据表的行数的PHP脚本,以及获取MySQL数据库中数据表内指定条数记录的PHP脚本。Described network device realizes the visit to MySQL database through PHP script; Need to write the PHP script that obtains the number of rows of the data table in the MySQL database when accessing, and the PHP script that obtains the specified number of records in the data table in the MySQL database.

所述获取指定条数记录的PHP脚本是按照时间降序排列获取当前数据表内所有记录中时间最靠前的记录,并按照时间升序排列进行输出。The PHP script for obtaining the specified number of records is to obtain the records with the highest time among all the records in the current data table in descending order of time, and output them in ascending order of time.

本发明的系统还包括供电设备,所述供电设备包括风光互补性太阳能电池,用于对检测系统进行供电。The system of the present invention also includes a power supply device, the power supply device includes a wind-solar complementary solar cell, and is used to supply power to the detection system.

所述供电设备还包括系统后备电源,系统后备电源为12V锂电池组。The power supply equipment also includes a system backup power supply, which is a 12V lithium battery pack.

本发明的有益效果为:The beneficial effects of the present invention are:

本发明中气象监测站与观察者之间通过互联网进行连接,使得数据观察方式更加灵活,用户人员即使不在工作站,通过手机或笔记本等设备上网也能实时查看到气象要素的变化情况。In the present invention, the meteorological monitoring station and the observer are connected through the Internet, so that the data observation method is more flexible. Even if the user personnel are not at the workstation, they can check the changes of the meteorological elements in real time through devices such as mobile phones or notebooks.

本发明中气象站的数据传输实现了无线化,更加方便气象观测站的部署、拆装等活动,降低了气象站观测系统的维护与安装成本。In the present invention, the data transmission of the weather station is wireless, which is more convenient for the deployment, disassembly and assembly of the weather observation station, and reduces the maintenance and installation costs of the weather station observation system.

本发明中气象数据的存储与更新都是在云服务器中完成,节省大量硬件内存,同时降低了由于突发情况导致监测数据丢失的风险。The storage and update of meteorological data in the present invention are all completed in the cloud server, which saves a large amount of hardware memory and reduces the risk of monitoring data loss due to emergencies.

本发明所属传感器均采用模块化设计的具有自诊断自校准功能的智能传感器,提高系统运行效率与测量精度,降低系统整体功耗。使得运行更加稳定可靠,同时便于系统的后期维护与拆装。The sensors of the present invention all adopt modularized intelligent sensors with self-diagnosis and self-calibration functions, which improve system operating efficiency and measurement accuracy, and reduce overall system power consumption. It makes the operation more stable and reliable, and at the same time facilitates the later maintenance and disassembly of the system.

本发明中供电系统的设计遵循节能环保准则,采用风光互补性太阳能电池供电,同时为提高供电方式的可靠性,并选用高性能12V锂电池作为系统后备电源,保证供电的稳定性。The design of the power supply system in the present invention follows the principles of energy saving and environmental protection, and uses solar cells with complementary wind and solar cells for power supply. At the same time, in order to improve the reliability of the power supply mode, a high-performance 12V lithium battery is selected as the system backup power supply to ensure the stability of power supply.

相对于传统气象站,本发明在结构设计上遵循小型化、低成本化设计原则,在体积上尽量减少占用空间减轻重量,成本上提高性价比;同时,在数据采集过程中对数据进行质量控制,大大提高了数据的准确性与可靠性。Compared with the traditional weather station, the present invention follows the design principle of miniaturization and low cost in terms of structural design, minimizes the occupied space and reduces weight in terms of volume, and improves cost performance in terms of cost; at the same time, the quality control of data is carried out during the data collection process, Greatly improved the accuracy and reliability of the data.

附图说明Description of drawings

图1为本发明整体系统结构图。Fig. 1 is a structural diagram of the overall system of the present invention.

图2为本发明气象数据采集模块结构图。Fig. 2 is a structural diagram of the meteorological data acquisition module of the present invention.

图3为本发明气象数据网络共享部分结构示意图。Fig. 3 is a schematic structural diagram of the meteorological data network sharing part of the present invention.

图4为本发明以风速为代表的数据显示界面折线图。Fig. 4 is a broken line diagram of the data display interface represented by wind speed in the present invention.

图5为本发明以风向为代表的数据显示界面扇形图。Fig. 5 is a fan diagram of the data display interface represented by the wind direction in the present invention.

具体实施方式Detailed ways

下面结合附图以及具体实施例对本发明进行详细说明。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

实施例Example

如图1所示,本实施例的基于云服务器的自动气象数据监测系统包括数据采集模块、网络共享部分和网络设备,数据采集模块包括若干不同的数据采集器和主控芯片,网络共享部分包括树莓派装置和云服务器,数据采集器与主控芯片连接,主控芯片与树莓派装置连接,树莓派装置与云服务器通过无线网络连接,网络设备可通过无线网络访问云服务器。As shown in Figure 1, the automatic meteorological data monitoring system based on the cloud server of the present embodiment includes a data acquisition module, a network sharing part and network equipment, the data acquisition module includes several different data collectors and main control chips, and the network sharing part includes The raspberry pie device and the cloud server, the data collector is connected to the main control chip, the main control chip is connected to the raspberry pie device, the raspberry pie device is connected to the cloud server through a wireless network, and the network equipment can access the cloud server through the wireless network.

本实施例中数据采集模块结构图如图2所示,数据采集器负责对包括气温、相对湿度、大气压力、风速、风向、雨量在内的多种气象要素数据进行采集,数据采集器在设计过程中预留足够接口,研究人员可根据实际需要增加气象要素的采集种类,例如光照强度、空气能见度、空气pm2.5值等其他气象要素。在本实施例中,数据采集模块选用STM32F103作为主控芯片,同时也可根据实际情况选用其它类型的芯片作为主控芯片。各类传感器的选用需充分考虑测量精确度、功耗等情况,均选用模块化处理的智能传感器,降低系统功耗,提高系统运行效率与测量精度,数据采集器采集到数据后传输给主控芯片数据采集模块用于采集气象数据并将气象数据传输到主控芯片,主控芯片用于将气象数据传输到树莓派装置,树莓派装置用于将气象数据上传至云服务器,用户可通过网络设备(计算机、手机等)访问云服务器来获取气象数据。In the present embodiment, the structure diagram of the data acquisition module is as shown in Figure 2. The data collector is responsible for collecting various meteorological element data including air temperature, relative humidity, atmospheric pressure, wind speed, wind direction, and rainfall. Sufficient interfaces are reserved in the process, and researchers can increase the collection types of meteorological elements according to actual needs, such as light intensity, air visibility, air pm2.5 value and other meteorological elements. In this embodiment, the data acquisition module uses STM32F103 as the main control chip, and other types of chips can also be selected as the main control chip according to the actual situation. The selection of various sensors needs to fully consider the measurement accuracy, power consumption, etc., all of which use modularized intelligent sensors to reduce system power consumption, improve system operation efficiency and measurement accuracy, and transmit the data collected by the data collector to the main control The chip data acquisition module is used to collect meteorological data and transmit the meteorological data to the main control chip, the main control chip is used to transmit the meteorological data to the Raspberry Pi device, and the Raspberry Pi device is used to upload the meteorological data to the cloud server. Obtain meteorological data by accessing cloud servers through network devices (computers, mobile phones, etc.).

本实施例中,气象数据采集完成后通过软件设计,对气象数据进行分析与数据质量控制,确保数据的准确性。系统将采集到的不同气象要素数据通过网络传输到服务器,在传输过程中对采集到的数据进行分析,按照格式检查、气候界限值检查、内部一致性检查、时间一致性检查和空间一致性检查,其中实时质量控制不包括空间一致性检查。在一系列检查后,使用中国气象局规定的质量控制码(QC码)对数据进行标志,将处理好后的气象数据进行打包,最后将数据更新到服务器的数据库中进行存储与调用。用户通过网页访问的形式,可以实时查看所采集到的气象数据。In this embodiment, after the meteorological data collection is completed, software design is used to analyze the meteorological data and data quality control to ensure the accuracy of the data. The system transmits the collected data of different meteorological elements to the server through the network, and analyzes the collected data during the transmission process, according to the format check, climate threshold check, internal consistency check, time consistency check and space consistency check , where real-time quality control does not include spatial consistency checks. After a series of inspections, use the quality control code (QC code) specified by the China Meteorological Administration to mark the data, package the processed meteorological data, and finally update the data to the server database for storage and recall. Users can view the collected meteorological data in real time through web page access.

图3为本实施例的数据网络共享部分结构示意图,为了搭建一个可以通过网络访问的服务器,本系统选择使用阿里云提供的“云服务器ECS”产品。ECS(Elastic ComputeService,云服务器)是一种简单高效、处理能力可弹性伸缩的计算服务器,通过它可以快速构建稳定、安全的应用,提高运维效率,降低IT成本,使得主要精力都在核心业务的开发上。本是实例中ECS选择了小规格适合小型Web应用的配置。具体配置为:1核心处理器,2GB内存,1Mbps网络带宽。当在实际量产运营时可根据具体情况提高设备配置。对树莓派网卡进行配置时,将网卡IP固定下来,方便通过网卡访问树莓派,本发明中树莓派通过USB无线网卡接入网络。Figure 3 is a schematic diagram of the structure of the data network sharing part of this embodiment. In order to build a server that can be accessed through the network, this system chooses to use the "cloud server ECS" product provided by Alibaba Cloud. ECS (Elastic Compute Service, cloud server) is a simple and efficient computing server with elastically scalable processing capabilities. It can quickly build stable and secure applications, improve operation and maintenance efficiency, reduce IT costs, and focus on core business development. In this example, ECS selects a configuration with a small specification suitable for small web applications. The specific configuration is: 1 core processor, 2GB memory, 1Mbps network bandwidth. When in actual mass production operation, the equipment configuration can be improved according to the specific situation. When configuring the network card of the Raspberry Pi, the IP of the network card is fixed to facilitate access to the Raspberry Pi through the network card. In the present invention, the Raspberry Pi is connected to the network through the USB wireless network card.

数据网络共享部分硬件结构选用的是树莓派三代,树莓派在整个系统中相当于一台小型电脑,数据采集模块将采集完成且经过质量控制后的数据打包发送至树莓派装置中,树莓派作为中转节点,通过远程访问的方式对ECS中的MySQL数据库进行访问,在数据库中插入接收到的气象数据,最终完成数据更新。The hardware structure of the data network sharing part is the third generation of Raspberry Pi. The Raspberry Pi is equivalent to a small computer in the whole system. The data acquisition module packs and sends the collected and quality-controlled data to the Raspberry Pi device. As a transit node, the Raspberry Pi accesses the MySQL database in the ECS through remote access, inserts the received meteorological data into the database, and finally completes the data update.

本实施例约定从STM32数据采集模块通过串口USART发送给树莓派装置的字符串为“ser%s1%s2%s3%s4%s5%s6\r\n”。其中,开始的“ser”用于标识识别,防止乱码的干扰;“s1”、“s2”等表示六种气象元素数据的一种;而“%”是用来分割不同数据的分割标志;最后“\r\n”表示一条字符串结束。因此,在树莓派收到一条数据后,可以通过“ser”来判断数据的开始;通过“\r\n”来判断数据的结束;通过“%”来将不同的气象要素分离出来以备使用。This embodiment agrees that the string sent from the STM32 data acquisition module to the Raspberry Pi device through the serial port USART is "ser%s1%s2%s3%s4%s5%s6\r\n". Among them, the initial "ser" is used for identification and identification to prevent the interference of garbled characters; "s1", "s2" and so on represent one of the six meteorological element data; and "%" is a division mark used to divide different data; finally "\r\n" indicates the end of a string. Therefore, after the Raspberry Pi receives a piece of data, you can use "ser" to judge the beginning of the data; use "\r\n" to judge the end of the data; use "%" to separate different meteorological elements for future use. use.

LNMP指的是一种采用Linux作为操作系统、Nginx作为服务器、MySQL作为数据库、PHP作为服务器脚本的服务器环境。本实施例中,在LNMP环境下,使用HTML、CSS、JavaScript等Web技术来进行系统网页开发。使用HTML编写静态的欢迎界面;通过PHP编写需要访问MySQL数据并进行动态更新的页面。通过使用CSS来对网站中的页面进行布局及美化。LNMP refers to a server environment that uses Linux as the operating system, Nginx as the server, MySQL as the database, and PHP as the server script. In this embodiment, under the LNMP environment, web technologies such as HTML, CSS, and JavaScript are used to develop system web pages. Use HTML to write a static welcome interface; use PHP to write a page that needs to access MySQL data and dynamically update it. Use CSS to layout and beautify the pages in the website.

由于MySQL本身并没有GUI界面,所有的交互操作都是通过命令行实现的。因此,除了上述的LNMP环境外,本发明还使用了phpMyAdmin来对MySQL数据库进行管理。phpMyAdmin是一个开源的、基于PHP编写的软件,可以使操作者通过Web来对数据库进行操作。此外,为了快速上传网站代码,通过sftp(Secure File Transfer Protocol,安全文件传输协议)建立了本地电脑与云端服务器的连接。同时,在购买ESC时,还购买了域名。通过将ECS实例与该域名绑定,就可以通过域名而不是IP地址来访问网站,这样便于使用者记忆和使用,观察人员直接通过访问域名的方式登录网页观察气象数据的变化情况,数据需要保密,可以通过对页面设置访问密码或进行用户认证等方式加强保密性。Since MySQL itself does not have a GUI interface, all interactive operations are realized through the command line. Therefore, in addition to the above-mentioned LNMP environment, the present invention also uses phpMyAdmin to manage the MySQL database. phpMyAdmin is an open source, PHP-based software that enables operators to operate databases through the Web. In addition, in order to quickly upload the website code, a connection between the local computer and the cloud server is established through sftp (Secure File Transfer Protocol, Secure File Transfer Protocol). At the same time, when purchasing ESC, a domain name is also purchased. By binding the ECS instance to the domain name, the website can be accessed through the domain name instead of the IP address, which is convenient for users to remember and use. Observers can directly log in to the webpage by accessing the domain name to observe changes in meteorological data. The data needs to be kept confidential. , you can strengthen the confidentiality by setting access passwords on the page or performing user authentication.

本发明搭建的网站基于Nginx服务器,通过Nginx服务器响应浏览器的请求。当用户通过浏览器访问某个页面时,Nginx会将请求页面中的PHP代码提交给PHP模块,在本发明中PHP代码多实现的是访问MySQL数据库获取所需数据的功能;得到数据库中数据后,PHP模块将完整的处理结果返回给Nginx,然后Nginx将页面返回给浏览器,最后,用户访问的页面显示在自己的浏览器中。The website built by the present invention is based on the Nginx server, and responds to the request of the browser through the Nginx server. When a user visits a certain page through a browser, Nginx will submit the PHP code in the requested page to the PHP module. In the present invention, the PHP code realizes the function of accessing the MySQL database to obtain the required data; after obtaining the data in the database , the PHP module returns the complete processing result to Nginx, and then Nginx returns the page to the browser, and finally, the page visited by the user is displayed in its own browser.

MySQL数据库中数据的访问通过PHP脚本实现的。在PHP脚本中通过使用MySQLi函数集可以十分便捷的访问MySQL数据库。根据本发明需求,分别编写获取数据库中表的行数的PHP脚本,以及获取数据库中表内指定条数记录的PHP脚本。其中,获取指定条数的数据的脚本具体实现的是:按照时间降序排列获取当前表内所有记录中时间最靠前的记录,并按照时间升序排列进行输出。Access to data in the MySQL database is achieved through PHP scripts. It is very convenient to access the MySQL database by using the MySQLi function set in the PHP script. According to the requirements of the present invention, a PHP script for obtaining the number of rows in the table in the database and a PHP script for obtaining the specified number of records in the table in the database are respectively written. Among them, the specific implementation of the script to obtain the specified number of data is: to obtain the records with the highest time among all the records in the current table in descending order of time, and arrange them in ascending order of time for output.

创建完成上述两个PHP脚本后,通过AJAX来对页面中的数据进行更新。AJAX(Asynchronous JavaScript and XML,异步JavaScript和XML)是一种通过现有标准所实现的新的请求数据的方法。AJAX可以在不重新加载整个页面的情况下,实现与服务器的数据交换,并对页面的某一部分内容进行更新。同时AJAX并不需要额外的插件实现,只要浏览器上允许运行JavaScript就可以顺利运行AJAX。本文中,通过AJAX技术,访问上述两个PHP数据库查询脚本,就可以在浏览器端获取到所需的数据库记录。After the above two PHP scripts are created, the data in the page is updated through AJAX. AJAX (Asynchronous JavaScript and XML, asynchronous JavaScript and XML) is a new method of requesting data implemented through existing standards. AJAX can exchange data with the server without reloading the entire page, and update a certain part of the page. At the same time, AJAX does not require additional plug-in implementation, as long as JavaScript is allowed to run on the browser, AJAX can run smoothly. In this article, by accessing the above two PHP database query scripts through AJAX technology, the required database records can be obtained on the browser side.

树莓派可以使用pymysql模块来对MySQL进行访问。通过设置连接服务器的IP(host)、端口(port)、访问用户名(user)、访问密码(passwd)、访问的具体数据库(db)这些参数,可以实现远程的对ECS上MySQL数据库的访问[21]。本发明所实现的远程访问函数包括数据库连接函数、SQL语句执行函数、断开连接函数。Raspberry Pi can use the pymysql module to access MySQL. Remote access to the MySQL database on ECS can be realized by setting parameters such as the connection server's IP (host), port (port), access user name (user), access password (passwd), and the specific database to be accessed (db). [ 21] . The remote access function realized by the present invention includes a database connection function, a SQL statement execution function, and a disconnection function.

本实施例还可以分别为温度、相对湿度、气压、风速、风向、雨量六种气象元素创建图表,其中为风向数据创建扇形图,为其他气象元素数据创建折线图。本发明中使折线图中同时显示12个数据点。接着要为风向创建扇形图,扇形图可以根据具体数据设置风向为16方位图中一个方向,在更新数据时创建一个长度为16的全零数组,并将数组中要显示方向的对应位置的数据设为1,这样便可实现风向的数据的显示。This embodiment can also create charts for six meteorological elements of temperature, relative humidity, air pressure, wind speed, wind direction, and rainfall, among which fan charts are created for wind direction data, and line charts are created for other meteorological element data. In the present invention, 12 data points are simultaneously displayed in the line chart. Next, create a fan chart for the wind direction. The fan chart can set the wind direction as a direction in the 16-position map according to the specific data. When updating the data, create an array of all zeros with a length of 16, and store the data in the corresponding position of the direction to be displayed in the array. Set it to 1, so that the display of wind direction data can be realized.

本实施例的系统中供电方式采用风光互补性太阳能电池供电,利用太阳能电池方阵与小型风力发电机将发出的电能存储到蓄电池组中,用以为系统提供电能,由于气象数据采集要求系统具有连续工作的特性,所以在使用太阳能电池供电的同时在系统中配备高性能12V锂电池组作为系统后备电源,系统默认供电方式选择太阳能电池供电,当太阳能电池提供的电能不足以驱动系统工作时,电压检测电路会检测到低电压,输出报警信号,同时电源切换电路切换至锂电池组继续为系统供电,供电电流一般不超过2000mA。The power supply mode of the system in this embodiment is powered by wind and solar complementary solar cells, and the solar cell square array and small wind generators are used to store the electric energy sent out in the battery pack to provide electric energy for the system. Since the meteorological data collection requires the system to have continuous Due to the characteristics of the work, the system is equipped with a high-performance 12V lithium battery pack as a system backup power supply while using solar cells for power supply. The default power supply mode of the system is powered by solar cells. The detection circuit will detect low voltage and output an alarm signal. At the same time, the power switching circuit switches to the lithium battery pack to continue to supply power to the system. The power supply current generally does not exceed 2000mA.

本发明基于云服务器的自动气象站数据监测系统,将气象站检测到的气象数据以远程访问的方式更新至ECS(Elastic Compute Service,云服务器)中的MySQL数据库中,实现数据的更新与存储,通过上网设备访问系统开发的网页便可以实时查看气象站监测到的气象数据,为增强数据观测的可读性,可以将气象数据采用数据加图形等多种方式展示给观察人员。图4、图5分别为本发明以风速为代表的数据显示界面折线图和以风向为代表的数据显示界面扇形图。The automatic weather station data monitoring system based on the cloud server of the present invention updates the meteorological data detected by the weather station to the MySQL database in the ECS (Elastic Compute Service, cloud server) in the form of remote access to realize data update and storage, By accessing the webpage developed by the system through Internet access devices, the meteorological data monitored by the weather station can be viewed in real time. In order to enhance the readability of data observation, the meteorological data can be displayed to observers in various ways such as data and graphics. Fig. 4 and Fig. 5 are respectively a broken line graph of the data display interface represented by wind speed and a sector diagram of the data display interface represented by wind direction in the present invention.

本发明的基于云服务器的自动气象数据监测系统不局限于上述各实施例,凡采用等同替换方式得到的技术方案均落在本发明要求保护的范围内。The cloud server-based automatic weather data monitoring system of the present invention is not limited to the above-mentioned embodiments, and all technical solutions obtained by adopting equivalent replacement methods fall within the protection scope of the present invention.

Claims (8)

1.一种基于云服务器的自动气象数据监测系统,其特征在于:包括数据采集模块、网络共享部分和网络设备,所述数据采集模块包括若干不同的数据采集器和主控芯片,网络共享部分包括树莓派装置和云服务器,数据采集器与主控芯片连接,主控芯片与树莓派装置连接,树莓派装置与云服务器通过无线网络连接,网络设备可通过无线网络访问云服务器,所述数据采集模块用于采集气象数据并将气象数据传输到主控芯片,主控芯片用于将气象数据传输到树莓派装置,树莓派装置用于将气象数据上传至云服务器。1. a kind of automatic meteorological data monitoring system based on cloud server, it is characterized in that: comprise data acquisition module, network sharing part and network equipment, described data acquisition module comprises some different data collectors and main control chip, network sharing part Including raspberry pie device and cloud server, the data collector is connected to the main control chip, the main control chip is connected to the raspberry pie device, the raspberry pie device is connected to the cloud server through a wireless network, and the network equipment can access the cloud server through a wireless network, The data acquisition module is used to collect meteorological data and transmit the meteorological data to the main control chip, the main control chip is used to transmit the meteorological data to the raspberry pie device, and the raspberry pie device is used to upload the meteorological data to the cloud server. 2.根据权利要求1所述基于云服务器的自动气象数据监测系统,其特征在于:所述主控芯片还可对所采集的气象数据进行处理,处理过程为对数据进行解析,按照顺序依次检查、加标识位并计算气象要素的瞬时值、算术平均值、极值与滑动平均值,然后对计算出的数值再次进行质量检查,检查完成后将数据重新写入数据包,然后通过串口将处理过的气象数据传输至树莓派装置。2. according to the described automatic meteorological data monitoring system based on cloud server of claim 1, it is characterized in that: described main control chip can also be processed to collected meteorological data, and processing process is to analyze data, checks successively according to order , add the identification bit and calculate the instantaneous value, arithmetic mean, extreme value and sliding mean of the meteorological elements, and then check the quality of the calculated value again. After the check is completed, rewrite the data into the data packet, and then process the The processed weather data is transmitted to the Raspberry Pi device. 3.根据权利要求2所述基于云服务器的自动气象数据监测系统,其特征在于:所述主控芯片为STM32F103系列芯片。3. The automatic weather data monitoring system based on cloud server according to claim 2, characterized in that: the main control chip is an STM32F103 series chip. 4.根据权利要求3所述基于云服务器的自动气象数据监测系统,其特征在于:所述云服务器内设有MySQL数据库,树莓派装置通过远程访问的方式对MySQL数据库进行访问,并插入处理过的气象数据,完成数据更新。4. according to the described automatic meteorological data monitoring system based on cloud server of claim 3, it is characterized in that: described cloud server is provided with MySQL database, and raspberry pie device visits MySQL database by the mode of remote access, and inserts processing The weather data has been updated to complete the data update. 5.根据权利要求4所述基于云服务器的自动气象数据监测系统,其特征在于:所述网络设备通过PHP脚本实现对MySQL数据库的访问;访问时需编写获取MySQL数据库中数据表的行数的PHP脚本,以及获取MySQL数据库中数据表内指定条数记录的PHP脚本。5. according to the described automatic meteorological data monitoring system based on cloud server of claim 4, it is characterized in that: described network equipment realizes the visit to MySQL database by PHP script; Need to write and obtain the number of rows of data table in MySQL database during access PHP script, and a PHP script to obtain the specified number of records in the data table in the MySQL database. 6.根据权利要求5所述基于云服务器的自动气象数据监测系统,其特征在于:所述获取指定条数记录的PHP脚本是按照时间降序排列获取当前数据表内所有记录中时间最靠前的记录,并按照时间升序排列进行输出。6. according to the described automatic meteorological data monitoring system based on cloud server of claim 5, it is characterized in that: the PHP script of described acquisition specified number of records is arranged in descending order according to time and obtains the most preceding time in all records in the current data table Record and output in ascending order of time. 7.根据权利要求6所述基于云服务器的自动气象数据监测系统,其特征在于:还包括供电设备,所述供电设备包括风光互补性太阳能电池,用于对检测系统进行供电。7. The automatic weather data monitoring system based on cloud server according to claim 6, characterized in that: it also includes a power supply device, the power supply device includes wind-solar complementary solar cells for powering the detection system. 8.根据权利要求7所述基于云服务器的自动气象数据监测系统,其特征在于:所述供电设备还包括系统后备电源,系统后备电源为12V锂电池组。8. The automatic meteorological data monitoring system based on cloud server according to claim 7, characterized in that: said power supply equipment also includes a system backup power supply, and the system backup power supply is a 12V lithium battery pack.

CN201711459860.1A 2017-12-28 2017-12-28 Automatic meteorological data monitoring system based on Cloud Server Pending CN108594330A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711459860.1A CN108594330A (en) 2017-12-28 2017-12-28 Automatic meteorological data monitoring system based on Cloud Server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711459860.1A CN108594330A (en) 2017-12-28 2017-12-28 Automatic meteorological data monitoring system based on Cloud Server

Publications (1)

Publication Number Publication Date
CN108594330A true CN108594330A (en) 2018-09-28

Family

ID=63633300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711459860.1A Pending CN108594330A (en) 2017-12-28 2017-12-28 Automatic meteorological data monitoring system based on Cloud Server

Country Status (1)

Country Link
CN (1) CN108594330A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109358385A (en) * 2018-10-17 2019-02-19 广东省气象探测数据中心 Intelligent batch calibrating meteorological sensing system and control method
CN110113430A (en) * 2019-05-21 2019-08-09 大连大学 A kind of communication means between mobile phone and raspberry pie based on cloud database
CN110794487A (en) * 2019-10-22 2020-02-14 福建省计量科学研究院(福建省眼镜质量检验站) A calibration device of automatic weather station based on wireless transmission
CN111239853A (en) * 2020-03-06 2020-06-05 南京云狐信息科技有限公司 Automatic meteorological observation system
CN111666471A (en) * 2020-05-21 2020-09-15 平安科技(深圳)有限公司 Information acquisition method and device, computer equipment and storage medium
CN114842584A (en) * 2022-04-19 2022-08-02 常州工学院 Smart access control service method based on RASPBERRY Pi 4B

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268112A (en) * 2013-06-03 2013-08-28 杭州电子科技大学 WSN-based reconfigurable wastewater monitoring system
CN104950769A (en) * 2015-06-24 2015-09-30 江阴市利得电气有限公司 Intelligent electrical equipment environment monitoring system based on cloud computing and big data analysis
CN105335173A (en) * 2014-07-01 2016-02-17 北京奇虎科技有限公司 Method, apparatus and system for initializing intelligent terminal device
CN106198331A (en) * 2016-07-02 2016-12-07 中国人民解放军63680部队 The network environment monitoring system sent based on Arduino and Fructus Rubi
CN106980145A (en) * 2017-03-22 2017-07-25 浙江大学 A kind of meteorological data collection and predictor sent based on raspberry
CN207636796U (en) * 2017-12-28 2018-07-20 南京信息工程大学 Automatic weather data monitoring system based on cloud server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268112A (en) * 2013-06-03 2013-08-28 杭州电子科技大学 WSN-based reconfigurable wastewater monitoring system
CN105335173A (en) * 2014-07-01 2016-02-17 北京奇虎科技有限公司 Method, apparatus and system for initializing intelligent terminal device
CN104950769A (en) * 2015-06-24 2015-09-30 江阴市利得电气有限公司 Intelligent electrical equipment environment monitoring system based on cloud computing and big data analysis
CN106198331A (en) * 2016-07-02 2016-12-07 中国人民解放军63680部队 The network environment monitoring system sent based on Arduino and Fructus Rubi
CN106980145A (en) * 2017-03-22 2017-07-25 浙江大学 A kind of meteorological data collection and predictor sent based on raspberry
CN207636796U (en) * 2017-12-28 2018-07-20 南京信息工程大学 Automatic weather data monitoring system based on cloud server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
侯宝峰 等: "基于树莓派的水源地水质监测系统设计", 微型机与应用 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109358385A (en) * 2018-10-17 2019-02-19 广东省气象探测数据中心 Intelligent batch calibrating meteorological sensing system and control method
CN110113430A (en) * 2019-05-21 2019-08-09 大连大学 A kind of communication means between mobile phone and raspberry pie based on cloud database
CN110113430B (en) * 2019-05-21 2021-12-17 大连大学 Communication method between mobile phone and raspberry pie based on cloud database
CN110794487A (en) * 2019-10-22 2020-02-14 福建省计量科学研究院(福建省眼镜质量检验站) A calibration device of automatic weather station based on wireless transmission
CN111239853A (en) * 2020-03-06 2020-06-05 南京云狐信息科技有限公司 Automatic meteorological observation system
CN111239853B (en) * 2020-03-06 2021-11-16 南京云狐信息科技有限公司 Automatic meteorological observation system
CN111666471A (en) * 2020-05-21 2020-09-15 平安科技(深圳)有限公司 Information acquisition method and device, computer equipment and storage medium
CN114842584A (en) * 2022-04-19 2022-08-02 常州工学院 Smart access control service method based on RASPBERRY Pi 4B

Similar Documents

Publication Publication Date Title
CN108594330A (en) 2018-09-28 Automatic meteorological data monitoring system based on Cloud Server
CN102096399B (en) 2013-10-09 Embedded energy data acquisition unit
CN104660682B (en) 2018-04-27 A kind of OPC data collection and monitoring intelligent terminal based on TD-LTE
CN104269922B (en) 2017-08-08 A kind of distributed power source parameter monitoring method and system based on GPRS/GIS
CN109547538A (en) 2019-03-29 Controller switching equipment condition monitoring system and implementation method based on technology of Internet of things
CN202126611U (en) 2012-01-25 Embedded energy data acquisition device
CN202150874U (en) 2012-02-22 Electric power equipment patrolling and checking system
CN104426950A (en) 2015-03-18 Electric power Internet of things intelligent communication method, system and gateway
Zhang et al. 2020 Transmission tower tilt monitoring system using low-power wide-area network technology
CN205301613U (en) 2016-06-08 But automatic meteorological station of remote access
CN109375289A (en) 2019-02-22 A Visualized Automatic Weather Station System Based on Internet of Things Technology
CN207096479U (en) 2018-03-13 More meteorological elements observe unmanned plane
CN101917666A (en) 2010-12-15 Mobile Farmland Intelligent Data Acquisition System and Method
CN101873349B (en) 2016-03-09 The multinode real-time power consumption monitoring system in the environment of wireless sensor network
CN207851060U (en) 2018-09-11 Landslide early-warning based on Internet of Things monitors system
CN207541042U (en) 2018-06-26 Air quality detection system based on high in the clouds
CN207636796U (en) 2018-07-20 Automatic weather data monitoring system based on cloud server
CN209624809U (en) 2019-11-12 A kind of visualization automatic weather station system based on technology of Internet of things
CN105610911A (en) 2016-05-25 Wind power mobile monitoring system and method based on private cloud
CN104281109A (en) 2015-01-14 Energy data collecting device and method
CN108449434A (en) 2018-08-24 A building energy consumption data acquisition system
CN208026588U (en) 2018-10-30 ZigBee wireless campus network environment monitoring device based on solar energy
CN107196861A (en) 2017-09-22 Modularization intelligent environmental monitoring router
CN203422647U (en) 2014-02-05 Energy data acquisition device
CN206726117U (en) 2017-12-08 A kind of photovoltaic data collection process device

Legal Events

Date Code Title Description
2018-09-28 PB01 Publication
2018-09-28 PB01 Publication
2018-10-26 SE01 Entry into force of request for substantive examination
2018-10-26 SE01 Entry into force of request for substantive examination
2024-05-14 RJ01 Rejection of invention patent application after publication
2024-05-14 RJ01 Rejection of invention patent application after publication

Application publication date: 20180928