Greenhouse environment regulation method and system based on artificial intelligence
Patent Information
- Application Number
- CN202610889995.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-11
AI Technical Summary
但在实际生产应用中,单一预测模型存在难以突破的精度上限,直接影响最终的调控效果,限制了智能调控系统的适用场景与长期运行稳定性
Smart Images

Figure CN122732985A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of agricultural Internet of Things (IoT) technology, and in particular to a method for controlling greenhouse environment based on artificial intelligence. Background Technology
[0002] Facility agriculture represents the most intensive and standardized form of production within the modern agricultural industry system. Greenhouses, through artificial intervention in internal microenvironment parameters, can overcome the limitations of natural climate and geographical conditions, enabling year-round continuous production of cash crops such as fruits, vegetables, and flowers. This plays a crucial supporting role in improving land use efficiency, stabilizing agricultural product market supply, and enhancing agricultural production benefits. With the gradual popularization of IoT sensing technology, automatic control technology, and artificial intelligence, greenhouse environmental control methods have evolved from manual control to fixed-threshold automatic control. Currently, they are evolving towards data-driven intelligent predictive control, with continuously improving response speed and parameter control accuracy. Consequently, modern facility agriculture production demands increasingly higher precision, stability, and energy efficiency in environmental control.
[0003] Existing AI-based greenhouse environment control technologies, such as Chinese patent CN120803173A, employ a single spatiotemporal joint prediction model. This model uses historical environmental monitoring data as training material to output the future trend of environmental parameter changes, and then generates corresponding control strategies based on the prediction results. Compared to traditional threshold-triggered control, this method can predict environmental changes in advance and execute pre-emptive adjustments, mitigating the lag problem caused by passive control to some extent, and achieving good control results under normal meteorological conditions. However, in practical production applications, the single prediction model has an insurmountable accuracy limit, directly affecting the final control effect and limiting the applicable scenarios and long-term operational stability of the intelligent control system.
[0004] On the one hand, the performance of purely data-driven prediction models is highly dependent on the coverage of the training dataset. For scenarios with a low proportion of training samples, such as extreme weather events, seasonal transitions, and the early stages of crop variety replacement, prediction errors accumulate with increasing prediction time. This causes forward-looking control strategies to lose reliable data support, ultimately degenerating into a control mode triggered close to the threshold, failing to leverage the advantages of predictive control. On the other hand, existing prediction models generally assume that the executing equipment is in its ideal rated output state when generating control strategies, without considering the equipment's efficiency decay, output limit, aging drift, and other physical characteristics across the entire operating range. This results in a systematic deviation between the control effect assumed in the prediction stage and the actual output effect that the equipment can achieve. The stability of environmental parameters and crop growth adaptability after control execution are both lower than the model's expectations.
[0005] The limited accuracy of the aforementioned single prediction model has become a major constraint on the further upgrading of current intelligent greenhouse control technology. There is an urgent need to propose new technologies at the prediction mechanism level to break through the accuracy bottleneck of the single model, while matching the actual operating characteristics of the equipment to achieve simultaneous improvement in greenhouse control effect and operating energy efficiency. Summary of the Invention
[0006] This application provides an artificial intelligence-based method and system for controlling the environment of a greenhouse, in order to solve the problems in the prior art.
[0007] On the one hand, embodiments of this application provide a greenhouse environment control method based on artificial intelligence, including the following steps: Multidimensional environmental data, including air, soil, and crop dimensions, are collected inside the greenhouse, as well as operational data, including fans, water pumps, supplemental lighting, and heating equipment. After preprocessing the multidimensional environmental data and operational data, a joint feature tensor of environment-equipment conditions, including time dimension, spatial node dimension, and feature dimension, is constructed. The spatiotemporal graph environmental prediction model and the equipment condition-efficiency mapping model are invoked respectively. Based on the joint feature tensor, a preset duration of environmental parameter prediction sequence and the corresponding energy consumption prediction results of each device under the control conditions are generated. Using the greenhouse heat and mass transfer mechanism equation as a physical constraint, the parameter change rate and steady-state value of the environmental parameter prediction sequence are corrected in reverse using the actual effective output calculation results of the equipment. At the same time, the operating condition offset parameters of the equipment condition-efficiency mapping model are iteratively updated using the actual performance of the equipment inferred from the environmental measurement data, thus completing the bidirectional correction of the spatiotemporal graph environmental prediction model and the equipment condition-efficiency mapping model. Based on the environmental parameter prediction sequence output by the corrected spatiotemporal map environmental prediction model, multi-objective global optimization is performed by combining crop physiological rigid constraints and equipment efficient operation range constraints to generate feasible environmental parameter domains and equipment operation baseline commands; within the adjustable range of equipment parameters on the edge of the greenhouse, parameter optimization is performed with the goal of maximizing equipment operating efficiency to determine the final operating parameters of each piece of equipment. The final operating parameters of the equipment are compiled into control commands that can be recognized by the corresponding equipment, and then distributed to each executing equipment according to the partition time slot scheduling and peak-shaving mechanism. The equipment operation feedback data is collected in real time and the execution status is verified.
[0008] On the other hand, embodiments of this application also provide an artificial intelligence-based greenhouse environment control system, including: The data acquisition unit is used to collect multi-dimensional environmental data inside the greenhouse, including air, soil and crop dimensions, as well as operating condition data including fans, water pumps, supplemental lighting and heating equipment. After preprocessing the multi-dimensional environmental data and operating condition data, a joint feature tensor of environment-equipment operating conditions containing time dimension, spatial node dimension and feature dimension is constructed. The model calibration unit is used to call the spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model respectively, generate an environmental parameter prediction sequence of a preset duration based on the joint feature tensor, and the energy consumption prediction results of each device under the corresponding control conditions; using the greenhouse heat and mass transfer mechanism equation as the physical constraint, it uses the actual effective output calculation results of the equipment to reverse correct the parameter change rate and steady-state value of the environmental parameter prediction sequence, and at the same time uses the actual performance of the equipment inferred from the environmental measurement data to iteratively update the condition offset parameters of the equipment condition-efficiency mapping model, thus completing the bidirectional calibration of the spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model; The decision unit is used to perform multi-objective global optimization based on the environmental parameter prediction sequence output by the corrected spatiotemporal map environmental prediction model, combined with crop physiological rigid constraints and equipment efficient operation range constraints, to generate the feasible domain of environmental parameters and equipment operation baseline instructions; within the adjustable range of equipment parameters on the edge of the greenhouse, the unit optimizes parameters with the goal of maximizing equipment operating efficiency, and determines the final operating parameters of each piece of equipment. The execution unit is used to compile the final operating parameters of the equipment into control instructions that can be recognized by the corresponding equipment, distribute them to each execution device according to the partition time slot scheduling and peak-shaving mechanism, collect equipment operation feedback data in real time, and verify the execution status.
[0009] The greenhouse environment control method and system based on artificial intelligence disclosed in this application have the following advantages: 1. This method establishes a two-way mutual calibration between environmental and energy consumption models. It constrains environmental prediction results with actual physical output of equipment and iterates energy consumption model parameters using measured environmental data. This breaks through the accuracy limit of a single model at the prediction mechanism level, reduces prediction errors in scenarios with insufficient samples, such as extreme weather and seasonal changes, and eliminates systematic biases caused by defaulting to ideal equipment output. Simultaneously, it adopts a two-level control architecture of central global optimization plus edge local optimization. The efficient operating range of equipment is incorporated as a hard constraint into the global strategy generation process, and the edge gateway performs fine-grained adjustments to equipment operating points. Without compromising environmental control standards, this improves overall equipment operating efficiency and reduces total system energy consumption and carbon emission intensity.
[0010] 2. The incremental evolution mechanism can adapt to long-term operating conditions such as seasonal changes, crop rotation, and equipment aging, avoiding the gradual degradation of model performance over time and ensuring the long-term control effectiveness of the system. Meanwhile, the time-slot scheduling command issuance and dual-mode feedback verification mechanism can reduce the grid impact and bus communication conflicts caused by the simultaneous startup of multiple devices, improving the system's operational stability in complex field environments and reducing deployment and maintenance costs. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating an artificial intelligence-based greenhouse environment control method provided in this application embodiment. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] Figure 1 A flowchart illustrating an artificial intelligence-based greenhouse environment control method provided in this application embodiment. This application embodiment provides an artificial intelligence-based greenhouse environment control method, including: S1 collects multidimensional environmental data inside the greenhouse, including air, soil, and crop dimensions, as well as operational data including fans, water pumps, supplemental lighting, and heating equipment. After preprocessing the multidimensional environmental data and operational data, a joint feature tensor of environment-equipment conditions is constructed, which includes time dimension, spatial node dimension, and feature dimension.
[0015] Exemplary, this application embodiment deploys a distributed sensor network within the greenhouse to simultaneously collect two types of heterogeneous data: environmental data and operational condition data. The environmental data covers three dimensions: air, soil, and crops. The air dimension includes air temperature, relative humidity, photosynthetically active radiation, and carbon dioxide concentration. This data is collected by uniformly distributed sensors installed 1.5 meters above the ground. The soil dimension includes soil temperature, soil volumetric water content, and soil electrical conductivity. This data is collected by composite sensors buried 10 centimeters deep in the crop root zone. The crop dimension includes leaf surface temperature, leaf surface humidity, and stomatal conductance. This data is collected by miniature sensors clamped to crop leaves. The sampling frequency is set to once every 30 seconds for the air dimension and once every 5 minutes for the physiological parameters of the soil and crops.
[0016] The operational status data covers the operating status of four types of equipment: fans, water pumps, supplementary lighting, and heating equipment. Collected parameters include real-time voltage, current, operating speed, operating status, cumulative runtime, and number of start-stop cycles. This information is collected through smart meters and speed sensors on the equipment side, with data sampled every 10 seconds. All collected data is aggregated via an edge gateway, uniformly stamped with a local high-precision timestamp, and uploaded to the central controller for storage.
[0017] Because the raw data may contain issues such as abnormal jumps, random noise, and time synchronization problems, it needs to undergo three preprocessing steps in sequence: outlier removal, noise suppression, and time alignment.
[0018] Specifically, a sliding window Grubbs' test is used to detect and remove outliers in real time, adapting to the characteristics of slowly changing environmental parameters and avoiding the false positives and false negatives that are prone to occur with the fixed threshold method. The sliding window length is set to 20 consecutive sampling points, and the window slides point by point with the sampling step size. The data in each window are sorted in ascending order of value, and the Grubbs' statistic is calculated:
[0019] Where G is the Grubbs statistic, which is dimensionless; x k This represents the k-th sampled value within the window, with units consistent with the corresponding parameter. This is the arithmetic mean of all sampled values within the window, with the unit consistent with the corresponding parameter. This indicates taking the absolute value; s is the sample standard deviation of all sampled values within the window, with the same unit as the corresponding parameter.
[0020] With a significance level of α = 0.05, the corresponding Grubbs' critical value G for 20 samples is... α =2.557. If the calculated Grubbs statistic G is greater than the critical value G... αIf a sample value is found to be outlier, it is removed. After outlier removal, temporary padding is performed using linear interpolation of adjacent normal data within the window, pending subsequent filtering.
[0021] After outlier handling, an adaptive weighted wavelet thresholding method is used to suppress environmental random noise and electrical noise. The db5 wavelet is selected as the basis function, and the data is decomposed into three levels of wavelet decomposition, yielding one level of low-frequency approximation coefficients and three levels of high-frequency detail coefficients. For the high-frequency coefficients at different decomposition levels, an adaptive threshold is used for shrinkage processing. The threshold calculation formula for the j-th level is:
[0022] Where, λ j σ is the threshold for the j-th level wavelet decomposition, with units consistent with the corresponding parameters; j denoted as the noise standard deviation of the high-frequency coefficients of the j-th layer, estimated using the median absolute deviation method, with units consistent with the corresponding parameters; n is the total number of sampling points, which is dimensionless; j is the layer number of the wavelet decomposition, taking values of 1, 2, and 3.
[0023] A soft thresholding function is used to shrink the high-frequency wavelet coefficients, and then the denoised data is reconstructed through inverse wavelet transform. The soft thresholding function can ensure the smoothness of the reconstructed signal and avoid the oscillation problem caused by hard thresholding.
[0024] Because different sensors have different sampling frequencies and sampling times, all data need to be aligned to a unified time axis. Using a uniform time step of 1 minute, cubic spline interpolation is employed to resample data from different sampling frequencies. Cubic spline interpolation is a cubic polynomial within each segmented interval, and it satisfies functional continuity, first derivative continuity, and second derivative continuity at all nodes. This accurately reproduces the continuous changing trend of environmental parameters and avoids the step-like errors caused by linear interpolation.
[0025] The preprocessed multidimensional environmental data and operational data are integrated dimensionally to construct a three-dimensional joint feature tensor as input to the subsequent prediction model. The tensor dimensions are [T, N, M]. Here, T is the time step length, taking 240 consecutive time steps, corresponding to 4 hours of historical data; N is the number of monitoring nodes, consistent with the total number of sensors deployed in the greenhouse; and M is the total number of feature dimensions, comprising 12 features: air temperature, air humidity, photosynthetically active radiation, CO2 concentration, soil temperature, soil moisture content, soil conductivity, leaf surface temperature, equipment rotation speed, equipment active power, equipment cumulative operating time, and outdoor temperature.
[0026] This tensor integrates time, space, and multi-source feature dimensions, and can comprehensively characterize the environment and equipment operation status of the greenhouse.
[0027] S2 calls the spatiotemporal diagram environmental prediction model and the equipment condition-efficiency mapping model respectively, and generates an environmental parameter prediction sequence of a preset duration based on the joint feature tensor, as well as the energy consumption prediction results of each device under the corresponding control conditions. Using the greenhouse heat and mass transfer mechanism equation as a physical constraint, the parameter change rate and steady-state value of the environmental parameter prediction sequence are corrected in reverse using the actual effective output calculation results of the equipment. At the same time, the operating condition offset parameters of the equipment condition-efficiency mapping model are iteratively updated using the actual performance of the equipment inferred from the environmental measurement data, thus completing the bidirectional correction of the spatiotemporal diagram environmental prediction model and the equipment condition-efficiency mapping model.
[0028] For example, the spatiotemporal graph environment prediction model adopts a dual-path architecture that combines graph convolutional networks and temporal convolutional networks. The graph convolutional network and the temporal convolutional network extract the spatial distribution features and temporal evolution patterns of multidimensional environmental parameters, respectively. After feature fusion, the model outputs an environmental parameter prediction sequence of a preset duration.
[0029] The input to the spatiotemporal graph environment prediction model is the joint feature tensor generated in step S1. This tensor is input to both the spatial feature extraction pathway (i.e., graph convolutional network) and the temporal feature extraction pathway (i.e., temporal convolutional network). The spatial feature extraction pathway employs a two-layer graph convolutional network to extract spatial distribution features based on the spatial topology of the sensor nodes. This pathway first constructs a node adjacency matrix A, where the matrix elements A... uv The spatial correlation between the u-th and v-th sensor nodes is represented by the following formula:
[0030] Among them, A uv d is the element in the u-th row and v-th column of the adjacency matrix A, with a value ranging from 0 to 1; uv σ is the Euclidean distance between the u-th and v-th sensors, in meters; d This is the distance attenuation coefficient, taken as 0.5 times the average sensor spacing in the greenhouse, in meters. When the sensor spacing exceeds 3 times the average spacing, A... uv Set it to 0 to ensure the sparsity of the adjacency matrix and reduce the amount of computation.
[0031] Normalization is performed on the adjacency matrix A to obtain the normalized adjacency matrix. :
[0032] Where I is the identity matrix, with the same dimensions as A; D is the degree matrix, where the diagonal elements are... The remaining elements are 0.
[0033] The calculation process for each graph convolution layer in a graph convolutional network is as follows:
[0034] Among them, H (l) H is the input feature matrix of the l-th layer graph convolution; (l+1) W is the output feature matrix of the l-th layer graph convolution, which is the input feature matrix of the (l+1)-th layer graph convolution; (l) Let be the trainable weight matrix of the l-th layer; σ(·) is the ReLU activation function, used to introduce nonlinearity.
[0035] The spatial distribution feature dimension of the output of the 2-layer graph convolution is [N, F]. s ], where F s This represents the number of spatial feature channels, with a value of 64.
[0036] The temporal feature extraction pathway employs a three-layer dilated temporal convolutional network (DCNN) to capture long-term environmental evolution patterns. Each DCNN layer contains two causal convolutional layers, using causal padding to ensure the output length matches the input and prevents the leakage of future information. The dilation coefficients of the three DCNN layers are 1, 2, and 4, with a kernel size of 3. Layer normalization and ReLU activation functions are added after each layer. This architecture can continuously expand the receptive field and capture long-term environmental change patterns without increasing network depth. The feature dimension of the temporal evolution pattern output by the temporal feature extraction pathway is [T, F]. t ], where F t This represents the number of time-series characteristic channels, with a value of 64.
[0037] Spatial distribution characteristics and temporal evolution patterns are concatenated along the feature dimension and then input into a two-layer fully connected network. The first layer of this network has 128 neurons, and the second layer has 4 neurons. The final output is the predicted environmental parameters for the next 144 time steps, corresponding to a 24-hour prediction duration and a 10-minute step size. These predicted values include four core parameters: air temperature, relative humidity, photosynthetically active radiation, and CO2 concentration.
[0038] The spatiotemporal environmental prediction model was trained using a multi-source dataset spanning seasons. This dataset contains three consecutive years of greenhouse environmental data, outdoor meteorological data, and crop growth records, covering the complete growth cycle of major crops such as tomatoes and cucumbers, with a total sample size exceeding 100,000. The dataset was randomly divided into training, validation, and test sets in an 8:1:1 ratio. Training employed the Adam optimizer, with an initial learning rate of 0.001, which decayed to 0.8 times its original value every 50 epochs. The batch size was set to 64, and the total number of iterations was set to 300.
[0039] The loss function employs a multi-task joint loss, which includes a prediction accuracy term and a temporal smoothing term. The calculation formula is as follows:
[0040] Among them, L envy represents the total loss value of the spatiotemporal graph environment prediction model; MSE(·) is the mean squared error function, which measures the deviation between the predicted value and the true value; pred The predicted sequence of environmental parameters output by the model; y ture Here is the corresponding measured sequence of environmental parameters; TV(·) is the total variation regularization term, used to constrain the smoothness of the predicted sequence, and its calculation formula is:
[0041] α is the weighting coefficient for the precision term, with a value of 0.9; β is the weighting coefficient for the smoothness term, with a value of 0.1.
[0042] The training process employs an early stopping mechanism, which means that when the validation set loss no longer decreases for 20 consecutive rounds, the training is terminated early, and the model weights with the lowest validation set loss are saved.
[0043] For four types of actuators—fans, pumps, supplementary lighting, and heating equipment—this application constructs independent Gaussian process regression models, namely, a fan model, a pump model, a supplementary lighting model, and a heating equipment model. These models characterize the operating efficiency and energy consumption characteristics of each type of equipment under all operating conditions and output Bayesian prediction results with confidence intervals.
[0044] The input to the wind turbine model is a 4-dimensional feature vector, including the equipment operating speed, ambient air temperature, cumulative operating time, and electrical voltage; the output is a 2-dimensional result, namely the real-time operating efficiency and active power of the equipment.
[0045] The input to the pump model is a 4-dimensional feature vector, including the equipment operating frequency, actual pipeline head, temperature of the transported water, and cumulative equipment operating time; the output is a 2-dimensional result, namely the real-time hydraulic efficiency of the pump and the active power of the equipment.
[0046] The input to the supplementary lighting model is a 4-dimensional feature vector, including the dimming duty cycle, ambient temperature around the luminaire, cumulative lighting time of the equipment, and power supply voltage; the output is a 2-dimensional result, namely the photosynthetically active radiation output efficiency and the active power of the equipment.
[0047] The input to the heating equipment model is a 4-dimensional feature vector, including the proportion of heating power levels, the air temperature on the air inlet side, the cumulative running time of the equipment, and the power supply voltage; the output is a 2-dimensional result, namely the electrothermal conversion efficiency and the active power of the equipment.
[0048] The Gaussian process regression model uses a kernel function that combines a squared exponential kernel and a linear kernel. This function can simultaneously fit the nonlinear curve characteristics of equipment efficiency and the linear drift characteristics caused by aging. The kernel function expression is as follows:
[0049] Where, k(x) i ,xq ) is the input sample x i With x q Kernel function values between; The variance of the signal is the overall fluctuation range of the control function; Describing the L2 norm, The feature length scale controls the rate at which sample correlation decays with distance; These are the linear kernel weights, controlling the strength of the linear drift term; T represents the transpose. δ represents the noise variance, characterizing the level of random noise in the observed data. iq The Kronecker function takes the value 1 when i=q, and 0 otherwise; (x i ,x q ) represents the feature vectors of the two input samples.
[0050] The dataset used for training the Gaussian process regression model includes factory-tested data under full operating conditions and accumulated field operation data, covering the entire speed range, ambient temperature range, and different aging stages of the equipment. The training sample size for each device is no less than 5000 records. The training process optimizes the hyperparameters of the kernel function using the maximum likelihood estimation method. The optimization objective is to maximize the logarithmic marginal likelihood function, solved using the conjugate gradient method. The maximum number of iterations is 100, and the convergence threshold is 10. -6 The trained Gaussian process regression model can not only output the predicted mean, but also provide the 95% confidence interval of the prediction results, quantifying the uncertainty of the prediction and providing a basis for subsequent correction.
[0051] The greenhouse heat balance equation and the water vapor mass balance equation in the greenhouse heat and mass transfer mechanism equation are used as common physical hard constraints for the two types of models to ensure that all prediction results and control strategies conform to basic physical laws and avoid pure data models from producing outputs that violate physical common sense.
[0052] The change in heat of the air inside the greenhouse satisfies the law of conservation of energy, and the greenhouse heat balance equation is expressed as follows:
[0053] Where, ρ a The air density inside the greenhouse is taken as 1.29 kg / m³ under standard operating conditions. 3 V represents the total air volume inside the greenhouse, in meters. 3 c p The specific heat capacity of air at constant pressure is taken as 1005 J / (kg·℃); dT in / dt represents the rate of change of indoor air temperature over time, in °C / s; Q sun Q represents the heat gain from solar radiation entering the greenhouse, expressed in W, and calculated from photosynthetically active radiation data. heatQ represents the heating capacity of the heating equipment, measured in W; light The heat dissipation power generated by the operation of the supplementary lighting, measured in W; Q vent Q represents the power lost through ventilation and heat exchange, expressed in watts (W), calculated from the fan's airflow and the indoor / outdoor temperature difference. soil Q represents the heat power lost through soil conduction, measured in W; eva The heat power absorbed by water evaporation, measured in W.
[0054] The change in water vapor content inside the greenhouse follows the law of conservation of mass, and the expression for the water vapor mass balance equation is:
[0055] Where, dρ v / dt is the rate of change of indoor air water vapor density over time, in kg / (m³). 3 ·s); E plant E represents the rate of moisture dissipation through crop transpiration, expressed in kg / s. soil V is the rate of moisture dissipation from the soil surface via evaporation, expressed in kg / s. vent The ventilation volume of the ventilation system is expressed in cubic meters (m³). 3 / s;ρ v,in The density of water vapor in indoor air, in kg / m³ 3 ;ρ v,out The density of water vapor in outdoor air, in kg / m³ 3 .
[0056] All prediction results and control strategies must satisfy the above greenhouse heat balance equation. The calculated equation residuals must satisfy the following conditions: temperature residual ≤ 0.2℃ and humidity residual ≤ 2%RH. Otherwise, the results are considered invalid and must be recalculated.
[0057] In the bidirectional correction process, a cyclical process of prediction-verification-tracing-correction needs to be constructed. The spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model are mutually constrained and mutually corrected to achieve a synergistic improvement in prediction accuracy.
[0058] Forward correction is based on the actual output capacity of the equipment, correcting deviations in environmental predictions that are inconsistent with the physical characteristics of the equipment. During execution, the initial control strategy output from the spatiotemporal environmental prediction model is first input into the equipment operating condition-efficiency mapping model to calculate the actual operating efficiency and effective output of each piece of equipment under the corresponding operating condition. For example, if the initial strategy sets the fan speed to 30Hz, the energy consumption model calculates that the actual operating efficiency of the fan at this speed is 72%, corresponding to an actual ventilation volume of 68% of the design value, which is lower than the ideal ventilation volume defaulted to by the environmental model. Then, the effective output of the equipment is used as a boundary condition and substituted into the greenhouse heat balance equation to calculate the corrected rate of change and steady-state value of environmental parameters, performing point-by-point correction on the environmental prediction sequence. Taking temperature correction as an example, the correction formula is:
[0059] Among them, T pred,corr (t) represents the corrected predicted temperature at time t, in °C; T pred (t) represents the original predicted temperature value at time t, in °C; k eff This is the efficiency correction factor, dynamically adjusted according to the equipment type, with a value range of 0.8 to 1.2; Q actual Q represents the actual heat exchange power of the equipment, in W; assume The default assumption for the ideal power of the equipment in the spatiotemporal graph environment prediction model is expressed in W; Δt is the prediction time step in seconds.
[0060] The same principle is used to correct other parameters such as humidity and CO2 concentration point by point, completing the correction of the entire environmental parameter prediction sequence. Forward correction can eliminate systematic biases caused by ideal equipment assumptions, making the prediction results more consistent with the actual on-site operating effects.
[0061] Backward calibration uses measured environmental data as a benchmark to iteratively update the energy consumption model parameters. Once the equipment is operating stably according to the control strategy, actual environmental parameters and equipment operating condition data are collected. The actual output and operating efficiency of the equipment are then inferred using the greenhouse heat balance equation and compared with the predicted values from the equipment operating condition-efficiency mapping model. If the deviation exceeds 5%, the equipment efficiency is considered to have drifted. Drift is typically caused by factors such as equipment aging, scaling, and bearing wear. This set of measured data is added to the model update dataset, and the kernel function hyperparameters of the Gaussian process regression model are updated using online incremental learning, completing the iterative optimization of the energy consumption model. Backward calibration allows the energy consumption model to continuously adapt to slow changes in equipment performance, maintaining long-term predictive accuracy.
[0062] In the embodiments of this application, before performing bidirectional correction on the spatiotemporal environmental prediction model and the equipment condition-efficiency mapping model, it is necessary to first trace and classify the prediction deviations. Specifically, a deviation tracing unit can be set up to automatically determine the source of the prediction deviation and execute targeted correction strategies to avoid blind correction that could lead to model oscillations.
[0063] If the environmental parameter deviation of a single sensor node exceeds 0.5℃, and the predictions of energy consumption for the other nodes are consistent with the actual measurements, it is determined to be a local sensing anomaly or a small spatial disturbance. No global model correction is performed; instead, spatial interpolation is used to compensate for the local data.
[0064] If the average deviation of environmental parameters of all nodes exceeds 0.5℃, and the deviation between predicted and measured energy consumption exceeds 5% simultaneously, the residual after substituting into the greenhouse heat balance equation conforms to the physical relationship. This is determined to be a disturbance of external factors such as meteorology, triggering the short-term adaptive adjustment of the environmental model and correcting the short-term prediction weights.
[0065] If the overall deviation of environmental parameters is less than 0.2℃, but the deviation between the predicted and actual energy consumption exceeds 5%, it is determined to be equipment performance drift. Only the parameters of the equipment operating condition-efficiency mapping model are updated, and the spatiotemporal environmental prediction model is not adjusted.
[0066] S3, based on the environmental parameter prediction sequence output by the corrected spatiotemporal map environmental prediction model, combines crop physiological rigid constraints and equipment efficient operation range constraints to perform multi-objective global optimization, generating feasible domains of environmental parameters and equipment operation baseline instructions; within the adjustable range of equipment parameters on the edge of the greenhouse, parameter optimization is performed with the goal of maximizing equipment operating efficiency, and the final operating parameters of each piece of equipment are determined.
[0067] For example, the central controller performs multi-objective global optimization based on the corrected environmental prediction results, and generates minute-level control benchmark strategies and feasible domains of environmental parameters, which serve as the higher-level basis for edge-side fine-tuning.
[0068] Specifically, a multi-objective optimization system with four sub-objectives needs to be constructed. All sub-objectives are normalized to dimensionless values, ranging from 0 to 1, with smaller values corresponding to better performance.
[0069] The first sub-objective is crop growth fitness f1, which measures the degree of matching between environmental parameters and the optimal growth range of the crop. The calculation formula is as follows:
[0070] Where, N t To optimize the total number of time steps within the cycle; T t T represents the indoor temperature at time t, in °C. opt The optimal temperature for the current growth stage of the crop, in °C; T range The width of half the suitable temperature range for crops, in °C; H t The indoor relative humidity at time t, in %RH; H opt The optimal humidity for the current growth stage of the crop, expressed in %RH; H range This represents half the width of the suitable humidity range for crops, expressed in %RH.
[0071] The second sub-objective is the overall system energy efficiency f2, which measures the overall operating efficiency of the equipment during the control period. The smaller the value, the higher the system energy efficiency. The calculation formula is:
[0072] Where M represents the total number of devices participating in the control; P m η represents the active power of the m-th device, in kW. m The operating efficiency of the m-th device under the corresponding operating conditions is expressed in %; η ratedThe rated maximum efficiency of the equipment is expressed in units of %.
[0073] The third sub-target is the carbon emission per unit area per cycle, f3, which measures the low-carbon properties of the regulation process. The smaller the value, the lower the carbon emission intensity. The calculation formula is:
[0074] Where f3 represents the periodic carbon emissions per unit area, expressed in kg CO2 / m². 2 E total The total system power consumption during the control period, expressed in kWh; EF carbon The carbon emission factor for electricity is 0.86 kg CO2 / kWh; S represents the effective planting area of the greenhouse, in m². 2 .
[0075] The fourth sub-objective is equipment operation smoothness f4, which measures the smoothness of equipment operation and reduces efficiency losses and equipment wear caused by frequent start-ups, shutdowns, and large adjustments. The smaller the value, the smoother the operation. The calculation formula is:
[0076] Among them, s m (t) represents the operating speed or power level of the m-th device at time t; s max This is the maximum adjustment range of the equipment.
[0077] The optimization process must satisfy three types of constraints, and all feasible solutions must satisfy all of them. Solutions that do not satisfy the constraints are directly determined to be invalid.
[0078] The first category is rigid constraints on crop physiology, including that the daily cumulative photosynthetically active radiation is not less than the minimum light requirement of the crop on that day, the indoor temperature is always within the upper and lower limits of the temperature range of the current growth period of the crop, and the indoor relative humidity is always within the upper and lower limits of the humidity range of the current growth period of the crop.
[0079] The second category is the constraint on the proportion of high-efficiency range of equipment, including that the time of operation of a single piece of equipment in the high-efficiency range accounts for no less than 85% of the total operating time. The high-efficiency range is defined as the operating condition range in which the equipment's operating efficiency is no less than 85% of the rated efficiency. The number of times a single piece of equipment starts and stops per day shall not exceed 6, so as to avoid equipment damage and starting energy consumption caused by frequent starts and stops.
[0080] The third type is the mechanism consistency constraint, which requires that the environmental change process corresponding to the control strategy must satisfy the greenhouse heat balance equation constructed in step S2, and the equation residuals must not exceed the preset threshold.
[0081] Furthermore, this application employs a multi-objective particle swarm optimization algorithm with adaptive inertia weights to solve the above-mentioned multi-objective optimization problem, generating a Pareto optimal solution set. The algorithm execution process is as follows: The first step is initialization, setting the population size to 100. Each particle corresponds to a complete set of control strategy parameters, including the hourly operating parameters of each device. The positions and velocities of the particles are randomly initialized, and an external file is initialized to store Pareto optimal solutions, with a maximum file size of 200.
[0082] The second step is fitness calculation. For each particle's corresponding control strategy, the values of the four optimization objectives are calculated to determine whether all constraints are met. Particles that do not meet the constraints are marked as infeasible solutions.
[0083] The third step involves updating the individual optimal and global optimal solutions. The individual optimal solution for each particle is the non-dominated optimal solution in its own history. The global optimal solution is selected from the external archive and sorted by crowding distance, prioritizing solutions with high crowding to ensure the diversity of the solution set.
[0084] The fourth step is velocity and position update. The velocity update formula for the p-th particle is:
[0085] Among them, v p (g) represents the velocity of the p-th particle in the g-th generation; w is the inertial weight, which adopts a linear adaptive adjustment strategy with an initial value of w. max =0.9, final value w min =0.4, which decreases linearly with the number of iterations. The calculation formula is: Where g is the current iteration number, T max is the maximum number of iterations; c1 and c2 are learning factors, both taking a value of 1.49445; r1 and r2 are random numbers uniformly distributed between 0 and 1; pbest p The optimal position for the p-th particle is given by 'x'; 'gbest' is the globally optimal position; x p (g) represents the position of the p-th particle in the g-th generation.
[0086] The particle position update formula is:
[0087] Boundary truncation is performed on positions that exceed the parameter value range.
[0088] The fifth step involves updating the external archives. Newly generated particles are added to the population, sorted non-dominated, and the Pareto optimal solutions in the external archives are updated. If the number of archives exceeds the limit, solutions are deleted in ascending order of crowding distance, retaining solutions with good diversity.
[0089] The sixth step is the termination check. When the number of iterations reaches 200 rounds, or the external files stop updating for 30 consecutive rounds, the algorithm terminates and outputs the final Pareto optimal solution set.
[0090] Based on the dynamic weights of the current production scenario, a weighted TOPSIS method is used to select the final execution benchmark control strategy from the Pareto optimal solution set. The dynamic weights are adjusted in real time according to crop growth stage, electricity price period, and weather conditions. Specifically, during key crop growth stages such as flowering and fruit setting, the weights are: growth fitness 0.4, system energy efficiency 0.2, carbon emissions 0.2, and operational stability 0.2. During peak electricity price periods, the weights are: growth fitness 0.2, system energy efficiency 0.4, carbon emissions 0.2, and operational stability 0.2. Under extreme weather conditions, the weights are: growth fitness 0.5, system energy efficiency 0.1, carbon emissions 0.1, and operational stability 0.3. Through dynamic weight adjustments, a performance trade-off is achieved under different scenarios, balancing control effectiveness with economic benefits.
[0091] Furthermore, this embodiment of the application also sets up a local efficiency optimization unit on the edge smart gateway side, which performs fine-tuning at the second level within the feasible range of environmental parameters issued by the central controller and the equipment operating baseline range, and adjusts the equipment operating parameters to the operating point with the highest efficiency.
[0092] The central controller issues minute-level environmental target ranges and device operating baseline ranges. Within these ranges, the edge intelligent gateway performs rapid optimization with the goal of maximizing device operating efficiency. An incremental golden section method is employed; this one-dimensional search algorithm boasts fast convergence speed and low computational cost, making it suitable for the real-time operation requirements of low-computing-power embedded platforms on the edge.
[0093] The optimization execution steps are as follows: The first step is to receive the adjustable range of device parameters [a,b] and the upper limit of allowable deviation of environmental parameters from the central controller. The second step is to select two initial trial points within the interval according to the golden ratio: ,
[0094] The third step is to control the equipment to operate under x1 and x2 conditions respectively. After the operating status stabilizes, the actual operating power of the equipment and environmental parameters are collected, and the operating efficiency of the corresponding conditions is calculated. The fourth step is to compare the efficiency values of the two trial points, discard the interval with lower running efficiency, and reduce the search interval to 0.618 times the original. Fifth, repeat steps two through four until the search interval length is less than the preset convergence threshold of 0.5Hz. Use the midpoint of the interval as the optimal operating parameter to control the stable operation of the device.
[0095] The entire optimization process can be completed within 30 seconds, achieving efficiency adjustments at the second level.
[0096] This application embodiment also includes a boundary verification mechanism. After each parameter adjustment, the edge intelligent gateway collects environmental parameters in real time. If the environmental parameters are about to exceed the feasible domain issued by the central controller, the optimization is immediately stopped, and the parameters are reverted to the baseline value to ensure that the environmental control effect does not deviate from the requirements. The boundary verification mechanism ensures that edge optimization is always carried out within the global control framework, only performing energy efficiency optimization without changing the overall control objective.
[0097] S4 compiles the final operating parameters of the equipment into control commands that the corresponding equipment can recognize, and sends them to each executing device according to the partition time slot scheduling and peak-shaving mechanism, and collects the equipment operation feedback data in real time and verifies the execution status.
[0098] For example, after the control baseline strategy is determined, the final operating parameters of each device, including fan speed, pump frequency, valve opening, supplementary lighting duty cycle, and running time, are first compiled into Modbus-RTU protocol instruction codes supported by the corresponding devices, adapting them to the communication interfaces of mainstream industrial actuators. The compiled instruction data is then encapsulated into MQTT-SN lightweight protocol frames, adapting to the low-bandwidth, multi-node industrial IoT transmission scenario in greenhouses, reducing communication resource consumption.
[0099] To improve the reliability of command transmission in complex electromagnetic environments, BCH(15,7) error correction coding is added to the command data segment of control commands. This coding uses 7 bits of command data as information bits, and generates 8 parity bits through generator polynomial operations to form a 15-bit codeword. It can correct up to 2 random bit errors and detect 3 consecutive bit errors. It can correct most transmission errors without triggering retransmission, significantly reducing the probability of command failure caused by motor interference and line loss in the field. The complete command frame structure includes the device address code, function code, command data segment, BCH check code, high-precision timestamp, and frame end symbol in sequence. The length of each field strictly follows the standard definition of the communication protocol.
[0100] The operating equipment inside the greenhouse is divided into eight independent groups based on functional attributes, installation area, and power supply circuit: East Zone Fan Group, West Zone Fan Group, Evaporative Cooling Pump Group, Irrigation Pump Group, Top Supplemental Lighting Group, Side Supplemental Lighting Group, Heating Equipment Group, and Window Opening Actuator Group. Each group is assigned an independent time slot, with a single time slot duration of 50ms and a 100ms interval between adjacent time slots. Commands are issued sequentially according to group number.
[0101] This partitioned peak-shaving mechanism avoids instantaneous power surges caused by all devices receiving commands and starting synchronously, reducing peak load on the power grid and minimizing capacity redundancy requirements in the power distribution system. Simultaneously, it avoids communication conflicts and data packet loss caused by multiple devices responding simultaneously on the bus, increasing the command issuance success rate to over 99.5%. The total time for issuing complete commands across 8 groups does not exceed 1.2 seconds, fully meeting the real-time requirements of greenhouse environment control.
[0102] Furthermore, the embodiments of this application also adopt a dual-mode feedback verification mechanism that combines periodic heartbeats with event-driven mechanisms, taking into account both the comprehensiveness of status monitoring and the efficiency of communication resource utilization.
[0103] In periodic heartbeat mode, all executing devices report their operating status heartbeat packets every 30 seconds. The data packets contain basic information such as current operating parameters, device status identifiers, fault codes, and cumulative runtime, used for routine system operation status monitoring and operation data archiving. In event-driven mode, when a device status changes, such as a start / stop action, speed gear adjustment, detection of hardware overcurrent or overvoltage faults, or deviations between operating parameters and command values exceeding preset thresholds, the device does not need to wait for the heartbeat cycle and immediately and proactively reports alarm information, ensuring that abnormal events can be detected by the system in a timely manner.
[0104] The central controller and edge smart gateway analyze the device feedback data in real time and compare the consistency between the actual operating parameters of the device and the issued command parameters. If the deviation of core parameters such as speed, power, and opening degree exceeds the preset threshold, such as the fan speed deviation being greater than 2Hz or the valve opening degree deviation being greater than 5%, it is determined to be an execution abnormality, the abnormal event is recorded and the subsequent processing procedure is triggered.
[0105] When an execution anomaly is detected, or when environmental sensors detect rapid fluctuations in parameters, the edge smart gateway can directly trigger local compensatory adjustments without waiting for new instructions from the central controller. If a single device experiences an execution deviation, the edge gateway automatically adjusts the operating parameters of other normal devices in the same group to compensate for the output shortfall and ensure that the overall environmental parameters of the greenhouse remain stable within the preset feasible range. If environmental parameters rapidly deviate from the target range, the edge gateway directly invokes pre-stored emergency adjustment strategies to quickly adjust the output of the corresponding devices to intervene in environmental changes, while simultaneously reporting alarm information and event records to the central controller.
[0106] The response time of edge compensation adjustment is no more than 100ms, which can effectively cope with sudden situations such as temporary equipment failure and sudden changes in the external environment, make up for the shortcomings of the central controller's long calculation cycle and slow response, and maintain the continuous stability of greenhouse environmental parameters.
[0107] Furthermore, this application embodiment also regularly constructs an incremental dataset every month as the data basis for model iteration and updates. The incremental data includes four categories: full environmental measurement data collected in the current month, equipment operating condition and energy efficiency measurement data, crop physiological index data collected periodically, and historical control strategy execution records.
[0108] The incremental data is labeled with bias attribution. Based on the bias source determination results in step S2, the source of bias for each data segment is labeled and categorized into three types: meteorological factors, equipment factors, and sensor factors. This is used to adjust the weights of corresponding modules in the model during incremental training, thereby improving training efficiency. The sample size of the incremental dataset is controlled between 5% and 10% of the original total training set to avoid introducing too much noisy data in a single update, which could interfere with the model's existing stable feature extraction capabilities.
[0109] The completed incremental dataset needs to undergo consistency verification to remove abnormal data segments that do not conform to the greenhouse heat balance equation, ensuring the physical rationality of the training data and avoiding deviations in the model's prediction logic caused by erroneous data.
[0110] Next, the elastic weight consolidation algorithm is used to carry out synchronous incremental fine-tuning of the two types of prediction models. While learning new working condition data, the core knowledge of the model is retained, avoiding the catastrophic forgetting problem common in incremental learning, and ensuring that the performance of the model does not drop significantly in the original scenario.
[0111] The total loss function for incremental training consists of two parts: the loss from the new data task and the regularization term for consolidating old knowledge. The expression is:
[0112] Among them, L total L represents the total loss value during incremental training. new For the task loss on the new dataset, the form is consistent with the loss function of the original training of the corresponding model. The spatiotemporal graph environment prediction model adopts the multi-task joint loss defined in step S2, and the equipment condition-efficiency mapping model adopts the log-marginal likelihood loss; λ is the regularization coefficient, with a value of 500, used to control the retention strength of old knowledge. The larger the coefficient, the more difficult it is for the model parameters to deviate from the original optimal value; F r θ represents the r-th diagonal element of the Fisher information matrix, measuring the importance of the r-th parameter to the old task. A larger value indicates a stronger impact of the parameter on the performance of the original model, and a higher degree of retention is needed during updates. The Fisher information matrix is calculated based on the log-likelihood function of the original training dataset, characterizing the degree of influence of parameter changes on the likelihood value of the old task. r θ represents the real-time value of the r-th parameter during the current training process. r This represents the r-th optimal parameter value of the old model before the update.
[0113] Incremental training employs a layered fine-tuning strategy, setting different update constraints for parameters at different levels. For the spatiotemporal graph environment prediction model, the weight parameters of the first two layers of graph convolutional networks and the first two layers of temporal convolutional networks are frozen, and only the parameters of the top fully connected layer and feature fusion layer are fine-tuned, preserving the model's core spatiotemporal feature extraction capability. For the equipment condition-efficiency mapping model, the signal variance parameter in the kernel function is frozen, and only the feature length scale and linear term weight parameters are fine-tuned, preserving the model's basic nonlinear mapping capability.
[0114] Mini-batch gradient descent was used during training, with a batch size of 32, an initial learning rate of 0.0001, and a total of 50 iterations. After training, the prediction accuracy of the updated model was tested on an independent validation set. If the accuracy was not lower than 95% of the original model, the update was considered successful, and the new model was deployed to the runtime environment. If the accuracy was lower than the threshold, the model was rolled back to the old version, and the incremental data was re-selected, the training parameters were adjusted, and training was conducted again.
[0115] After each model update, a dual-model physical consistency check is performed to ensure that the input and output logic of the two types of models conforms to the same physical laws, thus avoiding logical disconnect between the two types of models after long-term iteration, which would cause the bidirectional correction mechanism to fail.
[0116] The verification process is as follows: 100 independent test samples are randomly selected from the verification set and input into the spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model, respectively. After obtaining the output results of the two models, they are substituted into the greenhouse heat balance equation and water vapor mass balance equation in step S2 to calculate the average residual of the equations. If the average temperature residual exceeds 0.2℃ or the average humidity residual exceeds 2%RH, it is determined that there is a physical and logical disconnect between the two models, triggering the joint fine-tuning process.
[0117] The joint fine-tuning uses the residuals of the greenhouse heat balance equation as constraints and simultaneously adjusts the top-level parameters of both types of models so that the outputs of the two types of models meet the physical consistency requirements again, ensuring that the two-way mutual correction mechanism can operate stably for a long time.
[0118] This application also provides an artificial intelligence-based greenhouse environment control system, which includes: The data acquisition unit is used to collect multi-dimensional environmental data inside the greenhouse, including air, soil and crop dimensions, as well as operating condition data including fans, water pumps, supplemental lighting and heating equipment. After preprocessing the multi-dimensional environmental data and operating condition data, a joint feature tensor of environment-equipment operating conditions containing time dimension, spatial node dimension and feature dimension is constructed. The model calibration unit is used to call the spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model respectively, generate an environmental parameter prediction sequence of a preset duration based on the joint feature tensor, and the energy consumption prediction results of each device under the corresponding control conditions; using the greenhouse heat and mass transfer mechanism equation as the physical constraint, it uses the actual effective output calculation results of the equipment to reverse correct the parameter change rate and steady-state value of the environmental parameter prediction sequence, and at the same time uses the actual performance of the equipment inferred from the environmental measurement data to iteratively update the condition offset parameters of the equipment condition-efficiency mapping model, thus completing the bidirectional calibration of the spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model; The decision unit is used to perform multi-objective global optimization based on the environmental parameter prediction sequence output by the corrected spatiotemporal map environmental prediction model, combined with crop physiological rigid constraints and equipment efficient operation range constraints, to generate the feasible domain of environmental parameters and equipment operation baseline instructions; within the adjustable range of equipment parameters on the edge of the greenhouse, the unit optimizes parameters with the goal of maximizing equipment operating efficiency, and determines the final operating parameters of each piece of equipment. The execution unit is used to compile the final operating parameters of the equipment into control instructions that can be recognized by the corresponding equipment, distribute them to each execution device according to the partition time slot scheduling and peak-shaving mechanism, collect equipment operation feedback data in real time, and verify the execution status.
[0119] Experimental process To verify the actual control performance of the method proposed in this application, an area of 400m² was selected. 2 A multi-span glass greenhouse was used as the experimental platform, with tomatoes of the Jinpeng No. 1 variety being grown. The experiment was conducted during the flowering and fruit-setting period of tomatoes, and lasted for 30 consecutive days. Two parallel greenhouses, a control group and an experimental group, were set up. The initial environmental conditions, crop growth, and equipment configuration of the two groups were completely identical. The control group adopted the single-spatiotemporal AI model control scheme described in the prior art document CN120803173A, while the experimental group adopted the dual-model bidirectional calibration and two-level efficiency optimization control scheme described in this application. The comparison and verification were carried out from three dimensions: prediction accuracy, control effect, and energy efficiency level.
[0120] The experimental greenhouse is equipped with a roof-mounted ventilation system, a side-wall fan and wet curtain cooling system, an LED supplemental lighting system, a drip irrigation system, and an electric heating system. Thirty-two environmental monitoring nodes are deployed within the greenhouse, with data sampling intervals of one minute. During the experimental period, outdoor meteorological conditions covered typical weather types such as sunny, cloudy, and rainy days, including dynamic scenarios such as midday strong sunlight causing temperature rise and afternoon rainfall causing temperature drop, demonstrating sufficient scenario representativeness. The optimal growth parameters for tomatoes during the flowering and fruit-setting period were set as follows: daytime temperature 23–28℃, nighttime temperature 15–20℃, relative humidity 50%–70%, and minimum daily cumulative light intensity of 12 mol / m². 2 .
[0121] The experiment set up three types of evaluation indicators: prediction accuracy, control effect, and energy efficiency. The prediction accuracy indicators were the average absolute error of temperature prediction and the average absolute error of humidity prediction 24 hours in advance. The formula for calculating the average absolute error is:
[0122] Where K is the total number of prediction samples, y pred,h Let y be the predicted value for the h-th sample. true,h The value represents the measured value of the h-th sample; a smaller error value indicates higher prediction accuracy. The control effect indicators include the environmental parameter compliance rate, the crop's daily effective accumulated temperature satisfaction rate, and the intraday temperature fluctuation range. The environmental parameter compliance rate is the proportion of time during which temperature and humidity are within the suitable range relative to the total test time. Energy efficiency indicators include the total power consumption of the system during the experimental period, the average operating efficiency of the equipment, and the daily energy consumption per unit area.
[0123] Statistical analysis of prediction accuracy data over the experimental period showed that the average absolute error of temperature prediction 24 hours in advance was 1.21℃, and the average absolute error of humidity prediction was 4.32%RH in the control group; while the average absolute error of temperature prediction in the experimental group was 0.78℃, and the average absolute error of humidity prediction was 2.65%RH. Compared with the control group, the experimental group showed a 35.5% reduction in temperature prediction error and a 38.7% reduction in humidity prediction error.
[0124] Statistical analysis across different scenarios shows that during periods of abrupt weather changes, such as a sudden increase in strong midday sunlight or afternoon rain and cooling, the prediction error of the control group rises to over 2℃. In contrast, the experimental group, through a two-way correction process, maintains a prediction error below 1.1℃, demonstrating a significant improvement in prediction stability. This result verifies that the dual-model, two-way correction process can effectively overcome the accuracy limitations of a single model, exhibiting even greater advantages in dynamically changing scenarios and providing more reliable preliminary data support for generating control strategies.
[0125] In terms of regulation effectiveness, the environmental parameter compliance rate of the control group was 89.2%, the daily effective accumulated temperature satisfaction rate was 91.5%, and the daily temperature fluctuation range was ±1.8℃; while the environmental parameter compliance rate of the experimental group was 95.7%, the daily effective accumulated temperature satisfaction rate was 97.3%, and the daily temperature fluctuation range was ±1.1℃. The environmental parameter stability of the experimental group was significantly better than that of the control group, with the temperature and humidity fluctuation range reduced by about 40%.
[0126] The reason for this difference is that the corrected prediction results match the actual operating effect better, the control strategy is more forward-looking and accurate, and can be implemented in advance to make gradual adjustments, avoiding large fluctuations in parameters and problems of over-adjustment and under-adjustment, providing a more stable growth environment for crops, and playing a positive role in ensuring flowering and fruit setting rate and fruit quality.
[0127] The energy efficiency comparison results show that the total power consumption of the control group during the experimental period was 1287.6 kWh, the average operating efficiency of the equipment was 68.3%, and the daily energy consumption per unit area was 1.07 kWh / m². 2 The total power consumption of the experimental group was 1024.2 kWh, the average operating efficiency of the equipment was 82.7%, and the daily energy consumption per unit area was 0.85 kWh / m². 2 Compared with the control group, the experimental group reduced total energy consumption by 20.5% and increased average equipment operating efficiency by 14.4 percentage points.
[0128] The energy consumption reduction was most significant in the ventilation and irrigation systems, with the average daily operating time of the fans decreasing from 7.2 hours to 5.8 hours, and 87% of the operating time remaining within the high-efficiency range. The operating efficiency of the water pump system increased from 65% to 81%. These results validate the effectiveness of the two-stage efficiency optimization mechanism. By combining global strategy constraints with edge fine-tuning, the equipment can continuously operate within the high-efficiency range without affecting the control effect, achieving significant energy savings.
[0129] After 90 days of continuous operation, a retest was conducted. The control group model, affected by equipment aging and seasonal climate changes, experienced a 12.3% decrease in prediction accuracy and a drop in environmental parameter compliance rate to 84.7%. The experimental group, through incremental evolution, showed only a 2.1% decrease in prediction accuracy, while maintaining an environmental parameter compliance rate above 93%. These results demonstrate that this method possesses superior long-term adaptability and self-evolutionary capability, sustainably maintaining stable regulatory performance and reducing the workload of manual parameter tuning during long-term operation.
[0130] Overall, the method in this application solves the core problem of limited prediction accuracy of a single model through a dual-model bidirectional correction process, and achieves simultaneous improvement in regulation effect and energy efficiency level through two-stage efficiency optimization. All performance indicators are significantly better than existing solutions, and it has good practical value and prospects for promotion and application.
[0131] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0132] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. An artificial intelligence-based greenhouse environment regulation method, characterized in that, Includes the following steps: Multidimensional environmental data, including air, soil, and crop dimensions, is collected inside the greenhouse, as well as operating condition data, including fans, water pumps, supplemental lighting, and heating equipment. After preprocessing the multidimensional environmental data and the operating condition data, an environmental-equipment operating condition joint feature tensor containing time dimension, spatial node dimension, and feature dimension is constructed. The spatiotemporal graph environment prediction model and the equipment condition-efficiency mapping model are invoked respectively. Based on the joint feature tensor, an environmental parameter prediction sequence of a preset duration and the energy consumption prediction results of each device under the corresponding control conditions are generated. Using the greenhouse heat and mass transfer mechanism equation as a physical constraint, the parameter change rate and steady-state value of the environmental parameter prediction sequence are corrected in reverse using the actual effective output calculation results of the equipment. At the same time, the operating condition offset parameters of the equipment condition-efficiency mapping model are iteratively updated using the actual performance of the equipment inferred from the environmental measurement data, thus completing the bidirectional correction of the spatiotemporal graph environment prediction model and the equipment condition-efficiency mapping model. Based on the environmental parameter prediction sequence output by the corrected spatiotemporal map environmental prediction model, multi-objective global optimization is performed by combining crop physiological rigid constraints and equipment efficient operation range constraints to generate feasible domains of environmental parameters and equipment operation baseline instructions. Within the adjustable range of equipment parameters on the edge of the greenhouse, parameter optimization is performed with the goal of maximizing equipment operating efficiency to determine the final operating parameters of each piece of equipment. The final operating parameters of the equipment are compiled into control instructions that can be recognized by the corresponding equipment, and distributed to each execution device according to the partition time slot scheduling and peak-shaving mechanism. The equipment operation feedback data is collected in real time and the execution status is verified.
2. The greenhouse environment regulation method based on artificial intelligence according to claim 1, characterized in that, Before completing the bidirectional correction of the spatiotemporal map environmental prediction model and the equipment condition-efficiency mapping model, the prediction deviations are first classified by source: if only the environmental parameters of a single node are deviated, but the energy consumption prediction is consistent with the actual measurement, it is determined to be a local sensing anomaly, and spatial interpolation is used to compensate for the local data; if the global environmental parameters are deviated synchronously with the energy consumption prediction and conform to the greenhouse heat balance equation, it is determined to be an external meteorological disturbance, and the short-term prediction weights of the spatiotemporal map environmental prediction model are adjusted; if the environmental parameters are generally stable, but the deviation between the energy consumption prediction and the actual measurement exceeds the threshold, it is determined to be equipment performance drift, and only the parameters of the equipment condition-efficiency mapping model are updated.
3. The greenhouse environment regulation method based on artificial intelligence according to claim 1, characterized in that, The optimization objectives of the multi-objective global optimization include crop growth adaptability, system comprehensive energy efficiency, carbon emissions per unit area per cycle, and equipment operation stability. The constraints include crop physiological rigidity constraints, equipment high-efficiency interval ratio constraints, and mechanism consistency constraints. The Pareto optimal solution set is obtained by using a multi-objective particle swarm optimization algorithm with adaptive inertial weights. The final control benchmark strategy is selected from the Pareto optimal solution set by combining the dynamic weights of the current scenario.
4. The greenhouse environment regulation method based on artificial intelligence according to claim 1, characterized in that, The parameter optimization adopts the incremental golden section method. The execution steps are as follows: receive the adjustable range of equipment parameters and the upper limit of allowable deviation of environmental parameters issued by the central controller, select two initial trial points according to the golden section ratio, control the equipment to operate under the corresponding working conditions and calculate the actual operating efficiency, discard the interval with the lower actual operating efficiency, repeat the iteration until the length of the search interval is less than the preset convergence threshold, and take the midpoint of the interval as the optimal operating parameter.
5. The greenhouse environment regulation method based on artificial intelligence according to claim 1, characterized in that, The spatiotemporal graph environment prediction model adopts a dual-path architecture that combines a graph convolutional network and a temporal convolutional network. The graph convolutional network extracts the spatial distribution features of the joint feature tensor based on the spatial topological association of sensor nodes, and the temporal convolutional network extracts the temporal evolution law of the joint feature tensor using dilated causal convolution. The spatial distribution features and the temporal evolution law are concatenated and output as the environmental parameter prediction sequence through a fully connected layer. The spatiotemporal graph environment prediction model is trained using a multi-task joint loss function: Among them, L env Let y be the total loss value of the spatiotemporal graph environment prediction model, MSE(·) be the mean square error function, and y be the mean square error value. pred For the predicted sequence of environmental parameters, y ture Let be the measured sequence of environmental parameters, TV(·) be the total variation regularization term, α be the weighting coefficient of the precision term, and β be the weighting coefficient of the smoothing term.
6. The greenhouse environment regulation method based on artificial intelligence according to claim 1, characterized in that, The equipment condition-efficiency mapping model constructs independent Gaussian process regression models for fans, water pumps, supplementary lighting, and heating equipment. The fan model's inputs are operating speed, ambient air temperature, cumulative operating time, and supply voltage, with outputs being real-time operating efficiency and active power. The water pump model's inputs are operating frequency, actual pipeline head, transported water temperature, and cumulative operating time, with outputs being hydraulic efficiency and active power. The supplementary lighting model's inputs are dimming duty cycle, ambient temperature around the lamp, cumulative lighting time, and supply voltage, with outputs being photosynthetically active radiation output efficiency and active power. The heating equipment model's inputs are heating power level percentage, inlet air temperature, cumulative operating time, and supply voltage, with outputs being electrothermal conversion efficiency and active power.
7. The method for controlling the environment of a greenhouse based on artificial intelligence according to claim 6, characterized in that, The Gaussian process regression model uses a kernel function that combines a squared exponential kernel and a linear kernel, expressed as follows: In the formula: k(x) i ,x q ) is the input sample x i With x q The kernel function value, For signal variance, Represents the L2 norm. For the feature length scale, These are the linear kernel weights, and T represents the transpose. Let δ be the noise variance. iq The Kronecker function is used; the Gaussian process regression model is trained by optimizing the kernel function hyperparameters through maximum likelihood estimation and solving them using the conjugate gradient method.
8. The method for controlling the environment of a greenhouse based on artificial intelligence according to claim 1, characterized in that, The control commands are encapsulated into lightweight protocol frames with BCH error correction coding. The execution devices are divided into multiple independent groups according to function and region, and each group is allocated an independent transmission time slot. Commands are transmitted sequentially in staggered order according to the group sequence. A dual-mode feedback verification mechanism combining periodic heartbeat and event-driven is adopted. Periodic heartbeat means that the device reports its operating status at fixed intervals. Event-driven means that alarm information is reported immediately when the device status changes or malfunctions. When an execution abnormality is detected in the feedback verification, local compensation adjustment is triggered by the edge side.
9. The method for controlling the environment of a greenhouse based on artificial intelligence according to claim 1, characterized in that, After issuing the control commands, environmental measurement data, equipment energy efficiency data, and crop physiological index data are collected periodically. Combined with historical control records, an incremental dataset with bias attribution labels is constructed. An elastic weight consolidation algorithm is then used to simultaneously perform incremental fine-tuning on the spatiotemporal map environmental prediction model and the equipment condition-efficiency mapping model, completing the iterative update of the model. The total loss function expression for the incremental fine-tuning is: Among them, L total L represents the total loss during incremental training. new F is the task loss on the new dataset, where λ is the regularization coefficient. r Let θ be the r-th diagonal element of the Fisher information matrix, representing the importance of the corresponding parameter to the old task. r Let θ be the parameter value currently being trained. r These are the optimal parameter values for the old model.
10. A system applying the artificial intelligence-based greenhouse environment control method according to any one of claims 1-9, characterized in that, include: The data acquisition unit is used to collect multi-dimensional environmental data inside the greenhouse, including air, soil and crop dimensions, as well as operating condition data including fans, water pumps, supplemental lighting and heating equipment. After preprocessing the multi-dimensional environmental data and the operating condition data, an environmental-equipment operating condition joint feature tensor containing time dimension, spatial node dimension and feature dimension is constructed. The model calibration unit is used to call the spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model respectively, generate an environmental parameter prediction sequence of a preset duration based on the joint feature tensor, and the energy consumption prediction results of each device under the corresponding control conditions; using the greenhouse heat and mass transfer mechanism equation as a physical constraint, the unit uses the actual effective output calculation results of the equipment to reverse correct the parameter change rate and steady-state value of the environmental parameter prediction sequence, and at the same time uses the actual performance of the equipment inferred from the environmental measurement data to iteratively update the condition offset parameters of the equipment condition-efficiency mapping model, thus completing the bidirectional calibration of the spatiotemporal map environment prediction model and the equipment condition-efficiency mapping model; The decision unit is used to perform multi-objective global optimization based on the environmental parameter prediction sequence output by the corrected spatiotemporal map environmental prediction model, combined with crop physiological rigid constraints and equipment efficient operation range constraints, to generate the feasible domain of environmental parameters and equipment operation baseline instructions. Within the adjustable range of equipment parameters on the edge of the greenhouse, parameter optimization is performed with the goal of maximizing equipment operating efficiency to determine the final operating parameters of each piece of equipment. The execution unit is used to compile the final operating parameters of the device into control instructions that can be recognized by the corresponding device, distribute them to each execution device according to the partition time slot scheduling and peak-shaving mechanism, collect device operation feedback data in real time, and verify the execution status.
Citation Information
Patent Citations
Greenhouse environment adaptive regulation and control system based on artificial intelligence
CN120803173A