WO2020258007A1 - Atmospheric pollutant unmanned aerial vehicle tracing system and method based on big data technology - Google Patents

Atmospheric pollutant unmanned aerial vehicle tracing system and method based on big data technology Download PDF

Info

Publication number
WO2020258007A1
WO2020258007A1 PCT/CN2019/092685 CN2019092685W WO2020258007A1 WO 2020258007 A1 WO2020258007 A1 WO 2020258007A1 CN 2019092685 W CN2019092685 W CN 2019092685W WO 2020258007 A1 WO2020258007 A1 WO 2020258007A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
big data
chip microcomputer
uav
atmospheric
Prior art date
Application number
PCT/CN2019/092685
Other languages
French (fr)
Chinese (zh)
Inventor
徐鹤
裴苏玉
王汝传
李鹏
朱枫
沙超
徐哲
Original Assignee
南京邮电大学
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.)
Filing date
Publication date
Application filed by 南京邮电大学 filed Critical 南京邮电大学
Publication of WO2020258007A1 publication Critical patent/WO2020258007A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
    • H04N5/772Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera the recording apparatus and the television camera being placed in the same enclosure

Definitions

  • the invention belongs to the field of big data technology, and in particular relates to an air pollutant UAV traceability system and method based on big data technology.
  • air pollution emission sources are often not suitable for manual detection due to environmental factors such as geography, and solutions that deploy sensors at the source of the pollution sources often have the disadvantages of high cost, poor flexibility, and limited deployment control range, and cannot be dealt with in time. Unexpected situation.
  • black-hearted companies If manual pollutant detection is adopted, these black-hearted companies will often falsify during manual monitoring, stop the discharge of pollution sources, and have an adverse impact on the government's environmental governance. Utilizing the air pollutant UAV traceability system can effectively reduce labor costs, improve work efficiency, and contribute to atmospheric environmental governance.
  • the present invention provides a system and method capable of real-time, maneuvering, monitoring, analysis, and tracking of air pollution sources, using the maneuverability of drones to mount sensors to collect basic data of air pollutants, and using big data to store and analyze Frame analysis to trace the source of air pollution.
  • an air pollutant drone traceability system based on big data technology, including drones, single-chip computers, air pollutant detection sensors, atmospheric environment detection platforms, temperature and humidity sensors, hydrogen sulfide sensors, Camera, wireless module, PC computer terminal, big data storage framework HDFS, big data analysis framework MapReduce, the drone is equipped with a camera and a single-chip computer, and the single-chip is equipped with an atmospheric pollutant detection sensor, a temperature and humidity sensor, and hydrogen sulfide Sensors, wireless modules; the single-chip microcomputer includes CPU, DMA, and FLASH storage units; the single-chip microcomputer is connected to the PC computer terminal through the wireless module, and the PC computer terminal is connected to the big data HDFS.
  • the drone is a quadcopter drone.
  • the camera is an OV2640 camera.
  • the single-chip microcomputer is an STM32F407 single-chip microcomputer.
  • the wireless module is an ATK-ESP8266 serial port.
  • the temperature and humidity sensor is a DHT11 temperature and humidity sensor.
  • the hydrogen sulfide sensor is an MQ136 hydrogen sulfide sensor.
  • a method for air pollutant UAV traceability based on big data technology also includes the following specific steps:
  • the UAV is equipped with a single-chip microcomputer, which is equipped with atmospheric basic data detection sensors, and the single-chip microcomputer initializes the sensor configuration;
  • the single-chip microcomputer is equipped with a temperature and humidity sensor to measure the temperature and humidity data near the source of the pollutants;
  • the hydrogen sulfide sensor mounted on the single-chip microcomputer measures the concentration of hydrogen sulfide toxic and harmful gas near the source of the pollutant
  • the single-chip microcomputer drives the camera through the DCMI interface, the camera starts image collection, the data collected by the camera is transferred to the memory of the single-chip microcomputer through DMA, and the CPU uses the image processing program to save the abnormal image information if it detects abnormal image information Stored in the FLASH storage unit built in the microcontroller for subsequent processing;
  • This module is a high-performance wireless transmission module with a built-in TCP/IP protocol stack. If the required serial port configuration has been performed, the module can transmit from the serial port The data is converted into WIFI data, and then real-time information data transmission is carried out with the terminal, while ensuring the stability of the transmission;
  • the PC computer After the PC computer receives the data transmitted from the drone atmospheric environment detection platform, it will display the data on the host computer.
  • the PC computer and the ATK-ESP8266 serial wireless module adopt the customer service server mode, using TCP/IP Protocol, stable data transmission;
  • the data received from the PC is not only displayed on the host computer on the terminal, but also structured and written into a text file;
  • the beneficial effects of the present invention are: the design of the present invention is novel, and the feasibility is high.
  • the present invention proposes an air pollutant drone traceability system based on big data technology, which utilizes the mobile drone
  • the performance and the high-performance single-chip microprocessor onboard can effectively complete the collection of atmospheric pollutants, reduce labor costs and improve work efficiency.
  • the use of the big data storage analysis framework can efficiently analyze air pollutants and trace the source pollutants.
  • the unmanned aerial vehicle used in the present invention is a quadrotor, which has simple mechanics and good flight stability. The way it balances its own weight is to use aerodynamics, which can fly autonomously and fly remotely under human control .
  • the source of air pollutant emissions is often not suitable for human detection due to factors such as geographical environment.
  • some atmospheric pollutants such as hydrogen sulfide gas are toxic and harmful gases. If manual detection is used, it will cause certain harm to the health of the inspectors. Utilizing the vertical take-off and landing and free hovering functions of the four-axis UAV can break through the restrictions of the geographical environment and detect various sources of pollutants, improving efficiency, ensuring the safety of environmental monitoring personnel, and reducing safety risks.
  • the invention uses a four-axis unmanned aerial vehicle to suddenly detect the air pollutant emissions of the enterprise at any time without notifying the enterprise, and record it in time as evidence, and the detection cost is low.
  • High reliability Based on the massive data analysis of big data, it can carry out accurate statistical analysis on the data files of long-term inspection records, and make detailed statistics on the pollution situation of each area tested, and the reliability of the analysis results is high.
  • Figure 1 is a schematic diagram of the structure of the atmospheric environment monitoring platform in the present invention.
  • Figure 2 is a schematic diagram of the big data storage analysis process in the present invention.
  • Fig. 3 is a schematic diagram of the main logic processing flow of the Map() and Reduce() functions of the big data storage analysis part in the embodiment of the present invention.
  • the air pollutant traceability system for drones based on big data technology proposed in the embodiment of the present invention can be divided into two parts, including the design of the drone atmospheric environment detection platform and the large Data storage and analysis part.
  • the design part of the UAV atmospheric environment detection platform is shown in Figure 1.
  • the UAV is equipped with STM32F407 MCU, and uses STM32F407 MCU to drive basic atmospheric detection and acquisition sensor modules, including DHT11 temperature and humidity sensor module, MQ136 hydrogen sulfide toxic gas acquisition module and other air Contaminant sensor module.
  • STM32F407 single-chip microcomputer drives OV2640 image sensor.
  • STM32F407 uses the Cortex-M4 processing core introduced by ARM. Its main frequency can reach 168MHz and has a very high processing speed.
  • the image information collected by the OV2640 sensor can be processed and analyzed in real time.
  • the microprocessor chip has abundant peripheral resources, including 19KB SRAM, two 32-bit timers, and three 12-bit ADC peripherals.
  • the microprocessor chip has a built-in 1024KB FLASH, which has a large enough storage space. It is precisely because of STM32's abundant peripheral resources and sufficient storage space that when the single-chip microcomputer detects abnormal atmospheric environmental pollutants, it can be written into the built-in FLASH of the STM32F407 single-chip microcomputer in time, and the abnormal image information after image processing is stored in the single-chip microcomputer.
  • the built-in FLASH is precisely because of STM32's abundant peripheral resources and sufficient storage space that when the single-chip microcomputer detects abnormal atmospheric environmental pollutants, it can be written into the built-in FLASH of the STM32F407 single-chip microcomputer in time, and the abnormal image information after image processing is stored in the single-chip microcomputer.
  • the built-in FLASH is precisely because of STM32's abundant peripheral resources and sufficient storage space that when the single-chip microcomputer
  • the UAV atmospheric environment detection platform uses the ATK-ESP8266 high-performance serial-wireless module, and the onboard ai-thinker's ESP8266 module communicates with the STM32F407 through the serial port 3. After the UAV atmospheric detection platform has detected the atmospheric pollutant data, it communicates with the PC upper computer terminal through the ESP8266 serial wireless module.
  • the terminal receives and displays the upper computer written by itself to receive the data transmitted by the drone through the ESP8266 serial port-wireless module, and displays the actual data measured by the drone's atmospheric environment detection platform in the upper computer in real time.
  • the capture screen of the OV2640 camera is displayed on the machine.
  • the basic atmospheric data collected by the drone is written into a text file.
  • the data file adopts a structured storage method to specifically record the specific values of various atmospheric indicators in the air pollutant collection area of the drone, and Store the structured data text files on the disk and upload them to the big data storage framework HDFS.
  • Each air pollutant index has the phenomenon of exceeding the standard and the severity of exceeding the standard. Take the analysis of the amount of data collected within a certain period of time as an example, specifically analyze how many days a certain air pollutant indicator in the area has exceeded the standard during the detection period In order to judge the severity of exceeding the standard, the pollution situation of each detected area is finally determined, the source of pollution is traced, and environmental management personnel are notified to focus on rectification.
  • a specific operation method of air pollutant UAV traceability system based on big data technology includes the following parts:
  • the air pollutant sensor acquisition module is driven by the drone equipped with STM32F407 single-chip microcomputer to collect basic air pollutant environmental data.
  • STM32F407 microcontroller drives DHT11 sensor module, which is a digital sensor integrating temperature and humidity.
  • the microcontroller uses a single bus to communicate with the DHT11 module. After the DHT11 module is driven by a single bus, the DHT11 will transmit the temperature and humidity data collected internally to the microcontroller at a time. The microcontroller only needs to transmit the DHT11 through the single bus. Data analysis can get temperature and humidity data.
  • the timer interrupt is turned on to collect the temperature and humidity module, which ensures that the temperature and humidity data can be collected in real time.
  • the MQ136 module is used to collect hydrogen sulfide toxic gas, and the module is powered by 5V voltage. After the sensor module is powered and warmed up, its AOUT pin will automatically output the analog signal, and the ADC peripheral function of the STM32 microcontroller is used to read the AOUT pin The output analog signal quantity is converted into a digital signal quantity.
  • the actual hydrogen sulfide gas is measured for every 0.1V increase in the voltage. Increase the concentration of 200ppm to measure the concentration of hydrogen sulfide gas in the measured environment.
  • the timer is turned on to collect the hydrogen sulfide gas, and the timer interrupt time is 200m, which ensures that the hydrogen sulfide gas can be collected in real time.
  • the camera adopts the OV2640 image sensor produced by OV Company.
  • the OV2640 image sensor has a wealth of functional modules, including analog amplification, analog signal processing for gain control, 10-bit A/D conversion, full-column photosensitive function, and a powerful digital signal processor, including lens compensation and color space conversion , Black and white point compensation, etc.
  • the image sensor module has low operating voltage and small size, which is very suitable for application in the development of embedded systems.
  • the SCCB timing sequence is adopted to drive the 0V2640 camera sensor to realize the initialization of the module and other tasks. Set the transmission rate of the camera sensor, image format and other parameters through SCCB timing.
  • the camera module also comes with an 8-bit microprocessor, which comes with 512 bytes of SRAM and 4KB of ROM, which can fine-tune the image quality.
  • the image data output of the camera OV2640 is under the common control of pixel clock (PLCK), frame synchronization signal (VSYNC) and line synchronization signal (HREF/HSYNC). Shown in Figure 2 is the line output timing of the camera OV2640, when the line synchronization signal HREF is high, output image data. After HREF goes high, one PCLK clock cycle will complete an 8/10-bit data output. In the present invention, an 8-bit interface is used, so a PCLK clock will output one byte. If RGB/YUV is used In the output format, one tp is equal to two Tpclk. If the Raw format is used, one tp is equal to one Tpclk.
  • the steps for STM32 microcontroller to drive OV2640 through DCMI interface are as follows: First, configure the control pins of the camera OV2640, configure the camera's built-in registers, and configure the camera's working mode. After configuring the OV2640, configure the IO port related to the OV2640 module in the DCMI interface on the microcontroller, and enable the related clock, set the related IO mode to the multiplexing function, and select the DCMI multiplexing. Then carry on the relevant configuration of the DCMI interface on the STM32, where the VSPOL and data width parameters are all set through the DCMI_CR register.
  • the image processing part is to process one frame of data collected by the camera.
  • the size of one frame of image data transmitted by DMA is 4800 bytes.
  • the image processing is to process the bytes output by the camera in real time. Save these 4800 (60*80) bytes in a two-dimensional array, which is equivalent to dividing this frame of image into 60 rows, each with 80 bytes. In this way, the processing of one frame of image can be converted into processing the 60 lines of data separately.
  • set a counter to count the number of specified pixels in the frame of image information. When the number of specified pixels reaches a certain threshold, the frame of image data is regarded as abnormal image data, and the frame of image data is saved in The built-in FLASH of the STM32 microcontroller is convenient for later viewing.
  • the PC terminal is connected to the ESP8266 high-performance serial port-wireless module mounted on the drone via WIFI, and the received image data and atmospheric basic data are displayed on the upper computer in real time, and the upper computer is written by QT.
  • the computer is connected to the ATK-ESP8266 module, set the end computer protocol type to TCP Client, and set the corresponding address and port number of the server.
  • the PC and ATK-ESP8266 communicate with each other to send data.
  • the KEY0 button on the microcontroller development board controls the transmission of data from the ATKESP8266 module to the PC, and it can be displayed in real time on the host computer.
  • the upper computer written in QT also has the function of sending data to the ATK-ESP8266 module, and controls the opening and closing of individual functions of the STM32 microcontroller.
  • the basic atmospheric information collected by the drone is written into a file in a structured storage method.
  • Each row of data files records the data collected by the drone during the period.
  • the specific values of temperature, humidity, hydrogen sulfide and other detected gases in the area are written into the disk file.
  • the HDFS storage framework is highly fault-tolerant and can automatically save multiple copies. When a copy is lost, it can be automatically restored to process large amounts of data and ensure data uniqueness.
  • MapReduce is a programming framework for distributed computing programs. MapReduce is easy to program and has good scalability. MapReduce is also highly fault-tolerant. For example, if one of the machines goes down, the tasks on it can be transferred to another node.
  • the MapReduce phase can be divided into Map Task phase and Reduce Task phase.
  • Map() function processes the main business logic
  • Reduce() phase processes the main business logic, as shown in Figure 3 below.
  • MapReduce programming specification it is divided into three stages: Mapper, Reducer, and Driver.
  • Mapper programming stage first convert the text content of the structured stored data file into String, because each line of the data file is the value of various basic atmospheric data such as data collection and recording time, temperature and humidity, hydrogen sulfide, and the data file Separate the data with spaces.
  • map() In the map() function, divide a line of content into words according to the spaces, and save the basic atmospheric data in the String array fields[N], fields[0] are the values of the temperature and humidity indicators , Fields[1] is the value of hydrogen sulfide gas, that is, fields[N] is the value of the N-1 item of atmospheric pollutant data, and then the value of fields[n] is compared with the standard value of the atmospheric index, if If the value exceeds the mark, it will be recorded as exceeding, and the indicator will be output as ⁇ air pollutant, 1>, otherwise the indicator will be output as ⁇ air pollutant, 0>, and the data file will be formed after the map() function is processed A series of new key/value values, that is, a certain air pollutant is the key.
  • Reduce Task phase In the Reduce Task phase, first remotely copy the data generated in the Map Task phase from each Map Task, and for a piece of data, if its size exceeds a certain threshold, it will be written to the disk, otherwise it will be directly placed in the memory, Reduce Task The files in the memory and disk will be merged while copying data remotely. Then the reduce() function written by myself processes the key/value data from Map Task.
  • the data input to the reduce() function is a set of numbers aggregated by key. As long as the value of the same atmospheric data indicator is entered, In the reduce() function, add all the value values in the reduce() function to get the time that the air pollutant exceeds the standard within a certain period of time. Finally, the reduce() function will write the obtained results of various air pollutants exceeding the limit in a certain period of time into the big data storage framework HDFS, and store the analysis results for easy recording and viewing.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Astronomy & Astrophysics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention relates to the technical field of big data. Disclosed are an atmospheric pollutant unmanned aerial vehicle tracing system and method based on big data technology. The method comprises: an unmanned aerial vehicle carrying a single-chip microcomputer, and driving a sensor on the single-chip microcomputer to measure basic atmospheric data information; in addition, using the single-chip microcomputer carried on the unmanned aerial vehicle to drive a camera to photograph and collect evidence, and the single-chip microcomputer analyzing picture information in real time, and storing abnormal pictures obtained through corresponding analysis in an in-built FLASH of the single-chip microcomputer; moreover, using an ATK-ESP8266 serial port to realize communication between an atmospheric environment detection platform of the unmanned aerial vehicle and a ground terminal; and uploading data files to a big data HDFS, and using a big data analysis framework MapReduce for analysis to obtain a pollution condition summary of various pollutant indexes of measured regions, and writing an analysis result into the HDFS, so that environmental protection law enforcement officers can conveniently check and use the pollution condition summary, remediation is focused on severely polluted regions according to the actual conditions, helping to improve the atmospheric environment.

