A multi-source sensor-based temperature intelligent correction method

CN122775231BActive Publication Date: 2026-11-03INST OF REMOTE SENSING APPL SICHUAN ACAD OF AGRI SCI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611239305.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-03
Estimated Expiration
2046-08-17

AI Technical Summary

Technical Problem

Under strong sunlight, traditional greenhouse temperature measurement methods are affected by localized thermal radiation, leading to distorted measurement data. This affects the accuracy of environmental condition assessment and automated control decisions, making it difficult to achieve precise planting management.

Method used

By using a multi-source sensor array to collect environmental data and combining edge computing with a spatiotemporal Transformer model that embeds physical information, the overall true temperature of the greenhouse can be accurately predicted through multi-task loss function optimization.

Benefits of technology

It significantly improves the accuracy and reliability of temperature assessment, meets the real-time requirements of precision agriculture, provides a scientific basis for decision-making, avoids resource waste and crop growth risks, and improves agricultural production efficiency and crop yield and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122775231B_ABST
    Figure CN122775231B_ABST
Patent Text Reader

Abstract

The application discloses a kind of temperature intelligent correction methods based on multi-source sensor, comprising the following steps: step S1: multimodal sensor array data acquisition and space-time alignment;Step S2: based on the abnormal data cleaning and normalization of statistical-physical joint;Step S3: construct the space-time Transform temperature correction network based on physical constraint;Step S4: model training and optimization;Step S5: temperature evaluation and correction.The application acquires environmental data by distributed multimodal sensor array, combines edge computing and Transform model, effectively solves the temperature deviation problem caused by local thermal radiation of traditional sensor in strong light environment.The model enhances the generalization ability by physical law constraint, can adapt to different illumination and environmental conditions, provides scientific decision basis for greenhouse environment monitoring, automation control and planting management, effectively avoids resource waste and crop growth risk caused by temperature misjudgment, helps to improve agricultural production efficiency and crop yield quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental monitoring and temperature measurement technology, and in particular to a temperature intelligent correction algorithm based on multi-source sensors, which aims to improve the accuracy of measuring the true temperature of greenhouses under strong light conditions. Background Technology

[0002] Traditional temperature measurement methods have significant limitations in current greenhouse environmental monitoring. These methods typically rely on single or a few temperature sensors, and their measurements only reflect the temperature of the local microenvironment in which the sensor is located. However, these local measurements are highly susceptible to interference from surrounding environmental factors, especially under strong solar radiation. The sensor itself heats up due to absorbing light energy, causing its reading to be significantly higher than the true average temperature of the air inside the greenhouse. This "thermal radiation error" caused by sunlight makes the measurement data unable to accurately represent the overall environmental temperature for crop growth.

[0003] Such measurement bias can lead to a series of negative consequences. Because the acquired temperature data is distorted, the accuracy of environmental condition assessments and automated control decisions (such as ventilation, shading, and irrigation) based on this data will be significantly reduced. Incorrect decisions not only fail to create optimal growing conditions for crops but may also lead to energy waste, stunted crop growth, and even pests and diseases, ultimately affecting the yield and quality of agricultural products. Therefore, reliance on inaccurate local temperature data has become a key bottleneck restricting the achievement of precision management in facility agriculture.

[0004] In summary, effectively eliminating localized thermal radiation interference and accurately obtaining the true temperature representing the overall greenhouse environment under complex conditions such as strong sunlight has become a pressing technical challenge. Although some intelligent temperature control systems have emerged, such as the intelligent temperature control system for greenhouses disclosed in patent CN119597075B, which uses modules for data acquisition, crop growth databases, and data analysis and decision-making to precisely regulate the temperature based on crop growth needs and current environmental conditions, ensuring that crops are always within the optimal growth temperature range, these systems primarily focus on environmental regulation based on preset models. Their control accuracy still largely depends on the accuracy of sensor data. If the measurement deviation problem of sensors under strong sunlight is not fundamentally solved, even the most intelligent control strategies will struggle to achieve truly precise environmental management. Therefore, overcoming this measurement challenge is of significant practical importance and application value for improving the reliability of greenhouse environmental monitoring, enabling precise planting management decisions, and ensuring high-yield and high-quality crops. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a temperature intelligent correction method based on multi-source sensors. This invention involves distributing a multimodal sensor array within a greenhouse to collect multi-dimensional environmental data, including temperature, humidity, light intensity, wind speed, and solar position. A physical information-embedded spatiotemporal Transformer model (PST-Transformer) is then constructed on an edge computing device to deeply fuse and analyze the multi-source data, thereby accurately predicting the overall true temperature of the greenhouse, unaffected by localized thermal radiation.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] A temperature intelligent correction method based on multi-source sensors includes the following steps:

[0008] Step S1: Multimodal sensor array data acquisition and spatiotemporal alignment: A multimodal sensor array is deployed in a distributed manner within the greenhouse. Each sensor synchronously acquires environmental data at a preset sampling frequency and aligns the data using timestamps. Data caching and preliminary quality detection are performed using edge computing devices.

[0009] Step S2: Anomaly cleaning and normalization based on statistical-physical joint method: outlier detection and cleaning, missing value imputation, normalization, and time series alignment are performed on the collected multi-source sensor data to unify the units of measurement.

[0010] Step S3: Construct a spatiotemporal Transformer temperature correction network based on physical constraints: The spatiotemporal Transformer temperature correction network based on physical constraints adopts an encoder-decoder architecture. A thermal radiation physical constraint module is introduced at the top layer of the encoder to model the light-temperature coupling relationship. The spatiotemporal dependency between multi-source sensor data is extracted through a multi-head self-attention mechanism to output the overall temperature prediction value of the greenhouse.

[0011] Step S4: Model training and optimization: The spatiotemporal Transformer temperature correction network based on physical constraints is trained using a multi-task physical information loss function, which includes prediction error loss, physical consistency loss and contrastive learning loss.

[0012] Step S5: Temperature assessment and correction: The temperature prediction value output in step S3 is used as the corrected actual temperature of the greenhouse for environmental monitoring and planting management decisions.

[0013] As a preferred method, in step S1:

[0014] The multimodal sensor array includes a high-precision temperature and humidity sensor, a light intensity sensor, and a wind speed sensor;

[0015] High-precision temperature and humidity sensors are used to collect air temperature and relative humidity.

[0016] The light intensity sensor is used to collect photosynthetically active radiation and the radiation temperature of the sensor surface;

[0017] The wind speed sensor is used to collect the air velocity inside the shed for heat conduction calculations;

[0018] The preset sampling frequency is 1Hz, which is the environmental parameter.

