Method for spatio-temporal prediction and three-dimensional reconstruction of temperature and humidity field in sunlight greenhouse based on multi-sensor deep learning
Patent Information
- Application Number
- CN202610991151.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-04
- Publication Date
- 2026-10-27
AI Technical Summary
尽管如此,现有研究大多仍将传感器视为独立点位,缺乏对不规则空间内监测节点动态贡献度的自适应解析
[0036]1、本发明提出一种融合三维空间坐标嵌入与传感器级注意力机制的多传感器深度学习框架,构建了CNN-BiLSTM-SA模型。该模型通过多尺度卷积提取局部动态特征,结合BiLSTM捕捉环境温湿度的长时序依赖关系,并利用门控注意力机制根据环境状态动态分配不同传感器的权重,最终实现温湿度的多步预测与连续三维微气候重构。
Smart Images

Figure CN122987606A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a spatiotemporal prediction method for temperature and humidity fields in solar greenhouses that integrates spatial coordinate embedding and sensor-level attention mechanisms. Background Technology
[0002] Facility agriculture, as a pillar of modern agriculture ensuring global food supply and increasing the annual yield of high-value horticultural crops, plays a central role in addressing global climate uncertainty. Solar greenhouses, a form of facility agriculture unique to northern China, employ an asymmetrical single-slope enclosure structure design. Through a physical mechanism of light transmission on the front slope, heat storage in the rear wall, and heat insulation in the side walls, they effectively solve the energy consumption bottleneck in vegetable production during cold seasons. However, due to this special enclosure structure and thermophysical characteristics, the indoor microclimate environment (temperature, relative humidity, radiation, etc.) exhibits extremely strong nonlinear fluctuations, time lags, and three-dimensional spatially uneven distribution characteristics.
[0003] Existing research has shown that significant stratification exists within the temperature and humidity fields of solar greenhouses. The lower and middle parts of the canopy often exhibit a low-temperature, high-humidity microclimate due to airflow obstruction and intense transpiration. This significant spatial heterogeneity not only affects crop physiological metabolism, photosynthetic rate, and nutrient allocation efficiency, but is also a core environmental driver inducing crop stress. Current intelligent control strategies often rely on data from single measuring points located in the center of the greenhouse or far from the boundaries. This assessment method suffers from significant representativeness bias when dealing with highly heterogeneous environments, leading to frequent false triggering of ventilation and heating equipment and failing to cover risk areas at the greenhouse edges and the bottom of the canopy. Therefore, constructing a microclimate spatiotemporal extrapolation model capable of simultaneously sensing temporal fluctuations and three-dimensional spatial topological relationships is a crucial prerequisite for achieving proactive, zoned, and precise control.
[0004] Domestic and international scholars have conducted extensive and in-depth research in the field of greenhouse microclimate prediction, and the research path is evolving from mechanistic modeling to a data-driven paradigm. Early explorations mainly focused on thermodynamic mechanism modeling, aiming to construct a mathematical description system by explicitly describing the heat and mass transfer processes between the building envelope and the environment. Saberian and Sajadiy used computational fluid dynamics (CFD) simulation to deeply analyze the impact of dynamic solar heat load on greenhouse microclimate, accurately reproducing the spatial heterogeneity of the temperature and airflow fields inside the greenhouse. Hou et al. conducted numerical simulations of the canopy thermal environment of a solar greenhouse based on computational fluid dynamics (CFD) methods and compared and verified them with measured data. The results showed that the model can effectively characterize the three-dimensional distribution characteristics of air temperature and the temperature gradient variation law inside the greenhouse. However, such physical models face significant challenges in practical applications. The huge computational cost makes it difficult to adapt to the real-time prediction requirements in the Internet of Things (IoT) environment, and the complex parameter calibration process also limits its transferability between greenhouses with different structures.
[0005] With the improvement of high-performance computing capabilities, data-driven models have gradually become the mainstream direction of microclimate prediction research. He and Ma's research shows that after using principal component analysis (PCA) to remove redundant features, modeling based on artificial neural networks (ANNs) can effectively predict greenhouse relative humidity, significantly improving robustness against external environmental fluctuations. In recent years, breakthroughs in deep learning technology have brought about fundamental changes in the modeling of long-term, strongly coupled environmental data. Liu et al. developed a GCP-LSTM prediction system based on long short-term memory networks. This system integrates multi-source meteorological features from both indoor and outdoor sources and outperforms traditional statistical models such as support vector machines in predicting six key environmental factors, including temperature and humidity. Jia and Wei used a deep neural network regression (DNNR) model to achieve advanced prediction of temperature and humidity at multiple time steps, from 3 hours to 24 hours. The temperature error at the 24-hour step was distributed within [-7, 7]℃, laying the foundation for multi-step microclimate prediction research.
[0006] To further improve prediction accuracy in complex dynamic environments, researchers have begun to introduce attention mechanisms to capture key historical fluctuation information. Yang et al. further integrated the feedforward attention mechanism with LSTM to construct the FAM-LSTM model, significantly compressing the 24-hour temperature prediction error to [-1.8, 2.9]℃ and controlling the humidity error within [-5.8, 4.4]%, significantly outperforming single-time-series architectures of the same period. In the exploration of hybrid architectures, Kow et al. innovatively integrated deep learning prediction models with physical process constraints to construct a hybrid-driven multi-step microclimate prediction framework. This framework achieved significant improvements in both validation accuracy and interpretability, representing the current cutting-edge development direction in the field.
[0007] To address the lack of spatial topological information, Jia et al. introduced spatial information into the CNN-LSTM framework, exploring a method for regional temperature spatial simulation and prediction that combines convolutional features with temporal learning, providing important methodological references for greenhouse 3D temperature field modeling. Recently, Jiang et al. proposed the RIME-CNN-BiLSTM architecture, which, through automated parameter optimization algorithms, achieved accurate adaptation to extreme weather in Northeast China, reducing the mean absolute error (MAE) of temperature prediction by 46% and significantly enhancing the model's generalization ability in non-steady-state environments. Nevertheless, most existing studies still treat sensors as independent points, lacking adaptive analysis of the dynamic contributions of monitoring nodes in irregular spaces. Summary of the Invention
[0008] This invention addresses the significant spatiotemporal heterogeneity of temperature and humidity fields within solar greenhouses by proposing a spatiotemporal prediction and 3D reconstruction method for these fields based on multi-sensor deep learning. This method utilizes multi-source sensor data to construct a CNN-BiLSTM-SA spatiotemporal coupling model, achieving high-precision reconstruction from discrete measurement point observations to a continuous 3D physical field. Spatially, the model effectively characterizes the continuous gradient distribution of the temperature field driven by radiation and accurately reconstructs the vertical stratification features caused by the thermal inertia of the enclosure structure. Simultaneously, in humidity field analysis, it successfully identifies localized high-humidity cores and boundary low-humidity zones formed by crop transpiration and airflow obstruction, achieving a stable expression of highly spatially heterogeneous structures. This provides reliable data support and a methodological foundation for zonal environmental control and disease risk early warning in solar greenhouses.
[0009] The objective of this invention is achieved through the following technical solution:
[0010] A method for spatiotemporal prediction and 3D reconstruction of temperature and humidity fields in a solar greenhouse based on multi-sensor deep learning includes the following steps:
[0011] Step 1: Data Acquisition and Spatial Coordinate Calibration
[0012] A temperature and humidity sensor network was deployed inside the greenhouse to continuously collect temperature and humidity data of the crop canopy and the vicinity of the enclosure structure, and to record the three-dimensional coordinates and grouping information of each measuring point. At the same time, a meteorological station was set up in an unobstructed location outside the greenhouse to collect external meteorological forcing variables such as outdoor air temperature, relative humidity, atmospheric pressure, solar radiation, wind speed, wind direction, and rainfall. The temperature and humidity sensors were arranged in a 3×3 horizontal layout in each planting test area, combined with three vertical heights of 0.5 m, 1.0 m, and 1.5 m above the ground, forming a total of 27 canopy temperature and humidity measuring points, with a sampling interval of 15 min.
[0013] Step 2, Data Preprocessing and Sample Construction:
[0014] The greenhouse temperature and humidity observations, outdoor meteorological forcing variables, and time codes were unified into a 15-minute time grid. Outlier removal, missing value imputation, and normalization based on training set statistics were performed. Using 96 consecutive historical time steps as the input window and the next 96 time steps as the direct multi-step prediction target, a model input containing multi-sensor historical sequences, external meteorological features, time features, three-dimensional coordinates of measuring points, and grouped embeddings was constructed.
[0015] Step 3: Predicting the temperature and humidity of the greenhouse:
[0016] A CNN-BiLSTM-SA network architecture is constructed, which is a cascaded structure formed by sequentially connecting a multi-scale CNN neural network model, a sensor-level gated attention mechanism, and a BiLSTM neural network model. The network takes historical multi-sensor observation sequences, external meteorological data, temporal features, and sensor spatial coordinates as inputs. The multi-scale CNN neural network model is located at the front end, used to extract short-term perturbations and multi-scale variation features from the historical multi-sensor sequences. The sensor-level gated attention mechanism is located in the middle, used to adaptively allocate contribution weights from different sensors based on the characteristics of the measuring points and the external meteorological conditions. The BiLSTM neural network model is located at the back end, used to perform long-term dependency modeling on the global state sequence after attention fusion. Finally, the future temperature and humidity prediction results are obtained through a fully connected output layer, and continuous temperature and humidity field reconstruction is achieved by combining spatial interpolation.
[0017] The CNN neural network model constructs a neighborhood enhancement mechanism at the initial stage of data input to enhance its ability to represent the spatial heterogeneity features of boundary gradients, canopy humidity fluctuations, and local ventilation disturbances. The enhanced feature tensors are then input into a multi-scale temporal convolution module, which performs sliding window scanning on the input sequence through multiple sets of one-dimensional convolution kernels of different sizes deployed in parallel to extract high-order features under irregular spatial distribution. The specific convolution operation process is described as follows:
[0018]
[0019] In the formula, Indicates the first Each convolutional branch at time... Output characteristic response values; This indicates the input signal sequence after neighborhood enhancement at time [time]. The value of ; Indicates the first The convolutional kernel at the _th ... The weight of each position; Indicates the first Bias terms of each convolution kernel; This indicates the length of the receptive field of the convolution kernel; (·) denotes a nonlinear activation function; the multi-scale features output by the CNN are concatenated with the sensor's 3D coordinates and grouped embeddings, and then passed through a node mapping layer to obtain the measurement point time feature vector. This vector serves as the input to the subsequent sensor-level gated attention mechanism;
[0020] The sensor-level gating attention mechanism will use the time feature vectors of each measurement point. The current global meteorological characteristics include solar radiation and ambient temperature and humidity. Deep concatenation is performed to form augmented feature vectors. These vectors are then input into a shared multilayer perceptron to calculate energy scores, producing response values that are sensitive to physical location. To ensure the CNN-BiLSTM-SA network architecture's ability to focus on local heterogeneity centers, a Softplus function is introduced for mapping.
[0021]
[0022]
[0023]
[0024] In the formula, Indicates time No. The original energy score of each measuring point; This represents the measurement point temporal feature vector output by the CNN and the node mapping layer; This represents the global meteorological feature vector at the current moment; , and These represent the weight matrix, bias vector, and weight transformation vector of the attention layer, respectively. This represents the positive gated response after Softplus mapping; To prevent division by zero of extremely small constants; Indicates the number of sensors involved in the modeling; Indicates the first Each sensor at time The normalized contribution weights, and the time feature vectors of each measuring point according to Weighted summation is performed to form a comprehensive feature characterizing the instantaneous microclimate state of the entire greenhouse area, which is then used as the input to the BiLSTM module to achieve adaptive modulation of temporal features by geographic location information;
[0025] The BiLSTM neural network model takes the sequence obtained by concatenating the comprehensive feature vector and the global meteorological feature vector as input. It models the long-term dependence of the solar greenhouse microclimate within a historical window through two chains: a forward chain and a reverse chain. The forward chain captures the environmental change trend from morning to night, while the reverse chain supplements contextual information from the end of the historical window backward. The fusion of these two chains forms a more stable temporal representation, which is then output through a fully connected layer as the temperature and humidity prediction results for the next 96 time steps and all sensor locations. Its hidden layer state update follows a gated cyclic equation:
[0026]
[0027]
[0028]
[0029]
[0030]
[0031] In the formula, This indicates that BiLSTM at time... The input vector, in this invention, corresponds to... ; , and These represent the state vectors of the input gate, forget gate, and output gate, respectively. Indicates cell state, This indicates the cell state at the previous moment; and These represent the hidden states at the current and previous time points, respectively. , , , and , , , This represents the weight matrix for the corresponding input and hidden items; , , and The bias term is represented; the output of the BiLSTM hidden layer is mapped to the sensor's physical space via a fully connected layer to generate future global temperature and humidity prediction results.
[0032] The CNN-BiLSTM-SA network architecture addresses the typical vertical temperature stratification phenomenon in solar greenhouses by incorporating a vertical structure constraint term to suppress unreasonable temperature reversal fluctuations in the simulated physical field. The total loss function dynamically adjusts the weight ratio between the prediction error and the physical penalty term, and its specific form is as follows:
[0033]
[0034] In the formula, Represents the total loss function. Indicates the number of sensors; and Representing time respectively No. The predicted and measured values for each sensor location are used, with the first term representing the mean square error between the predicted and measured values. For spatial smoothing regularization, For vertical layering structure constraints, and It is a hyperparameter that controls the strength of physical constraints.
[0035] Compared with the prior art, the present invention has the following advantages:
[0036] 1. This invention proposes a multi-sensor deep learning framework that integrates three-dimensional spatial coordinate embedding and sensor-level attention mechanisms, constructing a CNN-BiLSTM-SA model. This model extracts local dynamic features through multi-scale convolution, combines BiLSTM to capture the long-term temporal dependence of environmental temperature and humidity, and utilizes a gated attention mechanism to dynamically allocate weights to different sensors according to the environmental state, ultimately achieving multi-step prediction of temperature and humidity and continuous three-dimensional microclimate reconstruction.
[0037] 2. The model was validated based on multi-source sensor monitoring data of cucumbers throughout their entire growth period in a typical solar greenhouse. The results showed that the model's mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²) in temperature prediction were satisfactory. 2 The values for temperature and humidity were 0.88℃, 1.236℃, and 0.92, respectively, and for humidity prediction, they were 2.619%, 3.735%, and 0.93, respectively, all significantly better than the baseline model. Further 2D slicing, 3D cloud map reconstruction, and key node time series analysis showed that the model can effectively restore the dominant spatial structure and dynamic evolution characteristics of the temperature and humidity field.
[0038] 3. This invention enables precise characterization of the microclimate of solar greenhouses, providing a high-precision data foundation and methodological support for precise zonal control and disease risk early warning of solar greenhouses. Attached Figure Description
[0039] Figure 1 For the experimental site and data acquisition system in the solar greenhouse, (a) the geographical location of the solar greenhouse, (b) the cross section of the solar greenhouse and the arrangement of sensors, and (c) the outdoor weather station;
[0040] Figure 2 For the prediction strategy of temperature and humidity field in solar greenhouses, Block 1 relies on a three-dimensional meshed sensor network to capture the dynamics of the indoor microenvironment and external meteorological boundaries in real time; Block 2 performs feature alignment, cleaning and normalizing the original sensor sequence, normalized physical coordinates of measuring points, and external stress factors of weather forecasts in high-dimensional data; Block 3, as the core inference engine, constructs a CNN-BiLSTM-SA cascaded network and uses a gated attention mechanism to adaptively analyze the contribution weights of key spatial nodes; Block 4 uses cascaded physical weak constraint reconstruction technology to achieve high spatial resolution continuous physical field reconstruction, thereby transforming the prediction results into a partitioned environmental risk map that can assist in decision-making.
[0041] Figure 3 This is a schematic diagram of the attention model for a gating sensor.
[0042] Figure 4Temperature and humidity data from canopy measurement points during the third growth stage (maturity stage);
[0043] Figure 5 Comparison of 2D-XY temperature slices in a solar greenhouse for the attention mechanism ablation experiment;
[0044] Figure 6 Comparison of 2D-XY humidity slices in a solar greenhouse for the attention mechanism ablation experiment;
[0045] Figure 7 Comparison cloud maps of three-dimensional temperature and humidity fields in a solar greenhouse: (a) three-dimensional temperature field cloud map, (b) three-dimensional humidity field cloud map.
[0046] Figure 8 This is a 2D-XY horizontal temperature slice image of a solar greenhouse;
[0047] Figure 9 This is a 2D-YZ vertical temperature slice image of a solar greenhouse;
[0048] Figure 10 A 2D-XY horizontal humidity slice of a solar greenhouse;
[0049] Figure 11 A 2D-YZ vertical humidity slice of a solar greenhouse;
[0050] Figure 12 Temperature prediction curves of the CNN-BiLSTM-SA model on different sensors;
[0051] Figure 13 Humidity prediction curves of the CNN-BiLSTM-SA model on different sensors;
[0052] Figure 14 Temperature and humidity data at canopy measurement points during the first growth stage (seedling stage);
[0053] Figure 15 Temperature and humidity data from canopy measurement points during the second growth phase (vegetative growth phase);
[0054] Figure 16 For the dynamic error comparison and local gain analysis of the attention mechanism ablation experiment, (a) temperature prediction error comparison and gain analysis; (b) humidity prediction error comparison and gain analysis. Detailed Implementation
[0055] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention that do not depart from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention.
[0056] This invention provides a spatiotemporal prediction and three-dimensional reconstruction method for temperature and humidity fields in solar greenhouses based on multi-sensor deep learning. The method mainly includes: (1) analyzing monitoring data of cucumbers throughout their entire growth period to reveal the spatial heterogeneity evolution characteristics of the temperature and humidity fields inside the solar greenhouse, providing physical constraints for modeling; (2) constructing a unified prediction framework that integrates multi-scale convolution, BiLSTM, and sensor-level gated attention to enhance the modeling ability for local high-gradient regions and heterogeneous sensitive regions; (3) combining two-dimensional slicing, three-dimensional field reconstruction, and key node temporal results to conduct comprehensive verification from three dimensions: overall model accuracy, spatial structure recovery ability, and the effectiveness of the attention mechanism. The research results will provide theoretical basis and technical support for the refined zoning control and digital twin system construction of facility agriculture. The specific steps are as follows:
[0057] 1. Test site and data acquisition:
[0058] This experiment was conducted in a typical solar greenhouse at Baiwang Plantation in Haidian District, Beijing (40°07' N, 116°29' E). Figure 1 a) The greenhouse is located at an azimuth of 8° south of west. The main structure is 80.0 m long, 8.0 m wide, with a ridge height of 3.9 m and a rear wall height of 2.7 m. The horizontal projection of the rear roof is 1.0 m, the horizontal projection of the insulation blanket is 0.8 m, the greenhouse aisle is 75 cm wide, the front bottom corner is 90 cm wide, and the shoulder height at 0.9 m is 1.7 m. The greenhouse frame is made of hot-dip galvanized round pipes and is a steel truss structure, divided into upper and lower chords, with a frame spacing of 1.0 m. Cucumber was selected as the test crop in this experiment. A north-south oriented double-row planting pattern was adopted, with a drip irrigation system under the film. Planting took place on April 1, 2024. Each row had 13 to 15 cucumber plants, with a plant spacing of 30 cm, a row spacing of 40 cm, a ridge spacing of 90 cm, and each ridge was 5.8 m long, for a total of 55 ridges.
[0059] This invention employs a temperature and humidity sensor (RC-4HC, Elitech, China) to continuously monitor the temperature and humidity data of various enclosing structures (front roof, rear roof, rear wall, and soil) within a solar greenhouse. All sensor probes are protected against light radiation interference. To analyze the spatial heterogeneity within the greenhouse, the greenhouse is divided into experimental zones every 20 m along the east-west direction: Zone A (x=20m); Zone B (x=40m); Zone C (x=60m). Within each experimental zone, 27 temperature and humidity sensors are arranged in a 3×3 horizontal layout (horizontal spacing 2 m), combined with three vertical heights (z=0.5 m, 1.0 m, and 1.5 m above the ground). Figure 1(b) This high-resolution monitoring scheme overcomes the spatial representation limitations of traditional single-point sampling, enabling the complete capture of the microenvironmental stratification characteristics within the crop canopy and at the edge of the enclosure structure. Simultaneously, to compare and analyze outdoor meteorological data with greenhouse microclimate data, a meteorological station is deployed outside the greenhouse. Figure 1 c) Responsible for monitoring meteorological environmental parameters. Solar radiation data is acquired by the radiation measurement unit integrated into the meteorological station. This unit is located outside the greenhouse in an unobstructed, unfilmed position, away from tall obstacles. Its installation height is consistent with the meteorological station's data acquisition module to minimize the impact of greenhouse structural shadows and ground reflections on radiation intensity recording. Both the meteorological station and the greenhouse's temperature and humidity sensors monitor at a frequency of 15 minutes per cycle. Indoor and outdoor environmental parameters can be viewed in real-time on web and mobile devices via a data transmission module.
[0060] 2. Methods for predicting temperature and humidity in solar greenhouses:
[0061] To address the significant spatiotemporal heterogeneity of temperature and humidity fields within greenhouses, this invention constructs a CNN-BiLSTM-SA network architecture. Taking historical multi-sensor observation sequences, external meteorological data, temporal features, and sensor spatial coordinates as inputs, it utilizes multi-scale convolution to extract local dynamic features, employs a bidirectional long short-term memory network (BiLSTM) to capture long-term dependencies, and dynamically allocates contribution weights for different measurement points through a sensor-level gating attention mechanism, thereby achieving prediction of future temperature and humidity and reconstruction of continuous spatial fields.
[0062] 2.1 CNN Neural Network Model:
[0063] To address the lack of spatial context caused by the sparse deployment of sensors in solar greenhouses, a neighborhood enhancement mechanism is constructed in the early stages of data input in the CNN neural network model. This mechanism comprehensively considers the spatial proximity relationships between monitoring nodes, enabling the raw sensor signals to incorporate local fluctuation information of the surrounding microenvironment before entering the deep network. This enhances the model's ability to represent spatially heterogeneous features such as boundary gradients, canopy humidity fluctuations, and local ventilation disturbances, effectively alleviating the problem of missing spatial context information caused by relying solely on single-point raw sequence modeling. The enhanced feature tensor is then input into a multi-scale temporal convolution module, which performs a sliding window scan on the input sequence using multiple sets of one-dimensional convolution kernels of different sizes deployed in parallel, aiming to extract high-order features under irregular spatial distribution. The specific convolution operation process is described below:
[0064]
[0065] In the formula, Indicates the first Each convolutional kernel at time... Output characteristic response values; The input signal sequence is enhanced by neighborhood enhancement; The weight matrix representing the convolution kernel, whose size is determined by the receptive field length. Decide; For bias terms; This represents a nonlinear activation function. Through this hierarchical feature extraction, the model can map environmental data from shallow to deep. Smaller convolutional kernels focus on capturing high-frequency pulse features caused by the instantaneous opening of vents, while larger kernels are dedicated to extracting the slow evolutionary trend dominated by day-night cycles. The feature stream output from the convolutional layers is then pooled, using a max-pooling strategy to preserve local extrema, thereby refining the messy original sensor sequence into a feature vector with spatial semantics.
[0066] 2.2 Sensor-level gating attention mechanism:
[0067] As the core component of this architecture for spatial perception, the sensor-level gating attention mechanism addresses the representation bias problem in the non-uniform heating environment of a solar greenhouse through dynamic weight allocation. The system then uses the temporal feature vectors of each measurement point... The current global meteorological characteristics include solar radiation and ambient temperature and humidity. Deep concatenation is performed to form an augmented feature vector. This vector is then fed into a shared multilayer perceptron to calculate an energy score, producing a response value that is sensitive to physical location. Figure 3 To ensure the model's ability to focus on local heterogeneity centers, the Softplus function is introduced for mapping:
[0068]
[0069]
[0070]
[0071] In the formula, Indicates time No. The original energy score of each measuring point; This represents the measurement point temporal feature vector output by the CNN and the node mapping layer; This represents the global meteorological feature vector at the current moment; , and These represent the weight matrix, bias vector, and weight transformation vector of the attention layer, respectively. This represents the positive gated response after Softplus mapping; To prevent division by zero of extremely small constants; Indicates the number of sensors involved in the modeling; Indicates the first Each sensor at time The normalized contribution weights, and the time feature vectors of each measuring point according to Weighted summation is performed to form a comprehensive feature characterizing the instantaneous microclimate state of the entire greenhouse area, which is then used as the input to the BiLSTM module to achieve adaptive modulation of temporal features by geographic location information.
[0072] 2.3 BiLSTM Neural Network Model:
[0073] To address the significant time lag and thermal inertia of greenhouse thermal environments, this invention introduces a bidirectional long short-term memory (BiLSTM) network. This architecture achieves bidirectional deep mining of time dependencies through two independent forward and backward chains. The forward pass captures historical trends (such as cooling caused by ventilation) through gated storage units, while the backward pass includes future environmental impacts (capturing temperature compensation features caused by heat release from the north wall). By fusing the bidirectional hidden states, this module constructs a holistic temporal representation of microclimate evolution, enabling accurate multi-step environmental regulation prediction. The updating of its hidden state follows a gated cyclic equation:
[0074]
[0075]
[0076]
[0077]
[0078]
[0079] In the formula, This indicates that BiLSTM at time... The input vector, in this invention, corresponds to... ; , and These represent the state vectors of the input gate, forget gate, and output gate, respectively. Indicates cell state, This indicates the cell state at the previous moment; and These represent the hidden states at the current and previous time points, respectively. , , , and , , , This represents the weight matrix for the corresponding input and hidden items; , , and This represents the bias term; the output of the BiLSTM hidden layer is mapped to the sensor's physical space via a fully connected layer to generate future global temperature and humidity prediction results.
[0080] 2.4 Physical Constraints and Loss Function:
[0081] Simple data-driven predictions often produce spatial jumps that violate thermodynamic principles. Therefore, the model introduces a physical constraint term on top of the conventional mean squared error loss function. This regularization framework guides the neural network to learn spatially smooth characteristics that conform to fluid dynamic continuity by penalizing unreasonable spatial abrupt changes between adjacent measurement points. For the typical vertical temperature stratification phenomenon in solar greenhouses, the model specifically sets a vertical structure constraint term to suppress unreasonable temperature reversal fluctuations in the simulated physical field. The total loss function dynamically adjusts the weight ratio between the prediction error and the physical penalty term, and its specific form is as follows:
[0082]
[0083] In the formula, Represents the total loss function. Indicates the number of sensors; and Representing time respectively No. The predicted and measured values for each sensor location; the first item represents the mean square error of the prediction. This represents a spatial smoothing regularization term, used to constrain unreasonable abrupt changes between adjacent measurement points; This represents a vertical stratification structure constraint term, used to maintain the reasonable vertical stratification characteristics of the temperature field in a solar greenhouse; and These represent the weight coefficients of the spatial smoothing regularization term and the vertical layering structure constraint term, respectively. This optimization strategy ensures that while pursuing numerical fitting accuracy, the spatial pattern of the output model maintains physical consistency as much as possible. By combining inverse distance weighted interpolation and parabolic geometric masking techniques, this invention achieves a logical closed loop from discrete point prediction to continuous three-dimensional physical field deduction.
[0084] 3. Data preprocessing and evaluation system:
[0085] 3.1 Data Preprocessing and Experimental Setup:
[0086] This invention selects greenhouse multi-sensor data collected from April 1, 2024 to July 31, 2024 as the research object, with a sampling interval of 15 minutes. After time alignment and sensor-dimensional expansion, the raw data yielded 386,496 valid observation records. Based on this, a sliding window approach was used to construct model samples, using a multivariate sequence of 96 consecutive time steps as input and temperature and humidity values of subsequent time steps as prediction targets. The dataset was divided into training, validation, and test sets at a ratio of 70%, 15%, and 15%, respectively. The preprocessing stage mainly included missing value imputation, training set statistic normalization, and spatial coordinate information encoding; further, IDW interpolation was combined to map discrete prediction results to a continuous spatial field to support two-dimensional slicing and three-dimensional field reconstruction analysis.
[0087] 3.2 Evaluation Indicators:
[0088] To evaluate model performance from different perspectives, this invention uses three metrics: root mean square error, mean absolute error, and coefficient of determination.
[0089]
[0090]
[0091]
[0092] In the formula, Indicates the number of samples. Represents the actual value. Indicates the predicted value. It represents the true mean. RMSE is more sensitive to large local errors and is suitable for reflecting deviations in extreme and boundary regions; MAE is more suitable for reflecting the overall average error level. This invention measures the model's ability to fit trends in temperature and humidity. It calculates these indicators separately for both temperature and humidity tasks, and then combines two-dimensional slicing, three-dimensional field reconstruction results, and time-series curves of key monitoring nodes to comprehensively analyze the model's performance.
[0093] 4. Experimental Results and Analysis:
[0094] 4.1 Analysis of the dynamic evolution law of spatial heterogeneity:
[0095] To investigate whether the heterogeneity of the microclimate inside a solar greenhouse exhibits significant growth stage specificity and spatial geometric sensitivity, this invention analyzes three growth stages of cucumber, observing whether the thermo-humidity coupling process shows a characteristic of evolving from uniformity to decoupling as the plant canopy structure develops. The monitoring results from the three growth stages show that the microclimate heterogeneity of the solar greenhouse continuously increases with canopy development. In the first growth stage (seedling stage), the temperature curves at each node of the z=0.5 m layer are generally similar (…). Figure 14 The daytime peak temperature difference was approximately 1.4~1.8 ℃, and the relative humidity changes were also basically synchronized, indicating that the indoor heat and humidity distribution was relatively uniform during the seedling stage. Therefore, single-point measurements still have a certain degree of representativeness.
[0096] In the second growth stage, as the plant height increases to approximately 1.22 m, distinct stratification begins to appear between the z=0.5 m and z=1.0 m layers. Figure 15 During the daytime, the temperature difference between different nodes widened to approximately 4.0 ℃, and the humidity recovery rate in the lower layer was faster than in the upper layer, indicating that the canopy barrier had caused an initial spatial decoupling of sensible and latent heat exchange. In the third growth stage, the plant height further increased to approximately 1.85 m, and the heterogeneity among the three monitoring surfaces was most significant. The maximum instantaneous temperature difference in the vertical direction reached 8.0 ℃. The relative humidity in the area at z=0.5 m at the bottom of the canopy was often maintained above 85%, while the upper layer was more affected by radiation and ventilation disturbances, indicating that a clear high-temperature stratification and localized high-humidity accumulation had formed by the maturity stage. Figure 4 Overall, the greenhouse microclimate gradually evolved from weak heterogeneity in the seedling stage to strong three-dimensional non-uniformity in the mature stage, indicating that its spatial differences are jointly controlled by the thermal response of the enclosure structure and canopy development, demonstrating the necessity of multi-sensor spatiotemporal modeling for accurately characterizing the greenhouse microclimate environment.
[0097] 4.2 Model Performance Evaluation and Ablation Experiment Analysis:
[0098] To verify the comprehensive performance of the constructed model in the temperature and humidity prediction task, the MAE, RMSE, and R of different models on the temperature and humidity test sets were compared as shown in Table 1. 2 The metrics show that the CNN-BiLSTM-SA model exhibits the best overall performance in both prediction tasks. In temperature prediction, its MAE, RMSE, and R² are 0.88℃, 1.236℃, and 0.92, respectively, while in humidity prediction, the corresponding values are 2.619%, 3.735%, and 0.93, respectively, outperforming both the CNN-BiLSTM and SA-BiLSTM models. Specifically, the CNN-BiLSTM model achieves MAE and RMSE of 1.18℃ and 1.684℃, respectively, in the temperature task, with R²... 2The error was only 0.87; however, in humidity tasks, the error increased further, with MAE and RMSE reaching 5.156% and 6.016%, respectively. 2 The score dropped to 0.85. The SA-BiLSTM model outperformed the CNN-BiLSTM model in both tasks, with improved MAE, RMSE, and R-value for temperature prediction. 2 The predicted temperatures were 0.98℃, 1.464℃, and 0.90, respectively, while the predicted humidity was 4.896%, 5.956%, and 0.87, respectively. Compared to the CNN-BiLSTM model, the RMSE of CNN-BiLSTM-SA decreased from 1.684℃ to 1.236℃ in temperature prediction and from 6.016% to 3.735% in humidity prediction, indicating that the overall fitting ability of the model under complex microclimate scenarios was significantly improved after introducing the sensor-level attention mechanism.
[0099] Table 1
[0100]
[0101] 4.3 Analysis of the response results of sensor-level attention mechanisms to spatial heterogeneity:
[0102] Sensor-level attention mechanisms are key to improving the spatial recognition capabilities of models. Through observation... Figure 5 and Figure 6 A comparison of 2D slices with and without the attention mechanism reveals that without it, the model exhibits a significant tendency towards spatial homogenization in both temperature and humidity predictions. Its residual cloud map shows large blocky deviations near the strong convection boundary of the southern film and in the densely planted central area, with absolute errors often exceeding 2.0℃ and 6%. Lacking spatial weight guidance, the model cannot account for local spatial gradient changes. After introducing the attention mechanism, the residual spatial distribution becomes significantly more discretized, and the overall amplitude decreases, especially in the strong gradient region at the boundary and the canopy core region, where the error converges significantly and approaches zero. In the temperature field, errors are effectively suppressed in the region near the southern cover structure and the central sun-receiving area. Figure 5 In the humidity field, both the locally high-humidity areas inside the canopy and the low-humidity areas near the ventilation boundary are more accurately characterized. Figure 6 This highlights that the attention mechanism, by assigning higher weights to key sensors, enables the model to actively focus on nodes that are more sensitive to changes in spatial structure, thereby improving the overall spatial recognition capability.
[0103] The results indicate that the model's predictive ability for complex regions is significantly improved after introducing the attention mechanism during periods of stronger environmental fluctuations and higher local errors. This is consistent with the results of two-dimensional slicing error convergence and key spatial structure recovery, suggesting that the attention mechanism enhances the ability to correct for local extreme states driven by crop physiological activities.
[0104] 4.4 Analysis of the 3D spatiotemporal reconstruction effect and physical characteristics of the temperature and humidity field:
[0105] This invention compares three-dimensional cloud maps ( Figure 7 The two-dimensional plots and 2D slices demonstrate the model's ability to reconstruct the structure of the global microclimate pattern. The 3D reconstruction results show that the model can simultaneously recover the multi-scale spatial structure of the temperature and humidity fields within a unified framework, maintaining good physical consistency. From an overall distribution perspective, the temperature field exhibits a gradient structure that gradually intensifies along the length of the greenhouse, with high-temperature regions mainly concentrated in the middle and rear sections and the upper part. The east-west temperature difference can reach 6.4℃, which is highly consistent with the laws governing solar radiation incidence and heat accumulation. Figure 7 a) The model accurately identified the location of the high-temperature center in the reconstruction results and reproduced the spatial distribution characteristics of the relatively low temperature near the ground under the boundary heat transfer effect.
[0106] In 2D-XY horizontal temperature slices ( Figure 8 The spatial structure is more clearly represented. Near the crop canopy height, the temperature distribution exhibits significant lateral non-uniformity, with a temperature difference distribution along the north-south direction caused by variations in the light transmittance of the covering material. The model predictions can effectively reproduce the thermal field structure formed by this difference in light reception. Further analysis of the 2D-YZ vertical temperature slices (…) Figure 9 From the perspective of the model, the temperature exhibits typical stratification along the height direction, with a maximum temperature difference of 7.0℃, reflecting the superimposed effect of hot air rising and radiative heating. The model successfully reconstructed this vertical gradient at multiple longitudinal locations, and also showed local thermal stability in the northern region due to the thermal storage structure, indicating that its response to boundary conditions has strong physical rationality.
[0107] Compared to the temperature field, the spatial structure of the humidity field is more complex. Its distribution is not only modulated by the temperature field but also directly influenced by crop transpiration and airflow organization. In the three-dimensional reconstruction results ( Figure 7 As can be observed in (b), humidity forms a relatively concentrated high-value region in the lower part of the canopy, manifesting as the formation of local high-humidity cores. The model prediction results can recover these dominant spatial structures well, and are consistent with the actual field in the location determination and overall distribution trend of high-humidity areas. However, there is a certain degree of smoothing in the intensity of local extreme values, and some high-humidity core boundaries are slightly diffused. Combined with 2D-XY horizontal humidity slices ( Figure 10Analysis showed that the model not only successfully identified the location of the area, but also restored its spatial range relatively well, with the interlayer relative humidity difference usually maintained between 10.0% and 12.0%.
[0108] 2D-YZ vertical humidity sectioning results ( Figure 11 Further analysis reveals that humidity levels tend to be higher in the lower canopy, while remaining lower near the ventilation boundary. The model can reproduce this spatial structure, formed by the combined effects of crop transpiration and airflow stagnation, relatively well, but exhibits some amplitude attenuation in complex profiles. In summary, the model can accurately reconstruct the dominant spatial pattern and interlayer structural characteristics of the humidity field. However, due to the coupled control of multiple factors such as transpiration, airflow organization, and water vapor retention, the stronger spatial heterogeneity causes its errors to be mainly concentrated in local wet cores and high-gradient regions, placing higher demands on the model's ability to represent local details.
[0109] In the time dimension, the model's prediction results for typical monitoring nodes further validate its dynamic response capability beyond spatial reconstruction. A comparison of time series data from multiple representative nodes shows that... Figure 12 and Figure 13 The predicted curves showed a high degree of consistency with the measured data in terms of overall trend, peak amplitude, and rate of change. During the nighttime cooling and early morning transition phases, environmental conditions became more complex. Sudden changes in temperature and humidity, often caused by adjustments to ventilation or cover structures, frequently exhibited significant nonlinear jumps. The model's bidirectional temporal feature fusion capability of the BiLSTM layer, combined with real-time weight correction via the attention mechanism, enabled the model to respond quickly and accurately track parameter fluctuations without significant prediction lag, indicating that its temporal modeling capability effectively handles short-term disturbances. Combined with spatial results, it can be inferred that the model can more effectively utilize sensor information related to local disturbances during these critical moments, thus maintaining a good dynamic response capability for temporal prediction.
[0110] 4.5 Spatial Heterogeneity Analysis of Greenhouse Microclimate:
[0111] The two-dimensional slicing and three-dimensional reconstruction results of this invention show that the temperature and humidity fields in solar greenhouses exhibit significant spatial heterogeneity: temperature exhibits certain gradients along the north-south direction and vertical height, while humidity tends to form local high values in the lower and middle parts of the canopy and in areas with weaker ventilation. This spatial pattern may be formed by the combined effects of the asymmetric enclosure structure of the solar greenhouse and crop canopy development. Hou et al., based on CFD simulations, pointed out that the thermal environment of the solar greenhouse canopy is affected by both solar radiation input and the thermal boundary of the enclosure structure, with a significant three-dimensional temperature gradient inside. The vertical temperature stratification and north-south gradient characteristics observed in this invention are basically consistent with their results. Xu et al. used LiDAR to reconstruct the real cucumber canopy and conducted photomicroclimate simulations, finding that canopy structural heterogeneity significantly alters the distribution of local microenvironments, which also supports the humidity accumulation phenomenon in the canopy region of this invention. Furthermore, the humidity field exhibits stronger locality than the temperature field, mainly because humidity is not only regulated by the temperature field but also directly affected by the combined effects of crop transpiration, water vapor diffusion, and local ventilation conditions. Existing research has shown that greenhouse crop transpiration is a crucial link connecting temperature, humidity, and crop physiological processes. Compared with most previous studies that only focused on the temperature field, this invention uses a combined temperature and humidity 3D reconstruction to simultaneously characterize the temperature gradient and canopy-scale humidity accumulation features, thus more comprehensively reflecting the real production environment of solar greenhouses and providing a more direct spatial basis for identifying high-humidity risk areas and providing early warning of diseases.
[0112] 4.6 Advantages and Prospects of Global Spatiotemporal Prediction and 3D Reconstruction Methods:
[0113] Existing research on greenhouse microclimate prediction largely focuses on time series modeling at single points or a few measuring points. While the FAM-LSTM model proposed by Yang et al. and the RIME-CNN-BiLSTM model developed by Jiang et al. have effectively improved the accuracy of multi-step predictions, they are mainly limited to the measuring point scale and are difficult to directly extend to a continuous three-dimensional spatial field. Although a few methods combining spatial interpolation have improved the temperature field reconstruction effect, they mostly adopt a step-by-step framework of time series prediction and spatial interpolation, making it difficult to simultaneously characterize the coupled evolution of temperature and humidity.
[0114] The CNN-BiLSTM-SA model constructed in this invention performs global multi-step predictions for all sensor nodes within a single framework. It dynamically allocates weights for each measurement point through 3D coordinate embedding and a sensor-level gated attention mechanism, providing a multi-point consistent prediction foundation for continuous 3D field reconstruction. Ablation experiments using the attention mechanism show that its introduction significantly improves prediction accuracy for regions such as high-gradient boundary areas and high-humidity core areas in the canopy. Figure 5 , Figure 6 , Figure 16The results indicate that the framework is highly adaptable to environments with strong spatiotemporal heterogeneity, particularly demonstrating advantages in restoring the local structure of the humidity field. This global prediction and 3D reconstruction method has practical value for precise regional control of solar greenhouses, and can provide data support for identifying local high-risk areas, optimizing ventilation and shading strategies, and providing early warning of diseases.
Claims
1. A method for spatiotemporal prediction and three-dimensional reconstruction of temperature and humidity fields in a solar greenhouse based on multi-sensor deep learning, characterized in that... The method includes the following steps: Step 1: Data Acquisition and Spatial Coordinate Calibration Step 1-1: Deploy a temperature and humidity sensor network in the greenhouse to continuously collect temperature and humidity data near the crop canopy and enclosure structure, and record the three-dimensional coordinates and grouping information of each measuring point. Steps 1-2: Simultaneously, set up a weather station in an unobstructed location outside the greenhouse to collect external meteorological forcing variables such as outdoor air temperature, relative humidity, atmospheric pressure, solar radiation, wind speed, wind direction, and rainfall. Step 2, Data Preprocessing and Sample Construction: Step 2-1: Unify the temperature and humidity observations in the greenhouse, the outdoor meteorological forced variables, and the time coding to a 15-minute time grid, and perform outlier removal, missing value imputation, and normalization based on training set statistics. Step 2-2: Using 96 consecutive historical time steps as the input window and the next 96 time steps as the direct multi-step prediction target, construct a model input that includes multi-sensor historical sequences, external meteorological features, time features, three-dimensional coordinates of measuring points, and group embedding. Step 3: Predicting the temperature and humidity of the greenhouse: A CNN-BiLSTM-SA network architecture is constructed. This network is a cascaded structure formed by sequentially connecting a multi-scale CNN neural network model, a sensor-level gating attention mechanism, and a BiLSTM neural network model. The inputs are historical multi-sensor observation sequences, external meteorological data, temporal features, and sensor spatial coordinates. The multi-scale CNN neural network model is located at the front end and is used to extract short-term disturbances and multi-scale change features in the historical sequences of multi-sensors. The sensor-level gating attention mechanism is located in the middle and is used to adaptively allocate the contribution weights of different sensors according to the characteristics of the measuring point and the external meteorological conditions. The BiLSTM neural network model is located at the back end and is used to perform long-term dependency modeling on the global state sequence after attention fusion. Finally, the future temperature and humidity prediction results are obtained through the fully connected output layer, and the continuous temperature and humidity field is reconstructed by combining spatial interpolation.
2. The method for spatiotemporal prediction and three-dimensional reconstruction of temperature and humidity field in a solar greenhouse based on multi-sensor deep learning according to claim 1, characterized in that... In step 1, the temperature and humidity sensors are arranged in a 3×3 horizontal layout in each planting test area, and combined with three vertical heights of 0.5 m, 1.0 m and 1.5 m above the ground, forming a total of 27 canopy temperature and humidity measuring points, with a sampling interval of 15 min.
3. The method for spatiotemporal prediction and three-dimensional reconstruction of temperature and humidity field in a solar greenhouse based on multi-sensor deep learning according to claim 1, characterized in that... In step 3, the CNN neural network model constructs a neighborhood enhancement mechanism at the initial stage of data input to enhance its ability to represent the spatial heterogeneity features of boundary gradients, canopy humidity fluctuations, and local ventilation disturbances. The enhanced feature tensor is then input into a multi-scale temporal convolution module, which performs sliding window scanning on the input sequence through multiple sets of one-dimensional convolution kernels of different sizes deployed in parallel to extract high-order features under irregular spatial distribution. The specific convolution operation process is described as follows: In the formula, Indicates the first Each convolutional branch at time... Output characteristic response values; This indicates the input signal sequence after neighborhood enhancement at time [time]. The value of ; Indicates the first The convolutional kernel at the _th ... The weight of each position; Indicates the first Bias terms for each convolution kernel; This indicates the length of the receptive field of the convolution kernel; (·) denotes a nonlinear activation function; the multi-scale features output by the CNN are concatenated with the sensor's 3D coordinates and grouped embeddings, and then passed through a node mapping layer to obtain the measurement point time feature vector. This vector serves as the input to the subsequent sensor-level gating attention mechanism.
4. The method for spatiotemporal prediction and three-dimensional reconstruction of temperature and humidity field in a solar greenhouse based on multi-sensor deep learning according to claim 3, characterized in that... In step 3, the sensor-level gated attention mechanism will convert the time feature vectors of each measurement point... The current global meteorological characteristics include solar radiation and ambient temperature and humidity. Deep concatenation is performed to form augmented feature vectors. These vectors are then input into a shared multilayer perceptron to calculate energy scores, producing response values that are sensitive to physical location. To ensure the CNN-BiLSTM-SA network architecture's ability to focus on local heterogeneity centers, a Softplus function is introduced for mapping. In the formula, Indicates time No. The original energy score of each measuring point; This represents the measurement point temporal feature vector output by the CNN and the node mapping layer; This represents the global meteorological feature vector at the current moment; , and These represent the weight matrix, bias vector, and weight transformation vector of the attention layer, respectively. This represents the positive gated response after Softplus mapping; To prevent division by zero of extremely small constants; Indicates the number of sensors involved in the modeling; Indicates the first Each sensor at time The normalized contribution weights, and the time feature vectors of each measuring point according to Weighted summation is performed to form a comprehensive feature characterizing the instantaneous microclimate state of the entire greenhouse area, which is then used as the input to the BiLSTM module to achieve adaptive modulation of temporal features by geographic location information.
5. The method for spatiotemporal prediction and three-dimensional reconstruction of temperature and humidity field in a solar greenhouse based on multi-sensor deep learning according to claim 4, characterized in that... In step 3, the BiLSTM neural network model uses the sequence obtained by concatenating the comprehensive feature vector and the global meteorological feature vector as input. It models the long-term dependence of the solar greenhouse microclimate within the historical window through two chains: a forward chain and a reverse chain. The forward chain captures the environmental change trend from morning to night, while the reverse chain supplements contextual information from the end of the historical window backward. The fusion of these two chains forms a more stable temporal representation, which is then output through a fully connected layer as the temperature and humidity prediction results for the next 96 time steps and all sensor locations. Its hidden layer state update follows a gated cyclic equation: In the formula, Indicates that BiLSTM at time The input vector; , and These represent the state vectors of the input gate, forget gate, and output gate, respectively. Indicates cell state, This indicates the cell state at the previous moment; and These represent the hidden states at the current and previous time points, respectively. , , , and , , , This represents the weight matrix for the corresponding input and hidden items; , , and This represents the bias term; the output of the BiLSTM hidden layer is mapped to the sensor's physical space via a fully connected layer to generate future global temperature and humidity prediction results.
6. The method for spatiotemporal prediction and three-dimensional reconstruction of temperature and humidity field in a solar greenhouse based on multi-sensor deep learning according to claim 1, characterized in that... In step 3, the CNN-BiLSTM-SA network architecture sets a vertical structure constraint term to suppress unreasonable temperature reversal fluctuations in the simulated physical field, addressing the typical vertical temperature stratification phenomenon in solar greenhouses. The total loss function dynamically adjusts the weight ratio between the prediction error and the physical penalty term, and its specific form is as follows: In the formula, Represents the total loss function. Indicates the number of sensors; and Representing time respectively No. The predicted and measured values for each sensor location are used, with the first term representing the mean square error between the predicted and measured values. For spatial smoothing regularization, For vertical layering structure constraints, and It is a hyperparameter that controls the strength of physical constraints.