Description

一种基于大数据技术的大气污染物无人机溯源系统及方法Air pollutant UAV traceability system and method based on big data technology 技术领域Technical field
本发明属于大数据技术领域,尤其涉及一种基于大数据技术的大气污染物无人机溯源系统及方法。The invention belongs to the field of big data technology, and in particular relates to an air pollutant UAV traceability system and method based on big data technology.
背景技术Background technique
在现实环境中,由于经济发展阶段的限制,不合理的经济发展方式往往伴随着对环境的破坏。不断恶化的大气环境污染状况导致了很多恶劣的后果。例如危害人体健康,对动植物的生长造成一定的破坏,对长期的经济发展也是有害无益的。随着时代的进步,国家对环境治理工作的重视,经济发展方式的变化,绿色经济的倡导,目前对大气环境的重视程度已经上升到国家层面。在推进工业化和城镇化的进程中,越来越注意大气环境的治理工作。如何快速、准确找到污染物源头进行集中治理就显得尤为重要。而在现实生活中,大气污染排放源往往因为地理等环境因素不适合人工检测,而采用在污染源源头布控传感器的方案往往成本较大、灵活性较差、布控范围有限的缺陷,且无法及时处理突发情况。另外在现实生活中,存在一些黑心企业,若采用人工污染物检测的方式,这些黑心企业往往会在人工监测的时候作假,停止污染源的排放,对政府的环境治理产生不利影响。利用该大气污染物无人机溯源系统可以有效的减少人工成本,提高工作效率,有助于大气环境治理。In the real environment, due to the limitations of the stage of economic development, unreasonable economic development methods are often accompanied by damage to the environment. The deteriorating air pollution situation has led to many bad consequences. For example, it harms human health, causes certain damage to the growth of animals and plants, and is harmful to long-term economic development. With the progress of the times, the state attaches great importance to environmental governance, changes in economic development methods, and the advocacy of green economy. At present, the importance of atmospheric environment has risen to the national level. In the process of advancing industrialization and urbanization, more and more attention has been paid to the governance of the atmospheric environment. How to quickly and accurately find the source of pollutants for centralized treatment is particularly important. In real life, air pollution emission sources are often not suitable for manual detection due to environmental factors such as geography, and solutions that deploy sensors at the source of the pollution sources often have the disadvantages of high cost, poor flexibility, and limited deployment control range, and cannot be dealt with in time. Unexpected situation. In addition, in real life, there are some black-hearted companies. If manual pollutant detection is adopted, these black-hearted companies will often falsify during manual monitoring, stop the discharge of pollution sources, and have an adverse impact on the government's environmental governance. Utilizing the air pollutant UAV traceability system can effectively reduce labor costs, improve work efficiency, and contribute to atmospheric environmental governance.
发明内容Summary of the invention
为了解决上述问题,本发明提供了一种可以实时、机动、监测、分析、追踪大气污染源的系统及方法,利用无人机的机动性能挂载传感器采集大气污染物基础数据,利用大数据存储分析框架分析溯源大气污染源。In order to solve the above problems, the present invention provides a system and method capable of real-time, maneuvering, monitoring, analysis, and tracking of air pollution sources, using the maneuverability of drones to mount sensors to collect basic data of air pollutants, and using big data to store and analyze Frame analysis to trace the source of air pollution.
本发明提供如下技术方案:一种基于大数据技术的大气污染物无人机溯源系统,包括了无人机、单片机、大气污染物检测传感器、大气环境检测平台、温湿度传感器、硫化氢传感器、摄像头、无线模块、PC电脑端、大数据存储框架HDFS,大数据分析框架MapReduce,所述无人机上安装有摄像头和单片机,所述单片机上配置有大气污染物检测传感器、温湿度传感器、硫化氢传感器、无线模块;所述单片机包括CPU、DMA、FLASH存储单元;所述单片机通过无线模块与PC电脑端连接,PC电脑端与大数据HDFS连接。The present invention provides the following technical solutions: an air pollutant drone traceability system based on big data technology, including drones, single-chip computers, air pollutant detection sensors, atmospheric environment detection platforms, temperature and humidity sensors, hydrogen sulfide sensors, Camera, wireless module, PC computer terminal, big data storage framework HDFS, big data analysis framework MapReduce, the drone is equipped with a camera and a single-chip computer, and the single-chip is equipped with an atmospheric pollutant detection sensor, a temperature and humidity sensor, and hydrogen sulfide Sensors, wireless modules; the single-chip microcomputer includes CPU, DMA, and FLASH storage units; the single-chip microcomputer is connected to the PC computer terminal through the wireless module, and the PC computer terminal is connected to the big data HDFS.
进一步,所述无人机为四轴飞行器无人机。Furthermore, the drone is a quadcopter drone.
进一步,所述摄像头为OV2640摄像头。Further, the camera is an OV2640 camera.
进一步,所述单片机为STM32F407单片机。Further, the single-chip microcomputer is an STM32F407 single-chip microcomputer.
进一步,所述无线模块为ATK-ESP8266串口。Further, the wireless module is an ATK-ESP8266 serial port.
进一步,所述温湿度传感器为DHT11温湿度传感器。Further, the temperature and humidity sensor is a DHT11 temperature and humidity sensor.
进一步,所述硫化氢传感器为MQ136硫化氢传感器。Further, the hydrogen sulfide sensor is an MQ136 hydrogen sulfide sensor.
进一步,一种基于大数据技术的大气污染物无人机溯源方法,还包括以下具体操作步骤:Furthermore, a method for air pollutant UAV traceability based on big data technology also includes the following specific steps:
S1、利用四轴飞行器无人机的机动性能,大气环境检测人员可选择手动遥控无人机飞行,控制无人机飞行轨迹,前往要测试的大气污染物排放源头,进行实地检测;S1. Utilizing the maneuverability of the quadcopter drone, atmospheric environment inspectors can choose to manually remotely control the drone to fly, control the drone's flight trajectory, and go to the source of atmospheric pollutant emissions to be tested for on-site inspection;
S2、无人机搭载单片机,单片机上配置大气基础数据检测传感器,单片机初始化传感器的配置;S2. The UAV is equipped with a single-chip microcomputer, which is equipped with atmospheric basic data detection sensors, and the single-chip microcomputer initializes the sensor configuration;
S3、单片机上装载了温湿度传感器测得污染物源头附近的温湿度数据;S3. The single-chip microcomputer is equipped with a temperature and humidity sensor to measure the temperature and humidity data near the source of the pollutants;
S4、单片机上装载的硫化氢传感器测得污染物源头附近的硫化氢有毒有害气体的浓度;S4. The hydrogen sulfide sensor mounted on the single-chip microcomputer measures the concentration of hydrogen sulfide toxic and harmful gas near the source of the pollutant;
S5、单片机通过DCMI接口驱动摄像头,摄像头开始图像采集,摄像头采集到的数据通过DMA的方式传输到单片机的内存中,CPU通过图像处理程序,若检测到异常图像信息,则将该异常图像信息保存在单片机内置的FLASH存储单元中存储下来,以进行后续的处理工作;S5. The single-chip microcomputer drives the camera through the DCMI interface, the camera starts image collection, the data collected by the camera is transferred to the memory of the single-chip microcomputer through DMA, and the CPU uses the image processing program to save the abnormal image information if it detects abnormal image information Stored in the FLASH storage unit built in the microcontroller for subsequent processing;
S6、单片机上配置ATK-ESP8266串口无线模块,该模块高性能的无线传输模块,该模块中内置了TCP/IP协议栈,若已经进行过所需的串口配置,该模块能够将从串口传输来的数据转换成WIFI数据,再与终端进行实时的信息数据传输,同时保证了传输的稳定性;S6. Configure the ATK-ESP8266 serial wireless module on the single chip microcomputer. This module is a high-performance wireless transmission module with a built-in TCP/IP protocol stack. If the required serial port configuration has been performed, the module can transmit from the serial port The data is converted into WIFI data, and then real-time information data transmission is carried out with the terminal, while ensuring the stability of the transmission;
S7、通过无线模块,PC电脑端和ATK-ESP8266串口无线模块联通之后就可以进行双向的数据通信;S7, through the wireless module, after the PC computer terminal and the ATK-ESP8266 serial wireless module are connected, two-way data communication can be carried out;
S8、PC电脑端接收到从无人机大气环境检测平台传送来的数据之后,将数据显示在上位机上,PC电脑端和ATK-ESP8266串口无线模块采用的是客服端服务器模式,采用TCP/IP协议,数据传输稳定;S8. After the PC computer receives the data transmitted from the drone atmospheric environment detection platform, it will display the data on the host computer. The PC computer and the ATK-ESP8266 serial wireless module adopt the customer service server mode, using TCP/IP Protocol, stable data transmission;
S9、PC电脑端接收来的数据不仅显示在终端上的上位机上,还会结构化写入文本文件中;S9. The data received from the PC is not only displayed on the host computer on the terminal, but also structured and written into a text file;
S10、将结构化数据文件上传到大数据存储框架HDFS中,并用大数据分析框架MapReduce进行数据分析,得到被检测的各个地区各项大气污染物的情况汇总,并将分析结果写入大数据存储框架HDFS中,方便环境保护执法人员查看,并根据分析结果,有效对高污染地区重点整治。S10. Upload the structured data file to the big data storage framework HDFS, and use the big data analysis framework MapReduce to perform data analysis to obtain a summary of the air pollutants in each area to be detected, and write the analysis results to the big data storage In the framework of HDFS, it is convenient for environmental protection law enforcement personnel to view, and based on the analysis results, it is effective for key rectification of high pollution areas.
与现有技术相比,本发明的有益效果是:本发明设计新颖,可实现性高,本发明提出了一种基于大数据技术的大气污染物无人机溯源系统,利用无人机的机动性能和搭载的高性能单片机微处理器,能够有效的完成大气污染物的采集工作,减少人工成本,提高工作效率。同时利用大数据的存储分析框架,可以高效的对大气污染物进行分析,溯源污染物。Compared with the prior art, the beneficial effects of the present invention are: the design of the present invention is novel, and the feasibility is high. The present invention proposes an air pollutant drone traceability system based on big data technology, which utilizes the mobile drone The performance and the high-performance single-chip microprocessor onboard can effectively complete the collection of atmospheric pollutants, reduce labor costs and improve work efficiency. At the same time, the use of the big data storage analysis framework can efficiently analyze air pollutants and trace the source pollutants.
高机动性:本发明采用的无人机即四旋翼飞行器,该飞行器机械简单,飞行稳定性好,其平衡自身重量的方式是利用空气动力,既能够自主飞行,又能够在人为控制下遥控飞行。利用了多旋翼无人机良好的机动性能,大气污染物排放的源头往往由于地理环境等因素,不适合人为的进行检测。而且有些大气污染物例如硫化氢气体属于有毒有害气体,若采用人工检测的方式,会对检测人员的健康产生一定的危害。利用四轴无人机的垂直起降,自由悬停的功能,可以突破地理环境的限制,对多样的污染物源头进行检测,提高了效率,保证了环境监测人员的安全,减低了安全风险。High maneuverability: The unmanned aerial vehicle used in the present invention is a quadrotor, which has simple mechanics and good flight stability. The way it balances its own weight is to use aerodynamics, which can fly autonomously and fly remotely under human control . Taking advantage of the good maneuverability of multi-rotor drones, the source of air pollutant emissions is often not suitable for human detection due to factors such as geographical environment. Moreover, some atmospheric pollutants such as hydrogen sulfide gas are toxic and harmful gases. If manual detection is used, it will cause certain harm to the health of the inspectors. Utilizing the vertical take-off and landing and free hovering functions of the four-axis UAV can break through the restrictions of the geographical environment and detect various sources of pollutants, improving efficiency, ensuring the safety of environmental monitoring personnel, and reducing safety risks.
实时性能高:在现实环境中,大气污染物的源头很多都是私有化工企业,在党和国家的大力治理之下,企业已经积极配合对大气污染源的治理工作,但是不乏一些黑心企业,在利益的熏陶下,仍然继续排放大气污染物。若采用人工检测的方式,很难完全避免,排放大气污染源的个别企业弄虚作假,提前关闭污染源的排放,对大气污染源的治理工作造成了很大的阻碍。本发明利用四轴无人机,可以在不通知企业的情况下,随时突发检测企业大气污染物的排放情况,并及时记录下来,作为证据,且检测成本较低。High real-time performance: In the real environment, many of the sources of air pollutants are private chemical companies. Under the vigorous governance of the party and the state, companies have actively cooperated with the control of air pollution sources, but there are many black-hearted companies that are interested in Under the influence of China, air pollutants continue to be emitted. If manual testing is used, it is difficult to completely avoid the fact that individual companies that emit air pollution sources resort to fraud and shut down the emission of pollution sources in advance, which has caused great obstacles to the treatment of air pollution sources. The invention uses a four-axis unmanned aerial vehicle to suddenly detect the air pollutant emissions of the enterprise at any time without notifying the enterprise, and record it in time as evidence, and the detection cost is low.
可靠性高:基于大数据的海量数据分析,能够对长时间检测记录的数据文件进行精确统计分析,对被检测的各个地区的污染情况作详细统计,分析结果的可靠性高。High reliability: Based on the massive data analysis of big data, it can carry out accurate statistical analysis on the data files of long-term inspection records, and make detailed statistics on the pollution situation of each area tested, and the reliability of the analysis results is high.
附图说明Description of the drawings
图1为本发明中大气环境监测平台结构示意图。Figure 1 is a schematic diagram of the structure of the atmospheric environment monitoring platform in the present invention.
图2为本发明中大数据存储分析流程示意图。Figure 2 is a schematic diagram of the big data storage analysis process in the present invention.
图3为本发明实施例中大数据存储分析部分的Map()、Reduce()函数主要逻辑处理流程示意图。Fig. 3 is a schematic diagram of the main logic processing flow of the Map() and Reduce() functions of the big data storage analysis part in the embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
并且,本发明各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。Moreover, the technical solutions between the various embodiments of the present invention can be combined with each other, but they must be based on what can be achieved by a person of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that this combination of technical solutions It does not exist and does not fall within the scope of protection required by the present invention.
请参阅附图1-3,本发明实施例中提出的一种基于大数据技术的大气污染物无人机溯源系统的可以分为两大部分,包括无人机大气环境检测平台设计部分和大数据存储与分析部分。Please refer to Figures 1-3. The air pollutant traceability system for drones based on big data technology proposed in the embodiment of the present invention can be divided into two parts, including the design of the drone atmospheric environment detection platform and the large Data storage and analysis part.
无人机大气环境检测平台设计部分如图1所示,由无人机搭载STM32F407单片机,利用STM32F407单片机驱动基础大气检测采集传感器模块,包括DHT11温湿度传感器模块、MQ136硫化氢有毒气体采集模块等空气污染物传感器模块。同时STM32F407单片机驱动OV2640图像传感器,STM32F407采用的是ARM公司推出的Cortex-M4处理内核,其主频可以达到168MHz,有着极高的处理速度。利用STM32G高性能的处理器芯片,可以实时处理分析OV2640传感器采集到的图像信息。微处理器芯片有着丰富的外设资源,其中包括19KB SRAM、2个32位的定时器、3个12位ADC外设,同时该微处理器芯片内置1024KB FLASH,有着足够大的存储空间。正是由于STM32丰富的外设资源和足够的存储空间,当单片机监测到大气环境污染物异常时,可以及时的写入STM32F407单片机内置的FLASH中,同时将图像处理后异常的图像信息保存在单片机内置的FLASH中。本无人机大气环境检测平台采用ATK-ESP8266高性能串口-无线模块,板载ai-thinker公司的ESP8266模块通过串口3与STM32F407进行通信。当无人机大气检测平台 检测完大气污染物数据后,通过该ESP8266串口无线模块与PC上位机终端进行通信。The design part of the UAV atmospheric environment detection platform is shown in Figure 1. The UAV is equipped with STM32F407 MCU, and uses STM32F407 MCU to drive basic atmospheric detection and acquisition sensor modules, including DHT11 temperature and humidity sensor module, MQ136 hydrogen sulfide toxic gas acquisition module and other air Contaminant sensor module. At the same time, STM32F407 single-chip microcomputer drives OV2640 image sensor. STM32F407 uses the Cortex-M4 processing core introduced by ARM. Its main frequency can reach 168MHz and has a very high processing speed. Using the STM32G high-performance processor chip, the image information collected by the OV2640 sensor can be processed and analyzed in real time. The microprocessor chip has abundant peripheral resources, including 19KB SRAM, two 32-bit timers, and three 12-bit ADC peripherals. At the same time, the microprocessor chip has a built-in 1024KB FLASH, which has a large enough storage space. It is precisely because of STM32's abundant peripheral resources and sufficient storage space that when the single-chip microcomputer detects abnormal atmospheric environmental pollutants, it can be written into the built-in FLASH of the STM32F407 single-chip microcomputer in time, and the abnormal image information after image processing is stored in the single-chip microcomputer. The built-in FLASH. The UAV atmospheric environment detection platform uses the ATK-ESP8266 high-performance serial-wireless module, and the onboard ai-thinker's ESP8266 module communicates with the STM32F407 through the serial port 3. After the UAV atmospheric detection platform has detected the atmospheric pollutant data, it communicates with the PC upper computer terminal through the ESP8266 serial wireless module.
终端接收显示部分由自己书写的上位机来接收无人机通过ESP8266串口-无线模块传输来的数据,并在上位机中实时显示出无人机大气环境检测平台测得的实际数据,并在上位机上显示OV2640摄像头的采集画面。同时以天为单位,将无人机采集到的基础大气数据写入文本文件中,数据文件采用结构化存储的方式,具体记录无人机大气污染物采集地区各项大气指标的具体数值,并将结构化存储的数据文本文件存储到磁盘并上传到到大数据存储框架HDFS中,当采集存储足够多的数据文本文件时,利用大数据分析框架MapReduce进行分析,分析得到具体哪个被检测地区的各项大气污染物指标存在超标的现象及超标的严重程度,以一定时间内的采集数据量分析为例,具体分析该地区某项大气污染物指标在被检测时长内有多少天的超标情况发生以判断超标的严重程度,最终确定各个被检测区域的污染情况,溯源污染源,进而通知环境管理人员重点整治。The terminal receives and displays the upper computer written by itself to receive the data transmitted by the drone through the ESP8266 serial port-wireless module, and displays the actual data measured by the drone's atmospheric environment detection platform in the upper computer in real time. The capture screen of the OV2640 camera is displayed on the machine. At the same time, in units of days, the basic atmospheric data collected by the drone is written into a text file. The data file adopts a structured storage method to specifically record the specific values of various atmospheric indicators in the air pollutant collection area of the drone, and Store the structured data text files on the disk and upload them to the big data storage framework HDFS. When enough data text files are collected and stored, use the big data analysis framework MapReduce to analyze and analyze the specific detected area Each air pollutant index has the phenomenon of exceeding the standard and the severity of exceeding the standard. Take the analysis of the amount of data collected within a certain period of time as an example, specifically analyze how many days a certain air pollutant indicator in the area has exceeded the standard during the detection period In order to judge the severity of exceeding the standard, the pollution situation of each detected area is finally determined, the source of pollution is traced, and environmental management personnel are notified to focus on rectification.
一种基于大数据技术的大气污染物无人机溯源系统的具体操作方法包括了如下部分:A specific operation method of air pollutant UAV traceability system based on big data technology includes the following parts:
1.大气基础信息采集检测1. Atmospheric basic information collection and detection
通过无人机搭载STM32F407单片机驱动大气污染物传感器采集模块,采集基础大气污染物环境数据。The air pollutant sensor acquisition module is driven by the drone equipped with STM32F407 single-chip microcomputer to collect basic air pollutant environmental data.
(1)采集温湿度(1) Collect temperature and humidity
STM32F407单片机驱动DHT11传感器模块,该传感器是温湿度一体的数字传感器。单片机采用单总线的方式和与DHT11模块进行通信,采用单总线的方式驱动DHT11模块后,DHT11会将内部采集到的温湿度数据一次性传给单片机,单片机只需将DHT11通过单总线传送来的数据进行解析即可得到温湿度数据。在STM32单片机中,开启了定时器中断来进行温湿度模块的采集,保证了能够实时的进行温湿度数据的采集。STM32F407 microcontroller drives DHT11 sensor module, which is a digital sensor integrating temperature and humidity. The microcontroller uses a single bus to communicate with the DHT11 module. After the DHT11 module is driven by a single bus, the DHT11 will transmit the temperature and humidity data collected internally to the microcontroller at a time. The microcontroller only needs to transmit the DHT11 through the single bus. Data analysis can get temperature and humidity data. In the STM32 microcontroller, the timer interrupt is turned on to collect the temperature and humidity module, which ensures that the temperature and humidity data can be collected in real time.
(2)硫化氢采集模块(2) Hydrogen sulfide collection module
硫化氢有毒气体的采集采用MQ136模块,采用5V电压给模块供电,给该传感器模块供电预热后,其AOUT引脚会自动输出模拟信号量,采用STM32单片机的ADC外设功能读取AOUT引脚输出的模拟信号量,转换成数字信号量。在没有 硫化氢有毒气体的正常环境下,利用STM32单片机的ADC功能,测得一个电压值作为基础电压值,当处于硫化氢环境中时,根据电压每升高0.1V,实际被测硫化氢气体的浓度增加200ppm来测得实测环境下硫化氢气体的浓度。同样在STM32单片机中,开启了定时器来进行硫化氢气体的采集,定时器中断时间为200m,保证了能够实时进行硫化氢气体的采集。The MQ136 module is used to collect hydrogen sulfide toxic gas, and the module is powered by 5V voltage. After the sensor module is powered and warmed up, its AOUT pin will automatically output the analog signal, and the ADC peripheral function of the STM32 microcontroller is used to read the AOUT pin The output analog signal quantity is converted into a digital signal quantity. In a normal environment where there is no toxic hydrogen sulfide gas, use the ADC function of the STM32 microcontroller to measure a voltage value as the basic voltage value. When in a hydrogen sulfide environment, the actual hydrogen sulfide gas is measured for every 0.1V increase in the voltage. Increase the concentration of 200ppm to measure the concentration of hydrogen sulfide gas in the measured environment. Also in the STM32 single-chip microcomputer, the timer is turned on to collect the hydrogen sulfide gas, and the timer interrupt time is 200m, which ensures that the hydrogen sulfide gas can be collected in real time.
(3)摄像头采集模块(3) Camera acquisition module
摄像头采用OV公司生产的OV2640图像传感器。该OV2640图像传感器具有丰富的功能模块,包括模拟放大、增益控制的模拟信号处理,10位的A/D转换,整列的感光功能,还有强大的数字信号处理器,包括镜头补偿、颜色空间转换、黑白点补偿等。而且图像传感器模块的工作电压低,体积小,非常适合应用在嵌入式系统的开发中。在本设计系统方案中,采用的是SCCB时序来驱动0V2640摄像头传感器,实现对该模块的初始化等工作。通过SCCB时序来设置摄像头传感器的传输速率,图像格式等参数。该摄像头模块还自带了一个8位的微处理器,其中该微处理器自带512字节的SRAM,4KB的ROM,具备微调图像质量的功能。The camera adopts the OV2640 image sensor produced by OV Company. The OV2640 image sensor has a wealth of functional modules, including analog amplification, analog signal processing for gain control, 10-bit A/D conversion, full-column photosensitive function, and a powerful digital signal processor, including lens compensation and color space conversion , Black and white point compensation, etc. Moreover, the image sensor module has low operating voltage and small size, which is very suitable for application in the development of embedded systems. In the system scheme of this design, the SCCB timing sequence is adopted to drive the 0V2640 camera sensor to realize the initialization of the module and other tasks. Set the transmission rate of the camera sensor, image format and other parameters through SCCB timing. The camera module also comes with an 8-bit microprocessor, which comes with 512 bytes of SRAM and 4KB of ROM, which can fine-tune the image quality.
摄像头OV2640的图像数据输出是在像素时钟(PLCK)、帧同步信号(VSYNC)和行同步信号(HREF/HSYNC)的共同控制下进行的。如图2所示的是摄像头OV2640的行输出时序,当行同步信号HREF为高的时候,输出图像数据。在HREF变高之后,一个PCLK时钟周期就会完成一个8/10位的数据输出,在本发明中,采用的是8位接口,这样一个PCLK时钟就会输出一个字节,若采用RGB/YUV的输出格式,一个tp等于两个Tpclk,若采用Raw格式,一个tp等于一个Tpclk。若采用UXGA时序、RGB565格式,那么一个像素的颜色可以由两个字节组成,这样每行有3200个像素时钟,有3200个字节输出。图3表示的是UXGA模式下的帧时序,清楚的表示了摄像头OV2640数据输出的方式。采用图3所示的帧时序读取摄像头数据就可以得到摄像头采集到的图像信息。The image data output of the camera OV2640 is under the common control of pixel clock (PLCK), frame synchronization signal (VSYNC) and line synchronization signal (HREF/HSYNC). Shown in Figure 2 is the line output timing of the camera OV2640, when the line synchronization signal HREF is high, output image data. After HREF goes high, one PCLK clock cycle will complete an 8/10-bit data output. In the present invention, an 8-bit interface is used, so a PCLK clock will output one byte. If RGB/YUV is used In the output format, one tp is equal to two Tpclk. If the Raw format is used, one tp is equal to one Tpclk. If UXGA timing and RGB565 format are used, then the color of a pixel can be composed of two bytes, so that each line has 3200 pixel clocks and 3200 bytes output. Figure 3 shows the frame timing in UXGA mode, clearly showing the way the camera OV2640 data output. Using the frame timing shown in Figure 3 to read the camera data, the image information collected by the camera can be obtained.
STM32单片机通过DCMI接口驱动OV2640的步骤如下:首先配置摄像头OV2640的控制引脚,配置摄像头内置寄存器,配置摄像头的工作模式。配置好OV2640之后,配置单片机上DCMI接口中与OV2640模块相关的的IO口,并使能相关时钟,将相关的IO模式设置成复用功能,选择为DCMI复用。然后进行STM32上DCMI接口的相关配置,其中VSPOL和数据宽度等参数都是通过DCMI_CR寄存 器来进行设置。同时为了便于后期在JPEG模式下的数据处理,要开启帧中断以及进行DCMI中断服务函数的编写。同时针对摄像头输出的JPEG数据采用直接采集的正常模式。接着通过DMA2数据流1的通道1来将摄像头采集到的信息输出到内存中,通过该方式完成DCMI的DMA传输。最后设置摄像头采集到的图像大小格式,采用JPEG模式,开启DCMI的捕获功能,驱动OV2640摄像头进行图像采集。The steps for STM32 microcontroller to drive OV2640 through DCMI interface are as follows: First, configure the control pins of the camera OV2640, configure the camera's built-in registers, and configure the camera's working mode. After configuring the OV2640, configure the IO port related to the OV2640 module in the DCMI interface on the microcontroller, and enable the related clock, set the related IO mode to the multiplexing function, and select the DCMI multiplexing. Then carry on the relevant configuration of the DCMI interface on the STM32, where the VSPOL and data width parameters are all set through the DCMI_CR register. At the same time, in order to facilitate the later data processing in the JPEG mode, it is necessary to open the frame interrupt and write the DCMI interrupt service function. At the same time, the normal mode of direct acquisition is adopted for the JPEG data output by the camera. Then output the information collected by the camera to the memory through channel 1 of DMA2 data stream 1, and complete the DCMI DMA transmission in this way. Finally, set the image size format collected by the camera, use JPEG mode, turn on the DCMI capture function, and drive the OV2640 camera for image capture.
2.摄像头图像处理部分2. Camera image processing part
图像处理部分就是对摄像头采集到的一帧帧数据进行处理,经过DMA传输的一帧图像数据大小为4800个字节,实际上图像处理就是对摄像头实时输出的这些字节进行实时处理。用二维数组的方式保存这4800(60*80)个字节,这样就相当于将这一帧图像分成了60行,每行有80个字节。这样对一帧图像的处理,就可以转换成对这60行数据分别进行处理。然后设置一个计数器,计数该帧图像信息中指定像素的个数,当计数指定像素的个数达到某一个阈值的时候,就将该帧图像数据视为异常图像数据,将该帧图像数据保存在STM32单片机内置的FLASH中,方便后期的查看。The image processing part is to process one frame of data collected by the camera. The size of one frame of image data transmitted by DMA is 4800 bytes. In fact, the image processing is to process the bytes output by the camera in real time. Save these 4800 (60*80) bytes in a two-dimensional array, which is equivalent to dividing this frame of image into 60 rows, each with 80 bytes. In this way, the processing of one frame of image can be converted into processing the 60 lines of data separately. Then set a counter to count the number of specified pixels in the frame of image information. When the number of specified pixels reaches a certain threshold, the frame of image data is regarded as abnormal image data, and the frame of image data is saved in The built-in FLASH of the STM32 microcontroller is convenient for later viewing.
3.大数据存储分析部分3. Big data storage analysis part
PC端与无人机上挂载的ESP8266高性能串口-无线模块通过WIFI相连,将接收图像数据和大气基础数据实时显示在上位机上,上位机用QT编写。在电脑与ATK-ESP8266模块相连时,设置端电脑协议类型为TCP Client,同时设置服务器的相应地址和端口号。当连接上之后,PC端和ATK-ESP8266之间相互通信发送数据。根据在STM32F407单片机上烧写的程序,单片机开发板上的KEY0按键控制ATKESP8266模块端向PC电脑端的数据发送,并且能够在上位机上面实时的显示出来。同时用QT编写的上位机同样具备向ATK-ESP8266模块端发送数据的功能,控制STM32单片机个别功能的开启和关闭。The PC terminal is connected to the ESP8266 high-performance serial port-wireless module mounted on the drone via WIFI, and the received image data and atmospheric basic data are displayed on the upper computer in real time, and the upper computer is written by QT. When the computer is connected to the ATK-ESP8266 module, set the end computer protocol type to TCP Client, and set the corresponding address and port number of the server. When connected, the PC and ATK-ESP8266 communicate with each other to send data. According to the program programmed on the STM32F407 microcontroller, the KEY0 button on the microcontroller development board controls the transmission of data from the ATKESP8266 module to the PC, and it can be displayed in real time on the host computer. At the same time, the upper computer written in QT also has the function of sending data to the ATK-ESP8266 module, and controls the opening and closing of individual functions of the STM32 microcontroller.
除了将接收到的大气基础数据在上位机上显示之外,以结构化存储的方式将无人机采集到的大气基础信息写入文件中,每一行数据文件记录着该时段无人机采集到的该地区温湿度、硫化氢等被检测气体的具体数值,写入磁盘文件中。再由磁盘文件上传到大数据存储框架HDFS中进行存储。HDFS存储框架具有高容错性,能够自动保存多个副本,当某一个副本丢失以后,可以自动进行恢复,以处 理大批量数据,保证数据的唯一性。In addition to displaying the received basic atmospheric data on the host computer, the basic atmospheric information collected by the drone is written into a file in a structured storage method. Each row of data files records the data collected by the drone during the period. The specific values of temperature, humidity, hydrogen sulfide and other detected gases in the area are written into the disk file. Then upload the disk file to the big data storage framework HDFS for storage. The HDFS storage framework is highly fault-tolerant and can automatically save multiple copies. When a copy is lost, it can be automatically restored to process large amounts of data and ensure data uniqueness.
大数据存储分析流程如图2所示,当存储到HDFS中的文件数据达到一定的数据量的时候,利用大数据分析框架MapReduce进行分析。MapReduce是一个分布式运算程序的编程框架,MapReduce易于编程,而且具有良好的扩展性。MapReduce同时具有高容错性,比如若其中的一台机器宕机,可以将其上面的任务转移到另一个节点上。The big data storage analysis process is shown in Figure 2. When the file data stored in HDFS reaches a certain amount of data, the big data analysis framework MapReduce is used for analysis. MapReduce is a programming framework for distributed computing programs. MapReduce is easy to program and has good scalability. MapReduce is also highly fault-tolerant. For example, if one of the machines goes down, the tasks on it can be transferred to another node.
MapReduce阶段又可以分为Map Task阶段和Reduce Task阶段,在Map Task阶段由Map()函数处理主要的业务逻辑,在Reduce阶段主要由Reduce()阶段处理主要的业务逻辑,如下图3所示。根据MapReduce编程规范,分为Mapper、Reducer、Driver三个阶段。在Mapper编程阶段,先将结构化存储的数据文件的文本内容转化为String,因为数据文件的每一行内容分别为数据采集记录时间、温湿度、硫化氢等各项大气基础数据的值,数据文件以空格分隔各项数据,在map()函数中,根据空格将一行内容切分成单词,并将各项大气基础数据保存在String数组fields[N]中,fields[0]为温湿度指标的值,fields[1]为硫化氢气体的值,即fields[N]为第N-1项大气污染物数据的值,然后将fields[n]的值跟该项大气指标的标准值进行比较,如果超过标志值,即记为超标,将该项指标输出为<大气污染物,1>,否则将该项指标输出为<大气污染物,0>,数据文件经过map()函数处理后就会形成一系列新的key/value值,即以某项大气污染物为key,若该大气污染物在对应时段超标,则value值为1,否则为0。当map()函数数据处理完成后,会调用OutputCollector.collect()输出结果。在该函数内部,它会将生成的key/value分区(调用Partitioner),并写入一个环形内存缓冲区中。当环形缓冲区满后,MapReduce会将数据写到本地磁盘上,生成一个临时文件。然后进入Reduce Task阶段。The MapReduce phase can be divided into Map Task phase and Reduce Task phase. In the Map Task phase, the Map() function processes the main business logic, and in the Reduce phase, the Reduce() phase processes the main business logic, as shown in Figure 3 below. According to the MapReduce programming specification, it is divided into three stages: Mapper, Reducer, and Driver. In the Mapper programming stage, first convert the text content of the structured stored data file into String, because each line of the data file is the value of various basic atmospheric data such as data collection and recording time, temperature and humidity, hydrogen sulfide, and the data file Separate the data with spaces. In the map() function, divide a line of content into words according to the spaces, and save the basic atmospheric data in the String array fields[N], fields[0] are the values of the temperature and humidity indicators , Fields[1] is the value of hydrogen sulfide gas, that is, fields[N] is the value of the N-1 item of atmospheric pollutant data, and then the value of fields[n] is compared with the standard value of the atmospheric index, if If the value exceeds the mark, it will be recorded as exceeding, and the indicator will be output as <air pollutant, 1>, otherwise the indicator will be output as <air pollutant, 0>, and the data file will be formed after the map() function is processed A series of new key/value values, that is, a certain air pollutant is the key. If the air pollutant exceeds the standard in the corresponding period, the value value is 1, otherwise it is 0. When the data processing of the map() function is completed, OutputCollector.collect() will be called to output the result. Inside this function, it will partition the generated key/value (call Partitioner) and write it into a ring memory buffer. When the ring buffer is full, MapReduce will write the data to the local disk and generate a temporary file. Then enter the Reduce Task stage.
在Reduce Task阶段中,首先从各个Map Task上远程拷贝Map Task阶段生成的数据,并针对某一片数据,如果其大小超过一定的阈值,则写入磁盘中,否则直接放到内存中,Reduce Task会在远程拷贝数据的同时对内存和磁盘中的文件进行合并。然后自己编写的reduce()函数对Map Task传来的key/value数据进行处理,输入到reduce()函数的数据是按key聚集的一组数,只要是同一个大气数据指标的value都会进入到reduce()函数中,在reduce()函数中 将所有的value值相加,即可以得到该项大气污染物在一定时间内超标时间。最后reduce()函数会将得到的各项大气污染物在一定时间内超标时长结果写入到大数据存储框架HDFS中,存储分析结果,方便记录及查看。In the Reduce Task phase, first remotely copy the data generated in the Map Task phase from each Map Task, and for a piece of data, if its size exceeds a certain threshold, it will be written to the disk, otherwise it will be directly placed in the memory, Reduce Task The files in the memory and disk will be merged while copying data remotely. Then the reduce() function written by myself processes the key/value data from Map Task. The data input to the reduce() function is a set of numbers aggregated by key. As long as the value of the same atmospheric data indicator is entered, In the reduce() function, add all the value values in the reduce() function to get the time that the air pollutant exceeds the standard within a certain period of time. Finally, the reduce() function will write the obtained results of various air pollutants exceeding the limit in a certain period of time into the big data storage framework HDFS, and store the analysis results for easy recording and viewing.
以上所述仅为本发明的较佳实施方式,本发明的保护范围并不以上述实施方式为限,但凡本领域普通技术人员根据本发明所揭示内容所作的等效修饰或变化,皆应纳入权利要求书中记载的保护范围内。The above are only preferred embodiments of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. However, all equivalent modifications or changes made by those of ordinary skill in the art based on the disclosure of the present invention should be included Within the scope of protection described in the claims.