[0019] The multimodal sensor array is deployed as follows: the high-precision temperature and humidity sensors are deployed at three height levels of 0.5m, 1.5m, and 2.5m at the four corners of the greenhouse; the light intensity sensor is deployed at the center of the top of the greenhouse and is equipped with a shading cover; and the wind speed sensor is deployed in the middle of the greenhouse.

[0020] As a preferred method, the outlier detection and cleaning in step S2 specifically includes:

[0021] Outlier detection is performed using the 3σ criterion combined with the isolated forest algorithm.

[0022] First, calculate the mean μ and standard deviation σ of the historical data for each sensor, and remove data that exceeds the range [μ-3σ, μ+3σ]. Then, construct an isolation forest model for the remaining data and calculate the outlier score.

[0023]

[0024] Where h(x) s ) is the sample x s The path length in an isolated forest, E(h(x) s )) represents the expected value of the path length, c(n) is the average path length given the number of samples n, and s(x) is the mean value of the path length. s (n) represents outlier scores;

[0025] A threshold s > 0.6 is set and the value is identified as an outlier and removed.

[0026] As a preferred embodiment, the encoder-decoder architecture of the physically constrained spatiotemporal Transformer temperature correction network described in step S3 specifically includes:

[0027] Encoder: Consists of N=6 identical encoder layers stacked together, each layer containing two sub-layers:

[0028] Sublayer 1: Multi-head spatiotemporal self-attention mechanism, used to extract spatial correlation and temporal dependence among multiple sensor sources;

[0029] Sublayer 2: Feedforward neural network, performing nonlinear feature transformation;

[0030] Each sublayer is followed by residual connections and layer normalization: LayerNorm(x+Sublayer(x)), where x is the sublayer input, Sublayer(x) is the sublayer output, and LayerNorm represents the layer normalization operation;

[0031] Decoder: Consists of N=6 identical decoder layers stacked together, each layer containing three sub-layers:

[0032] Sublayer 1: Multi-head self-attention mechanism with masking to prevent future information leakage;

[0033] Sublayer 2: Multi-head cross-attention mechanism to establish the correlation between encoder output and historical temperature sequence;

[0034] Sublayer 3: Feedforward neural network;

[0035] Residual connectivity and layer normalization are also used.

[0036] As a preferred embodiment, step S3 further includes:

[0037] Tensors of preprocessed temperature, humidity, and light intensity data Perform linear projection and add spatiotemporal location encoding:

[0038]

[0039] in, For the input tensor, For time step, For the number of sensors, For feature dimension, For embedded representation, The linear projection weight matrix is Encoding for time location, Spatial location encoding; temporal location encoding uses sine and cosine functions:

[0040]

[0041]

[0042] in, For time location index, For dimension indexing;

[0043] Spatial location encoding is achieved through sensors measuring the three-dimensional coordinates within the greenhouse. , , The result obtained after mapping through a fully connected layer is:

[0044]

[0045] in, For sensor indexing, , , The first The three-dimensional spatial coordinates of the sensors inside the greenhouse This is the weight matrix of the fully connected layer. For bias terms, This is the activation function.

[0046] As a preferred approach, the multi-head self-attention mechanism in step S3 specifically includes:

[0047] The attention head is divided into a spatial attention head and a temporal attention head. The spatial attention head focuses on the relationship between different sensors at the same time, while the temporal attention head focuses on the relationship between the same sensor at different times.

[0048] For the h-th attention head, calculate the query matrix Q, key matrix K, and value matrix V:

[0049]

[0050] in, For embedded representation, Let h be the query weight matrix for the h-th head. Let h be the key weight matrix of the h-th head. Let h be the weight matrix of the h-th head value. Let h be the query matrix for the h-th head. Let h be the key matrix of the h-th head. This is the value matrix of the h-th head;

[0051] Attention score calculation incorporates a light radiation intensity adjustment factor. :

[0052]

[0053] in, Let be the dimension of the key vector. Light intensity, Represents the Hadamard product. The attention output of the h-th head; the light radiation intensity adjustment factor The calculation formula is:

[0054]

[0055] in, The radiation attenuation coefficient is... This represents the maximum light intensity.

[0056] Multi-head attention output splicing:

[0057]

[0058] in, To query the matrix set, For the set of key matrices, For a set of value matrices, For the output of the h-th attention head, For the total number of attention heads, To output the weight matrix, This provides multi-headed attention output.

[0059] As a preferred embodiment, the thermal radiation physical constraint module in step S3 specifically includes:

[0060] A thermal radiation physical constraint module is introduced at the top layer of the encoder to model the light-temperature coupling relationship:

[0061]

[0062] in, The temperature feature matrix, The illumination feature matrix, The solar altitude angle is calculated using astronomical algorithms. This is the weight matrix for temperature features. This is the weight matrix for the illumination features. For the radiation fusion weight matrix, For bias terms, Output as physical characteristics Represents the Hadamard product;

[0063] Fusing physical features with attention features:

[0064]

[0065] in, As a feature of fusion, Indicates feature splicing, This provides multi-headed attention output.

[0066] As a preferred method, the predicted value of the overall temperature of the greenhouse in step S3 is:

[0067] The decoder output is mapped through a fully connected layer to generate the overall greenhouse temperature prediction:

[0068]

[0069] in, To fuse features, LayerNorm is a layer normalization operation. To output the weight matrix, For output bias terms, This is the corrected overall temperature prediction for the greenhouse.

[0070] As a preferred method, in step S4:

[0071] The prediction error loss is the mean squared error loss:

[0072]

[0073] in, For the first Predicted temperature value for each sample For the first Temperature reference value for each sample The total number of samples, The mean square error loss value is used; the temperature reference value is obtained through a multi-point calibrated reference measurement device, with the following point arrangement: one reference measurement point is set at the intersection of the diagonals of the greenhouse and one at the midpoint of each of the four sides, for a total of 5 reference points;

[0074] The physical consistency loss is:

[0075]

[0076] in, This is a predicted temperature value. For time, air density, For specific heat capacity, The thermal conductivity coefficient, For the Laplace operator, For solar radiation heat source term, related to light intensity and time Related, This represents the physical consistency loss value.

[0077] The contrastive learning loss is:

[0078]

[0079] in, , indicating the first The sample and the first Euclidean distance between the predicted temperature values ​​of each sample and The first The first sample and the first Environmental condition category labels for each sample For indicator functions, when The value is 1 if the condition is met, and 0 otherwise. The margin is a preset distance margin value. This indicates a positive part operation; that is, if the value inside the parentheses is positive, then that value is taken; otherwise, 0 is taken. To compare the learning loss values;

[0080] The total loss function is:

[0081]

