Urban garden monitoring method, device and electronic equipment based on Internet of Things
Through the numerical correlation relationship of urban garden sensors and the block structure training of deep convolutional neural networks, the problem of sensor judgment threshold variability is solved, and the accuracy of monitoring and feature mining effect is improved.
Patent Information
- Application Number
- CN202311686677.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-12-11
AI Technical Summary
The existing urban garden monitoring method based on a single sensor has problems of time and place variation when setting judgment thresholds, resulting in insufficient accuracy of abnormal judgments.
The overall judgment is made through the correlation relationship between the sensor values of each position in the city, and clustering is performed using deep convolutional neural network and Softmax function values. The block structure is trained to adapt to the category patterns in the original data, improving the accuracy of feature mining and Validity.
This avoids the problem of variability in threshold settings, improves the accuracy of abnormal judgment, and enables the convolutional neural network to better extract predetermined pattern information from the data.
Smart Images

Figure CN117390559B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of garden monitoring, and more specifically, to an urban garden monitoring method based on the Internet of Things, an urban garden monitoring device based on the Internet of Things, and electronic equipment. Background Art
[0002] Through various sensors based on the Internet of Things, such as temperature sensors, humidity sensors, etc., it is possible to obtain monitoring data of gardens in various locations in the city, and by analyzing these monitoring data, it is possible to monitor the status of urban gardens. For example, when the value of a sensor is abnormal, it can be determined that the garden corresponding to the sensor is abnormal, thereby further eliminating risks.
[0003] However, for the entire city, abnormal monitoring based on the value of a single sensor requires accurate setting of judgment thresholds, which will change with time and location. For example, for the temperature threshold, it is obvious that the temperature in summer will be higher than that in winter, and the temperature in densely populated areas will be higher than that in sparsely populated areas, which will affect the setting of the corresponding thresholds, making it impossible to guarantee the accuracy of abnormal judgment.
[0004] Therefore, it is expected to provide an urban garden monitoring solution based on the Internet of Things. Summary of the invention
[0005] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide an urban garden monitoring method based on the Internet of Things, an urban garden monitoring device based on the Internet of Things, and an electronic device, which comprehensively judge the abnormal state of the garden by using the correlation between the numerical values of the sensors of the gardens at various locations in the city, thereby avoiding the variability problem of threshold setting and improving the accuracy of abnormal judgment. In addition, the present application also clusters the Softmax function values of the feature values at each location in the feature map, and trains the block structure in the convolutional neural network based on the clustering results, so that the block structure in the convolutional neural network can be adapted to the category-based predetermined pattern in the original data, thereby improving the accuracy and effectiveness of feature mining.
[0006] According to one aspect of the present application, a method for monitoring urban gardens based on the Internet of Things is provided, which includes:
[0007] The training phase includes:
[0008] Obtaining the reading values of each sensor at each monitoring point of the urban garden to be monitored as training data, wherein each of the sensors is interconnected via the Internet of Things;
[0009] Arranging the reading values of each of the sensors at each of the monitoring points into a training sensor vector, and arranging the training sensor vectors of each of the monitoring points in a sample dimension to obtain a training sensor matrix;
[0010] Obtaining a training sensor feature map from the training sensor matrix using a deep convolutional neural network;
[0011] Calculate a Softmax-like classification function value of the feature value at each position in the training sensor feature map, where the Softmax-like classification function is a weighted sum of a natural exponential function value of the feature value at each position raised to a power divided by a natural exponential function value of the feature value at each position in the sensor feature map raised to a power;
[0012] Clustering the feature values at each position in the training sensor feature map based on the Softmax classification function value corresponding to the feature value at each position in the training sensor feature map to obtain a training classification feature map with multiple category areas;
[0013] Transmitting the position of the category region in the classification feature map to the corresponding regions of each layer in the deep convolutional neural network to determine a plurality of block structures corresponding to the plurality of category regions in the convolutional neural network;
[0014] Passing the training classification feature map having multiple category regions through a classifier to obtain a classification loss function value; and
[0015] Performing block-structure-based training on the deep convolutional neural network based on the classification loss function value; and
[0016] The forecasting phase includes:
[0017] Obtaining reading values of each sensor of all monitoring points of the urban garden to be monitored and constructing a sensor matrix;
[0018] Passing the sensing matrix through the deep convolutional neural network trained in the training phase to obtain a sensing feature map;
[0019] Obtaining reading values of various sensors at the monitored points of the urban garden to be monitored and constructing them into a sensing vector;
[0020] Using the sensing vector as a query vector, obtaining a classification feature vector matching the sensing vector from the sensing feature map;
[0021] The classification feature vector is passed through a classifier to obtain the monitoring result of the monitoring point of the urban garden to be monitored.
[0022] According to another aspect of the present application, there is provided an urban garden monitoring device based on the Internet of Things, comprising:
[0023] Training modules include:
[0024] A data acquisition unit, used to acquire the reading values of each sensor at each monitoring point of the urban garden to be monitored as training data, wherein each of the sensors is interconnected via the Internet of Things;
[0025] A training sensor matrix generating unit, used for arranging the reading values of each sensor of the monitoring point obtained by each data acquisition unit into a training sensor vector, and arranging the training sensor vectors of each monitoring point in a sample dimension to obtain a training sensor matrix;
[0026] A convolution processing unit, configured to obtain a training sensing feature map from the training sensing matrix obtained by the training sensing matrix generating unit using a deep convolutional neural network;
[0027] a classification function value calculation unit, used to calculate a Softmax-like classification function value of the feature value at each position in the training sensor feature map obtained by the convolution processing unit, wherein the Softmax-like classification function is a result of dividing a natural exponential function value of the feature value at each position raised to a power by a weighted sum of a natural exponential function value of the feature value at each position in the sensor feature map raised to a power;
[0028] A clustering unit, configured to cluster the feature values at each position in the training sensor feature map based on the Softmax-like classification function values corresponding to the feature values at each position in the training sensor feature map obtained by the classification function value calculation unit, so as to obtain a training classification feature map having multiple category areas;
[0029] A block structure determination unit, configured to transmit the position of the category region obtained by the clustering unit in the classification feature map to the corresponding region of each layer in the deep convolutional neural network, so as to determine a plurality of block structures corresponding to the plurality of category regions in the convolutional neural network;
[0030] a classifier processing unit, configured to pass the training classification feature map having multiple category regions obtained by the block structure determination unit through a classifier to obtain a classification loss function value; and
[0031] a training unit, configured to perform block-structure based training on the deep convolutional neural network based on the classification loss function value obtained by the classifier processing unit; and
[0032] Prediction module, including:
[0033] A sensor matrix construction unit, used to obtain the reading values of each sensor of all monitoring points of the urban garden to be monitored and construct a sensor matrix;
[0034] A feature map generating unit, configured to obtain a sensor feature map by passing the sensor matrix obtained by the sensor matrix construction unit through the deep convolutional neural network trained in the training phase;
[0035] A sensing vector construction unit, used for obtaining reading values of each sensor at the monitoring point of the urban garden to be monitored and constructing them into a sensing vector;
[0036] a classification feature vector generating unit, configured to obtain a classification feature vector matching the sensor vector from the sensor feature map obtained by the feature map generating unit by using the sensor vector obtained by the sensor vector constructing unit as a query vector; and
[0037] The monitoring result generating unit is used to obtain the monitoring result of the monitored point of the urban garden to be monitored by passing the classification feature vector obtained by the classification feature vector generating unit through a classifier.
[0038] According to another aspect of the present application, an electronic device is provided, comprising: a processor; and a memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor executes the urban garden monitoring method based on the Internet of Things as described above.
[0039] According to yet another aspect of the present application, a computer-readable medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the urban garden monitoring method based on the Internet of Things as described above.
[0040] According to the urban garden monitoring method based on the Internet of Things, the urban garden monitoring device based on the Internet of Things and the electronic device provided by the present application, the abnormal state of the garden is judged holistically by using the correlation between the values of the sensors of the gardens at various locations in the city, which can avoid the variability problem of threshold setting and improve the accuracy of abnormal judgment. In addition, the present application also clusters the Softmax function values of the feature values at each location in the feature map, and trains the block structure in the convolutional neural network based on the clustering results, so that the block structure in the convolutional neural network can be adapted to the predetermined pattern based on the category in the original data, thereby improving the accuracy and effectiveness of feature mining. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0042] Figure 1 Schematic diagram of a scenario of an urban garden monitoring method based on the Internet of Things according to an embodiment of the present application.
[0043] Figure 2A The flowchart of the training phase in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application.
[0044] Figure 2B This is a flow chart of the prediction stage in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application.
[0045] Figure 3A Schematic diagram of the architecture of the training phase in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application.
[0046] Figure 3B Schematic diagram of the architecture of the prediction stage in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application.
[0047] Figure 4 4 is a block diagram of an urban garden monitoring device based on the Internet of Things according to an embodiment of the present application.
[0048] Figure 5 is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0050] Scenario Overview
[0051] As mentioned above, through various sensors based on the Internet of Things, such as temperature sensors, humidity sensors, etc., it is possible to obtain monitoring data of gardens at various locations in the city, and by analyzing these monitoring data, it is possible to monitor the status of urban gardens. For example, when the value of a sensor is abnormal, it can be determined that the garden corresponding to the sensor is abnormal, thereby further eliminating risks.
[0052] However, for the entire city, abnormal monitoring based on the value of a single sensor requires accurate setting of judgment thresholds, which will change with time and location. For example, for the temperature threshold, it is obvious that the temperature in summer will be higher than that in winter, and the temperature in densely populated areas will be higher than that in sparsely populated areas, which will affect the setting of the corresponding thresholds, making it impossible to guarantee the accuracy of abnormal judgment.
[0053] The applicant of this application has taken into consideration that the states of the gardens distributed in various locations in the city themselves have some common pattern changes, and these pattern changes will reflect the correlation between the numerical values of the sensors. Therefore, if this correlation can be used instead of comparing with a single threshold to judge the abnormal state of the garden, it will be possible to avoid the problem of setting a single threshold and improve the accuracy of abnormal judgment.
[0054] That is, in the technical solution of the present application, the reading values of each sensor at each monitoring point are first obtained and formed into a sensor vector, and then the sensor vectors of each monitoring point are arranged in the sample dimension to obtain a sensor matrix. In this way, the correlation between the values of the two dimensions of the sensor matrix can be mined through a convolutional neural network.
[0055] Furthermore, in order to fully explore the hidden patterns in the data, the convolutional neural network used in this application must have a predetermined width and depth. According to recent research on deep neural networks, as the width or depth of the deep neural network increases, a block structure will appear in the deep neural network, that is, multiple continuous layers with predetermined similar representations exceeding a threshold and predetermined blocks therein. This can also be seen by examining the data attributes in this application, that is, there will be certain patterns between the sensor data of each monitoring point, for example, when there is water, the humidity will increase when the temperature rises, and when there is no water, the humidity will decrease when the temperature rises; in addition, there will be corresponding patterns between the sensor data of each monitoring point, for example, gardens near residential areas will have similar temperature change patterns.
[0056] Therefore, in the training process of the convolutional neural network of the present application, after obtaining the sensor feature map from the sensor matrix, the Softmax function value is calculated for the feature values of each position in the sensor feature map, and the feature values are clustered based on the category function value, so as to mine the category pattern in the feature map, thereby performing category-based block division on each position in the feature map. Then, in the process of iteratively updating the convolutional neural network, the parameters of the corresponding positions of each layer in the convolutional neural network are updated each time based on the block corresponding to a category in the feature map, so that the block structure in the convolutional neural network is more adapted to the category-based predetermined pattern in the original data, so that the convolutional neural network can more accurately and effectively extract the predetermined pattern information in the original data.
[0057] In this way, after obtaining the trained convolutional neural network, during inference, the sensor data of all monitored urban garden monitoring points can be obtained and constructed into a sensor matrix in the above manner to obtain a sensor feature map. The sensor vector composed of the sensor data of the urban garden monitoring point to be monitored is then used as a query vector and multiplied by the sensor feature map to obtain a classification feature vector, which is then input into the classifier to obtain the monitoring results of the urban garden monitoring point to be monitored.
[0058] Based on this, the present application proposes an urban garden monitoring method based on the Internet of Things, which includes: a training phase and a prediction phase. Among them, the training phase includes the steps of: obtaining the reading values of each sensor at each monitoring point of the urban garden to be monitored as training data, and each of the sensors is interconnected via the Internet of Things; arranging the reading values of each sensor at each of the monitoring points into training sensor vectors, and arranging the training sensor vectors of each of the monitoring points in the sample dimension to obtain a training sensor matrix; using a deep convolutional neural network to obtain a training sensor feature map from the training sensor matrix; calculating the Softmax-like classification function value of the eigenvalue of each position in the training sensor feature map, and the Softmax-like classification function is a natural exponential function value that takes the eigenvalue of each position raised to the power of the eigenvalue of each position divided by the value of the eigenvalue of each position in the sensor feature map. The eigenvalue of is the result of the weighted sum of the natural exponential function values raised to power; the eigenvalues at each position in the training sensor feature map are clustered based on the Softmax classification function values corresponding to the eigenvalues at each position in the training sensor feature map to obtain a training classification feature map with multiple category areas; the positions of the category areas in the classification feature map are transmitted to the corresponding areas of each layer in the deep convolutional neural network to determine multiple block structures corresponding to the multiple category areas in the convolutional neural network; the training classification feature map with multiple category areas is passed through a classifier to obtain a classification loss function value; and the deep convolutional neural network is trained based on a block structure based on the classification loss function value. Among them, the prediction stage includes the steps of: obtaining the reading values of each sensor of all monitoring points of the urban garden to be monitored and constructing a sensor matrix; passing the sensor matrix through the deep convolutional neural network trained in the training stage to obtain a sensor feature map; obtaining the reading values of each sensor of the monitored points of the urban garden to be monitored and constructing a sensor vector; using the sensor vector as a query vector to obtain a classification feature vector matching the sensor vector from the sensor feature map; and passing the classification feature vector through a classifier to obtain the monitoring results of the monitored points of the urban garden to be monitored.
[0059] Figure 1 The figure shows a scene schematic diagram of the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application. Figure 1 As shown, in the training phase of this application scenario, first, from each sensor of each monitoring point of the urban garden to be monitored (for example, Figure 1 Then, the training data is input into a server (e.g., Figure 1In S) as shown in , the server can train the convolutional neural network for urban garden monitoring based on the Internet of Things with the training data using the urban garden monitoring algorithm based on the Internet of Things.
[0060] After the training is completed, in the prediction stage, first, the sensors at each monitoring point of the urban garden to be monitored (for example, Figure 1 Then, the reading value is input into a server (for example, Figure 1 In the S) shown in the figure, the server can process the reading value with the urban garden monitoring algorithm based on the Internet of Things to generate a monitoring result indicating whether there is an abnormality at the monitored point of the urban garden to be monitored. In this application scenario, the sensors of the monitoring points of the urban garden to be monitored include but are not limited to temperature sensors, humidity sensors, etc. And the sensors are interconnected via the Internet of Things.
[0061] After introducing the basic principles of the present application, various non-limiting embodiments of the present application will be described in detail with reference to the accompanying drawings.
[0062] Exemplary Methods
[0063] Figure 2A The flowchart of the training phase in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application is shown. Figure 2AAs shown, according to the urban garden monitoring method based on the Internet of Things embodiment of the present application, the method includes: a training phase, including the steps of: S110, obtaining the reading values of each sensor of each monitoring point of the urban garden to be monitored as training data, and each of the sensors is connected to each other via the Internet of Things; S120, arranging the reading values of each sensor of each of the monitoring points into training sensor vectors, and arranging the training sensor vectors of each of the monitoring points in the sample dimension to obtain a training sensor matrix; S130, using a deep convolutional neural network to obtain a training sensor feature map from the training sensor matrix; S140, calculating the Softmax-like classification function value of the eigenvalue of each position in the training sensor feature map, and the Softmax-like classification function is a natural exponential function value divided by the eigenvalue of each position raised to a power. The result of taking the weighted sum of the natural exponential function values raised to the power of the eigenvalues at each position in the sensor feature map; S150, clustering the eigenvalues at each position in the sensor feature map based on the Softmax classification function values corresponding to the eigenvalues at each position in the training sensor feature map to obtain a training classification feature map with multiple category areas; S160, transmitting the positions of the category areas in the classification feature map to the corresponding areas of each layer in the deep convolutional neural network to determine multiple block structures corresponding to the multiple category areas in the convolutional neural network; S170, passing the training classification feature map with multiple category areas through a classifier to obtain a classification loss function value; and, S180, training the deep convolutional neural network based on a block structure based on the classification loss function value.
[0064] Figure 2B The figure shows a flow chart of the prediction stage in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application. Figure 2B As shown, according to the urban garden monitoring method based on the Internet of Things embodiment of the present application, it also includes: a prediction stage, including the steps of: S210, obtaining the reading values of each sensor of all monitoring points of the urban garden to be monitored and constructing a sensor matrix; S220, passing the sensor matrix through the deep convolutional neural network trained in the training stage to obtain a sensor feature map; S230, obtaining the reading values of each sensor of the monitored points of the urban garden to be monitored and constructing a sensor vector; S240, using the sensor vector as a query vector to obtain a classification feature vector matching the sensor vector from the sensor feature map; and, S250, passing the classification feature vector through a classifier to obtain the monitoring result of the monitored points of the urban garden to be monitored.
[0065] Figure 3A The diagram shows a schematic diagram of the architecture of the training phase in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application. Figure 3AAs shown, in the training phase, in the network architecture, first, the reading values obtained from each sensor at each monitoring point of the urban garden to be monitored (for example, Figure 3A IN1) as training data and arranged as training sensor vectors (e.g., as Figure 3A VT shown in FIG), and arranging the training sensor vectors of each monitoring point in the sample dimension to obtain a training sensor matrix (for example, Figure 3A ); then, using a deep convolutional neural network (e.g., Figure 3A The CNN 1 shown in FIG. 1 obtains a training sensor feature map (e.g., Figure 3A Then, the Softmax classification function value of the feature value at each position in the training sensor feature map is calculated (for example, Figure 3A Then, the feature values at each position in the training sensor feature map are clustered based on the Softmax classification function value corresponding to the feature value at each position in the training sensor feature map to obtain a training classification feature map with multiple category areas (for example, Figure 3A Then, the position of the category region in the classification feature map is transmitted to the corresponding region of each layer in the deep convolutional neural network to determine a plurality of block structures corresponding to the plurality of category regions in the convolutional neural network (for example, Figure 3A Then, the training classification feature map with multiple category regions is passed through a classifier (for example, Figure 3A The method further comprises: first, performing a block-structured training on the deep convolutional neural network based on the classification loss function value.
[0066] Figure 3B The figure shows a schematic diagram of the architecture of the prediction stage in the urban garden monitoring method based on the Internet of Things according to an embodiment of the present application. Figure 3B As shown, in the prediction stage, in the network structure, first, the reading values of each sensor of all monitoring points of the urban garden to be monitored are obtained (for example, Figure 3B IN2) is constructed as a sensing matrix (e.g., as Figure 3B Then, the sensor matrix is passed through the deep convolutional neural network trained in the training phase (for example, as Figure 3B ) to obtain the sensor feature map (e.g., Figure 3B Then, the reading values of each sensor at the monitored point of the urban garden to be monitored are obtained and constructed into a sensing vector (for example, Figure 3BThen, the sensing vector is used as a query vector to obtain a classification feature vector matching the sensing vector from the sensing feature map (for example, Figure 3B FC1 shown in FIG); and, finally, the classification feature vector is passed through a classifier (e.g., Figure 3B The classifier shown in FIG. 1 is used to obtain the monitoring results of the monitoring points of the urban garden to be monitored.
[0067] More specifically, in the training phase, in step S110, the reading values of each sensor at each monitoring point of the urban garden to be monitored are obtained as training data, and each of the sensors is connected to each other via the Internet of Things. As mentioned above, for the entire city, the abnormal monitoring based on the value of a single sensor requires accurate setting of the judgment threshold, and this judgment threshold will change with time and place. For example, for the temperature threshold, it is obvious that summer will be higher than winter, and the densely populated area will be higher than the sparsely populated area, which will affect the setting of the corresponding threshold, resulting in the inability to ensure the accuracy of abnormal judgment. In addition, the present application also takes into account that the state of the gardens distributed in various locations in the city itself still has some common pattern changes, and these pattern changes will reflect the correlation between the values of the sensors. Therefore, in the technical solution of the present application, the abnormal state of the garden is judged by replacing the comparison with a single threshold value by this correlation relationship, which can avoid the problem of setting a single threshold value to improve the accuracy of abnormal judgment.
[0068] It is worth mentioning that the sensors at the monitoring points of the urban gardens to be monitored include but are not limited to temperature sensors, humidity sensors, etc., and the sensors are interconnected via the Internet of Things.
[0069] More specifically, in the training phase, in step S120, the reading values of the sensors at the monitoring points are arranged as training sensor vectors, and the training sensor vectors of the monitoring points are arranged in the sample dimension to obtain a training sensor matrix. It should be understood that in order to subsequently mine the correlation between the values of the two dimensions of the sensor matrix through a convolutional neural network, it is necessary to first arrange the reading values of the sensors at the monitoring points into training sensor vectors, and then arrange them into a training sensor matrix according to the sample dimension.
[0070] Specifically, in the embodiment of the present application, the process of arranging the reading values of each sensor of each monitoring point into a training sensor vector includes: first, normalizing the reading values of each sensor of each monitoring point. It should be understood that, because each position in the training sensor feature map is to be clustered based on the feature value later, in order to avoid the adverse effects of different dimensions and different values on pattern recognition, and to facilitate the training and convergence of the convolutional neural network, it is necessary to normalize the reading values of each sensor. It is worth mentioning that in a specific example, the formula X can be used norm =(X i -X min ) / (X max -X min ) Calculate the maximum normalized data of the reading values of each sensor at each monitoring point, where X i Indicates the reading value of each sensor of each monitoring point. In other examples, the reading values of each sensor of each monitoring point can be normalized in other ways, which is not limited by the present application. In particular, in the embodiment of the present application, the values of the same sensor of each monitoring point are normalized, rather than being normalized based on the values of each sensor in the vector.
[0071] Then, the normalized reading values of each sensor at each monitoring point are arranged as the training sensor vector.
[0072] More specifically, in the training phase, in step S130, a training sensor feature map is obtained from the training sensor matrix using a deep convolutional neural network. That is, the training sensor matrix is processed using a deep convolutional neural network to mine the correlation between the values of the two dimensions of the sensor matrix through the convolutional neural network.
[0073] Specifically, in an embodiment of the present application, the process of obtaining a training sensor feature map from the training sensor matrix using a deep convolutional neural network includes: the deep convolutional neural network obtains the training sensor feature map from the training sensor matrix using the following formula; the formula is:
[0074]
[0075] in, is the input of the i-th layer of deep convolutional neural network, is the output of the i-th layer of deep convolutional neural network, is the convolution kernel of the i-th layer of deep convolutional neural network, and is the bias vector of the i-th layer of the deep convolutional neural network, Represents a nonlinear activation function. It should be understood that the gradient of the Sigmoid nonlinear activation function approaches 0 within a very narrow range of independent variables, which can easily lead to the problem of gradient diffusion. Therefore, in the embodiment of the present application, Function as activation function.
[0076] More specifically, in the training phase, in step S140, the Softmax-like classification function value of the feature value at each position in the training sensor feature map is calculated, and the Softmax-like classification function is the result of the natural exponential function value of the feature value at each position being raised to a power divided by the weighted sum of the natural exponential function value of the feature value at each position in the sensor feature map being raised to a power. It should be understood that in order to fully explore the hidden patterns in the data, the convolutional neural network used in this application must have a predetermined width and depth, and according to recent research on deep neural networks, as the width or depth of the deep neural network increases, a block structure in the deep neural network will appear, that is, multiple continuous layers with predetermined similar representations exceeding a threshold and predetermined blocks therein. This can also be seen by examining the data attributes in this application, that is, there will be certain patterns between the sensor data of each monitoring point, for example, when there is a water surface, the humidity will also increase when the temperature rises, and when there is no water surface, the humidity will decrease when the temperature rises; in addition, there will also be corresponding patterns between the sensor data of each monitoring point, for example, gardens near residential areas will have similar temperature change patterns. Therefore, in the technical solution of the present application, after obtaining the sensor feature map from the sensor matrix, a Softmax function value is calculated for the eigenvalues of each position in the sensor feature map, so as to facilitate the subsequent clustering of the eigenvalues based on the category function value, so as to mine the category pattern in the feature map, thereby performing category-based segmentation on each position in the feature map.
[0077] Specifically, in an embodiment of the present application, the process of calculating the Softmax classification function value of the feature value at each position in the training sensor feature map includes: calculating the Softmax classification function value of the feature value at each position in the training sensor feature map using the following formula; the formula is yi=exp(xi) / ∑exp(xi), xi represents the feature value at each position in the training sensor feature map.
[0078] More specifically, in the training phase, in step S150, the feature values at each position in the training sensor feature map are clustered based on the Softmax classification function values corresponding to the feature values at each position in the training sensor feature map, so as to obtain a training classification feature map with multiple category regions. That is, the feature values at each position in the training sensor feature map are clustered based on the Softmax classification function values corresponding to the feature values at each position in the training sensor feature map, so as to mine the category pattern in the sensor feature map, thereby facilitating the subsequent category-based segmentation of each position in the feature map.
[0079] Specifically, in an embodiment of the present application, the process of clustering the feature values at each position in the training sensor feature map based on the Softmax classification function values corresponding to the feature values at each position in the training sensor feature map to obtain a training classification feature map with multiple category areas includes: clustering the feature values at each position in the training sensor feature map using a K-means clustering algorithm based on the Softmax classification function values corresponding to the feature values at each position in the training sensor feature map to obtain the training classification feature map with multiple category areas.
[0080] More specifically, in the training phase, in step S160, the position of the category region in the classification feature map is transmitted to the corresponding region of each layer in the deep convolutional neural network to determine a plurality of block structures corresponding to the plurality of category regions in the convolutional neural network. It should be understood that by clustering based on the Softmax function value of the feature value at each position in the feature map and training the block structure in the convolutional neural network based on the clustering result, the block structure in the convolutional neural network can be adapted to the category-based predetermined pattern in the original data to improve the accuracy and effectiveness of feature mining.
[0081] More specifically, in the training phase, in step S170, the training classification feature map with multiple category regions is passed through a classifier to obtain a classification loss function value. Specifically, in an embodiment of the present application, the process of passing the training classification feature map with multiple category regions through a classifier to obtain a classification loss function value includes: first, encoding the training classification feature map through one or more fully connected layers of the classifier to obtain a training classification feature vector.
[0082] Next, the training classification feature vector is input into the Softmax classification function of the classifier to obtain a classification result. Specifically, the training classification feature vector is first input into the Softmax classification function of the classifier to obtain a first probability that the urban garden monitoring point to be monitored is normal and a second probability that the urban garden monitoring point to be monitored is abnormal; then the classification result is determined based on a comparison between the first probability and the second probability, that is, when the first probability is greater than the second probability, the classification result is that the urban garden monitoring point to be monitored is normal, and when the first probability is less than the second probability, the classification result is that the urban garden monitoring point to be monitored is abnormal.
[0083] Finally, the cross entropy loss function value between the classification result and the true value is calculated as the classification loss function value.
[0084] More specifically, in the training phase, in step S180, the deep convolutional neural network is trained based on the block structure based on the classification loss function value. That is, the block structure in the training convolutional neural network is reversely iterated based on the clustering result. It is worth mentioning that in the process of iteratively updating the convolutional neural network, the parameters of the corresponding positions of each layer in the convolutional neural network are updated each time based on the block corresponding to a category in the feature map, so that the block structure in the convolutional neural network is more adapted to the category-based predetermined pattern in the original data, so that the convolutional neural network can more accurately and effectively extract the predetermined pattern information in the original data.
[0085] After the training is completed, the prediction phase begins. That is, after using the IoT-based urban garden monitoring algorithm to train the convolutional neural network, the trained convolutional neural network is used in actual prediction scenarios.
[0086] More specifically, in the prediction stage, in step S210, the reading values of each sensor of all monitoring points of the urban garden to be monitored are obtained and constructed into a sensor matrix. Here, the sensors of each monitoring point of the urban garden to be monitored include but are not limited to temperature sensors, humidity sensors, etc. And each of the sensors is interconnected via the Internet of Things. In a specific embodiment, first, the reading values of each sensor of each monitoring point are normalized; then, the normalized reading values of each sensor of each monitoring point are arranged as the training sensor vector.
[0087] More specifically, in the prediction stage, in step S220, the sensor matrix is passed through the deep convolutional neural network trained in the training stage to obtain a sensor feature map. That is, the sensor matrix is processed by the trained deep convolutional neural network to mine the correlation between the values of the two dimensions of the sensor matrix through the trained deep convolutional neural network.
[0088] More specifically, in the prediction stage, in step S230 and step S240, the reading values of each sensor at the monitored point of the urban garden to be monitored are obtained and constructed as a sensor vector, and the sensor vector is used as a query vector to obtain a classification feature vector matching the sensor vector from the sensor feature map. That is, the sensor vector is used as a query vector and matrix multiplied with the sensor feature map to obtain the classification feature vector.
[0089] More specifically, in the prediction stage, in step S250, the classification feature vector is passed through a classifier to obtain the monitoring result of the monitored point of the urban garden to be monitored. That is, first, the classification feature map is passed through one or more fully connected layers to encode the classification feature map through the one or more fully connected layers to obtain a classification feature vector. Next, the classification feature vector is input into the Softmax classification function of the classifier to obtain a first probability that the classification feature vector belongs to the normal urban garden monitoring point to be monitored and a second probability that the urban garden monitoring point to be monitored is abnormal. Finally, the classification result is determined based on the comparison between the first probability and the second probability. Specifically, when the first probability is greater than the second probability, the classification result is that the urban garden monitoring point to be monitored is normal, and when the first probability is less than the second probability, the classification result is that the urban garden monitoring point to be monitored is abnormal.
[0090] In summary, the IoT-based urban garden monitoring method based on the embodiment of the present application is explained, which can comprehensively judge the abnormal state of the garden by using the correlation between the values of the sensors of the gardens at various locations in the city, thereby avoiding the variability problem of threshold setting and improving the accuracy of abnormal judgment. In addition, the present application also clusters the Softmax-like function values of the feature values at each location in the feature map, and trains the block structure in the convolutional neural network based on the clustering results, so that the block structure in the convolutional neural network can be adapted to the category-based predetermined pattern in the original data, thereby improving the accuracy and effectiveness of feature mining.
[0091] Exemplary Devices
[0092] Figure 4 The figure shows a block diagram of an urban garden monitoring device based on the Internet of Things according to an embodiment of the present application. Figure 4 As shown, the urban garden monitoring device 400 based on the Internet of Things according to an embodiment of the present application includes: a training module 410 and a prediction module 420.
[0093] like Figure 4 As shown, the training module 410 includes: a data acquisition unit 411, which is used to obtain the reading values of each sensor of each monitoring point of the urban garden to be monitored as training data, and each of the sensors is connected to each other via the Internet of Things; a training sensor matrix generation unit 412, which is used to arrange the reading values of each sensor of the monitoring point obtained by each of the data acquisition units 411 into training sensor vectors, and arrange the training sensor vectors of each of the monitoring points in the sample dimension to obtain a training sensor matrix; a convolution processing unit 413, which is used to obtain a training sensor feature map from the training sensor matrix obtained by the training sensor matrix generation unit 412 using a deep convolutional neural network; a classification function value calculation unit 414, which is used to calculate the Softmax-like classification function value of the eigenvalue of each position in the training sensor feature map obtained by the convolution processing unit 413, and the Softmax-like classification function is a natural exponential function value of the eigenvalue of each position raised to the power divided by the value of the eigenvalue of each position in the sensor feature map. The eigenvalue of is the result of the weighted sum of the natural exponential function values raised to power; a clustering unit 415, used to cluster the eigenvalues at each position in the training sensor feature map based on the Softmax classification function values corresponding to the eigenvalues at each position in the training sensor feature map obtained by the classification function value calculation unit 414, so as to obtain a training classification feature map with multiple category areas; a block structure determination unit 416, used to transmit the positions of the category areas in the classification feature map obtained by the clustering unit 415 to the corresponding areas of each layer in the deep convolutional neural network, so as to determine multiple block structures corresponding to the multiple category areas in the convolutional neural network; a classifier processing unit 417, used to pass the training classification feature map with multiple category areas obtained by the block structure determination unit 416 through a classifier to obtain a classification loss function value; and a training unit 418, used to perform block structure-based training on the deep convolutional neural network based on the classification loss function value obtained by the classifier processing unit 417.
[0094] like Figure 4As shown, the prediction module 420 includes: a sensor matrix construction unit 421, which is used to obtain the reading values of each sensor of all monitoring points of the urban garden to be monitored and construct a sensor matrix; a feature map generation unit 422, which is used to obtain a sensor feature map by passing the sensor matrix obtained by the sensor matrix construction unit 421 through the deep convolutional neural network trained in the training stage; a sensor vector construction unit 423, which is used to obtain the reading values of each sensor of the monitored points of the urban garden to be monitored and construct a sensor vector; a classification feature vector generation unit 424, which is used to obtain a classification feature vector matching the sensor vector from the sensor feature map obtained by the feature map generation unit 422 using the sensor vector obtained by the sensor vector construction unit 423 as a query vector; and a monitoring result generation unit 425, which is used to pass the classification feature vector obtained by the classification feature vector generation unit through a classifier to obtain the monitoring result of the monitored points of the urban garden to be monitored.
[0095] In one example, in the above-mentioned IoT-based urban garden monitoring device 400, the training sensor matrix generation unit 412 includes: a normalization processing subunit, used to normalize the reading values of each of the sensors at each of the monitoring points; and an arrangement subunit, used to arrange the normalized reading values of each of the sensors at the monitoring points obtained by the normalization processing subunits into the training sensor vector.
[0096] In one example, in the above-mentioned IoT-based urban garden monitoring device 400, the convolution processing unit 413 is further used for: the deep convolutional neural network obtains the training sensor feature map from the training sensor matrix according to the following formula; the formula is:
[0097]
[0098] in, is the input of the i-th layer of deep convolutional neural network, is the output of the i-th layer of deep convolutional neural network, is the convolution kernel of the i-th layer of deep convolutional neural network, and is the bias vector of the i-th layer of the deep convolutional neural network, represents a non-linear activation function.
[0099] In one example, in the above-mentioned IoT-based urban garden monitoring device 400, the classification function value calculation unit 414 is further used to: calculate the Softmax classification function value of the feature value of each position in the training sensor feature map using the following formula; the formula is yi=exp(xi) / ∑exp(xi), xi represents the feature value of each position in the training sensor feature map.
[0100] In one example, in the above-mentioned IoT-based urban garden monitoring device 400, the clustering unit 415 is further used to: cluster the feature values of each position in the sensor feature map using the K-means clustering algorithm based on the Softmax classification function value corresponding to the feature value of each position in the training sensor feature map to obtain the training classification feature map having multiple category areas.
[0101] In one example, in the above-mentioned IoT-based urban garden monitoring device 400, the classifier processing unit 417 includes: a training classification feature vector generation subunit, used to encode the training classification feature map through one or more fully connected layers of the classifier to obtain a training classification feature vector; a classification result calculation subunit, used to input the training classification feature vector obtained by the training classification feature vector generation subunit into the Softmax classification function of the classifier to obtain a classification result; and a comparison subunit, used to calculate the cross entropy loss function value between the classification result obtained by the classification result calculation subunit and the true value as the classification loss function value.
[0102] In one example, in the above-mentioned IoT-based urban garden monitoring device 400, the classification feature vector generation unit 424 is further used to: use the sensing vector as a query vector to perform matrix multiplication with the sensing feature map to obtain the classification feature vector.
[0103] In one example, in the above-mentioned IoT-based urban garden monitoring device 400, the monitoring result is whether there is an abnormality at the monitored point.
[0104] Here, those skilled in the art can understand that the specific functions and operations of the various units and modules in the above-mentioned urban garden monitoring device 400 based on the Internet of Things have been referred to above. Figures 1 to 3B The description of the IoT-based urban garden monitoring method has been introduced in detail, and therefore, its repeated description will be omitted.
[0105] As described above, the urban garden monitoring device 400 based on the Internet of Things according to the embodiment of the present application can be implemented in various terminal devices, such as a server of an urban garden monitoring algorithm based on the Internet of Things. In one example, the urban garden monitoring device 400 based on the Internet of Things according to the embodiment of the present application can be integrated into the terminal device as a software module and / or a hardware module. For example, the urban garden monitoring device 400 based on the Internet of Things can be a software module in the operating device of the terminal device, or can be an application developed for the terminal device; of course, the urban garden monitoring device 400 based on the Internet of Things can also be one of the many hardware modules of the terminal device.
[0106] Alternatively, in another example, the IoT-based urban garden monitoring device 400 and the terminal device may also be separate devices, and the IoT-based urban garden monitoring device 400 may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.
[0107] Exemplary Electronic Devices
[0108] Below, reference Figure 5 To describe the electronic device according to the embodiment of the present application. Figure 5 As shown, the electronic device 10 includes one or more processors 11 and a memory 12. The processor 11 may be a central processing unit (CPU) or other processing units with data processing capability and / or instruction execution capability, and may control other components in the electronic device 10 to perform desired functions.
[0109] The memory 12 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the functions of the urban garden monitoring method based on the Internet of Things of various embodiments of the present application described above and / or other desired functions. Various contents such as training classification feature maps, classification loss function values, etc. may also be stored in the computer-readable storage medium.
[0110] In one example, the electronic device 10 may further include: an input device 13 and an output device 14 , and these components are interconnected via a bus device and / or other forms of connection mechanisms (not shown).
[0111] The input device 13 may include, for example, a keyboard, a mouse, etc.
[0112] The output device 14 can output various information to the outside, including classification results, etc. The output device 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0113] Of course, to simplify, Figure 5 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.
[0114] Exemplary computer program products and computer-readable storage media
[0115] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps in the functions of the urban garden monitoring method based on the Internet of Things according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0116] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0117] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the urban garden monitoring method based on the Internet of Things described in the above "Exemplary Method" section of this specification.
[0118] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, devices or components, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0119] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0120] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0121] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0122] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0123] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for monitoring urban gardens based on the Internet of Things, characterized in that: include: The training phase includes: Obtaining the reading values of each sensor at each monitoring point of the urban garden to be monitored as training data, wherein each of the sensors is interconnected via the Internet of Things; Arranging the reading values of each of the sensors at each of the monitoring points into a training sensor vector, and arranging the training sensor vectors of each of the monitoring points in a sample dimension to obtain a training sensor matrix; Obtaining a training sensor feature map from the training sensor matrix using a deep convolutional neural network; Calculate a Softmax-like classification function value of the feature value at each position in the training sensor feature map, where the Softmax-like classification function is a weighted sum of a natural exponential function value of the feature value at each position raised to a power divided by a natural exponential function value of the feature value at each position in the sensor feature map raised to a power; Clustering the feature values at each position in the training sensor feature map based on the Softmax classification function value corresponding to the feature value at each position in the training sensor feature map to obtain a training classification feature map with multiple category areas; Transmitting the position of the category region in the classification feature map to the corresponding regions of each layer in the deep convolutional neural network to determine a plurality of block structures corresponding to the plurality of category regions in the convolutional neural network; Passing the training classification feature map having multiple category regions through a classifier to obtain a classification loss function value; and Performing block-structure-based training on the deep convolutional neural network based on the classification loss function value; and The forecasting phase includes: Obtaining reading values of each sensor of all monitoring points of the urban garden to be monitored and constructing a sensor matrix; Passing the sensing matrix through the deep convolutional neural network trained in the training phase to obtain a sensing feature map; Obtaining reading values of various sensors at the monitored points of the urban garden to be monitored and constructing them into a sensing vector; Using the sensing vector as a query vector, obtaining a classification feature vector matching the sensing vector from the sensing feature map; and Passing the classification feature vector through a classifier to obtain a monitoring result of the monitoring point of the urban garden to be monitored; The method of clustering the feature values at each position in the sensor feature map based on the Softmax classification function value corresponding to the feature values at each position in the training sensor feature map to obtain a training classification feature map having multiple category areas includes: Based on the Softmax classification function value corresponding to the feature value at each position in the training sensor feature map, the feature values at each position in the sensor feature map are clustered using the K-means clustering algorithm to obtain the training classification feature map with multiple category areas.
2. The urban garden monitoring method based on the Internet of Things according to claim 1, wherein: Arranging the reading values of the sensors at the monitoring points into training sensor vectors includes: Normalizing the reading values of each sensor at each monitoring point; and The normalized reading values of the sensors at the monitoring points are arranged as the training sensor vectors.
3. The urban garden monitoring method based on the Internet of Things according to claim 1, wherein: Obtaining a training sensor feature map from the training sensor matrix using a deep convolutional neural network, including: The deep convolutional neural network obtains the training sensor feature map from the training sensor matrix using the following formula; The formula is: ; in, is the input of the i-th layer of deep convolutional neural network, is the output of the i-th layer of deep convolutional neural network, is the convolution kernel of the i-th layer of deep convolutional neural network, and is the bias vector of the i-th layer of the deep convolutional neural network, represents a non-linear activation function.
4. The urban garden monitoring method based on the Internet of Things according to claim 1, wherein: Calculating the Softmax classification function value of the feature value at each position in the training sensor feature map includes: The Softmax classification function value of the feature value at each position in the training sensor feature map is calculated by the following formula; The formula is yi=exp(xi) / ∑exp(xi), where xi represents the characteristic value of each position in the training sensor feature map.
5. The urban garden monitoring method based on the Internet of Things according to claim 1, wherein: Passing the training classification feature map having multiple category regions through a classifier to obtain a classification loss function value, comprising: Encoding the training classification feature map through one or more fully connected layers of the classifier to obtain a training classification feature vector; Inputting the training classification feature vector into the Softmax classification function of the classifier to obtain a classification result; and The cross entropy loss function value between the classification result and the true value is calculated as the classification loss function value.
6. The urban garden monitoring method based on the Internet of Things according to claim 1, wherein: The method of obtaining a classification feature vector matching the sensing vector from the sensing feature map by using the sensing vector as a query vector comprises: The sensing vector is used as a query vector to perform matrix multiplication with the sensing feature map to obtain the classification feature vector.
7. The urban garden monitoring method based on the Internet of Things according to claim 5, wherein: The monitoring result is whether there is an abnormality at the monitored point.
8. An urban garden monitoring device based on the Internet of Things, characterized in that: include: Training modules include: A data acquisition unit, used to acquire the reading values of each sensor at each monitoring point of the urban garden to be monitored as training data, wherein each of the sensors is interconnected via the Internet of Things; A training sensor matrix generating unit, used for arranging the reading values of each sensor of the monitoring point obtained by each data acquisition unit into a training sensor vector, and arranging the training sensor vectors of each monitoring point in a sample dimension to obtain a training sensor matrix; A convolution processing unit, configured to obtain a training sensing feature map from the training sensing matrix obtained by the training sensing matrix generating unit using a deep convolutional neural network; a classification function value calculation unit, used to calculate a Softmax-like classification function value of the feature value at each position in the training sensor feature map obtained by the convolution processing unit, wherein the Softmax-like classification function is a result of dividing a natural exponential function value of the feature value at each position raised to a power by a weighted sum of a natural exponential function value of the feature value at each position in the sensor feature map raised to a power; A clustering unit, configured to cluster the feature values at each position in the training sensor feature map based on the Softmax-like classification function values corresponding to the feature values at each position in the training sensor feature map obtained by the classification function value calculation unit, so as to obtain a training classification feature map having multiple category areas; A block structure determination unit, configured to transmit the position of the category region obtained by the clustering unit in the classification feature map to the corresponding region of each layer in the deep convolutional neural network, so as to determine a plurality of block structures corresponding to the plurality of category regions in the convolutional neural network; a classifier processing unit, configured to pass the training classification feature map having multiple category regions obtained by the block structure determination unit through a classifier to obtain a classification loss function value; and a training unit, configured to perform block-structure based training on the deep convolutional neural network based on the classification loss function value obtained by the classifier processing unit; and Prediction module, including: A sensor matrix construction unit, used to obtain the reading values of each sensor of all monitoring points of the urban garden to be monitored and construct a sensor matrix; A feature map generating unit, configured to obtain a sensor feature map by passing the sensor matrix obtained by the sensor matrix construction unit through the deep convolutional neural network trained in the training phase; A sensing vector construction unit, used for obtaining reading values of each sensor at the monitoring point of the urban garden to be monitored and constructing them into a sensing vector; a classification feature vector generating unit, configured to obtain a classification feature vector matching the sensor vector from the sensor feature map obtained by the feature map generating unit by using the sensor vector obtained by the sensor vector constructing unit as a query vector; and A monitoring result generating unit, used for passing the classification feature vector obtained by the classification feature vector generating unit through a classifier to obtain a monitoring result of the monitoring point of the urban garden to be monitored; Wherein, the clustering unit is used to: cluster the feature values at each position in the training sensor feature map using a K-means clustering algorithm based on the Softmax classification function value corresponding to the feature value at each position in the training sensor feature map to obtain the training classification feature map with multiple category areas.
9. An electronic device, comprising: processor; as well as A memory, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the urban garden monitoring method based on the Internet of Things as described in any one of claims 1 to 7.