Claims (8)

  1. 一种基于大数据技术的大气污染物无人机溯源系统,其特征在于,包括:无人机、单片机、大气污染物检测传感器、大气环境检测平台、温湿度传感器、硫化氢传感器、摄像头、无线模块、PC电脑端、大数据存储框架HDFS,大数据分析框架MapReduce;所述无人机上安装有摄像头和单片机,所述单片机上配置有大气污染物检测传感器、温湿度传感器、硫化氢传感器、无线模块;所述单片机包括CPU、DMA、FLASH存储单元;所述单片机通过无线模块与PC电脑端连接,PC电脑端与大数据HDFS连接。An air pollutant UAV traceability system based on big data technology is characterized by: UAV, single chip microcomputer, atmospheric pollutant detection sensor, atmospheric environment detection platform, temperature and humidity sensor, hydrogen sulfide sensor, camera, wireless Module, PC computer terminal, big data storage framework HDFS, big data analysis framework MapReduce; the drone is equipped with a camera and a single-chip computer, and the single-chip computer is equipped with atmospheric pollutant detection sensors, temperature and humidity sensors, hydrogen sulfide sensors, wireless Module; the single-chip computer includes a CPU, DMA, and FLASH storage unit; the single-chip computer is connected to the PC computer terminal through a wireless module, and the PC computer terminal is connected to the big data HDFS.
  2. 根据权利要求1所述的一种基于大数据技术的大气污染物无人机溯源系统,其特征在于:所述无人机为四轴飞行器无人机。The air pollutant UAV traceability system based on big data technology according to claim 1, wherein the UAV is a quadcopter UAV.
  3. 根据权利要求1所述的一种基于大数据技术的大气污染物无人机溯源系统,其特征在于:所述摄像头为OV2640摄像头。The air pollutant drone traceability system based on big data technology according to claim 1, characterized in that: the camera is an OV2640 camera.
  4. 根据权利要求1所述的一种基于大数据技术的大气污染物无人机溯源系统,其特征在于:所述单片机为STM32F407单片机。The air pollutant UAV traceability system based on big data technology according to claim 1, characterized in that: the single-chip microcomputer is an STM32F407 single-chip microcomputer.
  5. 根据权利要求1所述的一种基于大数据技术的大气污染物无人机溯源系统,其特征在于:所述无线模块为ATK-ESP8266串口。The air pollutant UAV traceability system based on big data technology according to claim 1, characterized in that: the wireless module is an ATK-ESP8266 serial port.
  6. 根据权利要求1所述的一种基于大数据技术的大气污染物无人机溯源系统,其特征在于:所述温湿度传感器为DHT11温湿度传感器。The air pollutant UAV traceability system based on big data technology according to claim 1, wherein the temperature and humidity sensor is a DHT11 temperature and humidity sensor.
  7. 根据权利要求1所述的一种基于大数据技术的大气污染物无人机溯源系统,其特征在于:所述硫化氢传感器为MQ136硫化氢传感器。The air pollutant UAV traceability system based on big data technology according to claim 1, wherein the hydrogen sulfide sensor is an MQ136 hydrogen sulfide sensor.
  8. 一种基于大数据技术的大气污染物无人机溯源方法,其特征在于,包括以下步骤:A UAV traceability method for air pollutants based on big data technology is characterized by including the following steps:
    S1、利用四轴飞行器无人机的机动性能,大气环境检测人员可选择手动遥控无人机飞行,控制无人机飞行轨迹,前往要测试的大气污染物排放源头,进行实地检测;S1. Utilizing the maneuverability of the quadcopter drone, atmospheric environment inspectors can choose to manually remotely control the drone to fly, control the drone's flight trajectory, and go to the source of atmospheric pollutant emissions to be tested for on-site inspection;
    S2、无人机搭载单片机,单片机上配置大气基础数据检测传感器,单片机初始化传感器的配置;S2. The UAV is equipped with a single-chip microcomputer, which is equipped with atmospheric basic data detection sensors, and the single-chip microcomputer initializes the sensor configuration;
    S3、单片机上装载了温湿度传感器测得污染物源头附近的温湿度数据;S3. The single-chip microcomputer is equipped with a temperature and humidity sensor to measure the temperature and humidity data near the source of the pollutants;
    S4、单片机上装载的硫化氢传感器测得污染物源头附近的硫化氢有毒有害气体的浓度;S4. The hydrogen sulfide sensor mounted on the single-chip microcomputer measures the concentration of hydrogen sulfide toxic and harmful gas near the source of the pollutant;
    S5、单片机通过DCMI接口驱动摄像头,摄像头开始图像采集,摄像头采集到的数据通过DMA的方式传输到单片机的内存中,CPU通过图像处理程序,若检测到异常图像信息,则将该异常图像信息保存在单片机内置的FLASH存储单元中存储下来,以进行后续的处理工作;S5. The single-chip microcomputer drives the camera through the DCMI interface, the camera starts image collection, the data collected by the camera is transferred to the memory of the single-chip microcomputer through DMA, and the CPU uses the image processing program to save the abnormal image information if it detects abnormal image information Stored in the FLASH storage unit built in the microcontroller for subsequent processing;
    S6、单片机上配置ATK-ESP8266串口无线模块,该模块高性能的无线传输模块,该模块中内置了TCP/IP协议栈,若已经进行过所需的串口配置,该模块能够将从串口传输来的数据转换成WIFI数据,再与终端进行实时的信息数据传输,同时保证了传输的稳定性;S6. Configure the ATK-ESP8266 serial wireless module on the single chip microcomputer. This module is a high-performance wireless transmission module with a built-in TCP/IP protocol stack. If the required serial port configuration has been performed, the module can transmit from the serial port The data is converted into WIFI data, and then real-time information data transmission is carried out with the terminal, while ensuring the stability of the transmission;
    S7、通过无线模块,PC电脑端和ATK-ESP8266串口无线模块联通之后就可以进行双向的数据通信;S7, through the wireless module, after the PC computer terminal and the ATK-ESP8266 serial wireless module are connected, two-way data communication can be carried out;
    S8、PC电脑端接收到从无人机大气环境检测平台传送来的数据之后,将数据显示在上位机上,PC电脑端和ATK-ESP8266串口无线模块采用的是客服端服务器模式,采用TCP/IP协议,数据传输稳定;S8. After the PC computer receives the data transmitted from the drone atmospheric environment detection platform, it will display the data on the host computer. The PC computer and the ATK-ESP8266 serial wireless module adopt the customer service server mode, using TCP/IP Protocol, stable data transmission;
    S9、PC电脑端接收来的数据不仅显示在终端上的上位机上,还会结构化写入文本文件中;S9. The data received from the PC is not only displayed on the host computer on the terminal, but also structured and written into a text file;
    S10、将结构化数据文件上传到大数据存储框架HDFS中,并用大数据分析框架MapReduce进行数据分析,得到被检测的各个地区各项大气污染物的情况汇总,并将分析结果写入大数据HDFS中,方便环境保护执法人员查看,并根据分析结果,有效对高污染地区重点整治。S10. Upload the structured data file to the big data storage framework HDFS, and use the big data analysis framework MapReduce to perform data analysis to obtain a summary of the air pollutants in each area to be detected, and write the analysis results into the big data HDFS It is convenient for environmental protection law enforcement personnel to check, and based on the analysis results, effectively focus on remediation of high-polluting areas.