[0082] in, The weighting coefficients for each loss term are determined through optimization using the validation set. , , , This represents the total loss value.

[0083] As a preferred approach, the model training and optimization in step S4 further includes:

[0084] A transfer learning strategy was adopted: the model parameters were first pre-trained using a simulated dataset, and then fine-tuned using historical greenhouse data.

[0085] Using cosine annealing for learning rate scheduling:

[0086]

[0087] in, For the first The learning rate for each training round. To achieve the maximum learning rate, To minimize the learning rate, For the current training round, This is the maximum number of training rounds;

[0088] An early stopping mechanism is adopted: training is stopped when the validation set loss does not decrease for 10 consecutive training rounds.

[0089] The present invention has at least the following beneficial effects:

[0090] This invention utilizes a distributed multimodal sensor array to collect environmental data, combined with a spatiotemporal Transformer model incorporating edge computing and physical information embedding. This effectively solves the problem of temperature measurement deviation caused by localized thermal radiation in strong light environments, a problem inherent in traditional sensors. Through multi-source data fusion, physical constraint modeling, and multi-task loss function optimization, this method accurately predicts the overall true temperature of the greenhouse, significantly improving the accuracy and reliability of temperature assessment. Real-time data alignment and anomaly handling ensure data quality, while edge deployment reduces latency, meeting the real-time requirements of precision agriculture. Simultaneously, the model's generalization ability is enhanced through physical constraints, allowing it to adapt to different light and environmental conditions. This provides a scientific basis for greenhouse environmental monitoring, automated control, and planting management, effectively avoiding resource waste and crop growth risks caused by temperature misjudgments, and ultimately contributing to improved agricultural production efficiency and crop yield and quality. Attached Figure Description

[0091] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the drawings described herein are only some preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0092] Figure 1 This is a schematic diagram of a temperature intelligent correction system architecture based on multi-source sensors;

[0093] Figure 2 This is a schematic diagram of the internal structure of the Transformer fusion prediction module;

[0094] Figure 3 This is a schematic diagram of the preprocessing flow for raw sensor data;

[0095] Figure 4 This is a schematic diagram of the model training process based on transfer learning.

[0096] Figure 5 Spatial layout diagram for deploying sensor hardware in the greenhouse. Detailed Implementation

[0097] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the following description.

[0098] In the following description, numerous specific details are set forth to provide a thorough understanding of the invention. However, those skilled in the art will recognize that the invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted to avoid unnecessary detail that could obscure the description of the invention.

[0099] A temperature intelligent correction method based on multi-source sensors includes the following steps:

[0100] Step S1: Multimodal sensor array data acquisition and spatiotemporal alignment: A multimodal sensor array is deployed in a distributed manner within the greenhouse. Each sensor synchronously acquires environmental data at a preset sampling frequency and aligns the data using timestamps. Data caching and preliminary quality detection are performed using edge computing devices.

[0101] Step S2: Anomaly cleaning and normalization based on statistical-physical joint method: outlier detection and cleaning, missing value imputation, normalization, and time series alignment are performed on the collected multi-source sensor data to unify the units of measurement.

[0102] Step S3: Construct a spatiotemporal Transformer temperature correction network based on physical constraints: The spatiotemporal Transformer temperature correction network based on physical constraints adopts an encoder-decoder architecture. A thermal radiation physical constraint module is introduced at the top layer of the encoder to model the light-temperature coupling relationship. The spatiotemporal dependency between multi-source sensor data is extracted through a multi-head self-attention mechanism to output the overall temperature prediction value of the greenhouse.

[0103] Step S4: Model training and optimization: The spatiotemporal Transformer temperature correction network based on physical constraints is trained using a multi-task physical information loss function, which includes prediction error loss, physical consistency loss and contrastive learning loss.

[0104] Step S5: Temperature assessment and correction: The temperature prediction value output in step S3 is used as the corrected actual temperature of the greenhouse for environmental monitoring and planting management decisions.

[0105] In a preferred embodiment, in step S1:

[0106] The multimodal sensor array includes a high-precision temperature and humidity sensor, a light intensity sensor, and a wind speed sensor;

[0107] High-precision temperature and humidity sensors are used to collect air temperature and relative humidity with an accuracy of ±0.1℃;

[0108] The light intensity sensor is used to collect photosynthetically active radiation and the radiation temperature of the sensor surface;

[0109] The wind speed sensor is used to collect the air velocity inside the shed for heat conduction calculations;

[0110] The preset sampling frequency is 1Hz for environmental parameters, and each sensor synchronously collects data at the preset sampling frequency (1Hz for environmental parameters).

[0111] Deployment methods for multimodal sensor arrays (see...) Figure 5 The system comprises 12 high-precision temperature and humidity sensors deployed at three height levels (0.5m, 1.5m, and 2.5m) at the four corners of the greenhouse. Preferably, the greenhouse floor is divided into four equal rectangular sub-regions. Four light intensity sensors are deployed on the greenhouse roof above the center of each sub-region, each equipped with a shade cover. Four wind speed sensors are deployed inside the greenhouse at the center of each sub-region, at a height of 2.5m, for heat conduction calculations. All sensors are connected to an edge computing gateway via ZigBee wireless communication, transmitting the collected data to terminal devices in real time.

[0112] In a preferred embodiment, step S1 further includes acquiring solar position information and time information; the solar position information includes solar altitude angle and azimuth angle, which are obtained in real time through astronomical algorithms or geographical coordinates; the time information includes year, month, day, hour and minute data of the time of acquisition.

[0113] In a preferred embodiment, the outlier detection and cleaning in step S2 specifically includes:

[0114] Outlier detection is performed using the 3σ criterion combined with the isolated forest algorithm.

[0115] First, calculate the mean μ and standard deviation σ of the historical data for each sensor, and remove data that exceeds the range [μ-3σ, μ+3σ]. Then, construct an isolation forest model for the remaining data and calculate the outlier score.

[0116]

[0117] Where h(x) is the path length of sample x in the isolated forest, E(h(x)) is the expected value of the path length, c(n) is the average path length given the number of samples n, and s(x,n) is the anomaly score.

[0118] A threshold s > 0.6 is set and the value is identified as an outlier and removed.

[0119] In a preferred embodiment, the missing value imputation in step S2 specifically includes:

[0120] For missing data, spatiotemporal joint interpolation is used. Both Kalman filtering and Kriging interpolation are conventional methods in the field of spatiotemporal data interpolation.

[0121] In the time dimension, Kalman filtering is used for smooth estimation;

[0122] In the spatial dimension, estimation is performed based on neighboring sensor data using the Kriging interpolation method;

