A smart garden monitoring and management method and system
By deploying multiple sensors in the smart garden monitoring and management system, performing multi-source data fusion and intelligent prediction, generating intelligent decision-making rules and optimizing control strategies, the problems of insufficient data fusion, inaccurate prediction and insufficient optimization of automated control in the existing system are solved, and intelligent monitoring and control of the garden environment is realized.
Patent Information
- Application Number
- CN202411326619.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-09-23
AI Technical Summary
In the existing smart garden monitoring and management system, there are problems such as insufficient fusion of multi-source data, inaccurate environmental status prediction and insufficient automation control optimization.
By deploying multiple sensors to collect multi-source data, preprocess and feature extraction of the data, perform multi-modal data fusion, build an intelligent prediction model based on the results of timing analysis, generate intelligent decision-making rules, formulate and optimize control strategies, and finally execute automated control and introduce an adaptive control mechanism.
It realizes intelligent monitoring, prediction and control of the garden environment, ensures that the garden status is maintained within an ideal range, and improves the intelligence level and response speed of garden management.
Smart Images

Figure CN119148529B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart garden management, and in particular to a smart garden monitoring and management method and system. Background Art
[0002] With the rapid development of the Internet of Things (IoT), big data and artificial intelligence technologies, smart garden management systems have gradually become an important research direction in the field of gardening. Traditional garden management methods rely on human experience and manual operations, which are not only inefficient but also difficult to cope with complex and changing environmental conditions. In recent years, researchers and engineers have begun to introduce sensor networks, remote sensing technology and data analysis methods, and deploy a variety of sensors to monitor the state of the garden environment in real time, such as temperature, humidity, light, CO2 concentration and other multi-source data. These data are collected into the central control system through wireless transmission technology, and after analysis and processing, they are used to guide the irrigation, fertilization, ventilation, shading and other operations of the garden. However, most of the existing smart garden monitoring and management systems remain at the stage of simple data monitoring and manual control, lacking the ability to deeply mine multimodal data and make intelligent decisions. Especially in gardens with complex and rapidly changing environmental conditions, how to make full use of multi-source data for accurate environmental state prediction and automatic control is still an urgent problem to be solved. Summary of the invention
[0003] In view of the above existing problems, the present invention is proposed.
[0004] Therefore, the present invention provides a smart garden monitoring and management method and system to solve the problems of insufficient multi-source data fusion, inaccurate environmental status prediction and insufficient automatic control optimization in the existing smart garden management system.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a smart garden monitoring and management method, which includes:
[0007] Collect multi-source data by deploying a variety of sensors and pre-process the data;
[0008] Based on the preprocessed data, feature extraction and multimodal data fusion are performed on the data;
[0009] Conduct time series correlation analysis on the fused feature vectors, build an intelligent prediction model based on the time series analysis results, and predict the state of the garden environment;
[0010] Generate intelligent decision-making rules for different environmental states based on time series analysis and prediction results;
[0011] Formulate specific control strategies based on intelligent decision-making rules and optimize the control strategies;
[0012] According to the optimized control strategy, automatic control is performed, and an adaptive control mechanism is introduced to automatically adjust the control strategy.
[0013] As a preferred solution of the smart garden monitoring and management method of the present invention, wherein: the deployment of multiple sensors includes a soil moisture sensor, an air temperature sensor, a light intensity sensor, a CO2 concentration sensor and a high-definition camera;
[0014] The multi-source data collected includes temperature and humidity data, light intensity and CO2 concentration data and image data;
[0015] The data preprocessing includes data cleaning and noise filtering, data standardization, data time alignment, and image enhancement and size normalization.
[0016] As a preferred solution of the smart garden monitoring and management method of the present invention, the method of extracting features and fusing multimodal data based on the pre-processed data includes the following steps:
[0017] Extract time series data from the preprocessed temperature and humidity data, light intensity and CO2 concentration data;
[0018] Input the time series data into the LSTM model;
[0019] Compute the input gate, forget gate, cell state update, output gate, and hidden state update of the LSTM unit;
[0020] The sensor feature vector of the entire time series is represented by the last hidden state of the LSTM network ;
[0021] The size-normalized image data is input into the pre-trained deep convolutional neural network (CNN) model. In each convolution operation, the image is convolved using the convolution kernel.
[0022] Extract high-level features of the image through maximum pooling and normalization;
[0023] Flatten the last layer feature map of the CNN network into an image feature vector ;
[0024] is the sensor feature vector and the image feature vector Initialize the weights separately and set the initial value to 0.5;
[0025] The two feature vectors are fused by weighted averaging to obtain the fused feature vector ;
[0026] The fused feature vector Perform normalization.
[0027] As a preferred solution of the smart garden monitoring and management method of the present invention, the method includes: performing time series correlation analysis on the fused feature vectors, building an intelligent prediction model based on the time series analysis results, and predicting the garden environment state, including the following steps:
[0028] The fused feature vector is smoothed through the STL model;
[0029] Compare the smoothed data with the original data to extract the periodic components;
[0030] Subtract the trend and seasonal components from the original time series data to get the residual;
[0031] The trend component, seasonal component and residual component are taken as the components of the time series feature vector respectively;
[0032] The random forest regression model is used to build an intelligent prediction model for prediction, and the time series features in multi-source data are used as input features;
[0033] The data of each time step is used as a component of the feature vector, combined with the temperature and humidity data to construct a new composite feature;
[0034] Using the sliding window method, the data within a fixed time period is used as the feature of an input sample;
[0035] Combined with time information, timestamps are extracted as features;
[0036] Perform nonlinear transformation on features and try different feature combinations;
[0037] Construct the state of the environment at a certain point in the future as the target variable;
[0038] Use the preprocessed feature vectors and the corresponding target variables to construct a training dataset;
[0039] In the random forest model, multiple decision trees are constructed, each tree is trained on different subset features and samples, and the prediction results of all decision trees are averaged or weighted averaged as the final prediction result;
[0040] Determine the number of trees in the random forest, control the depth of each tree, the minimum number of samples to split an internal node, and the number of features that can be selected for each split;
[0041] The cross-validation method was used to evaluate the stability and generalization ability of the model, the mean square error was used to measure the difference between the predicted value and the true value, and the R² coefficient was used to evaluate the ability of the model to explain the variables;
[0042] Adjust the model’s hyperparameters based on the evaluation results;
[0043] After preprocessing, the sensor data collected in real time is input into the trained random forest regression model for real-time prediction. As time goes by and the environment changes, new data is used to retrain and update the model regularly.
[0044] As a preferred solution of the smart garden monitoring and management method of the present invention, wherein: generating intelligent decision rules for different environmental states according to the time series analysis and prediction results includes the following steps:
[0045] Extract the predicted values of key environmental variables in the next b time steps from the output of the intelligent prediction model. The predicted environmental variables include temperature ,humidity and light intensity , represents the time step, ≤ b;
[0046] Conduct trend analysis on the extracted forecast data and determine key time nodes based on the trends of the forecast data;
[0047] Define the ideal scope of each environment variable, expressed as,
[0048] ;
[0049] The ideal temperature range is [ , ], humidity range is [ , ], light intensity range is [ , ];
[0050] Generate intelligent decision rules based on whether the predicted values of various environmental variables are within the ideal range, and define specific execution parameters for the control operations involved in each decision rule;
[0051] All generated rules are organized into a rule base, and the rules in the rule base are arranged in time steps. Arrange and assign a priority to each rule.
[0052] As a preferred solution of the smart garden monitoring and management method of the present invention, the method of formulating a specific control strategy based on intelligent decision-making rules and optimizing the control strategy includes the following steps:
[0053] Based on the physical characteristics and environmental data of the garden, a control model is established, and the expression is:
[0054] ;
[0055] in, is the system state vector, is the control input vector, is the state transfer function, is the system noise, is the current time step;
[0056] Define the objective function of the control strategy, the expression is,
[0057] ;
[0058] in, is the value of the objective function, is the reference state, is the weight matrix, is the weight matrix of the control input, To predict the time domain length;
[0059] Use the MPC algorithm to optimize the objective function;
[0060] Based on the current state and control models to predict the future The system state in a time step
[0061] By optimizing the objective function , find the optimal control input sequence .
[0062] As a preferred solution of the smart garden monitoring and management method of the present invention, wherein: the automatic control is performed according to the optimized control strategy, the adaptive control mechanism is introduced, and the control strategy is automatically adjusted, including the following steps:
[0063] According to the optimized control strategy, a specific control signal is generated, and the expression is:
[0064] ;
[0065] in, is the actual control signal, is the optimized control input sequence;
[0066] Through the IoT platform, the control signal is transmitted to the corresponding execution device. After receiving the control signal, the device performs the operation according to the predetermined parameters;
[0067] During the control execution process, the environmental status is monitored in real time, the latest environmental data is obtained through the sensor network, and compared with the expected status. If there is a deviation between the actual status and the expected status, the system will automatically adjust the control strategy and execute new control actions;
[0068] Based on the adaptive algorithm, an adaptive model of the control system is established, which can automatically adjust the control parameters according to environmental feedback and historical data;
[0069] Define the parameter update mechanism to ensure that the control system can adjust the control strategy according to real-time data. The update formula is as follows:
[0070] ;
[0071] in, is the current control parameter, is the learning rate, is the objective function Parameters The gradient of
[0072] The system adjusts the control strategy in real time based on the adaptive model to ensure that the environmental state can be maintained within the target range under various conditions;
[0073] During long-term operation, control effects are analyzed regularly, potential problems are identified, and continuous optimization is performed by updating the decision rule base and control model.
[0074] In a second aspect, the present invention provides a smart garden monitoring and management system, comprising:
[0075] The sensor acquisition module is responsible for deploying multiple sensors to collect multi-source data;
[0076] The data preprocessing module is responsible for preprocessing the raw data collected by the sensor;
[0077] The feature extraction and data fusion module is responsible for feature extraction and multimodal data fusion based on the preprocessed data;
[0078] The time series analysis and intelligent prediction module is responsible for performing time series correlation analysis on the fused feature vectors, building an intelligent prediction model based on the time series analysis results, and predicting the state of the garden environment;
[0079] Intelligent decision-making module, responsible for generating intelligent decision-making rules for different environmental states based on time series analysis and prediction results;
[0080] The control strategy formulation and optimization module is responsible for formulating specific control strategies based on intelligent decision-making rules and optimizing the control strategies;
[0081] The automatic control and adaptive regulation module is responsible for executing automatic control according to the optimized control strategy, introducing the adaptive control mechanism, and automatically adjusting the control strategy.
[0082] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the smart garden monitoring and management method as described in the first aspect of the present invention is implemented.
[0083] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the smart garden monitoring and management method as described in the first aspect of the present invention is implemented.
[0084] The beneficial effects of the present invention are as follows: by deploying a variety of sensors to collect multi-source data, and pre-processing the data, then performing feature extraction and multimodal data fusion on the data, an intelligent prediction model is constructed based on the time series analysis results, thereby generating intelligent decision-making rules, formulating and optimizing control strategies, and finally executing automated control, and introducing an adaptive control mechanism to automatically adjust the strategy, thereby realizing intelligent monitoring, prediction and control of the garden environment, ensuring that the garden state is maintained within an ideal range. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0086] Figure 1 This is a flow chart of the smart garden monitoring and management method in Example 1.
[0087] Figure 2 This is a module diagram of the smart garden monitoring and management method in Example 1. DETAILED DESCRIPTION
[0088] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0089] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0090] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0091] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and provides a smart garden monitoring and management method, comprising the following steps:
[0092] S1. Collect multi-source data by deploying multiple sensors and pre-process the data;
[0093] Deploy a variety of sensors, including soil moisture sensors, which measure the water content in the soil to assess the moisture status of the soil; air temperature sensors, which measure the air temperature in the garden area and affect the growth environment of plants; light intensity sensors, which measure the intensity of light and directly affect the photosynthesis efficiency of plants; CO2 concentration sensors, which measure the concentration of carbon dioxide in the air and assess the respiration status of plants; and high-definition cameras, which collect real-time images of plants and monitor their health status.
[0094] Collect multi-source data, including temperature and humidity data, light intensity and CO2 concentration data, and image data;
[0095] Use interpolation or mean filling to fill missing values, remove outliers beyond the physical boundaries, and use the median filter algorithm to filter noise from the data;
[0096] Since the data collected by different sensors have different dimensions, the data needs to be standardized to facilitate subsequent data analysis and fusion;
[0097] Align the data from different sensors according to the timestamps and use linear interpolation to fill the time series to ensure that all data points have consistent characteristics at the same time;
[0098] Adopting the adaptive histogram equalization (CLAHE) method to improve the contrast of the image and enhance the detail information in the image;
[0099] All images are resized to a fixed size (e.g. 224x224 pixels) to ensure consistent input dimensions when fed into deep learning models.
[0100] S2. Based on the preprocessed data, feature extraction and multimodal data fusion are performed on the data, including the following steps:
[0101] Extract time series data from the preprocessed temperature and humidity data, light intensity and CO2 concentration data;
[0102] Input the time series data into the LSTM model. Assume that the sensor data is ={ , ,…, },in Indicates The input data of time steps, represents the number of time steps;
[0103] Compute the input gate, forget gate, cell state update, output gate, and hidden state update of the LSTM unit;
[0104] The input gate formula is,
[0105] ;
[0106] in, is the activation value of the input gate, is the weight matrix, is the hidden state at the previous time step, is the input of the current time step, is the bias, is the Sigmoid activation function;
[0107] The forget gate formula is:
[0108] ;
[0109] in, is the activation value of the forget gate, is the weight matrix, is bias;
[0110] The cell state update formula is:
[0111] ;
[0112] ;
[0113] in, is the candidate cell state at the current time step, is the updated cell state, is the hyperbolic tangent activation function;
[0114] The output gate formula is,
[0115] ;
[0116] in, is the activation value of the output gate, is the weight matrix, is bias;
[0117] The hidden state update formula is:
[0118] ;
[0119] in, is the hidden state at the current time step;
[0120] Through the last hidden state of the LSTM network The feature vector representing the entire time series ;
[0121] The normalized image data is input into the pre-trained deep convolutional neural network (CNN) model. Assume that the image data is ={ , ,…, },in For the images, is the number of images
[0122] In each layer of convolution operation, the convolution kernel is used to perform convolution operation on the image, and the expression is,
[0123] ;
[0124] in, represents the feature map after convolution, is the convolution kernel, is the pixel value of the input image;
[0125] Through maximum pooling and normalization processing, high-level features of the image are further extracted, the size of the feature map is reduced and the stability of the features is enhanced;
[0126] Flatten the last layer feature map of the CNN network into a feature vector ;
[0127] is the sensor feature vector and the image feature vector Initialize weights separately and , and set the initial value to 0.5 to ensure that each modal data has the same importance at the beginning;
[0128] The two feature vectors are fused by weighted averaging, and the expression is:
[0129] ;
[0130] in, is the fused feature vector, and is the weight parameter, initially = =0.5;
[0131] Set the input layer to receive data from different modalities, design a feature extraction layer (usually a fully connected layer, convolutional layer, or LSTM layer) for each modality, extract useful features from the input raw data, and perform weighted fusion on the extracted features in the fusion layer. Pass the fused features through one or more fully connected layers to generate the final output value.
[0132] Set the loss function and use the back propagation algorithm to calculate the effect of the loss function on the model parameters (including and ) and update these parameters by gradient descent to minimize the loss function
[0133] The fused feature vector Normalization is performed to ensure that the numerical ranges in different dimensions are consistent.
[0134] S3, perform time series correlation analysis on the fused feature vectors, build an intelligent prediction model based on the time series analysis results, and predict the state of the garden environment, including the following steps:
[0135] Input the fused feature vector into the STL decomposition model;
[0136] The fused feature vector is smoothed by the STL model to extract the long-term trend of the time series. The Loess smoothing method can be used to fit the trend part.
[0137] Compare the smoothed data with the original data to extract the cyclical components, usually using moving average or cyclic smoothing methods to identify seasonal fluctuations;
[0138] Subtract the trend and seasonal components from the original time series data to obtain the residual part, which usually represents unpredictable random fluctuations;
[0139] The trend component, seasonal component and residual component are respectively regarded as the components of the time series feature vector. For example, for each time step, the trend value, seasonal value and residual value are combined into a feature vector.
[0140] Other time-related features can be further introduced, such as time lag features, that is, using the feature values of the previous time steps as the input of the current time step;
[0141] The data of each time step (such as the average temperature and humidity of the past hour) is used as a component of the feature vector, and the temperature and humidity data are combined to construct new composite features, such as the temperature and humidity index (which comprehensively considers the impact of temperature and humidity on plants);
[0142] Use the sliding window method to take data within a fixed time period (such as the past hour) as the feature of an input sample. The window size can be adjusted according to specific needs.
[0143] Combined with time information, timestamps (such as day and night, season) are extracted as features to help the model capture long-term trends and cyclical changes;
[0144] Perform nonlinear transformations on features (such as squaring, square root, and logarithmic transformation) to capture nonlinear relationships;
[0145] Try different feature combinations, such as the product of temperature and light intensity, to evaluate how it improves model performance;
[0146] Construct the target variable, which is the environmental state at a certain point in the future (such as temperature, humidity, etc. one hour in the future), or the change or trend of the environmental state (such as the extent of temperature increase or decrease);
[0147] According to actual needs, select an appropriate time step as the prediction range of the target variable (such as the environmental status after 1 hour, 6 hours, or 24 hours);
[0148] Divide the dataset into training set, validation set and test set, usually in a ratio of 7:2:1 to ensure the generalization ability of the model;
[0149] Each sample consists of a feature vector (obtained by feature engineering) and a target variable (the state of the environment at a certain time step in the future);
[0150] Each tree is trained on randomly selected subset features and samples to generate multiple decision trees. Each tree recursively splits the feature space until the stopping condition (such as tree depth, minimum number of samples, etc.) is met. The prediction results of all decision trees are averaged or weighted averaged as the final prediction result to reduce the risk of overfitting of a single tree.
[0151] Determine the number of trees in the random forest. More trees usually improve the stability of the model, but also increase the training time. The appropriate number of trees can be selected through cross-validation;
[0152] Control the depth of each tree to prevent overfitting. When the tree depth is too large, the model may overfit the training data. The appropriate depth should be selected.
[0153] Control the minimum number of samples for splitting internal nodes to avoid overfitting on a small number of samples;
[0154] Control the number of features that can be selected at each split to increase the diversity of the tree. Usually, sqrt and log2 strategies can be selected;
[0155] Divide the data set into K subsets, select one subset as the validation set in turn, and the remaining subsets as the training set, repeat this process K times, calculate the model performance each time, and finally take the average value as the final evaluation result of the model;
[0156] The commonly used K value is 5 or 10. Choosing a suitable K value can balance the computational cost and evaluation accuracy;
[0157] Using mean square error Measures the difference between the predicted value and the true value. The calculation formula is,
[0158] ;
[0159] in, is the true value, indicating The true target value (i.e., the actual observed value) of samples, is the predicted value, indicating the The model prediction value of samples, is the sample size, that is, the total number of data points involved in the prediction, indicating the number of comparisons between the predicted results and the actual results. is the error, indicating the The difference between the predicted value and the true value of the sample, The error of each sample is squared to ensure that the error is positive and to amplify larger errors to reduce their impact on the overall error.
[0160] The R² coefficient is used to evaluate the model's ability to explain variables, that is, the degree to which the model explains the variation. The calculation formula is:
[0161] ;
[0162] in, is the average of the true values;
[0163] Perform an exhaustive search within a given parameter range through grid search to find the optimal hyperparameter combination;
[0164] Random search randomly selects combinations in parameter space, which is usually more efficient than grid search;
[0165] Use Bayesian optimization methods to build a proxy model to guide the search process, making the tuning process more intelligent;
[0166] The sensor data collected in real time is processed in real time through a data stream processing framework (such as Apache Kafka and Apache Flink) to ensure the continuity and real-time nature of the data. The pre-processed data stream is input into the random forest model to generate real-time prediction results, which are then used to control the immediate decision-making of the control system.
[0167] Collect new data regularly (such as weekly or monthly) and retrain the model to adapt to changes in the environment. For real-time systems, you can use incremental learning methods to gradually update the model parameters without retraining the entire model every time. Use a model management platform (such as MLflow, TensorFlow Serving) for model version control to ensure that when a new model is introduced, you can quickly roll back to the previous version.
[0168] S4. Generate intelligent decision rules for different environmental states based on the time series analysis and prediction results, including the following steps:
[0169] Extracting future insights from the output of a predictive model The predicted value of the key environmental variables at time step =1,2,… , represents the time step, and the predicted environmental variables include temperature ,humidity and light intensity , represents the time step, ≤ b;
[0170] Assume the current time is , then the extracted prediction data is + The predicted value of environmental variables at the moment;
[0171] The extracted prediction values are divided into Arrange them to form prediction sequence data of multiple time steps. The data of each time step should contain the predicted values of key variables such as temperature, humidity and light intensity.
[0172] Perform trend analysis on the extracted forecast data. According to the trend of the forecast data, determine the key time nodes. These key nodes are usually the moments when environmental variables approach or exceed the critical value, such as the time when the temperature rises to the critical value and the time when the humidity drops to the critical value. After identifying these nodes, early warning signals can be provided to the decision-making system to help the system take action at the appropriate time (such as starting cooling or humidification measures);
[0173] Define the ideal scope of each environment variable, expressed as,
[0174] ;
[0175] The ideal temperature range is [ , ], humidity range is [ , ], light intensity range is [ , ];
[0176] According to whether the predicted values of various environmental variables are within the ideal range, intelligent decision rules are generated. The basic form of the rules can be an "if-then" structure, for example:
[0177] ;
[0178] For each control operation involved in the decision rule, such as irrigation, ventilation and shading, its specific execution parameters are defined, for example,
[0179] ;
[0180] ;
[0181] ;
[0182] in is the irrigation rate, For irrigation time; is the opening level of the ventilation system, is the ventilation time; is the shading area, For sunshade time;
[0183] All generated rules are organized into a rule base, and the rules in the rule base are arranged in time steps. Arrange and assign priorities to each rule to facilitate handling when multiple rules conflict in the same time step.
[0184] S5. Based on the intelligent decision-making rules, formulate specific control strategies and optimize the control strategies, including the following steps:
[0185] Based on the physical characteristics and environmental data of the garden, a control model is established. The model describes the dynamic relationship between the control variables and the environmental state. The expression is:
[0186] ;
[0187] in, is the system state vector, is the control input vector, is the state transfer function, is the system noise, is the current time step;
[0188] Define the objective function of the control strategy, usually to minimize the control error and energy consumption, expressed as,
[0189] ;
[0190] in, is the value of the objective function, is the reference state, is the weight matrix, is the weight matrix of the control input, To predict the time domain length;
[0191] Use the MPC algorithm to optimize the objective function;
[0192] Based on the current state and control models to predict the future The system state in a time step
[0193] By optimizing the objective function , find the optimal control input sequence .
[0194] S6. According to the optimized control strategy, automatic control is performed, an adaptive control mechanism is introduced, and the control strategy is automatically adjusted, including the following steps:
[0195] According to the optimized control strategy, a specific control signal is generated, and the expression is:
[0196] ;
[0197] in, is the actual control signal, is the optimized control input sequence;
[0198] Through the IoT platform, control signals are transmitted to corresponding execution devices, such as irrigation systems, ventilation systems, and shading systems. After receiving the control signals, the devices perform operations according to the predetermined parameters.
[0199] During the control execution process, the environmental status is monitored in real time, the latest environmental data is obtained through the sensor network, and compared with the expected status. If there is a deviation between the actual status and the expected status, the system will automatically adjust the control strategy and execute new control actions;
[0200] Based on the adaptive algorithm, an adaptive model of the control system is established, which can automatically adjust the control parameters according to environmental feedback and historical data;
[0201] Define the parameter update mechanism to ensure that the control system can adjust the control strategy according to real-time data. The update formula is as follows:
[0202] ;
[0203] in, is the current control parameter, is the learning rate, is the objective function Parameters The gradient of
[0204] The system calculates the objective function based on real-time monitoring data For current control parameters The system adjusts the control parameters according to the direction and size of the gradient. ;
[0205] If the gradient is positive, it means that the error caused by the current control parameters increases and the control amount needs to be reduced;
[0206] If the gradient is negative, it means that the error caused by the current control parameters is reduced, and the control amount can be increased;
[0207] According to the updated control parameters , the system generates a new control signal , the expression is,
[0208] ;
[0209] in, It is the basic control signal generated based on the current state of the system;
[0210] The control signal generated The IoT platform transmits the control signals to the corresponding actuators, such as irrigation systems, ventilation systems, and shading systems. The devices then perform operations based on the new control signals:
[0211] For irrigation systems, adjust the flow rate or opening time of the pump to keep soil moisture within the target range;
[0212] For ventilation systems, adjust fan speed or ventilation volume, control air temperature and CO2 concentration;
[0213] For the shading system, adjust the angle of the visor to control the light intensity;
[0214] After the execution device completes the operation, the system continues to monitor the environmental status in real time and feeds back to the adaptive model. If the environmental status still does not reach the target range, the system will continue to adjust the control parameters and iterate until the environmental status stabilizes within the target range.
[0215] During operation, the system continuously records the environmental status, control parameters and adjustment results at each moment. By analyzing this data, the system can identify long-term trends and predict potential problems in advance.
[0216] As data accumulates, the system regularly updates and optimizes the adaptive model. The optimization content includes:
[0217] Dynamically adjust the learning rate based on the error change trend of historical data , to improve the response speed and stability of the system;
[0218] According to the long-term control effect, modify the objective function , to better reflect actual control needs;
[0219] Based on long-term operating data, the intelligent decision-making rule base is updated to ensure that the system can cope with new environmental changes.
[0220] This embodiment also provides a smart garden monitoring and management system, including:
[0221] The sensor acquisition module is responsible for deploying multiple sensors to collect multi-source data;
[0222] The data preprocessing module is responsible for preprocessing the raw data collected by the sensor;
[0223] The feature extraction and data fusion module is responsible for feature extraction and multimodal data fusion based on the preprocessed data;
[0224] The time series analysis and intelligent prediction module is responsible for performing time series correlation analysis on the fused feature vectors, building an intelligent prediction model based on the time series analysis results, and predicting the state of the garden environment;
[0225] Intelligent decision-making module, responsible for generating intelligent decision-making rules for different environmental states based on time series analysis and prediction results;
[0226] The control strategy formulation and optimization module is responsible for formulating specific control strategies based on intelligent decision-making rules and optimizing the control strategies;
[0227] The automatic control and adaptive regulation module is responsible for executing automatic control according to the optimized control strategy, introducing the adaptive control mechanism, and automatically adjusting the control strategy.
[0228] This embodiment also provides a computer device, which is suitable for the case of a smart garden monitoring and management method, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the smart garden monitoring and management method proposed in the above embodiment.
[0229] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0230] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the smart garden monitoring and management method proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0231] In summary, the present invention improves the accuracy and comprehensiveness of data collection through the collaborative work of multiple sensors, and improves the quality and consistency of data through preprocessing; through the fusion of multimodal data, the system's perception of complex environmental conditions is significantly improved, ensuring efficient analysis and decision-making under multi-dimensional data, and enhancing the accuracy of prediction; through the combination of time series correlation analysis and intelligent prediction models, the system can not only accurately predict future environmental conditions, but also detect abnormal changes in time, take countermeasures in advance, and avoid potential environmental problems; by defining ideal ranges and critical thresholds, the system can dynamically adjust control strategies to ensure that environmental variables remain within the ideal range, the establishment of a rule base enables the system to respond quickly to different environmental conditions and provide efficient control operations, and the generated intelligent decision-making rules enable the system to automatically make optimized decisions in complex and changeable environments, reduce the need for manual intervention, improve the intelligence level and response speed of garden management, and ensure the long-term stability and healthy development of the garden environment.
[0232] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A smart garden monitoring and management method, characterized by: include, Collect multi-source data by deploying a variety of sensors and pre-process the data; Based on the preprocessed data, feature extraction and multimodal data fusion are performed on the data; Conduct time series correlation analysis on the fused feature vectors, build an intelligent prediction model based on the time series analysis results, and predict the state of the garden environment; Generate intelligent decision-making rules for different environmental states based on time series analysis and prediction results; Formulate specific control strategies based on intelligent decision-making rules and optimize the control strategies; According to the optimized control strategy, automatic control is performed, and an adaptive control mechanism is introduced to automatically adjust the control strategy; The method of performing time series correlation analysis on the fused feature vectors, building an intelligent prediction model based on the time series analysis results, and predicting the state of the garden environment includes the following steps: The fused feature vector is smoothed through the STL model; Compare the smoothed data with the original data to extract the periodic components; Subtract the trend and seasonal components from the original time series data to get the residual; The trend component, seasonal component and residual component are taken as the components of the time series feature vector respectively; The random forest regression model is used to build an intelligent prediction model for prediction, and the time series features in multi-source data are used as input features; The data of each time step is used as a component of the feature vector, combined with the temperature and humidity data to construct a new composite feature; Using the sliding window method, the data within a fixed time period is used as the feature of an input sample; Combine time information and extract timestamp as feature; Perform nonlinear transformation on features and try different feature combinations; Construct the state of the environment at a certain point in the future as the target variable; Use the preprocessed feature vectors and the corresponding target variables to construct a training dataset; In the random forest model, multiple decision trees are constructed, each tree is trained on different subset features and samples, and the prediction results of all decision trees are averaged or weighted averaged as the final prediction result; Determine the number of trees in the random forest, control the depth of each tree, the minimum number of samples to split an internal node, and the number of features selected for each split; The cross-validation method was used to evaluate the stability and generalization ability of the model, the mean square error was used to measure the difference between the predicted value and the true value, and the R² coefficient was used to evaluate the ability of the model to explain the variables; Adjust the model’s hyperparameters based on the evaluation results; After preprocessing, the sensor data collected in real time is input into the trained random forest regression model for real-time prediction. As time goes by and the environment changes, new data is used to retrain and update the model regularly.
2. The smart garden monitoring and management method according to claim 1, characterized in that: The deployment of multiple sensors includes soil moisture sensors, air temperature sensors, light intensity sensors, CO2 concentration sensors, and high-definition cameras; The multi-source data collected includes temperature and humidity data, light intensity and CO2 concentration data and image data; The data preprocessing includes data cleaning and noise filtering, data standardization, data time alignment, and image enhancement and size normalization.
3. The smart garden monitoring and management method according to claim 2, characterized in that: The method of extracting features and fusing multimodal data based on the preprocessed data includes the following steps: Extract time series data from the preprocessed temperature and humidity data, light intensity and CO2 concentration data; Input the time series data into the LSTM model; Compute the input gate, forget gate, cell state update, output gate, and hidden state update of the LSTM unit; The sensor feature vector of the entire time series is represented by the last hidden state of the LSTM network ; The size-normalized image data is input into the pre-trained deep convolutional neural network (CNN) model. In each convolution operation, the image is convolved using the convolution kernel. Extract high-level features of the image through maximum pooling and normalization; Flatten the last layer feature map of the CNN network into an image feature vector ; is the sensor feature vector and the image feature vector Initialize the weights separately and set the initial value to 0.5; The two feature vectors are fused by weighted averaging to obtain the fused feature vector ; The fused feature vector Perform normalization.
4. The smart garden monitoring and management method according to claim 3, characterized in that: The method of generating intelligent decision rules for different environmental states based on the time series analysis and prediction results includes the following steps: Extract the predicted values of key environmental variables in the next b time steps from the output of the intelligent prediction model. The predicted environmental variables include temperature ,humidity and light intensity , represents the time step, ≤ b; Conduct trend analysis on the extracted forecast data and determine key time nodes based on the trends of the forecast data; Define the ideal scope of each environment variable, expressed as, ; The ideal temperature range is [ , ], humidity range is [ , ], light intensity range is [ , ]; Generate intelligent decision rules based on whether the predicted values of various environmental variables are within the ideal range, and define specific execution parameters for the control operations involved in each decision rule; All generated rules are organized into a rule base, and the rules in the rule base are arranged in time steps. Arrange and assign a priority to each rule.
5. The smart garden monitoring and management method according to claim 4, characterized in that: The method of formulating a specific control strategy based on intelligent decision-making rules and optimizing the control strategy includes the following steps: Based on the physical characteristics and environmental data of the garden, a control model is established, and the expression is: ; in, is the system state vector, is the control input vector, is the state transfer function, is the system noise, is the current time step; Define the objective function of the control strategy, the expression is, ; in, is the value of the objective function, is the reference state, is the weight matrix, is the weight matrix of the control input, To predict the time domain length; Use the MPC algorithm to optimize the objective function; Based on the current state and control models to predict the future The system state in a time step By optimizing the objective function , find the optimal control input sequence .
6. The smart garden monitoring and management method according to claim 5, characterized in that: The method of performing automatic control according to the optimized control strategy, introducing an adaptive control mechanism, and automatically adjusting the control strategy includes the following steps: According to the optimized control strategy, a specific control signal is generated, and the expression is: ; in, is the actual control signal, is the optimized control input sequence; Through the IoT platform, the control signal is transmitted to the corresponding execution device. After receiving the control signal, the device performs the operation according to the predetermined parameters; During the control execution process, the environmental status is monitored in real time, the latest environmental data is obtained through the sensor network, and compared with the expected status. If there is a deviation between the actual status and the expected status, the system will automatically adjust the control strategy and execute new control actions; Based on the adaptive algorithm, an adaptive model of the control system is established, which can automatically adjust the control parameters according to environmental feedback and historical data; Define the parameter update mechanism to ensure that the control system can adjust the control strategy according to real-time data. The update formula is as follows: ; in, is the current control parameter, is the learning rate, is the objective function Parameters The gradient of The system adjusts the control strategy in real time based on the adaptive model to ensure that the environmental state can be maintained within the target range under various conditions; During long-term operation, control effects are analyzed regularly, potential problems are identified, and continuous optimization is performed by updating the decision rule base and control model.
7. A smart garden monitoring and management system, based on the smart garden monitoring and management method according to any one of claims 1 to 6, characterized in that: include, The sensor acquisition module is responsible for deploying multiple sensors to collect multi-source data; The data preprocessing module is responsible for preprocessing the raw data collected by the sensor; The feature extraction and data fusion module is responsible for feature extraction and multimodal data fusion based on the preprocessed data; The time series analysis and intelligent prediction module is responsible for performing time series correlation analysis on the fused feature vectors, building an intelligent prediction model based on the time series analysis results, and predicting the state of the garden environment; Intelligent decision-making module, responsible for generating intelligent decision-making rules for different environmental states based on time series analysis and prediction results; The control strategy formulation and optimization module is responsible for formulating specific control strategies based on intelligent decision-making rules and optimizing the control strategies; The automatic control and adaptive regulation module is responsible for executing automatic control according to the optimized control strategy, introducing the adaptive control mechanism, and automatically adjusting the control strategy.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the smart garden monitoring and management method described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the smart garden monitoring and management method described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Energy-saving street lamp control method and system based on Internet of Things driving
CN117460129A
Power distribution network measurement and control system and method
CN117674140A
Smart garden monitoring method, system, equipment and medium
CN118520271A