Spatial environment monitoring method and system based on Internet of things big dataTechnical Field
The invention relates to the field of urban environment monitoring, in particular to a spatial environment monitoring method and system based on Internet of things big data.
Background
In a modern smart city system, monitoring the urban space environment is a basic link for realizing urban digitization, and monitoring the temperature, the humidity, the air pollutant concentration, the PM2.5 concentration, the ultraviolet intensity and the like of the urban space can play an important role in aspects of urban weather forecast, resource scheduling, energy conservation, tourism and the like.
At present, in order to monitor the space environment, monitoring sites are arranged in a city space range, a plurality of types of city space environment parameters are measured at each monitoring site through multifunctional sensor equipment, and then the city space environment parameters are uploaded to a background big data server through Internet of things protocols such as LORA, ZigBee, NB-IoT and the like, so that big data analysis and display are performed. Due to the wide urban space, in order to ensure the reliability of data, monitoring sites with sufficient number and density are required, for example, tens of thousands of monitoring sites may need to be arranged in a large and medium-sized urban space range, which brings certain difficulty to the analysis of a large data server: due to the fact that the number of the related monitoring sites is large and the distribution is wide, the acquisition and uploading of urban space environment parameters are not easy to achieve synchronization, and if one round of monitoring is carried out every 10 minutes, due to the reasons of transmission transfer, delay and the like, all the monitoring sites finish the data acquisition and uploading time of the round which is far longer than 10 minutes; if the big data server waits for all the monitoring sites to monitor the urban space environment parameters in place in the current round and then performs uniform analysis, a large delay time is generated in each round, and the update rate and the real-time performance of big data analysis are obviously reduced. In addition, if each monitoring site is updated in real time immediately after the latest uploaded urban space environment parameters are obtained, and one round of analysis is performed every 10 minutes, a large time difference exists in the actual acquired urban space environment parameters during each round of analysis, and the accumulation of the time difference is larger and larger, for example, when the urban space environment parameters are acquired and uploaded every round of a site slower than those of a site B, the time difference existing in the actual acquisition time of the urban space environment parameters of the site a and the site B is larger and larger when each round of analysis and display is performed, and the authenticity of the analysis is finally directly influenced.
In order to solve the problems, the invention provides a spatial environment monitoring method and system based on big data of the internet of things, so that the acquisition and uploading of urban spatial environment parameters are synchronous, the updating rate and the real-time performance of big data analysis can be improved, and the authenticity of the analysis is enhanced.
Disclosure of Invention
Objects of the invention
In order to overcome at least one defect in the prior art, the invention provides a spatial environment monitoring method and system based on Internet of things big data. The method not only realizes synchronization of acquisition and uploading of the urban space environment parameters, but also improves the update rate and the real-time performance of big data analysis and enhances the authenticity of the analysis.
(II) technical scheme
As a first aspect of the invention, the invention discloses a space environment monitoring method based on Internet of things big data, which comprises the following steps:
acquiring information, namely acquiring a plurality of time-varying characteristic vectors by acquiring urban space environment parameters of a plurality of monitoring sites, and merging and clustering a plurality of time-varying characteristic vector sets into a plurality of subsets;
and an information judgment step, namely comparing the percentage of the monitoring sites completing the updating of the urban space environment parameters in the plurality of subsets with a plurality of updating rate thresholds, and judging whether the urban space environment parameters of the subsets execute big data analysis or not according to the comparison result.
In a possible implementation manner, the information obtaining step collects the urban spatial environment parameters in the analysis window of the monitoring site to obtain the time-varying feature vector.
In a possible embodiment, the time-varying feature vector comprises: 4-dimensional feature vectors; setting the city space environment parameter obtained by M times of measurement of the nth monitoring site as X
n1,X
n2…X
nMThen the 4-dimensional feature vector
Rn=Max(Xn1,Xn2…XnM)-Min(Xn1,Xn2…XnM);
Wherein
Is X
n1,X
n2…X
nMThe mean value of (a);
in a possible embodiment, the clustering comprises: a K-means algorithm; the flow of the K-means algorithm comprises the following steps:
step 1, randomly selecting K4-dimensional feature vectors, wherein each 4-dimensional feature vector initially represents the center of one subset;
step 2, adding each residual 4-dimensional feature vector to the subset with the closest vector distance according to the vector distance between the feature vector and the center of each subset;
step 3, recalculating the average value of the 4-dimensional feature vector of each subset in each dimension, updating the recalculated average value to be a new subset center, wherein the new subset center is a new 4-dimensional feature vector, and the dimension value of the new subset center in each dimension is the average value of the 4-dimensional feature vector in the subset in each dimension;
and 4, continuously repeating the step 2 and the step 3 until the center of the subset does not change after repeating, and forming a plurality of subsets meeting specific conditions.
In one possible implementation, the information determining step determines that the urban spatial environment parameters of the subset perform the big data analysis when a percentage of the monitoring sites completing the update of the urban spatial environment parameters in the subset is higher than the update rate threshold corresponding to the subset.
As a second aspect of the present invention, the present invention discloses a spatial environment monitoring system based on big data of the internet of things, including:
the information acquisition module is used for acquiring a plurality of time-varying characteristic vectors by collecting urban space environment parameters of a plurality of monitoring sites, and then merging and clustering the plurality of time-varying characteristic vectors into a plurality of subsets;
and the information judgment module is used for comparing the percentage of the monitoring sites which finish the updating of the urban space environment parameters in the plurality of subsets with a plurality of updating rate thresholds and judging whether the urban space environment parameters of the subsets execute big data analysis or not according to the comparison result.
In a possible implementation manner, the information obtaining module is configured to collect the urban space environment parameters in the analysis window of the monitoring site to obtain the time-varying feature vector.
In a possible embodiment, the time-varying feature vector comprises: 4-dimensional feature vectors; setting the city space environment parameter obtained by M times of measurement of the nth monitoring site as X
n1,X
n2…X
nMThen the 4-dimensional feature vector
Rn=Max(Xn1,Xn2…XnM)-Min(Xn1,Xn2…XnM);
Is X
n1,X
n2…X
nMThe mean value of (a);
wherein
Is X
n1,X
n2…X
nMThe mean value of (a);
in a possible embodiment, the clustering performed by the information acquisition module includes: a K-means algorithm; the K-means algorithm comprises:
randomly selecting K of said 4-dimensional feature vectors, each of said 4-dimensional feature vectors initially representing a center of one of said subsets;
for each remaining 4-dimensional feature vector, adding the feature vector to the subset with the closest vector distance according to the vector distance between the feature vector and the center of each subset;
recalculating the average value of the 4-dimensional feature vector of each subset in each dimension, and updating the average value into a new subset center, wherein the new subset center is a new 4-dimensional feature vector, and the dimension value of the new subset center in each dimension is the average value of the 4-dimensional feature vector in the subset in each dimension;
and repeating continuously until the center of the subset does not change any more after repeating, and forming a plurality of subsets meeting specific conditions.
In a possible implementation manner, the information determining module is configured to determine that the urban spatial environment parameters of the subset perform the big data analysis when a percentage of the monitoring sites completing the update of the urban spatial environment parameters in the subset is higher than the update rate threshold corresponding to the subset.
(III) advantageous effects
The invention provides a space environment monitoring method and system based on Internet of things big data.A plurality of time-varying characteristic vectors are obtained by an information acquisition step through collecting city space environment parameters of a plurality of monitoring sites, and then the plurality of time-varying characteristic vectors form a multi-dimensional vector set, so that clustering is carried out according to the multi-dimensional vector set to form a plurality of subsets; and comparing the percentage of the monitoring sites completing the updating of the urban space environment parameters in each of the plurality of subsets with an updating rate threshold corresponding to the subset by an information determination step, thereby determining whether the urban space environment parameters of the subset execute big data analysis or not according to the comparison result. The method not only realizes synchronization of acquisition and uploading of the urban space environment parameters, but also improves the update rate and the real-time performance of big data analysis and enhances the authenticity of the analysis.
Drawings
The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining and illustrating the present invention and should not be construed as limiting the scope of the present invention.
Fig. 1 is a flowchart of a spatial environment monitoring method based on internet of things big data provided by the invention.
Fig. 2 is a schematic structural diagram of a spatial environment monitoring system based on internet of things big data provided by the invention.
Detailed Description
In order to make the implementation objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be described in more detail below with reference to the accompanying drawings in the embodiments of the present invention.
It should be noted that: in the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described are some embodiments of the present invention, not all embodiments, and features in embodiments and embodiments in the present application may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "central," "longitudinal," "lateral," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are used in the orientation or positional relationship indicated in the drawings, which are used for convenience in describing the invention and for simplicity in description, and are not intended to indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and are not to be considered limiting of the scope of the invention.
A first embodiment of a spatial environment monitoring method based on internet of things big data provided by the invention is described in detail below with reference to fig. 1. As shown in fig. 1, the method for monitoring a spatial environment provided by this embodiment mainly includes: an information acquisition step and an information determination step.
And an information acquisition step, namely acquiring a plurality of time-varying characteristic vectors by acquiring urban space environment parameters of a plurality of monitoring sites, and then merging and clustering the plurality of time-varying characteristic vectors into a plurality of subsets. The monitoring site can be provided with multifunctional sensor equipment; the multifunctional sensor equipment arranged on the monitoring site can measure various urban space environment parameters, such as urban temperature, humidity, PM2.5, ultraviolet rays and the like. The monitoring of the urban space environmental parameters can play a role in urban weather forecast, tourism and other aspects.
The time-varying characteristic vectors of a plurality of monitoring sites can form a multi-dimensional vector set, and then clustering can be carried out according to the multi-dimensional vector set to form a plurality of subsets.
And an information judgment step, namely comparing the percentage of the monitoring sites completing the updating of the urban space environment parameters in the plurality of subsets with a plurality of updating rate thresholds, and judging whether the urban space environment parameters of the subsets execute big data analysis or not according to the comparison result. A corresponding update rate threshold may be set for each subset, such that the percentage of the monitoring sites within each subset that complete the update of the urban spatial environment parameter is compared to the update rate threshold corresponding to that subset. Whether the urban space environment parameters of the subsets perform big data analysis can be judged according to the fact that the percentage of the monitoring sites which finish updating the urban space environment parameters in each subset is higher or lower than the updating rate threshold corresponding to the subset; whether the urban space environment parameters of the subsets perform big data analysis can be judged according to the ratio of the percentage of the monitoring sites completing the updating of the urban space environment parameters in each subset to the update rate threshold corresponding to the subset.
And the information acquisition step is to acquire the urban space environment parameters in the monitoring site analysis window to obtain the time-varying characteristic vector. An analysis window can be established, and then the urban space environment parameters obtained by the last few measurements of the monitoring site can be brought into the analysis window, so that the time-varying characteristic vector of the urban space environment parameters in the analysis window of the monitoring site is obtained.
Wherein the time-varying feature vector comprises: 4-dimensional feature vectors; setting the city space environment parameter obtained by M times of measurement of the nth monitoring site as X
n1,X
n2…X
nMThen the 4-dimensional feature vector
Rn=Max(Xn1,Xn2…XnM)-Min(Xn1,Xn2…XnM);
Wherein
Is X
n1,X
n2…X
nMThe mean value of (a);
and calculating the time-varying characteristic vectors (4-dimensional characteristic vectors) according to the urban space environment parameters obtained by the latest M times of measurement of the nth monitoring site, so that the plurality of time-varying characteristic vectors (4-dimensional characteristic vectors) are calculated according to the urban space environment parameters obtained by the latest M times of measurement of the plurality of monitoring sites.
Wherein the clustering comprises: a K-means algorithm; the flow of the K-means algorithm comprises the following steps: step 1, randomly selecting K4-dimensional feature vectors, wherein each 4-dimensional feature vector initially represents the center of one subset; step 2, adding each residual 4-dimensional feature vector to the subset with the closest vector distance according to the vector distance between the feature vector and the center of each subset; step 3, recalculating the average value of the 4-dimensional feature vector of each subset in each dimension, updating the recalculated average value to be a new subset center, wherein the new subset center is a new 4-dimensional feature vector, and the dimension value of the new subset center in each dimension is the average value of the 4-dimensional feature vector in the subset in each dimension; and 4, continuously repeating the step 2 and the step 3 until the center of the subset does not change after repeating, and forming a plurality of subsets meeting specific conditions. A multi-dimensional vector set (composed of time-varying feature vectors of a plurality of monitoring sites) in a city can be aggregated into 2 or more subsets through clustering; the temporal variations of the geospatial environmental parameters provided by monitoring sites within the same subset are similar, while the temporal variations of the geospatial environmental parameters provided by monitoring sites within different subsets differ.
In addition, the clustering also includes merged hierarchical clustering, FCM fuzzy clustering and the like, which are not described herein.
Wherein, in the information determining step, when the percentage of the monitoring sites completing the update of the urban spatial environment parameters in the subset is higher than the update rate threshold corresponding to the subset, it is determined that the urban spatial environment parameters of the subset execute the big data analysis. When the temporal variability of the urban spatial environment parameters of the monitoring sites in a subset is high (expressed as R)nAnd Sn,CnA larger value), a higher update rate threshold may be set; when the urban spatial environment parameters of the monitoring sites in a subset are not time-varying, the set update rate threshold is relatively low. When the percentage of the monitoring sites completing the updating of the urban space environment parameters in the subset is higher than the update rate threshold corresponding to the subset, it can be said that the number of the monitoring sites completing the updating in the subset reaches a value, which meets the condition of big data analysis, and further can execute the big data analysis on the urban space environment parameters in the subset.
The method comprises the steps of acquiring urban space environment parameters of a plurality of monitoring sites by an information acquisition step to obtain a plurality of time-varying characteristic vectors, and further forming a multi-dimensional vector set by the plurality of time-varying characteristic vectors, so that clustering is performed according to the multi-dimensional vector set to form a plurality of subsets; and comparing the percentage of the monitoring sites completing the updating of the urban space environment parameters in each of the plurality of subsets with an updating rate threshold corresponding to the subset by an information determination step, thereby determining whether the urban space environment parameters of the subset execute big data analysis or not according to the comparison result. The method not only realizes synchronization of acquisition and uploading of the urban space environment parameters, but also improves the update rate and the real-time performance of big data analysis and enhances the authenticity of the analysis.
A first embodiment of the spatial environment monitoring system based on big data of the internet of things provided by the invention is described in detail below with reference to fig. 2. As shown in fig. 2, the space environment monitoring system provided in this embodiment mainly includes: the device comprises an information acquisition module and an information judgment module.
The information acquisition module is used for acquiring a plurality of time-varying characteristic vectors by collecting urban space environment parameters of a plurality of monitoring sites, and then merging and clustering the plurality of time-varying characteristic vectors into a plurality of subsets;
and the information judgment module is used for comparing the percentage of the monitoring sites which finish the updating of the urban space environment parameters in the plurality of subsets with a plurality of updating rate thresholds and judging whether the urban space environment parameters of the subsets execute big data analysis or not according to the comparison result.
The information acquisition module is used for acquiring the urban space environment parameters in the monitoring site analysis window to obtain the time-varying characteristic vector.
Wherein the time-varying feature vector comprises: 4-dimensional feature vectors; setting the city space environment parameter obtained by M times of measurement of the nth monitoring site as X
n1,X
n2…X
nMThen the 4-dimensional feature vector
Rn=Max(Xn1,Xn2…XnM)-Min(Xn1,Xn2…XnM);
Wherein
Is X
n1,X
n2…X
nMThe mean value of (a);
wherein the clustering performed by the information acquisition module comprises: a K-means algorithm; the K-means algorithm comprises:
randomly selecting K of said 4-dimensional feature vectors, each of said 4-dimensional feature vectors initially representing a center of one of said subsets;
for each remaining 4-dimensional feature vector, adding the feature vector to the subset with the closest vector distance according to the vector distance between the feature vector and the center of each subset;
recalculating the average value of the 4-dimensional feature vector of each subset in each dimension, and updating the average value into a new subset center, wherein the new subset center is a new 4-dimensional feature vector, and the dimension value of the new subset center in each dimension is the average value of the 4-dimensional feature vector in the subset in each dimension;
and repeating continuously until the center of the subset does not change any more after repeating, and forming a plurality of subsets meeting specific conditions.
The information determination module is configured to determine that the urban spatial environment parameter of the subset performs the big data analysis when a percentage of the monitoring sites that complete the update of the urban spatial environment parameter in the subset is higher than the update rate threshold corresponding to the subset.
The method comprises the steps that an information acquisition module acquires a plurality of time-varying characteristic vectors by acquiring urban space environment parameters of a plurality of monitoring sites, and then the plurality of time-varying characteristic vectors form a multi-dimensional vector set, so that clustering is carried out according to the multi-dimensional vector set to form a plurality of subsets; and the information judgment module compares the percentage of the monitoring sites completing the updating of the urban space environment parameters in each of the plurality of subsets with the updating rate threshold corresponding to the subset, so as to judge whether the urban space environment parameters of the subset execute big data analysis according to the comparison result. The method not only realizes synchronization of acquisition and uploading of the urban space environment parameters, but also improves the update rate and the real-time performance of big data analysis and enhances the authenticity of the analysis.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.