[0123] If the missing duration is greater than 5 minutes, it is marked as a data interruption, and this segment of data will not be used for training.

[0124] In the data preprocessing stage of step S2, this invention employs a spatiotemporal joint interpolation strategy for intelligent repair of missing data in multi-source sensor data. Specifically, in the temporal dimension, the system introduces a Kalman filter algorithm, utilizing the dynamic evolution of environmental parameters over time to smoothly estimate and extrapolate the trend of missing periods. In the spatial dimension, the Kriging interpolation method is used to fully exploit the spatial correlation between adjacent sensors within the greenhouse, using data from normally functioning surrounding sensors to estimate the values ​​at the missing locations. Through this spatiotemporal dual-dimensional collaborative completion, the system can effectively restore the integrity of the data. Furthermore, to ensure the reliability of the model training data, the system also sets up a strict data quality filtering mechanism: when a missing segment of data is detected for more than 5 minutes, the system directly marks it as a data interruption and removes that segment from the training set, thereby avoiding interference from prolonged data gaps in model learning.

[0125] In a preferred embodiment, the normalization process in step S2 specifically includes:

[0126] For light intensity data, a logarithmic transformation is first performed to compress the dynamic range, followed by Z-score standardization; for temperature, humidity, and wind speed data, Z-score standardization is performed directly; the sun's position is encoded using trigonometric functions, employing a sine / cosine transform; all data are standardized to similar numerical ranges; the Z-score standardization formula is:

[0127]

[0128] Where x is the original data value, The mean of the training set, The standard deviation of the training set. The values ​​are standardized data values; the logarithmic transformation and Z-score standardization are both common methods in the field of data preprocessing.

[0129] To more clearly illustrate the data flow process of the above preprocessing steps, please refer to the appendix. Figure 3 The data preprocessing process of this invention will be described.

[0130] like Figure 3 The diagram illustrates the preprocessing flow of raw sensor data in this embodiment of the invention, aiming to transform multi-source heterogeneous raw data into a standardized sequence that meets the model input requirements. First, the system acquires raw sensor data including temperature, humidity, and light intensity, and then proceeds to the data cleaning stage. In the outlier removal stage, a dual detection mechanism is employed: on the one hand, utilizing… The criteria identify and remove statistical outliers that deviate excessively from the mean; on the other hand, the Isolation Forest algorithm is applied to detect global or local anomalies in the data distribution, thereby improving the accuracy of data cleaning. Subsequently, the cleaned data enters the data normalization module. In this step, Z-score standardization is performed on various environmental parameters, and its calculation formula is... ,in These are the original values. The sample mean. The standard deviation is used. This transformation maps data with different dimensions to a similar numerical range, thus eliminating the impact of numerical scale differences on model training.

[0131] Finally, time alignment is performed. Based on the timestamps of synchronously acquired data, the system resamples and interpolates the multi-source data to ensure strict temporal correspondence among the sensor data. After these steps, data preprocessing is complete, generating a standard feature sequence that can be directly input into the Transformer model.

[0132] In a preferred embodiment, the light intensity ranges from 0 to 200,000 lux;

[0133] The temperature range is -10℃ to 50℃.

[0134] In a preferred embodiment, the statistical-physical joint anomaly cleaning in step S2 further includes: detecting logical anomalies based on the greenhouse thermodynamic balance equation, wherein the logical anomalies include situations where the trends of light intensity and temperature change diverge.

[0135] In a preferred embodiment, the missing value filling in step S2 further includes: filling the missing value using an interpolation method based on time period characteristics, and performing weighted interpolation using the daily periodic pattern of greenhouse temperature.

[0136] In a preferred embodiment, the time series alignment in step S2 specifically includes:

[0137] Since different sensors have different sampling frequencies, linear interpolation is used to resample to a uniform 1-minute interval.

[0138] Construct a sliding window input:

[0139]

[0140] in, The input tensor for the sliding window at time t, Let be the multi-source sensor data vector at time t. For window length, For the number of sensors, For each sensor's feature dimension, , indicating 12 minutes of historical data.

[0141] In the data preprocessing stage of step S2, the system first employs an interpolation method based on time period characteristics to intelligently fill in any missing values ​​that may appear in the sensor data. This method fully utilizes the inherent diurnal cycle of greenhouse temperature changes, estimating and filling in missing values ​​through weighted interpolation of historical data from the same period, thereby preserving the natural evolution trend of environmental data to the greatest extent. Building on this, to address the issue of inconsistent sampling frequencies caused by hardware differences among multiple sensors, the system further performs a time series alignment operation. Linear interpolation resampling technology unifies the data from all sensors to a 1-minute time interval, ensuring strict synchronization of multi-source data along the time axis. Subsequently, to adapt to the input requirements of deep learning models, the system constructs a sliding window mechanism, using the current moment as a baseline to extract a fixed-length historical data sequence of 12 minutes. This operation transforms continuous time-stream data into a standardized input tensor containing 12 time steps and covering all sensor and feature dimensions, providing a structured data foundation for the subsequent Transformer network to accurately capture short-term dynamic changes in the greenhouse environment.

[0142] In a preferred embodiment, the encoder-decoder architecture of the physically constrained spatiotemporal Transformer temperature correction network in step S3 specifically includes:

[0143] Encoder: Consists of N=6 identical encoder layers stacked together, each layer containing two sub-layers:

[0144] Sublayer 1: Multi-head spatiotemporal self-attention mechanism, used to extract spatial correlation and temporal dependence among multiple sensor sources;

[0145] Sublayer 2: Feedforward neural network, performing nonlinear feature transformation;

[0146] Each sublayer is followed by residual connections and layer normalization: LayerNorm(x+Sublayer(x)), where x is the sublayer input, Sublayer(x) is the sublayer output, and LayerNorm represents the layer normalization operation;

[0147] Decoder: Consists of N=6 identical decoder layers stacked together, each layer containing three sub-layers:

[0148] Sublayer 1: Multi-head self-attention mechanism with masking to prevent future information leakage;

[0149] Sublayer 2: Multi-head cross-attention mechanism to establish the correlation between encoder output and historical temperature sequence;

[0150] Sublayer 3: Feedforward neural network;

[0151] Residual connectivity and layer normalization are also used.

