Greenhouse multi-source adaptive co-regulation method and device based on crop physiological feedback
By combining multi-head attention mechanisms and deep reinforcement learning agents, precise and adaptive greenhouse environment control has been achieved, solving the problems of low control accuracy and high energy consumption in traditional control methods, and improving crop growth efficiency and energy utilization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ACADEMY OF AGRICULTURE & FORESTRY SCIENCES
- Filing Date
- 2026-04-15
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional greenhouse control methods cannot accurately respond to crop growth needs, resulting in low control precision and high energy consumption. Furthermore, they fail to effectively combine crop physiological information with the dynamic correlation of external weather changes, leading to functional offsetting and energy waste among the implementing agencies.
An information fusion model constructed using a multi-head attention mechanism, combined with a deep reinforcement learning agent, generates an adaptive set of control instructions. By collecting real-time information on the greenhouse internal environment, crop physiology, and external meteorological conditions, a collaborative control strategy is generated, taking into account the coupling relationship of the actuators, to achieve precise control.
It has achieved precise, coordinated, and adaptive greenhouse environment control, reduced energy waste, improved crop yield and quality, and adapted to complex scene changes.
Smart Images

Figure CN122043968B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of smart agriculture and automatic control technology, and in particular to a method and device for multi-source adaptive and coordinated control of greenhouses that integrates crop physiological feedback. Background Technology
[0002] Greenhouse environmental control is a key aspect of facility agriculture, directly impacting crop yield, quality, and energy consumption. As a typical complex dynamic system characterized by strong nonlinearity, multi-factor coupling, and large time lag, the greenhouse system involves mutual constraints among environmental factors such as indoor temperature, humidity, light intensity, and CO2 concentration. Dynamic changes in external meteorological conditions continuously disrupt the indoor environment. Furthermore, crops exhibit significant differences in their physiological environmental requirements at different growth stages. The actions of actuators such as skylights, fans, and evaporative cooling pads possess strong physical coupling. These characteristics place extremely high demands on the precise and coordinated control of the greenhouse environment.
[0003] Traditional greenhouse control methods often rely on threshold control of a single environmental factor or multi-factor independent control strategies based on proportional-integral-derivative (PID) or fuzzy control. These methods trigger actuators based solely on preset fixed thresholds, failing to consider the coupling relationships between various environmental factors within the greenhouse, the actual physiological state of the crops, or the dynamic impact of external weather changes. They can only achieve passive, environment-driven regulation, resulting in low control precision, high energy consumption, and difficulty in adapting to the dynamic growth needs of crops.
[0004] To address these issues, existing technologies have gradually introduced multi-sensor data collection from multiple sources, including the greenhouse environment and external weather. Some studies have attempted to combine neural networks and simple weighted fusion to process multi-source information, or to introduce intelligent algorithms such as reinforcement learning to generate control commands. However, significant technical bottlenecks remain. Multi-source information processing often employs shallow fusion methods such as direct splicing and fixed-weighted averaging, failing to capture the dynamic differences in crop physiological states' sensitivity to external weather changes. Crops exhibit significantly different sensitivities to external weather factors at different growth stages or under different environmental conditions. For example, flowering crops are far more sensitive to canopy temperature changes than those in the vegetative growth stage. Traditional methods cannot adaptively adjust information weights based on these dynamic differences, and the fusion results lack a comprehensive representation of the relationship between the greenhouse environment, crops, and weather, making them unsuitable as an effective basis for precise control. Existing intelligent control algorithms often directly apply general models without customizing designs for the strong coupling characteristics of greenhouse actuators, failing to address the functional cancellation issues between actuators such as skylights, fans, and evaporative cooling pads. The actions of different actuators are interconnected and influence each other. Traditional algorithms do not fully consider this coupling relationship, which can easily generate conflicting control commands such as heating and ventilation at the same time, cooling and dehumidifying at the same time, resulting in serious energy waste and even causing indoor environmental imbalance, making it impossible to achieve coordinated optimization of various actuators.
[0005] Furthermore, existing technologies have not integrated crop physiological information as the primary basis for regulation into the multi-source information fusion and intelligent decision-making process, thus failing to break free from an environment-centric regulatory approach and hindering the shift from environment-driven to crop-demand-driven regulation. Even when some traditional technologies attempt to incorporate crop-related data, it is only used as a supplementary reference, without deep integration with external meteorological and indoor environmental information. This results in regulatory strategies that still struggle to align with the dynamic growth needs of plants and meet the development requirements of precise, energy-saving, and coordinated regulation in facility agriculture. Summary of the Invention
[0006] This invention provides a greenhouse multi-source adaptive collaborative regulation method integrating crop physiological feedback, comprising: real-time acquisition of internal greenhouse environmental information, crop physiological information, and external meteorological information; preprocessing and feature extraction of the acquired information to form environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors; inputting the environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors into an information fusion model to output a comprehensive fusion state feature vector, wherein the information fusion model is constructed based on a multi-head attention mechanism, using the environmental feature vector as the query and the crop physiological feature vector and external meteorological feature vector as the key and value, and adaptively weighting and fusing the input multi-source feature vectors; based on the comprehensive fusion state feature vector and a preset crop growth environment target, a deep reinforcement learning agent using a deep deterministic policy gradient outputs a regulation instruction set, wherein the deep reinforcement learning agent uses the comprehensive fusion state feature vector as input, combines the preset crop growth environment target to calculate the deviation of each environmental regulation factor, and generates the regulation instruction set through a policy-evaluation dual network architecture, wherein the policy network maps the comprehensive fusion state feature vector to continuous regulation parameters, and the evaluation network uses an action value function. The advantages and disadvantages of the control parameters are evaluated to suppress the offsetting of the actuator functions; multiple greenhouse actuators execute the control instruction set and return to the real-time acquisition step at a preset fixed period to form a closed-loop control.
[0007] According to one embodiment of the present invention, feature extraction of the collected information includes: extracting time-domain features, frequency-domain features, and / or spatial-domain features from the greenhouse internal environmental information to generate the environmental feature vector; extracting time-domain features, frequency-domain features, and / or spatial-domain features from the crop physiological information to generate the crop physiological feature vector; and extracting time-domain features, frequency-domain features, and / or spatial-domain features from the greenhouse external meteorological information to generate the external meteorological feature vector.
[0008] According to one embodiment of the present invention, the method further includes the step of constructing the information fusion model, specifically including: the information fusion model is sequentially connected to a linear projection module, a multi-head attention parallel computing module, and a feature enhancement module; the linear projection module is used to obtain a key matrix and a value matrix based on the crop physiological feature vector and the external meteorological feature vector, and to obtain a query matrix based on the environmental feature vector; the multi-head attention parallel computing module is used to calculate the dot product of the query matrix and the transpose of the key matrix, obtain dynamically calculated adaptive attention weights based on the dot product, and use the adaptive attention weights and the value matrix to complete the information fusion of single-head attention; the information fusion of single-head attention is repeated multiple times, and the information fusion results of multiple single-head attention are spliced and linearly projected to obtain the multi-head attention fusion output result; the feature enhancement module is used to obtain the comprehensive fusion state feature vector based on the environmental feature vector and the multi-head attention fusion output result through residual connection, layer normalization, and feedforward neural network processing.
[0009] According to one embodiment of the present invention, obtaining a key matrix and a value matrix based on the crop physiological feature vector and the external meteorological feature vector, and obtaining a query matrix based on the environmental feature vector, includes: using a first fully connected layer to perform a linear transformation on the crop physiological feature vector, mapping it to a first target feature dimension to obtain a first-dimensional crop physiological feature vector; using a second fully connected layer to perform a linear transformation on the external meteorological feature vector, mapping it to the first target feature dimension to obtain a first-dimensional external meteorological feature vector; using a third fully connected layer to perform a second linear calibration on the first-dimensional crop physiological feature vector and / or the first-dimensional external meteorological feature vector, so that they are mapped to the same feature space; concatenating the calibrated first-dimensional crop physiological feature vector and the first-dimensional external meteorological feature vector by dimension to obtain a first joint context feature; and performing a linear projection on the first joint context feature to obtain a key matrix. The matrix is constructed as follows: The crop physiological feature vector is linearly transformed using a fourth fully connected layer and mapped to the second target feature dimension to obtain a second-dimensional crop physiological feature vector; the external meteorological feature vector is linearly transformed using a fifth fully connected layer and mapped to the second target feature dimension to obtain a second-dimensional external meteorological feature vector; a sixth fully connected layer performs a second linear calibration on the second-dimensional crop physiological feature vector and / or the second-dimensional external meteorological feature vector, mapping them to the same feature space; the calibrated second-dimensional crop physiological feature vector and the second-dimensional external meteorological feature vector are concatenated dimensionally to obtain a second joint context feature; a linear projection is performed on the second joint context feature to obtain a value matrix; an independent linear layer maps the environmental feature vector to the same target feature space as the key matrix and the value matrix to obtain a query matrix; wherein, the projection process follows the following formula: , , In the formula, The query matrix of the multi-head attention mechanism is used for the alignment and association calculation of multi-source features, and is an entity matrix carrying environmental features. The environmental feature vector, The external meteorological feature vector, The key matrix, This is the physiological feature vector of the crop. For the value matrix, , , , , These are the weight matrices for the corresponding mappings. This is a vector concatenation operation that merges crop physiological feature vectors and external meteorological feature vectors in order of feature dimension.
[0010] According to one embodiment of the present invention, the method further includes a step of training the information fusion model, specifically including: constructing a training dataset for the information fusion model, wherein the samples are environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors obtained after extracting features under different greenhouse environment scenarios and different crop growth stages, and the labels of the training dataset are greenhouse environment state reference labels or manually labeled multi-source information fusion weight reference labels for the corresponding samples; dividing the training dataset to obtain a training set and a validation set; randomly initializing the trainable parameters of the linear projection layer, multi-head attention parallel computing layer, feedforward neural network, and layer normalization of the information fusion model, and setting the hyperparameters of the number of heads and key vector dimension of the multi-head attention mechanism; and inputting the sample environmental feature vectors, sample crop physiological feature vectors, and sample external meteorological feature vectors from the training set into the initial set. The information fusion model after optimization is executed, and a multi-source information weighted fusion process is performed to output a fusion state feature vector. The loss value between the fusion state feature vector and the corresponding sample label is calculated. Based on the loss value, all trainable parameters of the information fusion model are updated through backpropagation algorithm to complete one round of model training. The generalization ability of the information fusion model after each round of training is verified using the validation set, and the validation loss value is calculated. If the validation loss value does not reach the preset convergence condition, the training hyperparameters such as learning rate and batch size are adjusted, and the steps starting from inputting the sample environmental feature vector, sample crop physiological feature vector, and sample external meteorological feature vector from the training set into the initialized information fusion model are repeated to continue iterative training until the validation loss value reaches the preset convergence condition. The parameters of the trained information fusion model are saved.
[0011] According to one embodiment of the present invention, the decision-making process of the deep reinforcement learning agent includes: firstly, extracting the actual values of indoor environmental regulation factors, crop physiological correlation regulation factors, and external meteorological influence regulation factors from the comprehensive fusion state feature vector; the indoor environmental regulation factors include air temperature, air humidity, light intensity, CO2 concentration, and soil temperature and humidity; the crop physiological correlation regulation factors include canopy temperature, transpiration rate, stem micro-changes, and leaf surface humidity; and the external meteorological influence regulation factors include outdoor light intensity, temperature, humidity, wind speed, and wind direction; for each type of regulation factor, calculating its actual value and the preset value. The deviation magnitude and direction of the corresponding target values in the crop growth environment objectives are used to form a categorized and quantified deviation set. During deviation calculation, the deviation weights of various factors are dynamically adjusted according to the crop growth stage. Based on the categorized and quantified deviation set and the comprehensive fusion state feature vector, the control instruction set is generated through a strategy-evaluation dual-network architecture. The strategy network maps input features to continuous control parameters through a combination of multi-layer fully connected layers and nonlinear activation functions. The range of values for these continuous control parameters is normalized to match the physical motion range of the corresponding greenhouse actuator. The evaluation network calculates the action value function. The adaptability of the continuous control parameters is evaluated in real time, and the action value function is... The calculation process incorporates the dynamic balance weights of the actuator action coupling coefficient, the indoor environmental regulation factor, the crop physiological correlation regulation factor, and the external meteorological influence regulation factor to confirm the action value function. If the value is below a preset threshold, the evaluation result is fed back to the policy network, driving the policy network to iteratively optimize the continuous control parameters and suppress functional cancellation between the actions of different actuators.
[0012] According to one embodiment of the present invention, the continuous control parameters constitute the control instruction set, which is a continuous numerical coordinated action vector. Each dimension corresponds one-to-one with a greenhouse actuator, and the continuous control parameters of each dimension are normalized values of the corresponding greenhouse actuator's action opening, operating speed, or working rate. The control instruction set is used to coordinate the control of at least two types of greenhouse actuators. The greenhouse actuators are selected from at least two of the following: skylights, fans, rolling shutters, supplemental lighting, CO2 generators, heaters, irrigation valves, and wet curtains. The control instruction set is a system control strategy that comprehensively considers the action coupling relationship between each greenhouse actuator and takes into account the dynamic balance of the indoor environmental control factors, the crop physiological correlation control factors, and the external meteorological influence control factors.
[0013] According to one embodiment of the present invention, the process by which the deep reinforcement learning agent generates the control instruction set and optimizes the continuous control parameters is constrained by a reward function that integrates environmental deviation factors, energy consumption cost factors, and crop physiological stress factors. The reward function aims to maximize its value, guiding the iterative optimization direction of the policy network. The environmental deviation factor is negatively correlated with the combined deviation between the actual values and preset target values of the indoor environmental control factors, crop physiological correlation control factors, and external meteorological influence control factors; the smaller the combined deviation, the larger the value of the environmental deviation factor. The energy consumption cost factor is related to the greenhouse actuator... The total energy consumption of the greenhouse operating mechanism is negatively correlated with the overall operating energy consumption; the lower the overall operating energy consumption of the greenhouse actuator, the larger the value of the energy cost factor. The crop physiological stress factor is positively correlated with the suitability of the crop physiological correlation regulation factor; the closer the crop physiological correlation regulation factor is to the optimal growth state, the larger the value of the crop physiological stress factor. The reward function uses preset dynamic weight coefficients to perform a weighted summation of the environmental deviation factor, the energy cost factor, and the crop physiological stress factor. The weight coefficients are dynamically adjusted according to the crop growth stage to ensure that the regulation instruction set achieves a dynamic balance between environmental deviation correction, energy consumption control, and crop physiological stress relief.
[0014] This invention also provides a greenhouse multi-source adaptive collaborative control device integrating crop physiological feedback, comprising: a multi-source information sensing module for real-time acquisition of internal greenhouse environmental information, crop physiological information, and external meteorological information; the multi-source information sensing module includes an environmental sensor array, a crop physiological sensor group, and a communication interface for accessing external meteorological station data, all arranged within the greenhouse; and an information fusion model subunit, which incorporates an information fusion model based on a multi-head attention mechanism, for inputting environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors, and outputting a comprehensive fused state feature vector; the information fusion model is constructed based on a multi-head attention mechanism, using the environmental feature vector as the query parameter and the crop physiological feature vector as the input parameter. Physiological feature vectors and external meteorological feature vectors serve as keys and values. Adaptive weighted fusion of the input multi-source feature vectors is achieved through scaling dot product attention calculation, multi-head parallel fusion, residual connections, and layer normalization. A collaborative regulation decision generation subunit, incorporating a deep reinforcement learning agent with a built-in deep deterministic policy gradient, generates a set of regulation instructions based on the comprehensive fused state feature vectors and preset crop growth environment targets, utilizing a deep reinforcement learning intelligent decision-making model. An actuator driving module receives the regulation instruction set and drives at least two greenhouse actuators to operate according to the instruction set. Information collected by the multi-source information sensing module is processed to provide decision-making basis for the deep reinforcement learning agent.
[0015] According to one embodiment of the present invention, it further includes: a data preprocessing and feature extraction subunit, used to preprocess the information collected by the multi-source information sensing module, and to extract time-domain features, frequency-domain features and / or spatial-domain features from the collected information to form the environmental feature vector, the crop physiological feature vector and the external meteorological feature vector; and a human-computer interaction and monitoring module, used to set the preset crop growth environment target, display the greenhouse environment change curve, visualize the attention weight of the information fusion model, and perform system operation status monitoring and abnormal alarm.
[0016] This invention, through its innovative design of deep fusion of multi-source information and customized intelligent decision-making, effectively breaks through the limitations of traditional greenhouse control technology, achieving precise, coordinated, and adaptive greenhouse environmental control.
[0017] The dynamic response of crop physiology to meteorological changes is precisely adapted, significantly improving the targeted nature of regulation. This invention innovatively designs a specific construction strategy for query key-value pairs, using environmental characteristics as the query benchmark and crop physiology and external meteorological characteristics as keys and values. This enables the information fusion model to autonomously learn the dynamic relationships among the three. When crops are at different growth stages or face external meteorological fluctuations, the model can adaptively adjust the weight ratio of each information source, allowing the fusion result to accurately reflect the actual needs of the crop. This promotes a shift in regulation from traditional environment-driven to crop demand-driven approaches, significantly reducing the adverse effects of environmental fluctuations on crop growth.
[0018] The problem of strong coupling between actuators has been effectively solved, and the efficiency of coordinated control has been comprehensively optimized. Based on a dual-network architecture of policy evaluation and deep deterministic policy gradient reinforcement learning agent, the generated control instruction set fully considers the physical coupling relationship between actuators such as skylights, fans, and wet curtains. When generating continuous numerical instructions, the policy network can predict the mutual influence of different mechanism actions, avoiding functional cancellation; the evaluation network uses action value functions... The assessment continuously optimizes the quality of instructions, and combines a three-factor reward function that includes environmental deviations, energy costs, and crop physiological stress to achieve coordinated action among various implementing agencies. This ensures the dynamic balance of various factors in the greenhouse environment while significantly reducing energy waste.
[0019] The depth of multi-source information fusion and model adaptability are comprehensively enhanced, and the ability to adapt to complex scenarios is significantly improved. This invention abandons the traditional simple splicing or fixed-weighted fusion method. Through dimensional mapping and secondary calibration of the linear projection module, it achieves spatial unification of heterogeneous information. Through multi-head attention parallel computing and feature enhancement processing, it fully explores the deep correlation between environmental, crop, and meteorological information. After being trained with samples from multiple scenarios and multiple growth stages, the fusion model has extremely strong adaptability and can cope with complex scenarios such as seasonal changes, sudden weather changes, and crop growth stage transitions. It can continuously output high-quality fused state feature vectors without frequent manual parameter adjustments.
[0020] The technical solution balances feasibility and system interpretability, demonstrating significant practical application value. This invention clearly defines the normalized control parameters as a link between physical voltage or frequency signals mapped by a programmable logic controller (PLC), deeply integrating algorithmic logic with physical execution. Simultaneously, the human-computer interaction and monitoring module supports the visualization of the attention weights of the information fusion model, allowing managers to intuitively understand the model's focus in different scenarios, enhancing system reliability and ease of operation. A pre-set closed-loop control mode with a fixed cycle enables dynamic cycling of perception fusion, decision execution, and feedback, ensuring that the control strategy can respond in real-time to dynamic changes in the environment and crops.
[0021] This invention simultaneously improves control precision and energy efficiency, resulting in significant economic and social benefits. By accurately capturing the dynamic correlation between crop physiological needs and environmental meteorological conditions, and through coordinated optimization control of actuators, it can stabilize various control factors in the greenhouse environment within the optimal range for crop growth, effectively improving crop yield and quality. Coordinated control avoids energy waste caused by single-factor regulation, reducing ineffective energy consumption of various actuators while ensuring crop growth needs are met. This aligns with the green and efficient development trend of facility agriculture and can be widely applied to environmental control scenarios in various facility agriculture greenhouses. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating the greenhouse multi-source adaptive synergistic regulation method that integrates crop physiological feedback provided by the present invention.
[0024] Figure 2 This is a schematic diagram of the feature extraction process in the greenhouse multi-source adaptive collaborative regulation method that integrates crop physiological feedback provided by the present invention.
[0025] Figure 3 This is a schematic diagram of the process for constructing the information fusion model in the greenhouse multi-source adaptive and coordinated regulation method that integrates crop physiological feedback provided by the present invention.
[0026] Figure 4 This is a schematic diagram of the matrix generation process in the greenhouse multi-source adaptive and coordinated control method that integrates crop physiological feedback provided by the present invention.
[0027] Figure 5 This is a schematic diagram of the training process of the information fusion model in the greenhouse multi-source adaptive collaborative regulation method that integrates crop physiological feedback provided by the present invention.
[0028] Figure 6 This is a block diagram of the greenhouse multi-source adaptive and coordinated control device that integrates crop physiological feedback provided by the present invention.
[0029] Figure label:
[0030] 100: Greenhouse multi-source adaptive collaborative control device integrating crop physiological feedback; 110: Multi-source information sensing module; 120: Information fusion model subunit; 130: Collaborative control decision generation subunit; 140: Actuator drive module; 150: Data preprocessing and feature extraction subunit; 160: Human-computer interaction and monitoring module. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0032] Before proceeding with the formal explanation, let's first discuss the environmental feature vectors involved in this invention. E and original environment feature vector E The following explanation is provided:
[0033] Environmental feature vector The term "original environmental feature vector" refers to the standardized vector (integrating time-domain, frequency-domain, and spatial-domain features) generated after preprocessing and feature extraction of the internal environmental information of the greenhouse. It is one of the inputs for information fusion. In this invention, "original environmental feature vector E" and "environmental feature vector E" are the same parameter. "Original" is only used to distinguish the baseline input vector that has not undergone multi-head attention fusion processing and has no essential difference in interpretation.
[0034] The following is combined with Figures 1 to 6This invention describes a greenhouse multi-source adaptive and coordinated control method and apparatus that integrates crop physiological feedback. Figure 1 This is a flowchart illustrating the greenhouse multi-source adaptive synergistic regulation method integrating crop physiological feedback provided by the present invention. Figure 1 As shown, the method includes: in step S100, real-time acquisition of internal greenhouse environmental information, crop physiological information, and external greenhouse meteorological information; in step S200, preprocessing and feature extraction of the acquired information to form environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors; in step S300, inputting the environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors into an information fusion model to output a comprehensive fusion state feature vector, wherein the information fusion model is constructed based on a multi-head attention mechanism, using the environmental feature vector as the query and the crop physiological feature vector and external meteorological feature vector as the key and value, and adaptively weighting and fusing the input multi-source feature vectors; in step S400, based on the comprehensive fusion state feature vector and the preset crop growth environment target, a deep reinforcement learning agent using a deep deterministic policy gradient outputs a set of control instructions, wherein the deep reinforcement learning agent uses the comprehensive fusion state feature vector as input, calculates the deviation of each environmental control factor in combination with the preset crop growth environment target, and generates a set of control instructions through a policy-evaluation dual network architecture, wherein the policy network maps the comprehensive fusion state feature vector to continuous control parameters, and the evaluation network uses an action value function. The advantages and disadvantages of the control parameters are evaluated to suppress the offsetting of the actuator functions; in step S500, multiple greenhouse actuators execute the control command set and return to the real-time acquisition step at a preset fixed cycle to form a closed-loop control.
[0035] Specifically, in step S100, the system performs real-time acquisition of multi-source information. This process relies on... Figure 6 The multi-source information sensing module 110 in the illustrated device is complete, and this module includes three types of acquisition units. An environmental sensor array, deployed within the greenhouse, is distributed across key areas such as the crop canopy, soil surface, and ventilation openings, continuously capturing environmental indicators such as air temperature, air humidity, light intensity, CO2 concentration, and soil temperature and humidity. The crop physiological sensor group employs equipment such as an infrared thermal imager, stem flow meter, micro-strain sensor, and leaf surface humidity sensor to accurately acquire data reflecting crop growth status, including canopy temperature, transpiration rate, stem micro-changes, and leaf surface humidity. Simultaneously, the module accesses external weather station data via a communication interface to stably acquire external environmental parameters such as outdoor light intensity, temperature, humidity, wind speed, and wind direction. All three types of information are synchronously transmitted to the device's edge computing unit, forming a comprehensive and real-time raw data pool, providing a solid foundation for subsequent processing.
[0036] In step S200, the collected raw information will undergo preprocessing and feature extraction. This step corresponds to... Figure 6 The data preprocessing and feature extraction subunit 150 in the document provides a detailed workflow, which can be found in the reference section. Figure 2 The feature extraction diagram illustrates the process. The preprocessing stage first cleans the three types of information, removing outliers and filling in missing values to ensure data continuity. Then, calibration and correction are performed, adjusting system errors based on calibration parameters to improve data accuracy. Finally, alignment and normalization operations unify the time-series dimensions and transform data of different dimensions to the same scale, eliminating the impact of dimensional differences on subsequent calculations. After preprocessing, feature extraction is initiated. Temporal, frequency, and spatial features are extracted from the greenhouse internal environmental information. Temporal features include dynamic patterns such as mean, variance, peak value, and trends; frequency features uncover periodic patterns through signal transformation; and spatial features reflect the distribution differences of indicators in different regions. Corresponding features are extracted from crop physiological information to capture crop growth dynamics, physiological rhythms, and population differences. Features are extracted from external meteorological information to predict short-term evolution trends, periodic disturbances, and spatial distribution effects of the external environment. Finally, environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors with unified dimensions are generated, providing standardized input for information fusion.
[0037] Step S300 is the stage of deep fusion of multi-source information, and its process can be combined with... Figure 3 Information fusion model architecture and Figure 4 A deep understanding of the matrix generation process is needed, as this step is executed by the information fusion model subunit 120 of the device. The information fusion model is built based on a multi-head attention mechanism, employing a customized structure with environmental features as queries and crop physiological and external meteorological features as keys and values. The model is sequentially connected to a linear projection module, a multi-head attention parallel computing module, and a feature enhancement module. The linear projection module first processes the feature vectors, performing linear transformations and secondary calibrations on the crop physiological feature vectors and external meteorological feature vectors through six fully connected layers, mapping them to the same feature space. After dimensional concatenation to form joint context features, a key matrix and a value matrix are generated through linear projection. The environmental feature vectors are mapped to the same target feature space through independent linear layers to obtain the query matrix. The projection process follows specific mathematical logic to ensure that the three types of features can be correlated and calculated. Subsequently, the multi-head attention parallel computing module calculates the dot product of the query matrix and the transpose of the key matrix to obtain dynamic adaptive attention weights. These weights are used to perform weighted fusion of the value matrix, followed by multiple single-head attention fusions, result concatenation, and linear projections to obtain the multi-head attention fusion output. Finally, the feature enhancement module preserves basic environmental feature information through residual connections, and combines layer normalization and feedforward neural network processing to output a comprehensive fused state feature vector. This vector fully integrates the deep correlations among the three parties' information, providing accurate state support for decision-making. Furthermore, the information fusion model needs to undergo... Figure 5The training process optimization shown is achieved by constructing training datasets with multiple scenarios and growth stages, and through steps such as parameter initialization, iterative training, and validation optimization, to ensure that the model has stable fusion performance.
[0038] The collaborative regulation decision generation in step S400 is completed by the collaborative regulation decision generation subunit 130, which incorporates a deep reinforcement learning agent with a deep deterministic policy gradient. The agent takes a comprehensive fusion state feature vector and a preset crop growth environment target as input. First, it extracts the actual values of indoor environmental regulation factors, crop physiological correlation regulation factors, and external meteorological influence regulation factors from the fusion vector. Each type of factor contains a clear quantitative indicator. For each type of regulation factor, the agent calculates the deviation magnitude and direction between its actual value and the target value, forming a categorized quantitative deviation set. During the deviation calculation process, the deviation weights of each factor are dynamically adjusted according to the crop growth stage. Based on the deviation set and the fusion state feature vector, the agent generates a regulation instruction set through a policy-evaluation dual-network architecture. The policy network maps the input features to continuous regulation parameters through a combination of multi-layer fully connected layers and nonlinear activation functions. The parameter values are normalized and adapted to the physical motion range of the corresponding greenhouse actuator. The evaluation network calculates the action value function... Real-time assessment of the adaptability of control parameters, among which, This is a comprehensive fusion of state feature vectors. For continuous control parameters, action value function The calculation process incorporates the coupling coefficient of the actuator action and the dynamic balance weights of various control factors. If the action value function... If the values fall below a preset threshold, the evaluation results will be fed back to the policy network, driving iterative optimization of continuous control parameters to suppress functional cancellation between different actuators. Simultaneously, the agent's decision-making process is constrained by a reward function that integrates environmental deviation factors, energy consumption cost factors, and crop physiological stress factors. The reward function aims to maximize its value, and the three factors are weighted and summed using preset dynamic weight coefficients. These weight coefficients are dynamically adjusted according to the crop growth stage to ensure a dynamic balance between environmental deviation correction, energy consumption control, and crop physiological stress mitigation.
[0039] The formula for calculating the reward function is:
[0040] .
[0041] in, The reward function takes a negative value, and the agent's optimization objective is to maximize... This means minimizing the combined penalty of environmental bias, energy consumption cost, and crop physiological stress, reflecting the transformation logic of loss function and reward function in reinforcement learning; , , These are the global weight coefficients for environmental deviation factors, energy consumption cost factors, and crop physiological stress factors, respectively. Determines the system's sensitivity to environmental fluctuations. It reflects the degree of energy conservation required in production and can be increased when energy prices are high. The degree to which crops are considered is increased during key growth stages such as fruit ripening.
[0042] Environmental deviation factor The deviation of measured parameters of the greenhouse environment from preset target values is characterized by a weighted sum of squares error calculation.
[0043] .
[0044] In the formula, For the first Environmental factors, such as air temperature and CO2 concentration, are present in the environment. The measured value at time [time]. This is the preset optimal target value for the factor. For the first The deviation weighting coefficients of environmental factors, such as the temperature deviation weight being higher than humidity during the summer cooling phase.
[0045] for The moment-to-moment energy consumption cost factor characterizes the operating energy consumption and motion loss of the greenhouse actuator; for These are constant-time crop physiological stress factors, characterizing the degree of physiological stress on crops due to environmental influences. Detailed explanations follow.
[0046] In step S500, the actuator drive module receives a control instruction set and drives at least two types of greenhouse actuators to operate according to parameters. The actuators are selected from types such as skylights, fans, rolling shutters, supplemental lighting, CO2 generators, heaters, irrigation valves, and wet curtains. Greenhouse environmental control is achieved through coordinated actions. The control instruction set is a continuous numerical coordinated action vector, with each dimension corresponding one-to-one with a greenhouse actuator. The continuous control parameters for each dimension are normalized values of the corresponding actuator's opening degree, operating speed, or working rate. These normalized values (0-1 range) are mapped to physical control signals by a Programmable Logic Controller (PLC). For example, a skylight opening degree of 0.3 corresponds to a PLC output of 2.5V, a fan operating frequency normalized value of 0.7 corresponds to a 35Hz control signal, and a supplemental lighting power normalized value of 0.5 corresponds to 50% of the rated power output, ensuring the physical executability of the control instructions. After execution, the system returns to step S100 at a preset fixed cycle. The multi-source information sensing module then re-collects new multi-source information, sequentially undergoing preprocessing, feature extraction, information fusion, and decision generation to form a closed-loop control system of perception, fusion, decision-making, execution, and feedback. This cycle can be flexibly configured through the human-computer interaction and monitoring module to adapt to different crop growth stages and greenhouse scenarios, ensuring that the control strategy can respond in real time to dynamic changes in the environment and crops, and continuously optimize the control effect. The human-computer interaction and monitoring module also supports environmental change curve display, attention weight visualization, operational status monitoring, and anomaly alarm functions, enhancing the system's interpretability and ease of operation.
[0047] Figure 2 This is a schematic diagram of the feature extraction process in the greenhouse multi-source adaptive collaborative regulation method integrating crop physiological feedback provided by this invention. Figure 2 As shown, according to an embodiment of the present invention, feature extraction is performed on the collected information, including: in step S210, extracting time-domain features, frequency-domain features and / or spatial-domain features from the greenhouse internal environmental information to generate an environmental feature vector; in step S220, extracting time-domain features, frequency-domain features and / or spatial-domain features from crop physiological information to generate a crop physiological feature vector; and in step S230, extracting time-domain features, frequency-domain features and / or spatial-domain features from the greenhouse external meteorological information to generate an external meteorological feature vector.
[0048] Specifically, step S210 focuses on feature extraction of the greenhouse's internal environmental information, centering on indicators such as air temperature, air humidity, light intensity, CO2 concentration, and soil temperature and humidity. Multi-dimensional feature mining comprehensively characterizes the indoor environmental state. When extracting temporal features, the focus is on analyzing the dynamic changes of each indicator within a continuous collection period, including the mean, variance, peak value, trough value, and trend within the statistical period. For example, calculating the hourly rise and fall of air temperature and the stability fluctuation range of soil temperature and humidity during day and night cycles accurately captures the temporal evolution characteristics of environmental factors. When extracting frequency domain features, signal processing methods are used to mine the periodic patterns of indicator changes. For example, identifying the periodic fluctuation frequency of air humidity caused by ventilation operations and the frequency components of light intensity caused by supplemental lighting, providing support for subsequent fusion models to capture the rhythmic effects of environmental regulation. If multiple sets of sensors are deployed in different areas within the greenhouse, spatial domain features are also extracted, including the uniformity of light intensity distribution in different areas, the gradient changes in soil temperature and humidity in the north-south or east-west directions of the greenhouse, and the vertical differences in CO2 concentration between the crop canopy and the ground, comprehensively reflecting the spatial distribution characteristics of the indoor environment. These time-domain, frequency-domain, and spatial-domain features are integrated according to preset dimensions to form a unified and semantically complete environmental feature vector, providing standardized input for multi-source information fusion.
[0049] Step S220 focuses on feature extraction of crop physiological information, centering on physiological indicators such as canopy temperature, transpiration rate, stem micro-changes, and leaf humidity, reflecting the crop's growth status and environmental adaptability from different dimensions. Temporal feature extraction revolves around the dynamic changes of physiological indicators, including the changing trend of the difference between canopy temperature and air temperature during continuous monitoring periods, the fluctuation range of transpiration rate at different times of the day, and the growth rate curve of stem micro-changes, accurately capturing the real-time physiological response of crops to environmental changes. Frequency domain features are used to mine the periodic rhythms of physiological indicators, such as the rhythmic fluctuation frequency of stem micro-changes with the photoperiod and water supply, and the periodic change pattern of leaf humidity with transpiration, reflecting the inherent rhythms of crop physiological activities. Spatial domain features focus on the differences in the physiological states of the crop population, including the uniformity of canopy temperature distribution among different plants, the gradient changes in leaf humidity between rows, and the differences in physiological indicators among different parts of the crop, reflecting the growth consistency of the crop population and the differences in local environmental adaptability. By integrating these multi-dimensional features, crop physiological feature vectors that can accurately characterize crop growth status are generated, providing data support for crop demand-driven regulatory decisions.
[0050] Step S230 focuses on feature extraction of external meteorological information for the greenhouse, prioritizing meteorological indicators such as outdoor light intensity, temperature, humidity, wind speed, and wind direction to comprehensively capture the potential impact of the external environment on the greenhouse interior. Temporal feature extraction covers short-term trends, moving average values, and time intervals between extreme values of meteorological indicators, such as the rise or fall of outdoor temperature over the past three hours, the minute-by-minute average fluctuation of wind speed, and the daily variation curve of light intensity, to predict short-term evolution trends of external meteorological conditions. Frequency domain features analyze the frequency of changes in meteorological indicators to identify periodic fluctuations in daytime light intensity, the frequency components of wind speed changes, and the periodic patterns of humidity fluctuations, providing a basis for the fusion model to predict the periodic interference of meteorological factors on the indoor environment. Spatial domain features combine the propagation characteristics of meteorological elements, including the direction of airflow influence corresponding to wind direction, the distribution differences of outdoor humidity in different areas, and the spatial distribution of light intensity around the greenhouse, to assess the differentiated impact of external meteorological conditions on different areas inside the greenhouse. These features are integrated in a unified format to form an external meteorological feature vector that comprehensively characterizes external meteorological conditions, providing a data foundation for the fusion model to quantify external interference and optimize control strategies.
[0051] The extraction process of the three types of feature vectors follows a standardized procedure to ensure that features from different sources and of different types have a unified dimension and scale. This comprehensively explores the inherent laws and correlation characteristics of the greenhouse internal environment, crop physiology, and external weather, laying a solid foundation for subsequent deep fusion of multi-source information based on the multi-head attention mechanism. This enables the fusion results to more accurately reflect the overall state of the greenhouse system and the crop growth needs.
[0052] Figure 3 This is a schematic diagram illustrating the process of constructing the information fusion model in the greenhouse multi-source adaptive and coordinated regulation method that integrates crop physiological feedback provided by this invention. Figure 3As shown, according to an embodiment of the present invention, the implementation further includes constructing an information fusion model, specifically including: in step S310, the information fusion model is sequentially connected to a linear projection module, a multi-head attention parallel computing module, and a feature enhancement module; in step S320, the linear projection module is used to obtain a key matrix and a value matrix based on the crop physiological feature vector and the external meteorological feature vector, and to obtain a query matrix based on the environmental feature vector; in step S330, the multi-head attention parallel computing module is used to calculate the dot product of the query matrix and the transpose of the key matrix, obtain dynamically calculated adaptive attention weights based on the dot product, and complete the information fusion of single-head attention using the adaptive attention weights and the value matrix; in step S340, the information fusion of single-head attention is repeated multiple times, the information fusion results of multiple single-head attention are spliced and linearly projected to obtain the multi-head attention fusion output result; in step S350, the feature enhancement module is used to obtain a comprehensive fusion state feature vector based on the environmental feature vector and the multi-head attention fusion output result through residual connection, layer normalization, and feedforward neural network processing.
[0053] Specifically, step S310 clarifies the architectural composition and connection logic of the information fusion model. The three functional modules are sequentially connected in the order of feature preprocessing, deep fusion, and feature optimization to form a complete link. The linear projection module, as the first processing step after data input, mainly transforms heterogeneous multi-source feature vectors into a unified format suitable for attention computation, eliminating dimensional and semantic differences between features from different sources. The multi-head attention parallel computation module is the key to deep information fusion, mining the intrinsic correlation between environment, crops, and meteorology through multi-dimensional parallel computation. The feature enhancement module performs secondary optimization on the fusion results, strengthening key feature information and compensating for the feature dilution problem that may occur during deep fusion. The three modules perform their respective functions and work closely together to provide structural support for the deep integration of multi-source information.
[0054] In step S320, the linear projection module's task is to generate the query matrix, key matrix, and value matrix required for attention calculation. The formula for generating the query matrix is as follows: Environmental feature vector Through independent linear layer weight matrices A linear transformation is performed, mapping to a target feature space unified with the key and value matrices. This design ensures that the fusion process is always based on the current greenhouse environment, guaranteeing that information fusion revolves around how the environment adapts to crop needs, aligning with the main objectives of greenhouse regulation. The key matrix generation formula is as follows: Crop physiological feature vector Through a dedicated weight matrix Linear transformation, external meteorological feature vector Through a dedicated weight matrix Linear transformation, the two are concatenated by dimension The joint context features are formed, which ultimately constitute the key matrix. This process uses crop physiological needs and external meteorological disturbances as a correlation basis, providing a semantic foundation for subsequent attention weight calculations and ensuring that the model can accurately capture the dynamic relationship between the two. The value matrix generation formula is as follows: The crop physiological feature vector C is weighted by another set of dedicated weight matrices. Linear transformation, external meteorological feature vector W Through another set of dedicated weight matrices A linear transformation is performed, and the two are concatenated dimensionally to form a second joint context feature, which constitutes a value matrix. The value matrix carries specific features of crop physiology and external meteorology, serving as the original data carrier for subsequent weighted fusion and complementing the association function of the key matrix. In the above formula, all weight matrices are trainable parameters of the model, and their dimensional design strictly matches the input dimension and target feature space dimension of the corresponding feature vectors. The concatenation operation is performed in a fixed feature dimension order to ensure the stable positional correspondence between crop physiological features and external meteorological features, avoiding semantic misalignment.
[0055] Step S330 focuses on the information fusion process of single-head attention, and the formula is:
[0056] .
[0057] Among them, divided by The design aims to avoid key vector dimensionality. When the value is too large, the dot product result overflows, leading to... The function output approaches 0 or 1, causing the gradient vanishing problem; simultaneously, this scaling operation makes the distribution of attention weights more even, preventing a few features from occupying absolute weights, ensuring that the model can fully explore the deep correlations of multi-source information, and improving the robustness of the fusion result. The calculation process of this formula consists of four key steps, the first being the calculation of the query matrix. AND key matrix The dot product of the transpose (where Key matrix The transpose of the key matrix, through the key matrix After performing row and column swapping operations (adapting to the dimensionality requirements of the dot product calculation for the query matrix and key matrix), each element quantifies the correlation between environmental features and crop meteorological joint features. For example, when air temperature is high in the environmental features, the dot product result will highlight the correlation strength between canopy temperature in crop physiological features and outdoor wind speed in external meteorological features, providing a quantitative basis for weight allocation. Next, a scaling operation is performed, dividing by... , The dimension of the key vector is used to avoid the dot product result being too large. The vanishing gradient of the function ensures the stability of weight calculation. Need and key matrix The feature dimensions are consistent, typically taking values that are powers of 2, such as 64 or 128, to balance computational efficiency and feature representation capability. Then, through... The function transforms the scaled dot product result into a probability distribution between 0 and 1, i.e., adaptive attention weights. The function is calculated as follows:
[0058] ,
[0059] In the formula, The first dot product in the scaled result The element characterizes environmental features and the first element. The strength of the association between crop and meteorological characteristics; For the traversal variable of all scaled dot product results, The value range is 1 to ; This represents the total number of crop-meteorological joint features, corresponding to the number of dimensions of the multi-source features after linear projection. The sum of the weights is a natural constant. The weights are equal to 1 to ensure that the fusion process is a weighted sum of crop meteorological characteristics. The weight directly reflects the importance of the characteristic to current environmental regulation, achieving dynamic priority allocation. Finally, the normalized attention weights are compared with the value matrix. Dot product calculations are performed to obtain the fusion result of single-head attention. This result integrates the query requirements of environmental features with the key feature information of crop meteorology. For example, when the canopy temperature feature has a high weight, the fusion result will highlight the influence of this feature, making subsequent decisions more in line with the physiological needs of crops.
[0060] Step S340 achieves parallel fusion and result integration of multi-head attention, with the following formula:
[0061] .
[0062] The calculation process of this formula consists of three key steps. First, multi-head parallel computation is performed.
[0063]
[0064] in The number of heads receiving multi-head attention. , , For the first Each head has its own dedicated projection weight matrix, allowing each head to independently capture the correlation between environmental, crop, and meteorological conditions. For example, head 1 focuses on the correlation between temperature, canopy temperature, and outdoor temperature, while head 2 focuses on the correlation between humidity, transpiration rate, and outdoor humidity. This enables parallel capture of multi-dimensional correlations, avoiding omissions caused by a single perspective. Then... The fusion results of individual heads are concatenated along their feature dimensions to form a high-dimensional fusion feature set, integrating multi-view correlation information. The concatenation process requires that the output feature dimensions of each head be consistent to ensure uniform feature dimensions after concatenation, laying the foundation for subsequent linear projection processing. Finally, a global weight matrix is used... A linear transformation is performed on the concatenated high-dimensional features to map them to the target feature dimension, resulting in the final multi-head attention fusion output. This step integrates multi-view information, removes redundant features, and retains related information, providing high-quality input for the feature enhancement module.
[0065] In step S350, the feature enhancement module uses residual connections, layer normalization, and feedforward neural networks. Feature optimization is completed, and the formula is divided into two stages. The formula for the first stage is:
[0066] ,
[0067] Original environmental feature vector The residual connection is directly added to the output of multi-head attention fusion to ensure that basic information about environmental features is not lost and to avoid data dilution caused by deep fusion; layer normalization. Standardization processes bring the feature distribution closer to a mean of 0 and a variance of 1, reducing the impact of data fluctuations on the fusion effect and improving the stability of model training and inference. The formula for the second stage is:
[0068] ,
[0069] Feedforward Neural Network It consists of two fully connected layers, and the calculation method is as follows:
[0070] ,
[0071] in, This is the output of the feedforward neural network. For the input feature vector, , These are the weight matrices for the two fully connected layers. , These are the bias terms for the corresponding layers. Using the ReLU activation function, a non-linear feature transformation is achieved by setting the negative input to 0, thereby uncovering deep correlations in fused features and avoiding the gradient vanishing problem; Output results and The addition, or second-order residual connection, further preserves intermediate feature information. After layer normalization, the final output is a comprehensive fused state feature vector. This vector integrates shallow and deep nonlinear correlations between environmental and crop meteorological data, comprehensively reflecting the overall state of the greenhouse system and crop growth needs, providing precise and comprehensive state support for subsequent regulatory decisions.
[0072] Figure 4 This is a schematic diagram of the matrix generation process in the greenhouse multi-source adaptive and coordinated control method integrating crop physiological feedback provided by this invention. Figure 4 As shown, according to an embodiment of the present invention, a key matrix and a value matrix are obtained based on crop physiological feature vectors and external meteorological feature vectors, and a query matrix is obtained based on environmental feature vectors. The method includes: in step S321, a first fully connected layer is used to linearly transform the crop physiological feature vectors and map them to a first target feature dimension to obtain a first-dimensional crop physiological feature vector; in step S322, a second fully connected layer is used to linearly transform the external meteorological feature vectors and map them to a first target feature dimension to obtain a first-dimensional external meteorological feature vector; in step S323, a third fully connected layer is used to perform a second linear calibration on the first-dimensional crop physiological feature vectors and / or the first-dimensional external meteorological feature vectors, so that they are mapped to the same feature space; in step S324, the calibrated first-dimensional crop physiological feature vectors and the first-dimensional external meteorological feature vectors are concatenated dimensionally to obtain a first joint context feature; and a linear projection is performed on the first joint context feature to obtain a key matrix. In step S325, the crop physiological feature vector is linearly transformed using the fourth fully connected layer and mapped to the second target feature dimension to obtain the second-dimensional crop physiological feature vector; in step S326, the external meteorological feature vector is linearly transformed using the fifth fully connected layer and mapped to the second target feature dimension to obtain the second-dimensional external meteorological feature vector; in step S327, the second-dimensional crop physiological feature vector and / or the second-dimensional external meteorological feature vector are linearly calibrated using the sixth fully connected layer to map them to the same feature space; in step S328, the calibrated second-dimensional crop physiological feature vector and the second-dimensional external meteorological feature vector are concatenated by dimension to obtain the second joint context feature; a linear projection is performed on the second joint context feature to obtain the value matrix; in step S329, an independent linear layer is used to map the environmental feature vector to the same target feature space as the key matrix and the value matrix to obtain the query matrix; wherein, the projection process follows the following formula:
[0073] ,
[0074] ,
[0075] ,
[0076] In the formula, This is a query matrix for a multi-head attention mechanism, used for alignment and association calculation of multi-source features; it is an entity matrix carrying environmental features. For environmental feature vectors, This is an external meteorological feature vector. The key matrix, This is a crop physiological feature vector. For value matrices, , , , , These are the weight matrices for the corresponding mappings. This is a vector concatenation operation that merges crop physiological feature vectors and external meteorological feature vectors in order of feature dimension.
[0077] Specifically, step S321 is the initial step in adapting the crop physiological feature vector to the key matrix dimension. Through linear transformation of the first fully connected layer, the original crop physiological feature vector is accurately mapped to the preset first target feature dimension, forming the first-dimensional crop physiological feature vector. This transformation process is achieved through the weight matrix. Achieving a unified feature dimension ensures that crop physiological features are consistent with the processing dimensions of subsequent external meteorological features, eliminating dimensional barriers for the subsequent fusion of two types of heterogeneous features and ensuring the feasibility of subsequent correlation calculations.
[0078] Steps S322 and S321 work together to perform the same linear transformation operation on the external meteorological feature vector using the second fully connected layer, through the weight matrix. Mapping this to the first target feature dimension yields the first-dimensional external meteorological feature vector. This step ensures complete dimensional alignment between the crop physiological feature vector and the external meteorological feature vector, breaking down the dimensional barriers caused by the different sources and physical meanings of the two types of information. This lays the foundation for subsequent semantic calibration and fusion, ensuring the comparability and correlation of features in subsequent processing.
[0079] Step S323 focuses on the unified calibration of the semantic space. A third fully connected layer performs a second linear calibration on at least one class of the first-dimensional crop physiological feature vector and the first-dimensional external meteorological feature vector. Since the physical meanings of crop physiological features and external meteorological features are fundamentally different, even after dimensional unification, their semantic spaces may still have biases. The calibration process adjusts the distribution characteristics of the features, mapping the two types of vectors to the same feature space. This ensures that the feature components in the vectors have a consistent semantic benchmark, avoiding information misalignment or association distortion during subsequent fusion, and ensuring that the association calculation between features can truly reflect their intrinsic relationship.
[0080] Step S324 completes the generation of the bond matrix. First, the first-dimensional crop physiological feature vector and the first-dimensional external meteorological feature vector, after secondary calibration, are concatenated according to their feature dimensions. The operation integrates the effective information from the two types of features to form the first joint context feature. This joint feature retains the key information from both crop physiology and external meteorology, and also initially establishes the correlation between the two. The feature representation is further optimized through linear projection, ultimately generating a key matrix adapted for attention computation. This process follows the formula exactly:
[0081] ,
[0082] The mapping logic ensures that the key matrix can accurately carry the correlation between crops and meteorology.
[0083] Steps S325 to S328 replicate the key matrix generation logic, but adjust the target feature dimensions to meet the functional requirements of the value matrix, thereby achieving different feature representation emphases. Step S325 uses the fourth fully connected layer, leveraging the weight matrix... A linear transformation is performed on the crop physiological feature vector to map it to the second target feature dimension, resulting in the second-dimensional crop physiological feature vector; step S326 utilizes the fifth fully connected layer and the weight matrix The external meteorological feature vector is also mapped to the second target feature dimension to obtain the second-dimensional external meteorological feature vector; step S327 performs a second linear calibration on the two types of vectors through the sixth fully connected layer to ensure that they are in the same feature space; step S328 concatenates the calibrated vectors according to the dimensions to form the second joint context feature, and generates a value matrix after linear projection. The generation process of the value matrix strictly follows the formula:
[0084] ,
[0085] It carries the specific characteristics and details of crop physiology and external weather, and serves as the data carrier for subsequent attention-weighted fusion. It complements the association basis function of the key matrix, ensuring that the fusion process is both guided by association and supported by data.
[0086] Step S329 focuses on the independent generation of the query matrix, employing a linear layer independent of the key and value matrices, and using a weight matrix. Environmental feature vector Perform a linear transformation, following the formula: The mapping logic. This linear transformation precisely maps the environmental feature vectors to the key matrix. Sum matrix The same target feature space yields the query matrix. The design of independent linear layers avoids parameter interference during the generation of the query matrix, key matrix, and value matrix, ensuring that the query matrix can be based purely on environmental features. In subsequent attention calculations, it accurately associates crop-meteorological information in the key matrix, thereby filtering out the feature information most relevant to the current environmental state from the value matrix, providing a reliable query benchmark for the generation of dynamic attention weights.
[0087] Figure 5 This is a schematic diagram illustrating the training process of the information fusion model in the greenhouse multi-source adaptive collaborative regulation method integrating crop physiological feedback provided by this invention. Figure 5As shown, according to an embodiment of the present invention, the method further includes training the information fusion model, specifically including: in step S361, constructing a training dataset for the information fusion model, wherein the samples are environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors obtained after extracting features under different greenhouse environment scenarios and different crop growth stages, and the labels of the training dataset are greenhouse environment state reference labels or manually labeled multi-source information fusion weight reference labels for the corresponding samples; dividing the training dataset to obtain a training set and a validation set; in step S362, randomly initializing the trainable parameters of the linear projection layer, multi-head attention parallel computing layer, feedforward neural network, and layer normalization of the information fusion model, and setting the hyperparameters of the number of heads and key vector dimension of the multi-head attention mechanism; in step S363, the sample environmental feature vectors, sample crop physiological feature vectors, and sample external meteorological feature vectors in the training set are... The input is fed into the initialized information fusion model, and the multi-source information weighted fusion process of the information fusion model is executed to output the fusion state feature vector. In step S364, the loss value between the fusion state feature vector and the corresponding sample label is calculated. Based on the loss value, all trainable parameters of the information fusion model are updated through the backpropagation algorithm to complete one round of model training. In step S365, the generalization ability of the information fusion model after each round of training is verified using the validation set, and the validation loss value is calculated. In step S366, if it is confirmed that the validation loss value has not reached the preset convergence condition, the training hyperparameters such as learning rate and batch size are adjusted, and the steps starting from inputting the sample environmental feature vector, sample crop physiological feature vector, and sample external meteorological feature vector from the training set into the initialized information fusion model are repeated to continue iterative training until the validation loss value reaches the preset convergence condition. In step S367, the parameters of the trained information fusion model are saved.
[0088] Specifically, step S361 focuses on the construction and partitioning of the training dataset, providing a reliable foundation for model training through rich samples and clear labels. Sample collection covers diverse scenarios, including greenhouse operation data under different seasons, regions, and weather conditions, as well as the entire growth stage of crops from seedling to flowering and fruiting stages. Each sample consists of an environmental feature vector, a crop physiological feature vector, and an external meteorological feature vector after feature extraction, comprehensively covering the combination of multi-source information to ensure the model can learn the fusion rules under different scenarios. Two types of labels are set for the training dataset: greenhouse environmental state reference labels correspond to the optimal environmental fusion state for crop growth in the sample scenario, while manually labeled multi-source information fusion weight reference labels reflect the importance ratio of different information sources to the current regulatory scenario. These two types of labels provide clear optimization directions for model training. The dataset is partitioned into training and validation sets using a conventional ratio. The training set is used for model parameter learning, while the validation set is used to independently evaluate the model's generalization ability, avoiding overfitting due to limited data and ensuring that the training results are adaptable to complex real-world scenarios.
[0089] Step S362 involves initializing the model to provide a stable starting point for training. First, the trainable parameters of each major layer of the information fusion model are randomly initialized, including the weight matrix and bias of the linear projection layer, the association parameters of the multi-head attention parallel computation layer, the inter-layer weights of the feedforward neural network, and the scaling and offset parameters for layer normalization. Initialization values follow a normal or uniform distribution to ensure a balanced parameter distribution at the beginning of training, avoiding training getting stuck in local optima due to excessive initial parameter deviation. Simultaneously, key hyperparameters are set. The number of heads in the multi-head attention mechanism is reasonably selected based on the feature dimension and computational efficiency. The key vector dimension must be adapted to the feature vector dimension. The setting of hyperparameters directly affects the model's ability to capture multi-source information associations and training efficiency, laying the parameter foundation for subsequent iterative training.
[0090] Step S363 executes the forward propagation process of the training data, reproducing the actual operating logic of the model. Samples from the training set are input into the initialized information and fused into the model in batches. The model then sequentially passes through the linear projection module to complete the process. / / The matrix generation and multi-head attention parallel computing modules realize the weighted fusion of multi-source information, and the feature enhancement module optimizes the fusion result, finally outputting the fused state feature vector. The batch input method not only improves training efficiency, but also stabilizes the parameter update process through batch statistical characteristics, allowing the model to gradually master the fusion rules of multi-source information in batch sample learning, ensuring that each round of training can optimize parameters based on sufficient sample data.
[0091] Step S364 completes the backpropagation update of model parameters, optimizing the training. First, based on the label type, an appropriate loss function is selected to calculate the loss value between the fused state feature vector and the sample label. If the greenhouse environment state reference label is used, mean squared error loss is used to measure the numerical deviation between the two; if it is a multi-source information fusion weight reference label, cross-entropy loss is used to optimize the weight allocation accuracy. Based on the calculated loss value, the gradient of each trainable parameter is derived backward along the model architecture using the backpropagation algorithm, clarifying the direction of parameter adjustment. Then, the optimizer is used to update all parameters according to the gradient direction, reducing the loss value and completing a full round of model training, allowing the model to continuously optimize parameter configuration through error feedback.
[0092] Step S365 performs generalization capability verification to evaluate the model's actual adaptability. Samples from the validation set are input into the model after each training round, and the forward propagation process, consistent with the training process, is executed. The fused state feature vector of the validation set is output, and its validation loss value with the validation set labels is calculated. The validation loss value is a key indicator for judging model performance. If the training loss continuously decreases but the validation loss increases, it indicates that the model is overfitting and needs optimization through subsequent hyperparameter adjustments. If the validation loss decreases simultaneously with the training loss, it indicates that the model has good generalization ability and can adapt to new, unseen samples, ensuring stable performance in practical applications.
[0093] Step S366 iteratively optimizes the training process, continuously improving model performance. The preset convergence condition is that the validation loss value is less than a set threshold, or that the validation loss value no longer decreases significantly after multiple consecutive rounds of validation. If the validation loss value does not meet the convergence condition, the training hyperparameters need to be adjusted accordingly. For example, a learning rate decay strategy can be used to reduce the learning rate to avoid parameter oscillations, or the batch size can be adjusted to balance training efficiency and parameter update stability. Then, the process returns to step S363 to re-input the training set samples, repeating the forward propagation, parameter update, and validation evaluation process, continuously iterating until the validation loss value meets the convergence requirement, ensuring optimal model performance.
[0094] Step S367 completes the parameter saving of the trained model, solidifying the training results. The saved content includes all trainable parameters of the linear projection layer, multi-head attention layer, feedforward neural network, and layer normalization, and also records the optimal hyperparameter configuration during training. The saving format adopts a common model parameter file format, which is convenient for direct loading and calling during subsequent deployment, or for fine-tuning the model according to new scenario data, ensuring that the training results can be directly applied to actual greenhouse environment control scenarios and quickly exert the multi-source information fusion function of the model.
[0095] According to an embodiment of the present invention, the decision-making process of a deep reinforcement learning agent includes: First, extracting the actual values of indoor environmental control factors, crop physiological correlation control factors, and external meteorological influence control factors from a comprehensive fusion state feature vector. The indoor environmental control factors include air temperature, air humidity, light intensity, CO2 concentration, and soil temperature and humidity. The crop physiological correlation control factors include canopy temperature, transpiration rate, stem micro-changes, and leaf surface humidity. The external meteorological influence control factors include outdoor light intensity, temperature, humidity, wind speed, and wind direction. For each type of control factor, calculate... The deviation magnitude and direction between the actual value and the corresponding target value in the preset crop growth environment target are calculated to form a categorized and quantified deviation set. During the deviation calculation process, the deviation weights of various factors are dynamically adjusted according to the crop growth stage. Based on the categorized and quantified deviation set and the comprehensive fusion state feature vector, a control instruction set is generated through a strategy-evaluation dual-network architecture. The strategy network maps input features to continuous control parameters through a combination of multi-layer fully connected layers and nonlinear activation functions. The range of values for these continuous control parameters is normalized to match the physical motion range of the corresponding greenhouse actuator. The evaluation network calculates the action value function... Real-time assessment of the adaptability of continuous control parameters, action value function The calculation process incorporates the dynamic balance weights of the actuator action coupling coefficient, indoor environmental regulation factors, crop physiological correlation regulation factors, and external meteorological influence regulation factors to confirm the action value function. If the value is below a preset threshold, the evaluation results are fed back to the policy network, driving the policy network to iteratively optimize the continuous control parameters and suppress the functional cancellation between the actions of different actuators.
[0096] Specifically, the decision-making process of the deep reinforcement learning agent is based on a comprehensive fusion of state feature vectors and preset crop growth environment goals. It progressively generates and optimizes the set of regulatory instructions, ensuring the accuracy and coordination of regulatory actions. First, the agent accurately extracts the actual values of three key regulatory factors from the comprehensive fusion of state feature vectors. Indoor environmental regulatory factors include air temperature, air humidity, light intensity, CO2 concentration, and soil temperature and humidity; these indicators directly determine the basic environmental conditions for crop growth. Crop physiological regulatory factors include canopy temperature, transpiration rate, stem micro-changes, and leaf humidity, which directly reflect the crop's adaptability to the current environment and its growth status. External meteorological influence regulatory factors include outdoor light, temperature, humidity, wind speed, and wind direction, providing a basis for predicting the interference of the external environment on the indoor environment. These three types of factors comprehensively cover the main influencing dimensions of the greenhouse system, providing comprehensive and accurate state support for subsequent decision-making.
[0097] Next, the agent performs deviation calculations for each type of regulatory factor, comparing the actual value of each factor with the corresponding target value in the preset crop growth environment targets. This not only quantifies the magnitude of the deviation but also clarifies its direction, ultimately forming a categorized and quantified deviation set. During the deviation calculation process, the system flexibly adjusts the deviation weights of various factors according to the crop growth stage. For example, flowering crops are more sensitive to canopy temperature and air humidity than vegetative growth crops, so the deviation weights of these two factors are increased accordingly, while the weights of soil temperature and humidity are appropriately reduced. This ensures that the deviation assessment aligns with the main needs of different growth stages of the crop, making subsequent regulatory strategies more targeted.
[0098] Based on the classification-quantified deviation set and the comprehensive fusion state feature vector, the agent generates a set of control instructions through a policy-evaluation dual-network architecture. The policy network adopts a structure combining multi-layer fully connected layers and nonlinear activation functions to progressively map the input fusion features and deviation information into continuous control parameters. The value range of these continuous control parameters is normalized to accurately adapt to the physical motion range of the corresponding greenhouse actuator, making the parameter output match the actual motion capability of the actuator and enabling refined control.
[0099] The evaluation network calculates the action value function. Real-time adaptability evaluation of continuous control parameters generated by the policy network, action value function. The calculation process fully incorporates two key weights: first, the coupling coefficient of the actuator actions, used to quantify the degree of mutual influence between the actions of different actuators; second, the dynamic balance weights of indoor environmental regulation factors, crop physiological correlation regulation factors, and external meteorological influence regulation factors. The input to the evaluation network is a concatenation of the fused state feature vector and the regulation instruction set, and is calculated through the action value function. Quantitatively assess the collaborative adaptability of actions from multiple actuators. For example, when functions such as "heating + opening windows" or "cooling + dehumidifying" are detected to cancel each other out, the action value function is used. This will significantly reduce the need for iterative optimization of control parameters in the driving strategy network, thereby achieving decoupling and coordination of multiple actuators at the logic layer, avoiding energy waste and environmental imbalance. When the action value function... When the values fall below a preset threshold, it indicates a potential risk of functional offsetting between actuators or an imbalance in environmental factors. The evaluation network promptly feeds this assessment result back to the strategy network, driving iterative optimization of the continuous control parameters. Through repeated evaluation and feedback, the control parameters of each actuator are continuously adjusted, effectively suppressing functional offsetting between different actuators. This ensures that the final generated control instruction set can achieve coordinated operation of multiple actuators, taking into account the dynamic balance of various environmental control factors, and providing a stable and suitable greenhouse environment for crop growth.
[0100] This invention achieves precise decoupling of physical coupling between actuators through a Critic network of a deep reinforcement learning agent. Unlike the independent responses of each actuator in traditional control logic, the Critic network of this invention evaluates the action value function. The overall benefit of the control instruction set is predicted. Specifically, when the generated instruction set has functional offsetting effects between actuators, such as simultaneous start-up of cooling and heating, or conflict between ventilation and CO2 enhancement, the corresponding instruction set is limited by the preset energy consumption constraint and resource utilization efficiency term in the reward function. The value will decrease significantly. By feeding this low score evaluation (gradient) back to the Actor network, the Critic network forces the model to abandon mutually canceling regulatory logic during training, thereby achieving deep decoupling and collaborative optimization of multiple actuators at the logic layer.
[0101] According to an embodiment of the present invention, continuous control parameters constitute a control instruction set, which is a continuous numerical coordinated action vector. Each dimension corresponds one-to-one with a greenhouse actuator, and the continuous control parameters of each dimension are normalized values of the corresponding greenhouse actuator's action opening, operating speed, or working rate. The control instruction set is used to coordinate the control of at least two types of greenhouse actuators. The greenhouse actuators are selected from at least two of the following: skylights, fans, rolling shutters, supplemental lighting, CO2 generators, heaters, irrigation valves, and wet curtains. The control instruction set is a system control strategy that comprehensively considers the action coupling relationship between each greenhouse actuator and takes into account the dynamic balance of indoor environmental control factors, crop physiological correlation control factors, and external meteorological influence control factors.
[0102] Specifically, continuous control parameters are integrated into a control instruction set through structured integration. Its design revolves around precisely adapting to actuators, collaboratively avoiding action conflicts, and dynamically balancing multiple factors to ensure the operability and optimization effect of the control strategy. The control instruction set is presented as a continuous numerical collaborative action vector. Each dimension of the vector establishes a unique correspondence with a greenhouse actuator, i.e., one dimension per actuator. That is, one vector dimension specifically corresponds to only one particular greenhouse actuator, and one greenhouse actuator is controlled solely by one vector dimension. The number of dimensions perfectly matches the number of actuators being collaboratively controlled. For example, when simultaneously controlling three types of actuators—skylights, fans, and evaporative cooling pads—the vector contains three dimensions, each corresponding to the control parameters of the three types of actuators, achieving precise mapping.
[0103] The continuous control parameters for each dimension are normalized to the corresponding actuator's opening degree, operating speed, or working rate, based on the functional characteristics of the actuator. The value range is uniformly standardized within a fixed interval to ensure the standardization and consistency of parameter output. For actuators such as skylights and irrigation valves, whose primary action is opening and closing, the control parameters correspond to the opening degree, with the value directly reflecting the actuator's opening ratio. For rotating actuators such as fans, the parameters correspond to the operating speed, quantifying the speed of rotation. For actuators such as heaters and CO2 generators, whose primary function is power output, the parameters correspond to the working rate, reflecting the energy output intensity. Normalization ensures that parameters for different types and ranges of actuators are comparable, avoiding imbalances in control commands due to differences in physical ranges. It also facilitates signal conversion for subsequent programmable logic controllers, ensuring that parameters are accurately mapped to physical voltage or frequency signals recognizable by the actuator.
[0104] The goal of the control instruction set is to achieve coordinated control of at least two types of greenhouse actuators. The selection of actuators covers the main functional dimensions of greenhouse environmental control, including ventilation (skylights, fans), light regulation (roller curtains, supplemental lighting), temperature and humidity control (heaters, evaporative cooling pads), and nutrient supply (CO2 generators, irrigation valves). Users can select two or more types of actuators from eight preset categories to combine according to the actual configuration and control needs of the greenhouse. For example, for high temperature and high humidity scenarios, skylights and evaporative cooling pads can be selected to operate in coordination; for situations with insufficient light and low CO2 concentration, supplemental lighting and CO2 generators can be combined for coordinated control. By coordinating multiple actuators, the functional limitations of a single actuator can be compensated for, thereby improving control efficiency.
[0105] To avoid conflicts between the actions of multiple actuators, the control instruction set fully considers the coupling relationship between the actions of each actuator during the generation process. It learns the mutual influence rules of different mechanism actions in advance through a deep reinforcement learning agent. For example, opening the skylight will cause the indoor temperature and humidity to be affected by outdoor weather conditions, while the operation of the fan will accelerate the exchange of indoor and outdoor air. The actions of the two are closely coupled. When setting the skylight opening parameter, the instruction set will simultaneously match the fan speed to avoid the inefficiency of control caused by the skylight being wide open but the fan running at low speed, or the energy waste caused by heating while opening the window, ensuring that the actions of multiple mechanisms are consistent and complementary.
[0106] Meanwhile, the control instruction set takes into account the dynamic balance of indoor environmental control factors, crop physiological control factors, and external meteorological influence control factors. It does not unilaterally pursue the achievement of a single factor's target, but rather achieves synergistic adaptation of the three types of factors through multi-objective optimization. For example, when adjusting air temperature to meet the target of indoor environmental control factors, changes in crop canopy temperature (a crop physiological control factor) are considered simultaneously to avoid physiological stress on crops caused by sudden temperature changes. When cooling with evaporative cooling pads, the operating rate of the evaporative cooling pads is rationally controlled in conjunction with outdoor humidity and wind speed (external meteorological influence control factors) to prevent diseases caused by excessive indoor humidity. This dynamic balance design integrates the control instructions into a systematic control strategy, ensuring greenhouse environmental stability, meeting crop growth needs, and adapting to external meteorological changes, ultimately achieving precise, coordinated, and adaptive control of the greenhouse environment.
[0107] According to an embodiment of the present invention, the process of a deep reinforcement learning agent generating a set of control instructions and optimizing continuous control parameters is constrained by a reward function that integrates environmental deviation factors, energy consumption cost factors, and crop physiological stress factors. The reward function aims to maximize its value, guiding the iterative optimization direction of the strategy network. The environmental deviation factor is negatively correlated with the comprehensive deviation between the actual values and preset target values of indoor environmental control factors, crop physiological correlation control factors, and external meteorological influence control factors. The smaller the comprehensive deviation, the larger the value of the environmental deviation factor. The energy consumption cost factor is negatively correlated with the total energy consumption of the greenhouse actuator. The lower the comprehensive energy consumption of the greenhouse actuator, the larger the value of the energy consumption cost factor. The crop physiological stress factor is positively correlated with the suitability of the crop physiological correlation control factors. The closer the crop physiological correlation control factors are to the optimal growth state, the larger the value of the crop physiological stress factor. The reward function uses preset dynamic weight coefficients to perform a weighted summation of the environmental deviation factor, energy consumption cost factor, and crop physiological stress factor. The weight coefficients are dynamically adjusted according to the crop growth stage to ensure that the control instruction set achieves a dynamic balance between environmental deviation correction, energy consumption control, and crop physiological stress relief.
[0108] Specifically, throughout the entire process of generating regulatory instruction sets and optimizing continuous regulatory parameters, the deep reinforcement learning agent is consistently constrained by the reward function. Through the coordinated consideration and dynamic weight adjustment of three types of factors, it ensures that the regulatory strategy addresses multi-objective optimization needs. The design logic of the reward function is to provide a clear iterative direction for the strategy network by quantitatively evaluating the current regulatory effect. Its maximization objective directly corresponds to the demands of greenhouse environment regulation, namely, correcting environmental deviations and reducing energy costs while ensuring crop growth is not subject to physiological stress.
[0109] As a component of the reward function, the environmental deviation factor directly reflects the degree of fit between the three types of regulatory factors and the preset target values. Whether the actual values of indoor environmental regulatory factors conform to preset ranges such as air temperature and humidity, whether crop physiologically related regulatory factors are within suitable ranges such as canopy temperature and transpiration rate, and whether the dynamic changes of external meteorological influence regulatory factors are effectively adapted—the combined degree of deviation among these three factors determines the magnitude of the environmental deviation factor. A smaller overall deviation indicates a higher degree of fit between the current greenhouse environment and the optimal environment for crop growth, resulting in a larger environmental deviation factor value; conversely, a larger deviation leads to a smaller value. This negative correlation guides the strategy network to prioritize generating regulatory parameters that can reduce environmental deviation.
[0110] The energy cost factor focuses on the operational efficiency of greenhouse actuators, and its value is negatively correlated with the total energy consumption of all cooperating actuators. This characterizes the resource consumption and mechanical losses of the actuator, including penalties for changes in motion and instantaneous power consumption. The specific calculation formula is as follows:
[0111] .
[0112] In the formula, For the first Individual actuators (such as fans, skylights) in The normalized action value at time step. For Action value at any given moment Used to suppress frequent oscillations of the actuator to extend equipment life; This is the instantaneous power consumption function corresponding to the action. , These are the penalty coefficients for the change in motion and the instantaneous power consumption, respectively.
[0113] Whether it's the opening and closing of skylights, the rotation of fans, or the energy output of heaters and CO2 generators, the operation of various actuators generates energy consumption. The reward function quantifies and statistically analyzes this total energy consumption, causing the energy cost factor to increase as energy consumption decreases and decrease as energy consumption increases. This design prompts the policy network, when generating control instructions, to not only focus on environmental compliance and crop needs but also proactively avoid ineffective operation or excessive actions of actuators, minimizing energy waste while meeting control objectives and achieving a balance between energy conservation and control effectiveness.
[0114] Crop physiological stress factors are specifically used to assess crop growth fitness, and their values are positively correlated with the fitness of crop physiological regulatory factors. With canopy temperature difference as a constraint, the specific calculation formula is as follows:
[0115] .
[0116] In the formula, This represents the difference between crop canopy temperature and air temperature. This represents the optimal canopy temperature difference threshold corresponding to the crop growth stage. This is the compensation coefficient; when the canopy temperature difference exceeds the optimal threshold, the factor value increases with the increase of deviation (penalty enhancement), and the penalty is 0 when it is in the comfort range, ensuring priority protection of crop physiological safety.
[0117] Whether the crop canopy temperature is within the optimal range for photosynthesis, whether the transpiration rate reflects sufficient water supply, whether subtle changes in the stem reflect a normal growth rate, and whether leaf surface humidity is unlikely to trigger disease—the closer these physiological indicators are to the optimal growth state, the less physiological stress the crop experiences, and the higher the value of the crop physiological stress factor. The introduction of this factor allows the reward function to move beyond a purely environmental data-centric evaluation logic, shifting towards a crop-actual growth-oriented approach. This ensures that regulatory strategies truly align with the crop's physiological needs and avoids physiological stress responses triggered by environmental regulation.
[0118] The reward function uses preset dynamic weight coefficients to weight and sum three types of factors to form the final reward value. The dynamic adjustment of these weight coefficients is key to achieving a multi-objective dynamic balance. Different crop growth stages have varying needs regarding environment, energy consumption, and physiological state. For example, seedlings are highly sensitive to soil temperature, humidity, and light; therefore, the weights of indoor environmental regulation factors and crop physiological regulation factors are appropriately increased, while the weight of energy cost factors is moderately decreased. Once crops enter the flowering stage, the stability of canopy temperature and air humidity becomes crucial for pollination, further increasing the weights of crop physiological stress factors and indoor environmental regulation factors. During the fruiting stage, the need to balance yield and energy consumption becomes prominent, leading to corresponding adjustments in the weight of energy cost factors. Through this flexible weight allocation based on crop growth stages, the reward function guides the strategy network to generate control instruction sets with different focuses at different growth stages, ensuring a dynamic balance between environmental deviation correction, energy consumption control, and crop physiological stress mitigation, ultimately achieving precise, adaptive, and coordinated control of the greenhouse environment.
[0119] Figure 6 This is a block diagram of a greenhouse multi-source adaptive and coordinated control device integrating crop physiological feedback provided by the present invention. The present invention also provides a greenhouse multi-source adaptive and coordinated control device 100 integrating crop physiological feedback, as shown below. Figure 6As shown, it includes: a multi-source information sensing module 110, used to collect real-time environmental information inside the greenhouse, crop physiological information, and external meteorological information; the multi-source information sensing module includes an environmental sensor array, a crop physiological sensor group, and a communication interface for accessing data from an external meteorological station, all arranged inside the greenhouse; and an information fusion model subunit 120, which has a built-in information fusion model based on a multi-head attention mechanism, used to input environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors, and output a comprehensive fused state feature vector; the information fusion model is constructed based on a multi-head attention mechanism, using environmental feature vectors as queries, and crop physiological feature vectors and external meteorological feature vectors as inputs. The vectors are keys and values. Through scaling dot product attention calculation, multi-head parallel fusion, residual connection and layer normalization, the input multi-source feature vectors are adaptively weighted and fused. The collaborative regulation decision generation subunit 130 has a built-in deep reinforcement learning agent with deep deterministic policy gradient. It is used to generate a set of regulation instructions based on the comprehensive fused state feature vector and the preset crop growth environment target, using the intelligent decision model of deep reinforcement learning. The actuator driving module 140 is used to receive the set of regulation instructions and drive at least two kinds of greenhouse actuators to act according to the set of regulation instructions. The information collected by the multi-source information perception module 110 is processed to provide decision-making basis for the deep reinforcement learning agent.
[0120] According to an embodiment of the present invention, the system further includes: a data preprocessing and feature extraction subunit 150, used to preprocess the information collected by the multi-source information sensing module, and to extract time-domain features, frequency-domain features and / or spatial-domain features from the collected information to form environmental feature vectors, crop physiological feature vectors and external meteorological feature vectors; and a human-computer interaction and monitoring module 160, used to set preset crop growth environment targets, display greenhouse environment change curves, visualize the attention weights of the information fusion model, monitor the system operation status and issue abnormal alarms.
[0121] The greenhouse multi-source adaptive collaborative control device integrating crop physiological feedback of the present invention has a one-to-one correspondence with the above-mentioned greenhouse environment collaborative control method. The device is the hardware implementation carrier of the method. Each functional module is precisely adapted to the main steps and technical features of the method. The technical logic of the two is completely consistent and can be referenced by each other. The detailed implementation process of the device will not be elaborated here.
[0122] The specific correspondence is reflected in the following ways: the real-time acquisition function of the multi-source information sensing module 110 precisely corresponds to the steps in the method of real-time acquisition of greenhouse internal environmental information, crop physiological information, and greenhouse external meteorological information, providing raw data support for the entire control process; the processing logic of the data preprocessing and feature extraction subunit 150 completely matches the steps in the method of preprocessing and extracting features from the acquired multi-source information, forming environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors, realizing data standardization and effective representation; the information fusion model subunit 120 has a built-in information fusion model based on a multi-head attention mechanism, which is consistent with the steps in the method of constructing an information fusion model, inputting three types of feature vectors, and outputting a comprehensive fusion state feature vector, and mining the deep correlation of multi-source information through adaptive weighted fusion; and the collaborative control decision generation subunit 130 has a built-in deep deterministic strategy gradient. The deep reinforcement learning agent corresponds to the steps in the method of generating a control instruction set based on a comprehensive fusion of state feature vectors and preset crop growth environment targets, through a policy-evaluation dual network architecture, to complete intelligent decision-making and parameter optimization. The actuator driving module 140 receives the control instruction set and drives the corresponding greenhouse actuator to perform actions, which is consistent with the steps in the method where multiple greenhouse actuators execute the control instruction set, realizing the physical implementation of decision-making instructions. The human-computer interaction and monitoring module 160 supports the functions of preset crop growth environment targets, visualized attention weights, and operation status monitoring, adapting to the state tracking requirements in the preset target setting and closed-loop control in the method. The various modules of the device cooperate in a cyclical manner in the order of acquisition, processing, fusion, decision-making, execution, and monitoring, which is completely synchronized with the process in the method of returning real-time acquisition steps with preset fixed cycles to form closed-loop control, ensuring the continuity and adaptive adjustment of control.
[0123] Since the technical implementation of the device relies entirely on the logic of the method, the functions and operating procedures of each module match the steps and technical features of the method one by one. There is no need to elaborate on the details of the device. The working principle and implementation process of the device can be understood by referring directly to the specific implementation method of the above method.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A greenhouse multi-source adaptive and coordinated control method integrating crop physiological feedback, characterized in that, include: Real-time collection of information on the greenhouse's internal environment, crop physiological information, and external weather conditions; The collected information is preprocessed and features are extracted to form environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors. The environmental feature vector, the crop physiological feature vector, and the external meteorological feature vector are input into the information fusion model, and a comprehensive fusion state feature vector is output. The information fusion model is constructed based on a multi-head attention mechanism, using the environmental feature vector as the query and the crop physiological feature vector and the external meteorological feature vector as the key and value, and adaptively weighting and fusing the input multi-source feature vectors. Based on the comprehensive fusion state feature vector and the preset crop growth environment target, a deep reinforcement learning agent using a deep deterministic policy gradient outputs a set of control instructions. The deep reinforcement learning agent takes the comprehensive fusion state feature vector as input, calculates the deviation of each environmental control factor in conjunction with the preset crop growth environment target, and generates the control instruction set through a policy-evaluation dual-network architecture. The policy network maps the comprehensive fusion state feature vector to continuous control parameters, and the evaluation network uses an action value function... Evaluate the quality of control parameters to suppress the offsetting effects of actuator functions; Multiple greenhouse actuators execute the control instruction set and return to the real-time data acquisition step at a preset fixed cycle, forming a closed-loop control.
2. The method according to claim 1, characterized in that, Feature extraction is performed on the collected information, including: Extract time-domain features, frequency-domain features, and / or spatial-domain features from the internal environmental information of the greenhouse to generate the environmental feature vector; Extract time-domain features, frequency-domain features, and / or spatial-domain features from the crop physiological information to generate the crop physiological feature vector; Temporal, frequency, and / or spatial features are extracted from the external meteorological information of the greenhouse to generate the external meteorological feature vector.
3. The method according to claim 1, characterized in that, It also includes the step of constructing the information fusion model, specifically including: The information fusion model is sequentially connected to the linear projection module, the multi-head attention parallel computing module, and the feature enhancement module; The linear projection module is used to obtain a key matrix and a value matrix based on the crop physiological feature vector and the external meteorological feature vector, and to obtain a query matrix based on the environmental feature vector. The multi-head attention parallel computing module is used to calculate the dot product of the query matrix and the transpose of the key matrix, obtain dynamically calculated adaptive attention weights based on the dot product, and complete the information fusion of single-head attention using the adaptive attention weights and the value matrix. The information fusion of single-head attention is performed repeatedly, and the information fusion results of the multiple single-head attention operations are spliced together and linearly projected to obtain the multi-head attention fusion output result. The feature enhancement module is used to obtain the comprehensive fusion state feature vector based on the environmental feature vector and the multi-head attention fusion output result, through residual connection, layer normalization and feedforward neural network processing.
4. The method according to claim 3, characterized in that, The process of obtaining the key matrix and value matrix based on the crop physiological feature vector and the external meteorological feature vector, and obtaining the query matrix based on the environmental feature vector, includes: The crop physiological feature vector is linearly transformed by the first fully connected layer and mapped to the first target feature dimension to obtain the first dimension crop physiological feature vector. The external meteorological feature vector is linearly transformed using the second fully connected layer and mapped to the first target feature dimension to obtain the first-dimensional external meteorological feature vector. The first dimension crop physiological feature vector and / or the first dimension external meteorological feature vector are subjected to a second linear calibration using a third fully connected layer, so that the two are mapped to the same feature space. By concatenating the calibrated first-dimensional crop physiological feature vector and the first-dimensional external meteorological feature vector according to dimensions, the first joint context feature is obtained; A linear projection is performed on the first joint context features to obtain the key matrix; The crop physiological feature vector is linearly transformed using the fourth fully connected layer and mapped to the second target feature dimension to obtain the second-dimensional crop physiological feature vector. The external meteorological feature vector is linearly transformed using the fifth fully connected layer and mapped to the second target feature dimension to obtain the second-dimensional external meteorological feature vector. The second-dimensional crop physiological feature vector and / or the second-dimensional external meteorological feature vector are subjected to a second linear calibration using the sixth fully connected layer, so that the two are mapped to the same feature space. By concatenating the calibrated second-dimensional crop physiological feature vector and the second-dimensional external meteorological feature vector according to dimensions, a second joint contextual feature is obtained; A linear projection is performed on the second joint context feature to obtain the value matrix; The environmental feature vector is mapped to the same target feature space as the key matrix and the value matrix using an independent linear layer to obtain the query matrix; The projection process follows the formula below: , , , In the formula, The query matrix of the multi-head attention mechanism is used for the alignment and association calculation of multi-source features, and is an entity matrix carrying environmental features. The environmental feature vector, The external meteorological feature vector, The key matrix, This is the physiological feature vector of the crop. For the value matrix, , , , , These are the weight matrices for the corresponding mappings. This is a vector concatenation operation that merges crop physiological feature vectors and external meteorological feature vectors in order of feature dimension.
5. The method according to claim 3, characterized in that, It also includes the step of training the information fusion model, specifically including: The training dataset for the information fusion model is constructed. The samples are environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors obtained after extracting features under different greenhouse environment scenarios and different crop growth stages. The labels of the training dataset are greenhouse environment status reference labels for the corresponding samples or manually labeled multi-source information fusion weight reference labels. The training dataset is divided into training set and validation set. The linear projection layer, multi-head attention parallel computing layer, feedforward neural network, and layer normalization trainable parameters of the information fusion model are randomly initialized, and the hyperparameters of the number of heads and key vector dimension of the multi-head attention mechanism are set. The sample environmental feature vector, sample crop physiological feature vector, and sample external meteorological feature vector in the training set are input into the initialized information fusion model, and the multi-source information weighted fusion process of the information fusion model is executed to output the fusion state feature vector. Calculate the loss value between the fused state feature vector and the corresponding sample label, and update all trainable parameters of the information fusion model based on the loss value through the backpropagation algorithm to complete one round of model training. The generalization ability of the information fusion model after each round of training is verified using the validation set, and the validation loss value is calculated. If the verification loss value does not meet the preset convergence condition, after adjusting the training hyperparameters such as the learning rate and batch size, repeat the steps from the beginning of inputting the sample environmental feature vector, sample crop physiological feature vector, and sample external meteorological feature vector into the initialized information fusion model, and continue iterative training until the verification loss value meets the preset convergence condition. Save the parameters of the trained information fusion model.
6. The method according to claim 1, characterized in that, The decision-making process of the deep reinforcement learning agent includes: First, the actual values of indoor environmental regulation factors, crop physiological correlation regulation factors, and external meteorological influence regulation factors are extracted from the comprehensive fusion state feature vector. The indoor environmental regulation factors include air temperature, air humidity, light intensity, CO2 concentration, and soil temperature and humidity. The crop physiological correlation regulation factors include canopy temperature, transpiration rate, stem micro-changes, and leaf surface humidity. The external meteorological influence regulation factors include outdoor light, temperature, humidity, wind speed, and wind direction. For each type of regulatory factor, the deviation magnitude and direction between its actual value and the corresponding target value in the preset crop growth environment target are calculated to form a set of classified and quantified deviations. During the deviation calculation process, the deviation weights of each type of factor are dynamically adjusted according to the crop growth stage. Based on the classification quantification deviation set and the comprehensive fusion state feature vector, the control instruction set is generated through a policy-evaluation dual network architecture. The policy network maps the input features into continuous control parameters through a combination of multi-layer fully connected layers and nonlinear activation functions. The range of values of the continuous control parameters is normalized to match the physical motion range of the corresponding greenhouse actuator. The evaluation network calculates the action value function. The adaptability of the continuous control parameters is evaluated in real time, and the action value function is... The calculation process incorporates the dynamic balance weights of the actuator action coupling coefficient, the indoor environmental regulation factor, the crop physiological correlation regulation factor, and the external meteorological influence regulation factor to confirm the action value function. If the value is below a preset threshold, the evaluation result is fed back to the policy network, driving the policy network to iteratively optimize the continuous control parameters and suppress functional cancellation between the actions of different actuators.
7. The method according to claim 6, characterized in that, The continuous control parameters constitute the control instruction set, which is a continuous numerical coordinated action vector. Each dimension corresponds to a greenhouse actuator, and the continuous control parameters of each dimension are normalized values of the corresponding greenhouse actuator's action opening, operating speed, or working rate. The control instruction set is used to coordinate the control of at least two types of greenhouse actuators. The greenhouse actuators are selected from at least two of the following: skylights, fans, rolling shutters, supplemental lighting, CO2 generators, heaters, irrigation valves, and wet curtains. The control instruction set is a system control strategy that comprehensively considers the action coupling relationship between the various greenhouse actuators and takes into account the dynamic balance of the indoor environmental control factors, the crop physiological correlation control factors, and the external meteorological influence control factors.
8. The method according to claim 7, characterized in that, The process by which the deep reinforcement learning agent generates the set of control instructions and optimizes the continuous control parameters is constrained by a reward function that integrates environmental deviation factors, energy consumption cost factors and crop physiological stress factors. The reward function aims to maximize its value and guides the iterative optimization direction of the policy network. The environmental deviation factor is negatively correlated with the degree of comprehensive deviation between the actual values and the preset target values of the indoor environmental control factor, the crop physiological correlation control factor, and the external meteorological influence control factor. The smaller the comprehensive deviation, the larger the value of the environmental deviation factor. The energy cost factor is negatively correlated with the total energy consumption of the greenhouse actuator. The lower the overall energy consumption of the greenhouse actuator, the larger the value of the energy cost factor. The crop physiological stress factor is positively correlated with the fitness of the crop physiological related regulatory factor. The closer the crop physiological related regulatory factor is to the optimal growth state, the larger the value of the crop physiological stress factor. The reward function uses preset dynamic weighting coefficients to perform a weighted summation of the environmental deviation factor, the energy consumption cost factor, and the crop physiological stress factor. The weighting coefficients are dynamically adjusted according to the crop growth stage to ensure that the control instruction set achieves a dynamic balance between environmental deviation correction, energy consumption control, and crop physiological stress relief.
9. A greenhouse multi-source adaptive and coordinated control device integrating crop physiological feedback, characterized in that, include: The multi-source information sensing module is used to collect real-time environmental information inside the greenhouse, crop physiological information, and meteorological information outside the greenhouse. The multi-source information sensing module includes an environmental sensor array, a crop physiological sensor group, and a communication interface for accessing data from an external meteorological station, all arranged inside the greenhouse. The information fusion model subunit incorporates a multi-head attention-based information fusion model, which takes environmental feature vectors, crop physiological feature vectors, and external meteorological feature vectors as inputs and outputs a comprehensive fused state feature vector. The information fusion model is constructed based on a multi-head attention mechanism, using the environmental feature vector as the query and the crop physiological feature vector and external meteorological feature vector as the key and value, respectively. It adaptively weights and fuses the input multi-source feature vectors through scaled dot product attention calculation, multi-head parallel fusion, residual connections, and layer normalization. The collaborative regulation decision generation subunit has a built-in deep reinforcement learning agent with a deep deterministic policy gradient, which is used to generate a set of regulation instructions based on the comprehensive fusion state feature vector and the preset crop growth environment target using a deep reinforcement learning intelligent decision model. An actuator drive module is used to receive the control instruction set and drive at least two types of greenhouse actuators to operate according to the control instruction set. The information collected by the multi-source information perception module is processed to provide decision-making basis for the deep reinforcement learning agent.
10. The apparatus according to claim 9, characterized in that, Also includes: The data preprocessing and feature extraction subunit is used to preprocess the information collected by the multi-source information sensing module, and to extract time-domain features, frequency-domain features and / or spatial-domain features from the collected information to form the environmental feature vector, the crop physiological feature vector and the external meteorological feature vector. The human-computer interaction and monitoring module is used to set the preset crop growth environment target, display the greenhouse environment change curve, visualize the attention weight of the information fusion model, monitor the system operation status, and issue abnormal alarms.