CN117390128B - Urban physical environment intelligent mobile monitoring system and method based on Arduino platform - Google Patents

Urban physical environment intelligent mobile monitoring system and method based on Arduino platform Download PDF

Info

Publication number
CN117390128B
CN117390128B CN202311698983.6A CN202311698983A CN117390128B CN 117390128 B CN117390128 B CN 117390128B CN 202311698983 A CN202311698983 A CN 202311698983A CN 117390128 B CN117390128 B CN 117390128B
Authority
CN
China
Prior art keywords
data
environment
points
time
environmental
Prior art date
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.)
Active
Application number
CN202311698983.6A
Other languages
Chinese (zh)
Other versions
CN117390128A (en
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.)
Filing date
Publication date
Application filed by Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
Priority to CN202311698983.6A priority Critical patent/CN117390128B/en
Publication of CN117390128A publication Critical patent/CN117390128A/en
Application granted granted Critical
Publication of CN117390128B publication Critical patent/CN117390128B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/27Regression, e.g. linear or logistic regression
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y20/00Information sensed or collected by the things
    • G16Y20/10Information sensed or collected by the things relating to the environment, e.g. temperature; relating to location
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/10Detection; Monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Remote Sensing (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses an intelligent mobile monitoring system and method for urban physical environment based on an Arduino platform, wherein the method comprises the following steps: according to the environment monitoring requirement, constructing a hardware monitoring system based on an Arduino platform, and collecting environment data; grouping the environment data according to different categories, and displaying the data change trend on a map; creating a virtual IP address on the cloud, binding the virtual IP address to a cloud server where the mobile application program is located, establishing network connection with a local computer, and transmitting data in the mobile application program to the local computer; and the acquired environmental data is subjected to interpolation processing on the local computer side by using a cubic linear interpolation method, so that gaps among the environmental data are filled, a complete environmental data set is obtained, a complete physical environmental monitoring data map is formed, multidimensional environmental monitoring is performed, and meanwhile, real-time data transmission and processing are realized by utilizing cloud and local combined processing, so that the data integrity and accuracy are improved.

Description

Urban physical environment intelligent mobile monitoring system and method based on Arduino platform
Technical Field
The invention relates to the technical field of Arduino platform data processing, in particular to an intelligent mobile monitoring system and method for urban physical environment based on an Arduino platform.
Background
In order to solve the problems of the conventional environmental monitoring system, such as fixation, high cost and difficult deployment, and the challenges of data deletion and data processing, new innovative methods are required. In this respect, arduino-based open source electronic prototype platforms have great potential.
The existing urban physical environment monitoring technology methods mainly comprise two types: firstly, a fixed site observation method, namely, deploying instrument equipment at a fixed site for observation; and secondly, a mobile observation method, namely, combining different types of sensors, data acquisition instruments and batteries and disposing the sensors, the data acquisition instruments and the batteries on an electric bicycle or an automobile.
The main problems of the existing urban physical environment monitoring technology method are as follows:
(1) The fixed point observation method is limited by factors such as cost, installation site, management authority and the like, usually only a small number of measuring points can be set, the coverage range is limited, and the fine space characteristics of the urban physical environment elements can not be obtained. In addition, the fixed point observation method also has the difficulties of high cost, including instruments, installation, maintenance and the like, difficult installation site permission, high instrument safety risk and the like.
(2) And a researcher usually purchases various sensors and data acquisition instruments for assembly according to research requirements. The mobile monitoring platform system has the advantages of oversized system, oversized weight, inconvenience in carrying and high installation difficulty (the installation bracket is usually required to be customized); the cost is high, and the cost of each self-assembly platform is different due to the adopted sensor and data acquisition; the sensor, the data acquisition instrument, the battery and the like have low integration level and adaptation degree, and can be used only by complex setting and parameter adjustment, so that the assembly difficulty is high, and the fault rate is high in the use process; the integration level of software and hardware is not high, data such as time, track, environmental parameters and the like are usually required to be respectively exported, and then third-party software is imported for post-processing, so that the processing steps are complicated and the difficulty is high; the automation and the intelligent degree are not high, the wireless remote transmission of data can not be realized, and the data time correction and the spatial interpolation processing can not be automatically carried out.
In summary, developing a low-cost portable intelligent mobile monitoring system, providing more comprehensive, accurate and real-time environmental data, has important practical significance.
Disclosure of Invention
The invention aims to solve the problems that: the intelligent mobile monitoring system and method for the urban physical environment based on the Arduino platform are used for multidimensional environment monitoring, realizing real-time transmission and processing of environment data and improving the integrity and accuracy of the environment data.
The invention adopts the following technical scheme: an intelligent mobile monitoring method for urban physical environment based on Arduino platform comprises the following steps:
s1, constructing a hardware monitoring system: according to the requirement of environment monitoring, selecting an Arduino plate and a plurality of sensors, respectively establishing hardware connection with the sensors based on an Arduino platform, then programming and testing, acquiring real-time environment data through the sensors, and transmitting the real-time environment data to output equipment or a storage medium;
s2, building a mobile application program: grouping the environmental data according to different categories, displaying the geographic distribution of the environmental data by using a map, and displaying the change trend of the environmental data on the map;
s3, data transmission: creating a virtual IP address on the cloud, binding the virtual IP address to a cloud server where a mobile application program is located, establishing network connection between the mobile application program and a local computer through the virtual IP address, and transmitting data in the mobile application program to the local computer;
s4, data expansion: the method comprises the steps of performing data preprocessing and correction on collected environmental data at a local computer side, expanding the environmental data of a low-density area by using a KNN method, and enhancing the environmental data;
s5, data interpolation processing: performing interpolation prediction on the expanded environmental data by using a cubic linear interpolation method, and filling the gaps among the environmental data;
s6, drawing data edges: performing visual edge drawing on the interpolated environmental data set by using a convex hull method to obtain a complete environmental data set;
and S7, transmitting the obtained complete data set back to the mobile application program, and constructing a complete physical environment monitoring data map for representing the change trend and the characteristics of the environment data.
Further, in step S1, the Arduino plate includes: arduino Uno, arduino Mega; the sensor includes: a temperature sensor, a humidity sensor, and an air pressure sensor; the output device includes: LCD display screen and serial monitor.
Further, the mobile application program in step S2, written based on Hbuilder platform, comprises the following sub-steps,
s2.1, grouping and classification: grouping the environmental data according to different categories, storing the environmental data, and providing historical environmental data record and reference; the categories include temperature, humidity, and air pressure;
s2.2, map display: displaying the geographic distribution of the environmental data by using a map, marking geographic position and longitude and latitude information on the map, and providing click punctuation to view the detailed environmental data;
s2.3, data visualization: the change trend of the environmental data is visually displayed in a chart and graph mode, and the change trend of the environmental data is displayed;
s2.4, user individuation setting: user-personalized settings are provided for user-defined routes, time periods, environmental data parameters, and map display styles.
Further, in step S3, the virtual IP address is created on the messenger cloud, and is bound to the cloud server where the mobile application program is located, and the environment data in the mobile application program is transmitted to the designated port of the local computer by configuring the intranet penetration rule using the intranet penetration technology provided by the messenger cloud.
And step S3, connecting a plurality of Arduino nodes together by utilizing the Internet of things to form a distributed monitoring network, and acquiring environmental data in the distributed monitoring network.
Further, in step S4, the local computer performs data preprocessing and correction on the collected environmental data, including the following sub-steps:
s4.1, preprocessing environmental data, and detecting and removing abnormal values: reading environment data in the MySQL database, converting a time column into a datetime format, and screening the environment data in a specified time range:
s4.2, performing time correction: calculating temperature change based on the environmental data time difference and the temperature change, and performing time correction on each temperature value;
s4.3, meshing: dividing the geographic area into grids;
s4.4, calculating the number of data points in each grid;
s4.5, setting a threshold value, and determining a low-density region.
And (3) applying a KNN regression algorithm to the environmental data enhancement, and expanding the low-density area environmental data determined in the step S4.5 by using a KNN method.
Further, in step S5, interpolation prediction is performed on the extended environmental data using a cubic linear interpolation method, where the cubic linear interpolation involves constructing a smooth polynomial function for fitting known temperature values to given data points, and calculating an interpolation temperature for each grid point.
The technical scheme of the invention also comprises the following steps: an intelligent mobile monitoring system for urban physical environment based on Arduino platform, which is used for implementing the intelligent mobile monitoring method for urban physical environment, comprising:
arduino data acquisition module: according to the requirement of environment monitoring, respectively establishing hardware connection with the sensor, then programming and testing, acquiring real-time environment data through the sensor, and transmitting the real-time environment data to output equipment or a storage medium;
mobile application module: the method comprises the steps of grouping the environment data according to different categories, displaying geographic distribution of the environment data by using a map, connecting a plurality of Arduino data acquisition modules together by using the Internet of things to form a distributed monitoring network, and displaying the change trend of the environment data on an application map;
and a data transmission module: the method comprises the steps of creating a virtual IP address on a cloud, binding the virtual IP address to a cloud server where a mobile application program is located, establishing network connection between the mobile application program and a local computer through the virtual IP address, and transmitting data in the mobile application program to the local computer;
a local computer data processing module: the method is used for carrying out interpolation processing on the collected environment data, filling the gaps among the environment data to obtain a complete environment data set, and forming a complete physical environment monitoring data map.
Compared with the prior art, the technical scheme provided by the invention has the following technical effects:
1. the intelligent environment mobile monitoring system integrates various sensors, can be added with sensors according to requirements, realizes multi-dimensional environment monitoring, has low equipment cost, is easy to deploy and use, occupies small space, is portable and is simple and convenient to operate, and a complete environment data collection, processing and visualization solution is provided.
2. According to the intelligent mobile environment monitoring method, the mobile application app is written based on the Hbuilder platform, so that data acquisition and viewing are more visual and convenient, and a user can intuitively know the current environment.
3. According to the intelligent mobile environment monitoring method, the unknown data points are fitted by using a Gaussian regression interpolation algorithm, so that the data integrity and accuracy are improved, the data analysis and summarization are facilitated, and the real-time transmission and processing of the environment data are realized by utilizing cloud and local combined processing.
Drawings
FIG. 1 is a flow chart of the steps of the intelligent mobile monitoring method for the environment;
FIG. 2 is a software flow chart of the intelligent mobile monitoring method for the environment;
FIG. 3 is a graph of a temperature interpolation prediction obtained by performing a cubic linear interpolation without adding reinforcing data points;
FIG. 4 is a graph of a temperature interpolation prediction obtained by adding 5% of the enhanced generation points to perform three linear interpolations;
FIG. 5 is a graph of a temperature interpolation prediction obtained by adding 10% of the enhanced generation points to perform three linear interpolations;
FIG. 6 is a graph of a predicted temperature interpolation obtained after a simultaneous increase of 100% in both the enhanced data set and the threshold points.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the application will be further elaborated in conjunction with the accompanying drawings, and the described embodiments are only a part of the embodiments to which the present invention relates. All non-innovative embodiments in this example by others skilled in the art are intended to be within the scope of the invention. Meanwhile, the step numbers in the embodiments of the present invention are set for convenience of illustration, the order between the steps is not limited, and the execution order of the steps in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
The invention discloses an intelligent mobile monitoring method for urban physical environment based on an Arduino platform, which is shown in figure 1 and comprises the following steps:
s1, constructing a hardware monitoring system: according to the requirement of environment monitoring, selecting an Arduino plate and a plurality of sensors, respectively establishing hardware connection with the sensors based on an Arduino platform, then programming and testing, acquiring real-time environment data through the sensors, and transmitting the real-time environment data to output equipment or a storage medium;
s2, building a mobile application program: grouping the environmental data according to different categories, displaying the geographic distribution of the environmental data by using a map, and displaying the change trend of the environmental data on the map;
s3, data transmission: creating a virtual IP address on the cloud, binding the virtual IP address to a cloud server where a mobile application program is located, establishing network connection between the mobile application program and a local computer through the virtual IP address, and transmitting data in the mobile application program to the local computer;
s4, data expansion: the method comprises the steps of performing data preprocessing and correction on collected environmental data at a local computer side, expanding the environmental data of a low-density area by using a KNN method, and enhancing the environmental data;
s5, data interpolation processing: performing interpolation prediction on the expanded environmental data by using a cubic linear interpolation method, and filling the gaps among the environmental data;
s6, drawing data edges: performing visual edge drawing on the interpolated environmental data set by using a convex hull method to obtain a complete environmental data set;
and S7, transmitting the obtained complete data set back to the mobile application program, and constructing a complete physical environment monitoring data map for representing the change trend and the characteristics of the environment data.
In one embodiment of the present invention, a section around a certain school is selected to monitor environmental data of temperature, air pressure and humidity, as shown in fig. 2, specifically as follows:
s1, hardware deployment, connecting a plurality of sensors through an Arduino integrated sensor, collecting environmental data in real time, transmitting the environmental data to a monitoring system through Bluetooth, processing the environmental data through a built-in module,
first, an appropriate Arduino board is selected, which has sufficient input/output pins and processing power, depending on the needs of the monitoring system.
Commonly used Arduino boards include Arduino Uno, arduino Mega, and the like, which all have abundant pins and powerful processing capabilities and are suitable for use in environmental data monitoring systems.
And secondly, selecting a proper sensor, selecting a corresponding sensor for data acquisition according to the type of the monitored environmental data, ensuring that the sensor is compatible with the Arduino board, and accurately measuring the environmental data.
In this embodiment, the DHT11 or DHT22 sensor is preferably selected to monitor temperature and humidity, and the BMP180 or BMP280 sensor is preferably selected to monitor air pressure.
The sensor is then attached to the appropriate pins of the Arduino board and wired correctly according to the specifications and documents of the sensor. Typically, the sensor will have three pins, VCC (power), GND (ground) and data pins, respectively. Through the VCC pin of being connected to the 5V pin of Arduino with the sensor, the GND pin is connected to the GND pin of Arduino, and the data pin is connected to the digital pin of Arduino, just can realize the connection of sensor and Arduino.
Finally, programming and testing are performed. The program is written using an Arduino development environment by reading the sensor data and transmitting it to a designated output device or storage medium, such as an LCD display screen, serial monitor, or SD card. During programming and testing, accurate data reading of the sensor is ensured, and stable operation can be realized.
In this embodiment, the server side is constructed by selecting a manner of using flash+apache+mysql.
The flash framework is a miniature Web framework, and can quickly start and implement Web applications. And because interpolation algorithms and machine learning need to be used, the flash framework written by python is used.
Apache is one of the commonly used Web servers, the stability and performance of the Apache are verified in time, and the Apache provides a series of security enhancement functions, such as SSL/TLS encryption, access control and the like, so that the security of software is ensured. Mysql is a relational database widely applied by using SQL language, has the advantages of small volume, high speed and the like, and can support Python language. The embodiment combines the practical advantages of lightweight, flexibility, stability, safety and excellent performance of the three components by using a structure of flash+Apache+MySQL.
S2, mobile application design:
constructing a concise and clear interface: the interface is kept compact, and clear fonts and proper icons are used for conveying information, so that a user can quickly understand and navigate.
Environmental data grouping and classification: the relevant environmental data are grouped and classified according to different categories so that a user can quickly find the required information. For example, data such as temperature, humidity, air pressure and the like are displayed in groups, so that a user can conveniently browse and compare different environment indexes.
Map display: the map is used for displaying the geographic distribution condition of the environment data, the positions are marked on the map, the function of clicking punctuation to view detailed data is provided, the interactivity and usability of the map are ensured, and a user can freely browse and zoom the map.
Data visualization: the change trend of the environmental data is visually displayed in a chart, a graph and the like, so that the change trend of the environmental data is more intuitively displayed for a user, for example, the change of temperature is displayed by using a line graph, and the change of humidity is displayed by using a bar graph.
And (3) performing user personalized setting: the user personalized setting function is provided, the user is allowed to customize the displayed environment data and map patterns, different user requirements are met, and the user experience is improved.
In this embodiment, the map api is called by the display window interface of the software, so that the personal position and the real environment are unified. Because the refreshing of the map is delayed, and the point-to-point phenomenon of data acquisition is caused once the data storage is delayed and shifted, the mobile phone positioning punctuation is selected and acquired, and the accurate longitude and latitude of each point positioning point are ensured.
The user can mark the position on the map, record the related data, position the current position through the positioning button and carry out dotting operation, after the dotting is completed, select to transmit the recorded data to the background through the cloud for processing.
On the interface of the monitoring system, a user can see the geographical longitude and latitude information of the current position, the air temperature, the humidity and the air pressure data at the position, know the current weather condition and the environment change, and then make corresponding decisions and adjustments according to historical data and trend analysis results so as to optimize the environment condition and improve the life quality.
The user can also observe the recorded position and data in real time, the position of the punctuation point and related data such as air temperature, humidity, air pressure and the like are displayed on the interface, the latest data is obtained through a refreshing button or an automatic refreshing function of the interface, the environment condition of the recorded position is known at any time, and corresponding decision and adjustment are made.
In addition to observing the data, the user may also perform some other operation. For example, the saved data is cleared, and new data is re-recorded; the recorded data is exported to a local file for offline analysis and storage, which may provide more flexibility and convenience to enable a user to better manage and utilize the recorded data.
S3, data transmission:
first, a virtual IP address is created on the messenger cloud and bound to the cloud server where the mobile application is located, and the mobile application establishes a network connection with the local computer through the virtual IP address.
The data in the mobile application is then transmitted to the local computer using intranet penetration techniques provided by the messenger cloud. The intranet penetration technology can expose the service of the local computer to the extranet access to realize the data interaction with the mobile application program. By configuring intranet penetration rules, data in the mobile application can be transferred to a designated port of the local computer.
In the data transmission process, stability and security of data transmission need to be ensured. The messenger cloud provides rich network security functions such as firewall, access control and the like, and can protect the security of data. Meanwhile, the network infrastructure of the communication cloud is stable and reliable, and the stability of data transmission can be ensured.
S4, data expansion:
in this embodiment, first, data preprocessing is performed: reading data in the MySQL database, and converting the time column into a datetime format so as to screen the data in a specified time range:
wherein,dfis a set of raw environmental data that is,d time is a data pointdIs used for the time period of (a),choose_started time is the start time chosen to be chosen and,choose_end time is the selected end time.
Then, time correction is performed: calculating the temperature change condition (change rate) based on the time difference and the temperature change, and further performing time correction on each temperature value, wherein the specific formula is as follows:
wherein,is the firstiTemperature after correction of the individual data, +.>Is the firstiThe raw temperature of the individual data is calculated,T end andT started the temperatures corresponding to the end time and start time data points respectively,time diff =choose_started time -choose_end time is the time difference of the end time minus the start time,time i is the corresponding time for each environmental data point.
Then, meshing and data density calculation are performed:
dividing grids: dividing a geographic area into grids, each grid point being represented as
Wherein,gridrepresents the set of grid points after the division,long i 、lat j represent the firstiLongitude value and thjThe value of the individual latitude is determined,longmin andlongmax represents the minimum and maximum values of longitude in the dataset,latmin andlatmax represents the minimum and maximum values of the latitude in the dataset.
Calculating the number of data points within each grid:
wherein,grid_density ij representing grid points [ ]long i ,lat j ) The number of data points within the set,Iis an indication function if the data pointdIn the gridgrid ij And if so, returns to 1, otherwise returns to 0,d long andd lat data pointsdIs defined as the longitude and latitude of (a),choosea subset of the time-filtered data mentioned in the data preprocessing;
setting a threshold value, and determining a low density region:
wherein,low_density_areasa set of grid points representing a low density region,thresholda threshold number of data points defining a low density region.
Finally, KNN regression was applied to data enhancement: for each to eachgrid ij low_density_ areasGenerating new data points [ ]long new ,lat new ) And calculate the temperature thereoftem new The formula is as follows:
wherein,KNN k (choose,long new ,lat new ) Representing slavechooseThe distance is selectedlong new ,lat new ) Recently, the method of the present inventionkA data point is provided for each of the data points,d tem is thatchooseTemperature values for data points.
S5, data interpolation processing:
spatial interpolation is a method of predicting unknown points from finite sample data points.
In most natural situations, the temperature and humidity of points close to each other are more similar than those of points far away, however, the most easily implemented inverse distance interpolation depends largely on local data points, resulting in large deviations in areas far from known data points, especially when the data distribution is uneven.
In the embodiment, interpolation prediction is performed on the expanded environmental data by using a cubic linear interpolation method, so that the gap between the environmental data is filled; the cubic linear interpolation can provide more balanced and consistent estimation in the whole interpolation area, in addition, the result generated by the cubic linear interpolation is very smooth, the smooth interpolation curve is helpful to better represent the terrain change or climate change in the Geographic Information System (GIS) and the meteorological data analysis, so that the cubic linear interpolation method is adopted for prediction, and the recognized sparse area is reasonably expanded to a certain extent by the KNN method for the sparse area of data acquisition in actual situations, so that the interpolation result is more reliable.
Cubic linear interpolation involves constructing a smooth polynomial function that fits known temperature values over a given data point. For each grid pointlong i ,lat j ) Interpolation temperature thereofgrid_z ij The method can be calculated by the following steps:
1. the five closest data points (which include the newly generated data points after data enhancement) were selected: selecting five nearest grid points from all known data pointslong i ,lat j ) Is marked as the point of (2)datas near
2. Constructing a cubic polynomial in each direction: a cubic polynomial is constructed for each direction (longitude and latitude):
for the longitudinal direction (assumed to be the x-direction), a cubic polynomial is constructed:
for the latitudinal direction (assuming the y-direction), a cubic polynomial is constructed:
wherein,a 0 a 1 a 2 a 3 andb 0 b 1 b 2 b 3 is a polynomial coefficient obtained by solving a system of linear equations, which is composed ofdatas near The temperature value and the position information are formed;
3. calculating interpolation temperature: grid points [ ]long i ,lat j ) The interpolation temperature at this point is the product of the values of the two polynomials:
s6, drawing data edges:
in the embodiment, a convex hull method is used for carrying out visual edge drawing on the environment data set after interpolation processing so as to obtain a complete environment data set; the data enhancement is to make the cubic linear interpolation more accurate in the actual measurement area, but newly generated data points are inevitably outside the actual measurement area, and the data points have positive effects on the interpolation result, but become new boundary points so as to present the most accurate prediction area.
Introducing a convex hull, carrying out visualized edge drawing on measured data on the basis of an interpolation result based on a reinforced data set based on the edge point of an initial measured region, wherein the basic process is as follows:
1. finding the lowest point of the environment data: selecting the lowest latitude point from all environment data points, and recording asp 0
2. According to relative top 0 Is arranged in the order of the angles: pressing the remaining points against themp 0 Polar angle ordering of (2);
3. constructing a convex hull: traversing the ordered set of points to determine in sequence whether the points should be included in the convex hull, for each pointp i The method comprises the following steps:
a. will bep i And the last two points in the convex hullp top-1p top Comparing;
b. if it isp i At the position ofp top-1 Andp top the right side of the wire, i.e. forming a lobe, willp i Adding the convex hull into the convex hull;
c. otherwise, removep top Repeating steps S6.3.1 to S6.3.3;
4. obtaining convex hulls: repeating the steps until all the points are inspected, and forming a convex hull by the obtained environmental data point set.
With the method described in this embodiment, based on the original environmental data set, no reinforcement data points are added, and after performing three linear interpolations, a temperature interpolation prediction image is obtained, as shown in fig. 3. The abscissa axis marked as 'temperature+segment map' is a display segment map corresponding to temperature, the ordinate axis area marked as 'excessively-far invalid prediction range' is an area outside the boundary (i.e. convex hull) of the outermost peripheral data point of the environmental data set, and is regarded as an inaccurate prediction range, and interpolation operation is not performed.
And (2) respectively adding 5% of enhancement generation points, 10% of enhancement generation points and 100% of simultaneous increase of the enhancement data set and the threshold point number on the original environment data set, and expanding by using the low-density area environment data expansion method in the step S4 to obtain a temperature interpolation predicted image as shown in fig. 4, 5 and 6. The newly-appearing temperature image area is the data quantity assistance of the enhanced data to the original sparse area beyond the convex hull of fig. 3.
S7, constructing a complete physical environment monitoring data map:
and transmitting the obtained complete data set back to the mobile application program, and constructing a complete physical environment monitoring data map for representing the change trend and the characteristics of the environment data.
It should be specifically noted that, in this embodiment, based on MySQL database, database table design is performed in Python program, which is suitable for processing and managing temperature data of large-scale geographic locations, and specifically includes:
two-dimensional data partitioning mechanism: the data partitioning strategy adopted by the table partitions data according to geographic positions (longitude and latitude) and time stamps, so that two key dimensions are allowed to be optimized, and the query and storage efficiency is improved;
dynamic partition adjustment capability: dynamically adjusting partition strategies according to data access modes and data growth to ensure continuous high performance and data balance;
optimized query performance: by geographically and temporally partitioning the data, the efficiency of data queries based on geographic locations or time ranges is improved, especially when complex data analysis and large data volume queries are handled.
By using the database table design, the query time of a large data set is reduced, and the overall data processing efficiency is improved; the data backup, recovery and migration processes are simplified, and the complexity of data maintenance is reduced; meanwhile, the method can adapt to the ever-increasing data volume and the changing business requirements, and provides a flexible expansion scheme; and the requirements of compliance of data storage in different areas are met, and the safety and reliability of the data are enhanced.
In summary, according to the environment monitoring requirements, a hardware monitoring system is built based on an Arduino platform, and sensor environment data are collected through the Arduino board; grouping the environment data according to different categories, and displaying the data change trend on a map; creating a virtual IP address on the cloud, binding the virtual IP address to a cloud server where the mobile application program is located, establishing network connection with a local computer, and transmitting data in the mobile application program to the local computer; finally, according to the data of the existing route, based on the data preprocessing and correction of the collected environmental data at the local computer side, the KNN method is used for expanding the environmental data of the low-density area for enhancing the environmental data; performing interpolation prediction on the expanded environmental data by using a cubic linear interpolation method, and filling the gaps among the environmental data; and performing visualized edge drawing on the environment data set subjected to interpolation processing by using a convex hull method to obtain a complete environment data set, forming a complete physical environment monitoring data map, performing multi-dimensional environment monitoring, and simultaneously realizing real-time data transmission and processing by using cloud and local combined processing, and improving the data integrity and accuracy.
The foregoing is only a preferred embodiment of the invention, it being noted that: it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the invention.