[0152] The encoder-decoder architecture constructed in this invention achieves deep feature extraction and sequence generation through multi-layer stacking. In the encoder section, the system consists of six identical encoder layers stacked sequentially. Each layer first extracts the spatial correlation and temporal dependence between multiple sensor sources using a multi-head spatiotemporal self-attention mechanism, followed by deep nonlinear feature transformation via a feedforward neural network. During this process, residual connections and layer normalization operations are introduced into each sub-layer, where the input and output of the sub-layer are directly added and then normalized. This effectively alleviates the gradient vanishing problem in deep networks and ensures the stability of feature distribution. In the decoder section, also composed of six identical decoder layers stacked, its workflow is more refined: first, a masked multi-head self-attention mechanism is used to strictly shield future information to prevent the model from "cheating" during autoregressive generation; then, a multi-head cross-attention mechanism dynamically aligns and correlates the current state of the decoder with the global spatiotemporal features output by the encoder; finally, a feedforward neural network is used for feature integration. Similar to the encoder, each sublayer of the decoder is also equipped with residual connections and layer normalization structures, thereby ensuring smooth convergence and efficient learning of the entire network in complex computations.

[0153] In a preferred embodiment, step S3 further includes:

[0154] Tensors of preprocessed temperature, humidity, and light intensity data Perform linear projection and add spatiotemporal location encoding:

[0155]

[0156] in, For the input tensor, For time step, For the number of sensors, For feature dimension, For embedded representation, The linear projection weight matrix is Encoding for time location, Spatial location encoding; temporal location encoding uses sine and cosine functions:

[0157]

[0158]

[0159] in, For time location index, For dimension indexing;

[0160] Spatial location encoding is achieved through sensors measuring the three-dimensional coordinates within the greenhouse. , , The result obtained after mapping through a fully connected layer is:

[0161]

[0162] in, For sensor indexing, , , The first The three-dimensional spatial coordinates of the sensors inside the greenhouse This is the weight matrix of the fully connected layer. For bias terms, This is the activation function.

[0163] In the data preprocessing and feature construction stage of step S3, the system first maps the preprocessed multi-dimensional data tensors, such as temperature, humidity, and light intensity, to a unified feature space through linear projection, and then superimposes spatiotemporal location codes to generate the final embedded representation. Specifically, considering the temporal dynamic characteristics of the greenhouse environment, the model adopts a periodic encoding method based on sine and cosine functions, transforming the time step index into continuous temporal location codes, thereby guiding the model to accurately capture the periodic evolution of environmental parameters such as temperature over time. Simultaneously, to reflect the complex spatial distribution differences inside the greenhouse, the model extracts the three-dimensional spatial coordinates of each sensor within the greenhouse and maps them into spatial location codes through a fully connected layer combined with a nonlinear activation function. Finally, the system element-wise superimposes and fuses the linear projection results of the original data with the temporal and spatial location codes, so that the generated embedded representation possesses both rich temporal periodic information and spatial topology, laying a solid data foundation for subsequent deep spatiotemporal feature extraction by the Transformer network.

[0164] In a more preferred embodiment, to more accurately model the physical laws in a greenhouse environment, the embedding layer further integrates solar position encoding and physical knowledge embedding on top of the basic spatiotemporal encoding. The complete calculation formula is as follows:

[0165]