PCT/CN2019/092685 2019-06-24 2019-06-25 Atmospheric pollutant unmanned aerial vehicle tracing system and method based on big data technology WO2020258007A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910548525.1A CN110297921A (en) 2019-06-24 2019-06-24 A kind of atmosphere pollution unmanned plane traceability system and method based on big data technology
CN201910548525.1 2019-06-24

Publications (1)

Publication Number Publication Date
WO2020258007A1 true WO2020258007A1 (en) 2020-12-30

Family

ID=68028603

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092685 WO2020258007A1 (en) 2019-06-24 2019-06-25 Atmospheric pollutant unmanned aerial vehicle tracing system and method based on big data technology

Country Status (2)

Country Link
CN (1) CN110297921A (en)
WO (1) WO2020258007A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113029252A (en) * 2021-04-16 2021-06-25 中科海拓(无锡)科技有限公司 Industrial park air quality detection system based on data processing
CN113777223A (en) * 2021-08-12 2021-12-10 北京金水永利科技有限公司 Atmospheric pollutant tracing method and system
CN114878750A (en) * 2022-05-13 2022-08-09 苏州清泉环保科技有限公司 Intelligent control system and method integrating atmospheric pollution monitoring and tracing
CN115016542A (en) * 2022-07-28 2022-09-06 重庆理工大学 Unmanned aerial vehicle control system based on high-speed bus architecture
CN115495499A (en) * 2022-09-22 2022-12-20 生态环境部南京环境科学研究所 Integration statistical method based on mass data of same medium in multiple batches in polluted site
CN116359218A (en) * 2023-06-02 2023-06-30 北京建工环境修复股份有限公司 Industrial aggregation area atmospheric pollution mobile monitoring system
CN117405563A (en) * 2023-12-14 2024-01-16 河北师范大学 Method and device for monitoring pollutants in fuel combustion greenhouse effect

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111103397A (en) * 2019-11-21 2020-05-05 浙江华珍科技有限公司 Atmospheric pollution tracing monitoring method
CN111564031A (en) * 2020-05-26 2020-08-21 河南赛贝电子科技有限公司 Gridding atmospheric pollution emergency mobile monitoring system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595792A (en) * 2013-11-15 2014-02-19 南京云创存储科技有限公司 Environmental pollution trend monitoring system
CN107422747A (en) * 2017-08-14 2017-12-01 上海交通大学 For atmospheric environment on-line monitoring and the UAS of the controlled sampling of air
US20190050948A1 (en) * 2017-08-08 2019-02-14 Indigo Ag, Inc. Machine learning in agricultural planting, growing, and harvesting contexts

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595792A (en) * 2013-11-15 2014-02-19 南京云创存储科技有限公司 Environmental pollution trend monitoring system
US20190050948A1 (en) * 2017-08-08 2019-02-14 Indigo Ag, Inc. Machine learning in agricultural planting, growing, and harvesting contexts
CN107422747A (en) * 2017-08-14 2017-12-01 上海交通大学 For atmospheric environment on-line monitoring and the UAS of the controlled sampling of air

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113029252A (en) * 2021-04-16 2021-06-25 中科海拓(无锡)科技有限公司 Industrial park air quality detection system based on data processing
CN113777223A (en) * 2021-08-12 2021-12-10 北京金水永利科技有限公司 Atmospheric pollutant tracing method and system
CN113777223B (en) * 2021-08-12 2024-04-30 北京金水永利科技有限公司 Atmospheric pollutant tracing method and system
CN114878750A (en) * 2022-05-13 2022-08-09 苏州清泉环保科技有限公司 Intelligent control system and method integrating atmospheric pollution monitoring and tracing
CN115016542A (en) * 2022-07-28 2022-09-06 重庆理工大学 Unmanned aerial vehicle control system based on high-speed bus architecture
CN115495499A (en) * 2022-09-22 2022-12-20 生态环境部南京环境科学研究所 Integration statistical method based on mass data of same medium in multiple batches in polluted site
CN116359218A (en) * 2023-06-02 2023-06-30 北京建工环境修复股份有限公司 Industrial aggregation area atmospheric pollution mobile monitoring system
CN116359218B (en) * 2023-06-02 2023-08-04 北京建工环境修复股份有限公司 Industrial aggregation area atmospheric pollution mobile monitoring system
CN117405563A (en) * 2023-12-14 2024-01-16 河北师范大学 Method and device for monitoring pollutants in fuel combustion greenhouse effect
CN117405563B (en) * 2023-12-14 2024-03-19 河北师范大学 Method and device for monitoring pollutants in fuel combustion greenhouse effect