Claims (8)

1. An intelligent mobile monitoring method for urban physical environment based on an Arduino platform is characterized by comprising the following steps:
s1, constructing a hardware monitoring system: according to the requirement of environment monitoring, selecting an Arduino plate and a plurality of sensors, respectively establishing hardware connection with the sensors based on an Arduino platform, then programming and testing, acquiring real-time environment data through the sensors, and transmitting the real-time environment data to output equipment or a storage medium;
s2, building a mobile application program: grouping the environment data according to different categories, displaying the geographic distribution of the environment data by using a map, and displaying the change trend of the environment data on the map; the mobile application program is written based on an Hbuilder platform, and comprises the following substeps:
s2.1, grouping and classification: grouping the environmental data according to different categories, storing the environmental data, and providing historical environmental data record and reference; the categories include temperature, humidity, and air pressure;
s2.2, map display: displaying the geographic distribution of the environmental data by using the map, marking the geographic position and longitude and latitude information on the map, and providing click punctuation to view the detailed environmental data;
s2.3, data visualization: the change trend of the environmental data is visually displayed in a chart and graph mode, and the change trend of the environmental data is displayed;
s2.4, user individuation setting: providing user personalized settings for user-defined routes, time periods, environmental data parameters and map display styles;
s3, data transmission: creating a virtual IP address on the cloud, binding the virtual IP address to a cloud server where a mobile application program is located, establishing network connection between the mobile application program and a local computer through the virtual IP address, and transmitting data in the mobile application program to the local computer;
the virtual IP address is created on the cloud and bound to a cloud server where the mobile application program is located, and environment data in the mobile application program is transmitted to a designated port of a local computer by configuring an intranet penetration rule by using an intranet penetration method provided by the cloud;
s4, data expansion: the method comprises the steps of performing data preprocessing and correction on collected environmental data at a local computer side, expanding the environmental data of a low-density area by using a KNN method, and enhancing the environmental data;
s5, data interpolation processing: performing interpolation prediction on the expanded environmental data by using a cubic linear interpolation method, and filling the gaps among the environmental data;
s6, drawing data edges: performing visual edge drawing on the environment data subjected to interpolation processing by using a convex hull method to obtain a complete environment data set;
and S7, transmitting the obtained complete data set back to the mobile application program, and constructing a complete physical environment monitoring data map for representing the change trend and the characteristics of the environment data.
2. The intelligent mobile monitoring method for urban physical environment according to claim 1, wherein in step S1,
the Arduino plate includes: arduino Uno, arduino Mega;
the sensor includes: a temperature sensor, a humidity sensor, and an air pressure sensor;
the output device includes: LCD display screen and serial monitor.
3. The intelligent mobile monitoring method for urban physical environment according to claim 1, wherein step S3 further comprises connecting a plurality of Arduino nodes together by using the internet of things to form a distributed monitoring network, and acquiring environmental data in the distributed monitoring network.
4. The intelligent mobile monitoring method for urban physical environment according to claim 1, wherein step S4, the data preprocessing and correction of the collected environmental data are performed on the local computer side, comprises the following sub-steps:
s4.1, preprocessing environmental data, and detecting and removing abnormal values: reading environment data in the MySQL database, converting a time column into a datetime format, and screening the environment data in a specified time range:
wherein,dfis a set of raw environmental data that is,d time is a data pointdIs used for the time period of (a),choose_started time is the start time chosen to be chosen and,choose_end time is the selected end time;
s4.2, performing time correction: calculating temperature change based on the environmental data time difference and the temperature change, and performing time correction on each temperature value according to the following formula:
wherein,is the firstiTemperature after correction of the individual data, +.>Is the firstiThe raw temperature of the individual data is calculated,T end andT started the temperatures corresponding to the end time and start time data points respectively,time diff = choose_started time - choose_end time is the time difference of the end time minus the start time,time i is the corresponding time for each environmental data point;
s4.3, meshing: the geographic area is divided into grids, each grid point being represented as:
wherein,gridrepresents the set of grid points after the division,long i 、lat j represent the firstiLongitude value and thjThe value of the individual latitude is determined,longmin andlongmax represents the minimum and maximum values of longitude in the dataset,latmin andlatmax represents the minimum and maximum values of the latitude in the dataset;
s4.4, calculating the number of data points in each grid:
wherein,grid_density ij representing grid points [ ]long i ,lat j ) The number of data points within the set,Iis an indication function if the data pointdIn the gridgrid ij And if so, returns to 1, otherwise returns to 0,d long andd lat data pointsdIs defined as the longitude and latitude of (a),choosethe data subset after time screening in the step S4.1 data preprocessing is obtained;
s4.5, setting a threshold value, and determining a low-density region:
wherein,low_density_areasa set of grid points representing a low density region,thresholda threshold number of data points defining a low density region.
5. The urban physical environment intelligent mobile monitoring method according to claim 4, wherein the KNN regression algorithm is applied to the environmental data enhancement in step S4, the low-density area environmental data determined in step S4.5 is expanded using the KNN method, for eachgrid ij low_density_areasGenerating new data points [ ]long new ,lat new ) And calculate the temperature thereoftem new The formula is as follows:
wherein,KNN k (choose,long new ,lat new ) Representing slavechooseThe distance is selectedlong new ,lat new ) Recently, the method of the present inventionkA data point is provided for each of the data points,d tem is thatchooseTemperature values for data points.
6. The intelligent mobile monitoring method according to claim 5, wherein in step S5, the extended environmental data is interpolated and predicted using a cubic linear interpolation method, the cubic linear interpolation involves constructing a smooth polynomial function, fitting known temperature values to given data points, and for each grid pointlong i ,lat j ) Interpolation temperature thereofgrid_z ij The calculation method comprises the following steps:
s5.1, selecting the five closest data points:
selecting five nearest grid points from all known data pointslong i ,lat j ) Comprises the newly generated number after data enhancementData pointsdatas near
S5.2, constructing a cubic polynomial in each direction, and constructing a cubic polynomial for each longitude and latitude direction:
a cubic polynomial is constructed for the longitudinal direction x:
for the latitudinal direction y, a cubic polynomial is constructed:
wherein,a 0 a 1 a 2 a 3 andb 0 b 1 b 2 b 3 is a polynomial coefficient obtained by solving a system of linear equations, which is composed ofdatas near The temperature value and the position information are formed;
s5.3, calculating interpolation temperaturegrid_z ij
Wherein grid points [ ]long i ,lat j ) The interpolation temperature above is the product of the values of the two cubic polynomials at that point.
7. The intelligent mobile monitoring method for urban physical environment according to claim 6, wherein in step S6, the convex hull method is used to perform visual edge rendering on the interpolated environmental data set, and the method is as follows:
s6.1, finding the lowest point of the environment data: selecting the lowest latitude point from all environment data points, and recording asp 0
S6.2 according top 0 Is arranged in the order of the angles: pressing the remaining points against themp 0 Polar angle ordering of (2);
s6.3, constructing a convex hull: traversing the ordered set of points to determine in sequence whether the points should be included in the convex hull, for each pointp i The method comprises the following substeps of:
s6.3.1, willp i And the last two points in the convex hullp top-1p top Comparing;
s6.3.2 if it isp i At the position ofp top-1 Andp top the right side of the wire, i.e. forming a lobe, willp i Adding the convex hull into the convex hull;
s6.3.3 otherwise, removep top Repeating steps S6.3.1 to S6.3.3;
s6.4, obtaining convex hulls: repeating the steps S6.1 to S6.3 until all the points are inspected, and forming a convex hull by the obtained environmental data point set.
8. An intelligent mobile monitoring system for urban physical environment based on Arduino platform for implementing the intelligent mobile monitoring method for urban physical environment according to any one of claims 1 to 7, characterized in that it comprises:
arduino data acquisition module: according to the requirement of environment monitoring, respectively establishing hardware connection with the sensor, then programming and testing, acquiring real-time environment data through the sensor, and transmitting the real-time environment data to output equipment or a storage medium;
mobile application module: the method comprises the steps of grouping the environment data according to different categories, displaying geographic distribution of the environment data by using a map, connecting a plurality of Arduino data acquisition modules together by using the Internet of things to form a distributed monitoring network, and displaying the change trend of the environment data on an application map;
and a data transmission module: the method comprises the steps of creating a virtual IP address on a cloud, binding the virtual IP address to a cloud server where a mobile application program is located, establishing network connection between the mobile application program and a local computer through the virtual IP address, and transmitting data in the mobile application program to the local computer;
a local computer data processing module: the method is used for carrying out interpolation processing on the collected environment data, filling the gaps among the environment data to obtain a complete environment data set, and forming a complete physical environment monitoring data map.
CN202311698983.6A 2023-12-12 2023-12-12 Urban physical environment intelligent mobile monitoring system and method based on Arduino platform Active CN117390128B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311698983.6A CN117390128B (en) 2023-12-12 2023-12-12 Urban physical environment intelligent mobile monitoring system and method based on Arduino platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311698983.6A CN117390128B (en) 2023-12-12 2023-12-12 Urban physical environment intelligent mobile monitoring system and method based on Arduino platform