[0166] in, For the final embedded representation, Encoding the sun's position is used to capture the impact of the sun's periodic motion on the temperature inside the greenhouse; This incorporates physics knowledge to introduce prior knowledge of greenhouse thermodynamics. The terms in the above formula ( All are vectors of the same dimension mapped to the same feature space. By adding them element by element, a deep integration of data features, spatiotemporal periodic patterns and prior physical knowledge is achieved.

[0167] The input-output relationship of the model is as follows:

[0168] The model input vector is represented as:

[0169]

[0170] in, For time step, For the number of sensors, For feature dimensions;

[0171] After being stacked through L layers, the encoder outputs a high-level feature representation. Decoder The data is processed and ultimately output as a predicted temperature value through a fully connected layer.

[0172]

[0173] in, This is the corrected overall temperature prediction for the greenhouse. To output the weight matrix, It is a feature of fusion Normalization is performed on the feature dimension by adjusting the feature vector of each sample to a distribution with a mean of 0 and a variance of 1, and by introducing learnable scaling (γ) and translation (β) parameters, the training process is stabilized and convergence is accelerated while preserving the expressive power of the model. This is the output bias term.

[0174] To more intuitively illustrate the data interaction and processing flow of the above modules, see the appendix. Figure 2 The core network architecture of this invention will be described in detail.

[0175] like Figure 2 The diagram shown illustrates the internal structure of the Transformer fusion prediction module in an embodiment of the present invention. This module mainly consists of an input layer, an input embedding layer, an encoder module, a decoder module, and an output layer. In the input layer, the system receives multi-source time-series data, including temperature sequences. , humidity sequence Light intensity sequence And information on the sun's position (elevation angle) Azimuth The data includes time information (year / month / day / hour / minute). After entering the input embedding layer, the time-series data collected by the environmental sensors first undergoes linear projection. Mapped to a high-dimensional space; simultaneously, the sun's position, time, and position information are encoded using the sun's position. Time coding and position encoding Feature embedding is performed, and this encoded information is fused with the linearly projected data as input to the subsequent network.

[0176] The fused feature vectors enter the encoder module. This module includes a multi-head self-attention mechanism to capture long-range dependencies in the input sequence; then, they undergo nonlinear transformation via a feedforward neural network and are normalized through residual connections and layers. The encoder output is further fed into the decoder module. The decoder first processes the target sequence using a masked multi-head attention mechanism to prevent future information leakage; then it interacts with the encoder output through a cross-attention mechanism to focus on key environmental features; finally, it is processed again by a feedforward neural network. Ultimately, the decoder output enters the output layer, passes through a fully connected linear mapping layer, and outputs the predicted temperature value. This refers to the corrected actual temperature of the greenhouse.

[0177] In a preferred embodiment, the multi-head self-attention mechanism in step S3 specifically includes:

[0178] The attention head is divided into a spatial attention head and a temporal attention head. The spatial attention head focuses on the relationship between different sensors at the same time, while the temporal attention head focuses on the relationship between the same sensor at different times.

[0179] For the h-th attention head, calculate the query matrix Q, key matrix K, and value matrix V:

[0180]

[0181] in, For embedded representation, Let h be the query weight matrix for the h-th head. Let h be the key weight matrix of the h-th head. Let h be the weight matrix of the h-th head value. Let h be the query matrix for the h-th head. Let h be the key matrix of the h-th head. This is the value matrix of the h-th head;

[0182] Attention score calculation incorporates a light radiation intensity adjustment factor. :

[0183]

[0184] in, Let be the dimension of the key vector. Light intensity, Represents the Hadamard product. The attention output of the h-th head; the light radiation intensity adjustment factor The calculation formula is:

[0185]

[0186] in, The radiation attenuation coefficient is... This represents the maximum light intensity.

[0187] Multi-head attention output splicing:

[0188]

[0189] in, To query the matrix set, For the set of key matrices, For a set of value matrices, For the output of the h-th attention head, For the total number of attention heads, To output the weight matrix, For multi-head attention output, This indicates a vector concatenation operation.

[0190] In step S3, this invention performs targeted structural optimization on the multi-head self-attention mechanism, explicitly dividing the attention heads into spatial attention heads and temporal attention heads. This allows the model to focus on the spatial correlation between different sensors at the same moment, as well as the temporal evolution of the same sensor at different moments. In the specific calculation process, the system first uses its independent weight matrices to linearly project the input embedding representation, generating query, key, and value matrices specific to each attention head. To more accurately adapt to the greenhouse environment, this mechanism innovatively introduces a light radiation intensity adjustment factor when calculating the attention score. This factor decays exponentially based on the ratio of real-time light intensity to maximum light intensity. By multiplying this adjustment factor element-wise with the basic attention score, the model can dynamically perceive and adaptively adjust the feature attention under different lighting conditions. Finally, the system concatenates the output results calculated independently by each attention head and linearly fuses them using a unified output weight matrix, thereby generating a comprehensive attention representation that takes into account multi-dimensional spatiotemporal features and the dynamic influence of light, providing richer contextual information for subsequent temperature prediction.

[0191] In a preferred embodiment, the thermal radiation physical constraint module in step S3 specifically includes:

[0192] A thermal radiation physical constraint module is introduced at the top layer of the encoder to model the light-temperature coupling relationship:

[0193]

[0194] in, The temperature feature matrix, The illumination feature matrix, The solar altitude angle is calculated using astronomical algorithms. This is the weight matrix for temperature features. This is the weight matrix for the illumination features. For the radiation fusion weight matrix, For bias terms, Output as physical characteristics Represents the Hadamard product;

[0195] Fusing physical features with attention features:

[0196]

[0197] in, As a feature of fusion, Indicates feature splicing, This provides multi-headed attention output.

[0198] In a preferred embodiment, the predicted temperature of the overall greenhouse output in step S3 is:

[0199] The decoder output is mapped through a fully connected layer to generate the overall greenhouse temperature prediction:

[0200]

[0201] in, To fuse features, LayerNorm is a layer normalization operation. To output the weight matrix, For output bias terms, This is the corrected overall temperature prediction for the greenhouse.

[0202] In the specific implementation of step S3, this invention first introduces a thermal radiation physical constraint module at the top layer of the encoder to achieve deep modeling of the complex coupling relationship between light and temperature. This module receives the temperature feature matrix and the light feature matrix, and combines them with the solar altitude angle calculated in real time by an astronomical algorithm. It then uses a nonlinear activation function to perform weighted fusion processing on the multi-dimensional features, thereby extracting a physical feature vector containing thermodynamic laws and radiation physical properties. Subsequently, the system concatenates and fuses this physical feature vector with the conventional temporal attention features extracted by the model through a multi-head attention mechanism. This results in a fused feature that contains both data-driven statistical regularities and strictly adheres to the physical constraints of nature. After feature fusion, the system inputs it into the decoder, and sequentially performs layer normalization and fully connected layer mapping to smooth and transform the fused features. Finally, it accurately outputs the corrected overall greenhouse temperature prediction value, effectively improving the model's prediction reliability and physical consistency in complex greenhouse environments.

[0203] To address the unique challenges of greenhouse temperature correction, this invention proposes a Physically Constrained Spatiotemporal Transformer (PST-Transformer) temperature correction network based on the traditional Transformer architecture. In its implementation, this network first incorporates a physics knowledge embedding layer, directly integrating prior physical knowledge of the greenhouse environment, such as solar radiation heat conduction models and air convection heat transfer models, into the input embedding layer. This guides the model to learn and adhere to the intrinsic physical relationship between light and temperature during the low-level feature extraction stage. Building upon this, to further enhance the model's accuracy in perceiving complex environmental variables, the network specifically improves the multi-head self-attention mechanism. It employs a domain-specific attention head allocation strategy, dynamically assigning differentiated attention weights to different environmental parameters such as temperature, humidity, light intensity, and wind speed, significantly enhancing the model's ability to capture features of key influencing factors. Furthermore, considering the strong spatiotemporal dynamics of greenhouse temperature changes, the network introduces time encoding and solar position encoding for feature enhancement. This allows the model to fully learn the periodic patterns of the time dimension and the driving effect of changes in the sun's spatial position on the greenhouse temperature, thereby achieving accurate greenhouse temperature correction.

[0204] In a preferred embodiment, in step S4:

[0205] The prediction error loss is the mean squared error loss:

[0206]

[0207] in, For the first Predicted temperature value for each sample For the first Temperature reference value for each sample The total number of samples, The mean square error loss value is used; the temperature reference value is obtained through a multi-point calibrated reference measurement device, with the following point arrangement: one reference measurement point is set at the intersection of the diagonals of the greenhouse and one at the midpoint of each of the four sides, for a total of 5 reference points;

[0208] The physical consistency loss is:

[0209]

[0210] in, This is a predicted temperature value. For time, air density, For specific heat capacity, The thermal conductivity coefficient, For the Laplace operator, For solar radiation heat source term, related to light intensity and time Related, This represents the physical consistency loss value.

[0211] The contrastive learning loss is:

[0212]

[0213] in, , indicating the first The sample and the first Euclidean distance between the predicted temperature values ​​of each sample and The first The first sample and the first Environmental condition category labels for each sample For indicator functions, when The value is 1 if the condition is met, and 0 otherwise. The margin is a preset distance margin value. This indicates a positive part operation; that is, if the value inside the parentheses is positive, then that value is taken; otherwise, 0 is taken. To compare the learning loss values;

[0214] The total loss function is:

[0215]

[0216] in, The weighting coefficients for each loss term are determined through optimization using the validation set. , , , This represents the total loss value.

[0217] In a preferred embodiment, the model training and optimization in step S4 further includes:

[0218] A transfer learning strategy was adopted: the model parameters were first pre-trained using a simulated dataset, and then fine-tuned using historical greenhouse data.

[0219] Using cosine annealing for learning rate scheduling:

[0220]

[0221] in, For the first The learning rate for each training round. To achieve the maximum learning rate, To minimize the learning rate, For the current training round, This is the maximum number of training rounds;

[0222] AdamW optimizer, cosine annealing learning rate scheduling, Dropout (ratio 0.1), and early stopping mechanism (patience=10) are all common training strategies in the field of deep learning.

[0223] An early stopping mechanism is adopted: training is stopped when the validation set loss does not decrease for 10 consecutive training rounds.

[0224] The following is in conjunction with the appendix Figure 4 The entire model training process of this invention will be described.

[0225] like Figure 4 The diagram shown illustrates the model training process based on transfer learning in an embodiment of the present invention. This process mainly includes four parts: dataset preparation, pre-training stage, fine-tuning stage, and model deployment.

[0226] First, the dataset was prepared by integrating simulated greenhouse data and historical greenhouse data, and then dividing it into training set, validation set and test set.

[0227] Then, the pre-training phase begins: the system loads the simulated training data set, initializes the PST-Transformer model for pre-training, and sets the training epochs. During training, a multi-task loss, including mean squared error (MSE), physical consistency loss, and contrastive learning loss, is calculated, and the AdamW optimizer combined with a cosine annealing learning rate strategy is used for parameter updates. After each training round, the model is evaluated on the validation set. If the model does not converge, the iteration continues; if it converges, the current pre-trained weights are saved.

[0228] Next, the system enters the fine-tuning phase: it loads the actual greenhouse data training set and uses the saved pre-trained weights as initial parameters for fine-tuning training, setting the training epochs. The same multi-task loss calculation and AdamW optimization strategy are employed. An early stopping detection mechanism is introduced at this stage: if performance does not improve for 10 consecutive epochs in the validation set evaluation (i.e., triggering early stopping), training is stopped and the optimal model is saved. Finally, the trained optimal model is deployed to edge devices for real-time temperature correction tasks.

[0229] In a preferred embodiment, the spatiotemporal Transformer temperature correction network based on physical constraints is trained using historical data, and the training objective is to minimize the mean square error between the predicted temperature and the actual overall temperature of the greenhouse.

[0230] The actual overall temperature of the greenhouse was obtained through a multi-point calibrated reference measuring device.

[0231] In a preferred embodiment, step S5 further includes:

[0232] Generate a comparative analysis report of the calibrated temperature and the local measurement temperature of a single sensor, and output it in the form of visual charts;

[0233] The multi-head self-attention mechanism is specifically used to model the following dynamic coupling relationships:

[0234] The thermal radiation interference effect of light intensity on local temperature sensors;

[0235] Nonlinear relationship between humidity and temperature;

[0236] The effect of changes in the sun's position over time on the temperature distribution inside the greenhouse.

[0237] A temperature intelligent correction system based on multi-source sensors includes:

[0238] Sensor array: A distributed array of high-precision temperature and humidity sensors and light sensors deployed within the greenhouse;

[0239] Data preprocessing module: used for data cleaning and normalization;

[0240] Transformer fusion prediction module: Loads pre-trained models, inputs multi-source data and auxiliary information in real time, and outputs corrected temperature.

[0241] like Figure 1The diagram illustrates a temperature intelligent correction system architecture based on multi-source sensors provided in this embodiment of the invention. The system mainly includes a sensor array layer, an edge computing device, and a local output terminal. The sensor array layer is used to collect multi-dimensional environmental data within the greenhouse, specifically including a distributed high-precision temperature and humidity sensor group, a light sensor group, and a solar position calculation module based on astronomical algorithms. The collected data is transmitted to the edge computing device via wired or wireless communication. Inside the edge computing device, the data is processed sequentially by a data receiving module, a data preprocessing module (performing cleaning and normalization operations), and a Transformer fusion prediction module. Finally, the result display module generates a temperature curve or comparison chart and outputs the corrected real temperature data locally for environmental monitoring.

[0242] This invention provides a temperature intelligent correction system based on multi-source sensors. Its overall architecture mainly consists of three parts: a sensor array layer, an edge computing device, and a local output terminal. During system operation, the sensor array layer first comprehensively collects multi-dimensional environmental data within the greenhouse. This layer includes not only a distributed array of high-precision temperature and humidity sensors and a light sensor array, but also a solar position calculation module based on astronomical algorithms, enabling accurate capture of dynamic changes in the natural environment and solar radiation. Subsequently, this multi-dimensional data is transmitted in real-time to the edge computing device via wired or wireless communication networks. Inside the edge computing device, the data receiving module receives the raw data and passes it to the data preprocessing module for cleaning and normalization to remove abnormal noise and standardize the data format. Next, the processed and standardized data is input to the core Transformer fusion prediction module, which deeply mines and fuses the complex correlations between multi-source data to intelligently calculate the corrected true temperature. Finally, the results display module transforms this corrected data into intuitive temperature curves or comparison charts and presents them in real-time at the local output terminal, thus providing reliable data support for the accurate monitoring and control of the greenhouse environment.

[0243] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A temperature intelligent correction method based on multi-source sensors, characterized in that, Includes the following steps: Step S1: Multimodal sensor array data acquisition and spatiotemporal alignment: A multimodal sensor array is deployed in a distributed manner within the greenhouse. Each sensor synchronously acquires environmental data at a preset sampling frequency and aligns the data using timestamps. Data caching and preliminary quality testing are performed using edge computing devices; Step S2: Anomaly cleaning and normalization based on statistical-physical joint method: outlier detection and cleaning, missing value imputation, normalization, and time series alignment are performed on the collected multi-source sensor data to unify the units of measurement. Step S3: Construct a spatiotemporal Transformer temperature correction network based on physical constraints: The spatiotemporal Transformer temperature correction network based on physical constraints adopts an encoder-decoder architecture. A thermal radiation physical constraint module is introduced at the top layer of the encoder to model the light-temperature coupling relationship. The spatiotemporal dependency between multi-source sensor data is extracted through a multi-head self-attention mechanism, and the overall temperature prediction value of the greenhouse is output. Step S4: Model Training and Optimization: The spatiotemporal Transformer temperature correction network based on physical constraints is trained using a multi-task physical information loss function, which includes prediction error loss, physical consistency loss, and contrastive learning loss. Step S5: Temperature assessment and correction: The temperature prediction value output in step S3 is used as the corrected actual temperature of the greenhouse for environmental monitoring and planting management decisions. The multi-head self-attention mechanism described in step S3 specifically includes: The attention head is divided into a spatial attention head and a temporal attention head. The spatial attention head focuses on the relationship between different sensors at the same time, while the temporal attention head focuses on the relationship between the same sensor at different times. For the h-th attention head, calculate the query matrix Q, key matrix K, and value matrix V: ; in, For embedded representation, Let h be the query weight matrix for the h-th head. Let h be the key weight matrix of the h-th head. Let h be the weight matrix of the h-th head value. Let h be the query matrix for the h-th head. Let h be the key matrix of the h-th head. This is the value matrix of the h-th head; Attention score calculation incorporates a light radiation intensity adjustment factor. : ; in, Let be the dimension of the key vector. Light intensity, Represents the Hadamard product. The attention output of the h-th head; the light radiation intensity adjustment factor The calculation formula is: ; in, The radiation attenuation coefficient, This represents the maximum light intensity. Multi-head attention output splicing: ; in, To query the matrix set, For the set of key matrices, For a set of value matrices, For the output of the h-th attention head, For the total number of attention heads, To output the weight matrix, This provides multi-headed attention output.

2. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, In step S1: The multimodal sensor array includes a high-precision temperature and humidity sensor, a light intensity sensor, and a wind speed sensor; High-precision temperature and humidity sensors are used to collect air temperature and relative humidity. The light intensity sensor is used to collect photosynthetically active radiation and the radiation temperature of the sensor surface; The wind speed sensor is used to collect the air velocity inside the shed for heat conduction calculations; The multimodal sensor array is deployed as follows: high-precision temperature and humidity sensors are deployed at three height levels of 0.5m, 1.5m, and 2.5m at the four corners of the greenhouse; the greenhouse floor is divided into four equal rectangular sub-regions; four light intensity sensors are deployed on the top of the greenhouse above the center of each sub-region, each equipped with a shading cover; four wind speed sensors are deployed inside the greenhouse at the center of each sub-region, at a height of 2.5m, for heat conduction calculation.

3. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, The outlier detection and cleaning described in step S2 specifically includes: Outlier detection is performed using the 3σ criterion combined with the isolated forest algorithm. First, calculate the mean μ and standard deviation σ of the historical data for each sensor, and remove data that exceeds the range [μ-3σ, μ+3σ]. Then, construct an isolation forest model for the remaining data and calculate the outlier score. ; Where h(x) s ) is the sample x s The path length in an isolated forest, E(h(x) s )) represents the expected value of the path length, c(n) is the average path length given a sample size n, and s(x) is the mean value of the path length. s (n) represents outlier scores; A threshold s > 0.6 is set and the value is identified as an outlier and removed.

4. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, The encoder-decoder architecture of the physically constrained spatiotemporal Transformer temperature correction network described in step S3 specifically includes: Encoder: Consists of N=6 identical encoder layers stacked together, each layer containing two sub-layers: Sublayer 1: Multi-head spatiotemporal self-attention mechanism, used to extract spatial correlation and temporal dependence among multiple sensor sources; Sublayer 2: Feedforward neural network, performing nonlinear feature transformation; Each sublayer is followed by residual connections and layer normalization: LayerNorm(x+Sublayer(x)), where x is the sublayer input, Sublayer(x) is the sublayer output, and LayerNorm represents the layer normalization operation; Decoder: Consists of N=6 identical decoder layers stacked together, each layer containing three sub-layers: Sub-layer 1: Multi-head self-attention mechanism with masking to prevent future information leakage; Sublayer 2: Multi-head cross-attention mechanism to establish the correlation between encoder output and historical temperature sequence; Sublayer 3: Feedforward neural network; Residual connectivity and layer normalization are also used.

5. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, Step S3 also includes: Tensors of preprocessed temperature, humidity, and light intensity data Perform linear projection and add spatiotemporal location encoding: ; in, For the input tensor, For time step, For the number of sensors, For feature dimension, For embedded representation, The linear projection weight matrix is Encoding for time location, Spatial location encoding; temporal location encoding uses sine and cosine functions: ; ; in, For time location index, For dimension indexing; Spatial location encoding is achieved through sensors measuring the three-dimensional coordinates within the greenhouse. , , The result obtained after mapping through a fully connected layer is: ; in, For sensor indexing, , , The first The three-dimensional spatial coordinates of the sensors inside the greenhouse This is the weight matrix of the fully connected layer. For bias terms, This is the activation function.

6. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, The thermal radiation physical constraint module mentioned in step S3 specifically includes: A thermal radiation physical constraint module is introduced at the top layer of the encoder to model the light-temperature coupling relationship: ; in, The temperature feature matrix, The illumination feature matrix, The solar altitude angle is calculated using astronomical algorithms. This is the weight matrix for the temperature features. This is the weight matrix for the illumination features. For the radiation fusion weight matrix, For bias terms, Output as physical characteristics Represents the Hadamard product; Fusing physical features with attention features: ; in, As a feature of fusion, Indicates feature splicing, This provides multi-headed attention output.

7. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, The predicted temperature value for the overall greenhouse output in step S3 is: The decoder output is mapped through a fully connected layer to generate the overall greenhouse temperature prediction: ; in, To fuse features, LayerNorm is a layer normalization operation. To output the weight matrix, For output bias terms, This is the corrected overall temperature prediction for the greenhouse.

8. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, In step S4: The prediction error loss is the mean squared error loss: ; in, For the first Predicted temperature value for each sample For the first Temperature reference value for each sample The total number of samples, The mean square error loss value is used; the temperature reference value is obtained through a multi-point calibrated reference measurement device, with the following point arrangement: one reference measurement point is set at the intersection of the diagonals of the greenhouse and one at the midpoint of each of the four sides, for a total of 5 reference points; The physical consistency loss is: ; in, This is a predicted temperature value. For time, air density, For specific heat capacity, The thermal conductivity coefficient, For the Laplace operator, For solar radiation heat source term, related to light intensity and time Related, This represents the physical consistency loss value. The contrastive learning loss is: ; in, , indicating the first The sample and the first Euclidean distance between the predicted temperature values ​​of each sample and The first The first sample and the first Environmental condition category labels for each sample For indicator functions, when The value is 1 if the condition is met, and 0 otherwise. The margin is a preset distance margin value. This indicates a positive part operation; that is, if the value inside the parentheses is positive, then that value is taken; otherwise, 0 is taken. To compare the learning loss values; The total loss function is: ; in, The weighting coefficients for each loss term are determined through optimization on the validation set. , , , This represents the total loss value.

9. The intelligent temperature correction method based on multi-source sensors according to claim 1, characterized in that, The model training and optimization described in step S4 also includes: A transfer learning strategy was adopted: the model parameters were first pre-trained using a simulated dataset, and then fine-tuned using historical greenhouse data. Using cosine annealing for learning rate scheduling: ; in, For the first The learning rate for each training round. To achieve the maximum learning rate, To minimize the learning rate, For the current training round, This is the maximum number of training rounds; An early stopping mechanism is adopted: training is stopped when the validation set loss does not decrease for 10 consecutive training rounds.

Citation Information

Patent Citations

  • A smart temperature control system for greenhouses

    CN119597075B

  • Knowledge tracking method integrating image embedding and attention

    CN116611517A

  • Polyurethane waterproof coating construction quality detection method, medium and system

    CN118794948A