Also Published As

Publication number Publication date
CN110297921A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
WO2020258007A1 (en) Atmospheric pollutant unmanned aerial vehicle tracing system and method based on big data technology
CN108896799A (en) Very Important Person electric energy meter image-pickup intelligent-reading remote transmission device
CN204965727U (en) Raise dust noise on -line monitoring device
CN107014727A (en) A kind of atmosphere particle concentration data supervising platform
CN205843666U (en) A kind of depopulated helicopter three dimensional data collection and cruising inspection system
CN105892491A (en) Fume pollutant comprehensive information monitoring system based on multi-rotor wing remote control aircraft
CN205920233U (en) Meteorological monitoring and early warning system based on GIS
CN207895289U (en) A kind of oil smoke monitoring device based on NB-IoT
CN204089884U (en) One converges control real-time monitoring platform
CN206301209U (en) A kind of crop straw burning monitoring device based on unmanned plane
CN111222930A (en) Invoice monitoring method, device and system supporting large-screen display
CN203366326U (en) Hand-held terminal applied to field of safety production
CN210578661U (en) Low-power-consumption geological disaster big data monitoring system
CN203133297U (en) Novel civil ship digital weather instrument
CN107239938A (en) Enterprise personnel discrepancy volume statistic system and method
CN112732794A (en) Long-time-period data curve display method, device, equipment and medium
CN201476850U (en) Gas meter detection system
CN105407319A (en) Field single-soldier combat inspection tour system based on Beidou navigation satellite
CN206023998U (en) One kind is used for tunnel instrumental panel intelligent meter data recording system
CN202429356U (en) Display circuit of airplane display module
CN108593305A (en) A kind of agricultural machinery diesel engine real time execution monitoring of working condition instrument
CN103637799A (en) Human brain imaging system
Zhang et al. An acquisition system for remote diagnostics of airport special equipment based on LabVIEW
CN204303159U (en) Red-lamp running automatic recording system calibration device
Yan et al. Design of intelligent invigilator system based on artificial vision

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19935275

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19935275

Country of ref document: EP

Kind code of ref document: A1