Publications (2)

Publication Number Publication Date
CN117390128A CN117390128A (en) 2024-01-12
CN117390128B true CN117390128B (en) 2024-02-23

Family

ID=89468812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311698983.6A Active CN117390128B (en) 2023-12-12 2023-12-12 Urban physical environment intelligent mobile monitoring system and method based on Arduino platform

Country Status (1)

Country Link
CN (1) CN117390128B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104061962A (en) * 2014-05-29 2014-09-24 江南大学 Urban environment data dynamic monitoring and real-time marking electronic map system and use method
CN109842638A (en) * 2017-11-24 2019-06-04 卓望数码技术(深圳)有限公司 A kind of method and system for realizing mobile communication base station monitoring environment
CN110580552A (en) * 2019-09-12 2019-12-17 南京邮电大学 Universal regional environment information mobile sensing and predicting method
CN112508056A (en) * 2020-11-13 2021-03-16 东南大学 Urban air quality monitoring method based on mobile multi-source perception
CN116047950A (en) * 2022-12-15 2023-05-02 武汉大学 Modularized system of soil site pollution mobile monitoring robot

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104061962A (en) * 2014-05-29 2014-09-24 江南大学 Urban environment data dynamic monitoring and real-time marking electronic map system and use method
CN109842638A (en) * 2017-11-24 2019-06-04 卓望数码技术(深圳)有限公司 A kind of method and system for realizing mobile communication base station monitoring environment
CN110580552A (en) * 2019-09-12 2019-12-17 南京邮电大学 Universal regional environment information mobile sensing and predicting method
CN112508056A (en) * 2020-11-13 2021-03-16 东南大学 Urban air quality monitoring method based on mobile multi-source perception
CN116047950A (en) * 2022-12-15 2023-05-02 武汉大学 Modularized system of soil site pollution mobile monitoring robot

Also Published As

Publication number Publication date
CN117390128A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
JP2021518528A (en) Sensor calibration
KR101828682B1 (en) 3 dimensional atmospheric environmental data processing system and visualization method using drone and ground based measurement network
CN116486025A (en) Urban geological data processing platform based on big data cloud computing technology
CN116316614B (en) Three-dimensional digital twin system of power grid, performance analysis method and related device
Qin et al. Noisesense: A crowd sensing system for urban noise mapping service
CN105706105A (en) Static earth model grid cell scaling and property re-sampling methods and systems
Sun et al. Advanced cyberinfrastructure for intercomparison and validation of climate models
CN113779261B (en) Quality evaluation method and device of knowledge graph, computer equipment and storage medium
CN112236764A (en) Outside-view position indication for digital cartography
CN117390128B (en) Urban physical environment intelligent mobile monitoring system and method based on Arduino platform
CN103957539B (en) Mobile communications network information collecting method and system
Kim et al. Real time building data collecting using IoT and BIM
Dutta et al. Performance evaluation of south Esk hydrological sensor web: unsupervised machine learning and semantic linked data approach
Preve et al. An integrated sensor web grid cyberimplementation for environmental protection
CN116188676A (en) Method and device for establishing digital twin model of digital center
Van de Vyver On the estimation of continuous 24-h precipitation maxima
CN113890833B (en) Network coverage prediction method, device, equipment and storage medium
CN113222276B (en) Ice-covering condition prediction method, device, computer equipment and storage medium
CN113345095B (en) System based on digital twin revolutionary relic damage monitoring and early warning method
JP2020091171A (en) Weather forecasting system, weather forecasting method, and weather forecasting program
CN115375867A (en) Method, system, equipment and medium for calculating geothermal resource quantity by using grid model
Zander et al. Environmental data management with the river basin information system
Lenart et al. Real-time monitoring and analyses of sensory data integrated into the BIM platform
de Almeida et al. Integration and management of sensor data for rainfall monitoring
CN114046771B (en) Position location system for survey and drawing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant