Artificial Intelligence Control Method and System for Retractable Roof Greenhouses for Peach Tree Cultivation
By aligning environmental data with growth stages using dynamic time warping algorithm and tensor decomposition technique, and combining constraint-aware convolutional network to optimize greenhouse control strategy, the problems of insufficient data alignment and nonlinear interaction processing in existing greenhouse systems are solved, achieving precise environmental control and improved growth efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG FEICHENG MODERN FRUIT CO LTD
- Filing Date
- 2025-11-25
- Publication Date
- 2026-05-26
AI Technical Summary
Existing greenhouse environmental control systems have shortcomings in data alignment, nonlinear interaction, and handling of environmental constraints, resulting in a lack of precision and operability in control strategies, which affects the growth and yield of peach trees.
A dynamic time warping algorithm is used to adaptively align environmental data with the growth stage. Tensor decomposition is used to capture cross-modal nonlinear interaction relationships. Environmental constraints are explicitly embedded in a constraint-aware convolutional network to construct a photosynthetically effective radiation utilization index, optimize the control strategy, and update the strategy network.
It improves the accuracy of environmental factor mapping, captures cross-modal coupling relationships, ensures the feasibility and safety of control strategies, optimizes the greenhouse opening and closing roof control strategy, and adapts to the growth needs of peach trees.
Smart Images

Figure CN121455268B_ABST
Abstract
Description
Technical Field
[0001] With the continuous development of modern agricultural technology, greenhouse control systems play a crucial role in improving agricultural yields and optimizing crop growth environments. Especially in efficient and sustainable agricultural production, achieving precise coupling between the environment and crop growth has become an important research topic in agricultural science and technology. Peach trees, as a crop with relatively strict environmental requirements, are particularly sensitive to changes in environmental factors such as temperature, humidity, and light. Therefore, implementing precise environmental control within greenhouses is crucial for improving peach tree growth efficiency and fruit quality.
[0002] Currently, greenhouse environmental control systems generally rely on quantitative models or data-driven methods for environmental regulation. These methods typically utilize historical environmental data, meteorological conditions, and sensor inputs, combined with machine learning algorithms to predict crop growth requirements. However, existing technologies generally have certain limitations, such as the alignment between environmental data and crop growth stages, neglect of complex nonlinear interactions between environmental factors, and insufficient consideration of environmental constraints in control strategies. These shortcomings may lead to a lack of sufficient accuracy and operability in the control strategies generated by the system in practical applications, thereby affecting the growth and yield of peach trees.
[0003] Existing technologies have the following shortcomings in practical applications: They typically use linear interpolation or simple alignment methods to process data, lacking accuracy in aligning environmental data of different frequencies and growth stage labels, which may lead to incorrect environment-growth relationship mapping; conventional methods often ignore the complex interactions between environmental factors, causing the model to fail to effectively capture coupling patterns in multimodal environments, affecting the accuracy of environmental control strategies; traditional methods fail to effectively combine environmental constraints for feature extraction, which may lead to greenhouse control strategies that violate environmental limitations and fail to ensure that peach trees grow in the optimal growth environment; in the process of optimizing environmental control strategies, existing technologies often do not fully consider the balance between short-term environmental adjustments and long-term growth benefits, which can easily lead to good short-term effects but low long-term growth efficiency.
[0004] This invention relates to the fields of artificial intelligence and data processing technology, and in particular to an artificial intelligence control method and system for opening and closing greenhouses for peach tree cultivation. Background Technology
[0005] Therefore, this invention proposes an artificial intelligence control method and system for opening and closing roof greenhouses for peach tree planting to solve the above problems. Summary of the Invention
[0006] This invention addresses the shortcomings of existing technologies by developing an artificial intelligence control method and system for opening and closing roof greenhouses for peach tree cultivation. By accurately quantifying the impact of environmental factors, this invention can improve the safety and efficiency of greenhouse control and optimize growth benefits.
[0007] On the one hand, the technical solution of this invention to solve the technical problem is an artificial intelligence control method for a retractable roof greenhouse for peach tree planting, which includes the following steps:
[0008] S1. Deploy an IoT sensor network to collect greenhouse environmental data in real time, set the collection frequency, and label the collected data with growth stages;
[0009] Based on the collected multi-source data, the optimization tasks of the greenhouse roof opening and closing degree and the side window opening and closing degree are defined, and the action space is defined.
[0010] S2. Using a dynamic time warping algorithm, environmental data of different frequencies are adaptively aligned with growth stage labels to obtain aligned data.
[0011] S3. For the aligned data, tensor decomposition technology is used to fuse environmental features and agricultural operations to capture cross-modal nonlinear interaction relationships and obtain a fused feature matrix.
[0012] S4. Constraint-aware convolution is used to explicitly embed environmental constraints during the feature extraction process of the fused feature matrix to improve the safety of the control strategy and output constraint features.
[0013] S5. By constructing the photosynthetically effective radiation utilization rate and its sensitivity index, and then splicing it with the constraint features, the actual impact efficiency of environmental factors on growth is quantified, and the growth efficiency feature vector is obtained.
[0014] S6. Optimize the policy network. First, dynamically adjust the intensity of exploration noise according to the growth stage of the peach tree using a stage-adaptive exploration strategy. Then, calculate the dual-branch value function to evaluate the short-term environmental optimization benefits and long-term growth cumulative benefits, and dynamically adjust the weights of the two based on growth efficiency characteristics to obtain a comprehensive action value function. Next, select actions with enhanced constraints. Using constraint features and physical constraint models, project the actions output by the policy network onto the feasible space and introduce a constraint violation penalty term to output a penalized action value function. Finally, use a deterministic policy gradient algorithm to optimize the policy and use an adaptive mechanism to update the policy. Deploy the optimized and updated policy network into the greenhouse control system.
[0015] S7. Project the actions output by the optimized and updated strategy network onto the feasible space, and output the final control command. The command drives the greenhouse equipment through the actuator.
[0016] S1 is as follows:
[0017] The collected greenhouse environmental data included light intensity, carbon dioxide concentration, soil moisture, air temperature, leaf temperature, photosynthetically active radiation, fruit diameter, air humidity, soil electrical conductivity, and chlorophyll fluorescence index.
[0018] Set environmental data to be collected continuously at a frequency of one second;
[0019] Agricultural experts combined fruit morphology observations and leaf development status to make a comprehensive judgment, and labeled the collected environmental data with the label of peach tree growth stage.
[0020] S2 is as follows:
[0021] The collected environmental data is aggregated into mean features by hour to form an environmental feature sequence matrix;
[0022] definition The environmental feature sequence matrix has dimensions of . This represents the trend of multi-source environmental characteristics at the hourly granularity. Each row corresponds to the average environmental conditions for one hour, and each column corresponds to the time series of an environmental factor. The number of time steps is in the hourly range. The aggregation method involves aggregating second-level environmental data by performing an arithmetic average over an hourly window.
[0023] Based on the environmental feature sequence matrix and the growth stage sequence, the importance of each environmental factor is adjusted by the environmental factor weight coefficient preset by experts, and the historical best mean is used as the reference benchmark for stage correlation. The Euclidean distance matrix is calculated to quantify the difference between environmental data and growth stage. The growth stage sequence represents the growth stage sequence corresponding to each day in the total number of days d of the peach tree growth stage.
[0024] Based on the Euclidean distance matrix, the minimum cost curved path is solved by dynamic programming, and a time warp penalty term is introduced to control the penalty intensity of cross-stage mapping. The hourly environmental data is adaptively aligned with the day-level growth stage to obtain the minimum cost curved path.
[0025] Finally, the environmental feature sequence matrix is obtained through a minimum-cost tortuous path. The data is extracted to obtain an aligned data cube.
[0026] S3 is as follows:
[0027] The aligned data cube and the agricultural operation matrix are concatenated to form a fused third-order feature tensor. This fused third-order feature tensor unifies multimodal information. The agricultural operation matrix has the following dimensions: d represents the total number of days in the peach tree's growth stage. Indicates the number of agricultural operation types;
[0028] Based on the fusion of third-order feature tensors, the Tucker decomposition method is employed to approximate the original tensor through the product of the core tensor and the factor matrix, capturing the cross-modal nonlinear interaction relationships between the time dimension, environmental features, and agricultural operations. The core tensor represents the high-order cross-modal interaction patterns obtained through the Tucker decomposition method, with a dimension of [missing information]. The factor matrix includes Time factor matrix, characteristic factor matrix and operation factor matrix The dimensions are respectively , and , Describes the rank of the time dimension. Denotes the rank of the feature dimension. Denotes the rank of the operation dimension. This indicates the number of environmental factors in the collected environmental data;
[0029] Then, based on the core tensor and factor matrix, the core tensor is expanded into a vector through vectorization operations, and the factor matrix is flattened into a vector. Finally, a fusion feature matrix is formed through concatenation operations.
[0030] S4 is as follows:
[0031] Based on the fused feature matrix, the violation of each constraint condition is quantified by the indicator function and the normalized distance, and the penalty coefficient is mapped to generate the constraint matrix using the Sigmoid function.
[0032] Based on the fusion features and constraint matrix, the constraint matrix is used as a feature weight adjustment factor through the Hadamard product. The feature channel weights are adaptively enhanced when the constraints are violated through the operation of a multi-layer constraint-aware convolutional network, so as to obtain the constraint features output by each layer of constraint-aware convolution.
[0033] By using a multi-layer constraint-aware convolutional network to output constraint features, the first... Constraint features of the output of a layer constraint-aware convolutional network. This indicates the last layer.
[0034] S5 is detailed below:
[0035] Based on the increase in peach fruit diameter and cumulative photosynthetically active radiation, the photosynthetically active radiation utilization rate is calculated by using the ratio relationship and incorporating the previous day's fruit diameter for size effect correction. The photosynthetically active radiation utilization rate represents the increase in fruit diameter per unit of photosynthetically active radiation, serving as a quantitative indicator of growth efficiency.
[0036] Based on the photosynthetically active radiation utilization rate and its partial derivatives with respect to air temperature and light intensity, a growth efficiency feature vector is formed by combining splicing operations with constraint features. The growth efficiency feature vector represents the growth efficiency under environmental constraints and its sensitivity to key factors.
[0037] S6 is detailed below:
[0038] The specific phase-adaptive exploration strategy is as follows:
[0039] Based on growth stage labels and optimal exploration centers, the standard deviation of stage-adaptive exploration noise is generated in the form of a Gaussian kernel function. The optimal exploration center represents the optimal exploration center for the current growth stage as set according to agronomic knowledge.
[0040] Based on the deterministic actions and stage-adaptive exploration noise output by the parameterized policy network, exploration action vectors are generated by injecting Gaussian distributed noise. These exploration action vectors serve as the final actions executed by the environment. The input to the parameterized policy network is a state vector, which represents the state observed from the environment, including environmental features and growth stage information.
[0041] The specific calculation process of the two-branch value function is as follows:
[0042] Based on state vector, action vector and growth efficiency feature vector, short-term action value and long-term action value are output through two independent fully connected networks, respectively, to quantify the immediate environmental optimization benefits and cumulative growth benefits, and obtain short-term action value function and long-term action value function.
[0043] Based on short-term and long-term action value functions, the fusion weights are dynamically calculated through the growth efficiency feature vector, and a comprehensive action value function is generated. The strategy is then optimized using the comprehensive action value function.
[0044] The specific action selection operation for constraint enhancement is as follows:
[0045] Based on constraint features and physical constraints, the action vectors output by the policy network are mapped to the action space through a projection function so that the actions satisfy the physical constraints.
[0046] Define the projection action vector of the projection function as: Within the action space, the projected motion vector is The smallest deviation from the action vector indicates a feasible control action under physical constraints;
[0047] By introducing a constraint violation penalty term into the comprehensive action value function, the degree of violation is quantified based on constraint characteristics, and actions that violate the constraints are further prevented, resulting in an action value function with penalty.
[0048] On the other hand, the present invention also provides an artificial intelligence control system for a retractable roof greenhouse for peach tree planting, including modules for executing processing instructions for each step in the artificial intelligence control method for a retractable roof greenhouse for peach tree planting, including: an Internet of Things sensing module, a data alignment and fusion module, a constraint feature extraction module, a growth efficiency quantification module, a strategy network optimization module, and a control execution module;
[0049] The Internet of Things (IoT) sensing module is used to deploy a sensor network to collect multi-source data on the greenhouse environment in real time, set the collection frequency, and label the data according to the growth stages of peach trees. At the same time, it defines the optimization tasks and action space for the opening and closing of the greenhouse roof and side windows based on the collected data.
[0050] The data alignment and fusion module is used to adaptively align environmental data and growth stage labels of different frequencies using a dynamic time warping algorithm, and then use tensor decomposition technology to fuse environmental features and agricultural operations in the aligned data, capture cross-modal nonlinear interaction relationships, and output a fusion feature matrix.
[0051] The constraint feature extraction module is used to extract features from the fused feature matrix using constraint-aware convolution. During the extraction process, environmental constraints are explicitly embedded to improve the safety of the control strategy and output constraint features.
[0052] Growth efficiency quantification module: used to construct photosynthetically active radiation utilization rate and its sensitivity index, concatenate the index with constraint features, quantify the actual impact efficiency of environmental factors on peach tree growth, and output growth efficiency feature vector;
[0053] The strategy network optimization module is used to implement an adaptive exploration strategy during the execution phase to dynamically adjust the exploration noise intensity. It calculates the short-term environmental optimization benefits and long-term growth cumulative benefits through a two-branch value function and dynamically adjusts the weights based on the growth efficiency characteristics. After constraint-enhanced action selection, the actions are projected onto the feasible space and a constraint violation penalty term is introduced. The strategy optimization and update are completed using a deterministic strategy gradient algorithm and an adaptive mechanism, and the optimized strategy network is deployed to the control system.
[0054] Control execution module: It is used to receive the actions output by the strategy network and project them into the feasible space, generate the final control instructions, and drive the greenhouse roof and side windows to perform corresponding opening and closing actions through the actuators.
[0055] The effects described in the invention are merely those of the embodiments, and not all the effects of the invention. The above technical solutions have the following advantages or beneficial effects:
[0056] This invention employs a dynamic time warping algorithm to handle the nonlinear alignment of environmental data and growth stages, solving the problem of spurious environmental feature mapping caused by linear interpolation in conventional methods, thereby improving the mapping accuracy between growth stages and environmental factors. This invention also introduces multimodal environmental feature tensor fusion, using Tucker decomposition technology to extract cross-modal nonlinear interactions between environmental features and agricultural operations, overcoming the limitation of traditional methods in effectively capturing cross-modal coupling relationships. This invention uses a constraint-aware convolutional network to explicitly embed environmental constraints, automatically adjusting the weights of environmental constraints during feature extraction to ensure the feasibility of greenhouse control strategies and avoid generating control strategies that violate environmental limitations. Furthermore, this invention quantifies the actual impact of environmental factors on fruit growth through photosynthetically active radiation utilization rate and its sensitivity index. Combined with growth efficiency characteristics, it can accurately reflect the effect of environmental control on peach tree growth, thereby optimizing the greenhouse opening and closing control strategy.
[0057] In summary, this invention can accurately quantify the impact of environmental factors, improve the safety and effectiveness of regulation, and adapt to the growth needs of peach trees. Attached Figure Description
[0058] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0059] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0060] Figure 2 This is a comparison chart showing the alignment accuracy of the method of the present invention and existing methods at different growth stages.
[0061] Figure 3 This diagram illustrates the temperature control effects of the method of this invention compared to conventional methods.
[0062] Figure 4 This diagram illustrates the effect of the method of the present invention on air humidity control compared to conventional methods.
[0063] Figure 5 This diagram illustrates the effect of the method of this invention on the control of carbon dioxide concentration compared to conventional methods.
[0064] Figure 6 This is the interface for displaying the opening and closing degree of the greenhouse roof in the greenhouse control system.
[0065] Figure 7 This is the interface for displaying the opening and closing degree of the side windows in the greenhouse control system.
[0066] Figure 8 This is a display interface for motion vector feedback adjustment in a greenhouse control system. Detailed Implementation
[0067] To clearly illustrate the technical features of this solution, the invention will be described in detail below through specific implementation methods and in conjunction with the accompanying drawings.
[0068] Example 1
[0069] like Figure 1 As shown, an artificial intelligence-based control method for a retractable roof greenhouse for peach tree cultivation includes the following steps:
[0070] S1. Deploy an IoT sensor network to collect greenhouse environmental data in real time, set the collection frequency, and label the collected data with growth stages;
[0071] Based on the collected multi-source data, the optimization tasks of the greenhouse roof opening and closing degree and the side window opening and closing degree are defined, and the action space is defined.
[0072] S2. Using a dynamic time warping algorithm, environmental data of different frequencies are adaptively aligned with growth stage labels to obtain aligned data.
[0073] S3. For the aligned data, tensor decomposition technology is used to fuse environmental features and agricultural operations to capture cross-modal nonlinear interaction relationships and obtain a fused feature matrix.
[0074] S4. Constraint-aware convolution is used to explicitly embed environmental constraints during the feature extraction process of the fused feature matrix to improve the safety of the control strategy and output constraint features.
[0075] S5. By constructing the photosynthetically effective radiation utilization rate and its sensitivity index, and then splicing it with the constraint features, the actual impact efficiency of environmental factors on growth is quantified, and the growth efficiency feature vector is obtained.
[0076] S6. Optimize the policy network. First, dynamically adjust the intensity of exploration noise according to the growth stage of the peach tree using a stage-adaptive exploration strategy. Then, calculate the dual-branch value function to evaluate the short-term environmental optimization benefits and long-term growth cumulative benefits, and dynamically adjust the weights of the two based on growth efficiency characteristics to obtain a comprehensive action value function. Next, select actions with enhanced constraints. Using constraint features and physical constraint models, project the actions output by the policy network onto the feasible space and introduce a constraint violation penalty term to output a penalized action value function. Finally, use a deterministic policy gradient algorithm to optimize the policy and use an adaptive mechanism to update the policy. Deploy the optimized and updated policy network into the greenhouse control system.
[0077] S7. Project the actions output by the optimized and updated strategy network onto the feasible space, and output the final control command. The command drives the greenhouse equipment through the actuator.
[0078] In a specific implementation, S1 is as follows:
[0079] By deploying an Internet of Things (IoT) sensor network, real-time greenhouse environmental data is collected, including 10 environmental factors such as light intensity, carbon dioxide concentration, soil moisture, air temperature, leaf temperature, photosynthetically active radiation, fruit diameter, air humidity, soil electrical conductivity, and chlorophyll fluorescence index.
[0080] Environmental data is collected continuously at a rate of one second, forming a raw data stream at the second level. At the same time, agronomic experts manually label the growth stages of peach trees every day. The labeling categories include key physiological stages such as budding, flowering, and fruit enlargement. The labeling process needs to be combined with fruit morphological observation (such as changes in fruit diameter) and leaf development status for comprehensive judgment.
[0081] The optimization task is defined as dynamically optimizing the opening and closing degree of the greenhouse roof and side windows based on multi-source data, and the feasible action space is defined as follows. To maximize the photosynthetically active radiation utilization rate of peach trees while meeting strict environmental constraints, the photosynthetically active radiation utilization rate is defined as: As a quantitative indicator of growth efficiency, it represents the increase in fruit diameter produced by a unit of photosynthetically active radiation; the larger the value, the higher the light energy utilization efficiency.
[0082] In addition, optimizing tasks also requires balancing short-term environmental adjustment benefits with long-term growth accumulation benefits, quantifying immediate environmental optimization benefits and cumulative growth benefits through short-term action value and long-term action value, respectively.
[0083] In a specific implementation, since environmental data is collected every second, while fruit growth stage labels need to be manually labeled daily, the collection frequencies of the two are inconsistent. When the conventional linear interpolation method is used for alignment, false environmental features are introduced, causing the model to learn an incorrect mapping relationship between growth stages and environmental factors. This invention uses a dynamic time warping algorithm to adaptively align environmental data with growth stage labels at different frequencies. S2 is as follows:
[0084] 1) Constructing an environmental feature sequence matrix
[0085] The raw environmental data is aggregated hourly into mean features, forming an environmental feature sequence matrix to reduce data granularity while retaining key trends. Specifically,
[0086] definition The environmental feature sequence matrix has dimensions of . This characterizes the trend of multi-source environmental features at the hourly granularity. Each row corresponds to the average environmental conditions for one hour, and each column corresponds to the time series of an environmental factor.
[0087] This represents the number of time steps in hours, which is the number of time points after aggregation.
[0088] For environmental characteristics, the preferred settings are... This is equivalent to the number of environmental factors covered.
[0089] In practice, the aggregation method is to aggregate the original second-level environmental data by arithmetic average in hourly windows. That is, for each environmental factor, the mean of all second-level data within an hour is calculated to form an hourly feature sequence.
[0090] In one embodiment, environmental characteristics include light intensity, carbon dioxide concentration, soil moisture, air temperature, leaf temperature, photosynthetically active radiation, fruit diameter, air humidity, soil electrical conductivity, and chlorophyll fluorescence index.
[0091] 2) Calculate the distance matrix of growth stages
[0092] Based on the environmental feature sequence matrix and growth stage sequence, the importance of each environmental factor is adjusted by the environmental factor weight coefficient, and the historical best mean is used as a reference benchmark for stage correlation. An Euclidean distance matrix is calculated to quantify the difference between environmental data and growth stages, thereby assessing the degree of matching between environmental features and stage labels. This is represented as:
[0093]
[0094] In the formula, This represents the element in the i-th row and j-th column of the distance matrix D, which characterizes the element in the distance matrix. Hour and the The Euclidean distance between natural growth stages is used to assess the degree of matching between environmental characteristics and stage labels;
[0095] For hourly indexes, the preferred value range is set to [value range]. ;
[0096] For the day index, the preferred value range is set to [value range]. ;
[0097] The total number of days refers to the total number of days in the growth stage label, that is, the number of days from the start of planting to the current observation period. The specific value is determined according to the actual growth cycle, such as the peach tree growth cycle, which is usually 90-120 days.
[0098] For environmental factor indexing, in one implementation, the preferred value range is [value range missing]. This corresponds to 10 environmental factors in environmental characteristics;
[0099] Indicates the first The weight coefficients of each environmental factor satisfy the following conditions: It is preset by expert experience and is used to adjust the contribution of different environmental factors in distance calculation;
[0100] Represents the environmental feature sequence matrix The element in the i-th row and k-th column represents the element in the environmental feature sequence matrix. Hour The values of each environmental factor;
[0101] Indicates the first The growth stages of a peach tree on a given day, such as the budding stage, flowering stage, and fruit enlargement stage, are determined by manual labeling or agronomic models to indicate the tree's physiological state on that day.
[0102] Indicates the first Natural growth stage Next The historical best mean of each environmental factor is used as a stage-related reference benchmark.
[0103] During implementation, weighting coefficients are preset using expert scoring or analytic hierarchy process (AHP). Experts score environmental factors based on their impact on peach tree growth; for example, light intensity has a higher weight, while soil electrical conductivity has a lower weight. The weighting is then normalized to meet the following criteria. Example These correspond to 10 environmental factors, namely light intensity, carbon dioxide concentration, soil moisture, air temperature, leaf temperature, photosynthetically active radiation, fruit diameter, air humidity, soil electrical conductivity, and chlorophyll fluorescence index.
[0104] During implementation, the historical best mean Based on historical data statistics, the first step is to collect data on the growth stages of historical planting. Next For each environmental factor, the mean of all observed values is calculated as the historical best mean. For example, for At that time, light intensity data corresponding to all historical flowering periods were collected, and the average value was calculated as the historical best average.
[0105] 3) Dynamic time warping and alignment
[0106] Based on the distance matrix of growth stages, a minimum-cost curved path is solved through dynamic programming, and a time warp penalty term is introduced to control the penalty intensity of cross-stage mapping, thereby achieving adaptive alignment between hourly environmental data and day-level growth stages. The resulting minimum-cost curved path is expressed as:
[0107]
[0108] In the formula, Representing the minimum cost curved path, it is a mapping sequence of hourly and daily indices, used to determine the optimal alignment between environmental data and growth stages;
[0109] This indicates the search for the path that minimizes the objective function;
[0110] This represents the time warp penalty coefficient, with a preferred value of [value missing]. This is used to control the penalty intensity for cross-stage mapping;
[0111] This represents the total number of hours.
[0112] It should be noted that, The term represents the time warp penalty term, used to avoid unreasonable cross-stage mapping and constrain the degree of time deviation of the alignment path, where and Standardize the hourly and daily time coordinates separately to penalize the non-linear mapping between environmental data and growth stage labels on the time scale, such as matching early environmental data to later stages, to avoid excessive distortion leading to pseudo-alignment and improve the rationality of stage-environment mapping.
[0113] 4) Output aligned data cube
[0114] definition This represents an aligned data cube with dimension 1. The format corresponds to [number of days × hours × environmental characteristics], using the least cost curved path. From the environmental feature sequence matrix Extracting data Specifically, for each growth stage, from the environmental feature sequence matrix Select the 24-hour data block corresponding to the hourly index to form... The cubes are precisely matched to the growth stages, representing the sequence of environmental conditions for each 24-hour period.
[0115] In a specific implementation, since the aligned environmental data includes continuous sensor data and discrete agricultural operation data, conventional feature stitching methods ignore the nonlinear interactions between different modes, causing the model to be unable to effectively capture cross-modal coupling patterns such as "high light intensity requires simultaneous high carbon dioxide levels." Therefore, this invention utilizes tensor decomposition technology to fuse environmental features and agricultural operations to capture cross-modal nonlinear interaction relationships, as detailed in S3 below:
[0116] 1) Constructing the feature tensor
[0117] Align the data cube By concatenating it with the agricultural operation matrix, a fused third-order feature tensor is formed. To uniformly represent multimodal information such as time, environmental characteristics, and agricultural operations;
[0118] definition This represents the agricultural operation matrix, with dimensions of [missing information]. ,in For the number of days, The optimal setting is determined by the number of agricultural operation types. Each column of the agricultural operation matrix corresponds to an agricultural operation type, including irrigation operations. Fertilization operations pruning operation Pharmaceutical operations ;
[0119] This represents the fused third-order feature tensor with dimension . The format corresponds to [number of days × hours × (environmental characteristics + agricultural operations)], which uniformly encodes the time dimension, environmental characteristics and agricultural operations, represents the interaction structure of multimodal information, and facilitates the capture of cross-modal coupling patterns.
[0120] 2) Tensor decomposition feature interaction
[0121] Based on the fusion of third-order feature tensors, the Tucker decomposition method is adopted. The original tensor is approximated by the product of the core tensor and the factor matrix, thereby capturing the cross-modal nonlinear interaction relationship between the time dimension, environmental features, and agricultural operations, achieving feature dimensionality reduction and interaction extraction, as expressed in:
[0122]
[0123] In the formula, This represents an approximate decomposition, specifically an approximate relation for tensor Tucker decomposition, which approximates the fused third-order feature tensor by multiplying the core tensor and the factor matrix. To extract low-dimensional latent features;
[0124] Represents the core tensor, with dimension . It is learned through the Tucker decomposition algorithm and represents the high-order interaction patterns across modalities.
[0125] For the rank of the time dimension, the preferred setting is... The number of latent factors characterizing time modes;
[0126] For the rank of the feature dimension, it is preferred to set... The number of potential factors characterizing environmental features and agricultural operations;
[0127] For the rank of the operation dimension, the preferred setting is... The number of potential factors characterizing agricultural operation modes;
[0128] This indicates a product operation of the tensor along the first modulus;
[0129] This indicates a product operation of the tensor along the second modulus;
[0130] This indicates a product operation of the tensor along the third modulus;
[0131] Represents the time factor matrix, with dimension 1. It learns from tensor decomposition and captures latent patterns in the time dimension;
[0132] Represents the feature factor matrix, with dimension . This is used to capture latent patterns of environmental features and agricultural operations, where the total dimension of environmental features and agricultural operations is 14, learned from tensor decomposition, to capture latent patterns of environmental features and agricultural operations.
[0133] This represents the operation factor matrix, with dimension 1. The underlying structure representing agricultural operations is learned from tensor decomposition.
[0134] 3) Feature fusion and output
[0135] Based on the core tensor and factor matrix, the core tensor is expanded into vectors through vectorization operations, and the factor matrix is flattened into vectors. Then, a concatenation operation is performed to form a fused feature matrix, achieving a compact representation of multimodal environmental features and capturing the nonlinear interactions between time, environment, and operations. This is represented as:
[0136]
[0137] In the formula, It represents a fused feature matrix, a compact representation of multimodal environmental features, and fully captures the nonlinear interactions between time, environment, and operation;
[0138] Indicates vectorization operation, The term expands the core tensor into a vector;
[0139] This indicates the operation of flattening a matrix into a vector;
[0140] This indicates a splicing operation.
[0141] In a specific implementation, peach tree growth is subject to rigid environmental constraints, such as a flowering temperature requirement of 5°C. Conventional feature extraction methods may ignore the risk of constraint violation, potentially leading to the generation of infeasible greenhouse control strategies. This invention employs constraint-aware convolution to explicitly embed environmental constraints during feature extraction, thereby enhancing the safety of the control strategy. S4 is detailed below:
[0142] 1) Generate the constraint matrix
[0143] Based on the fused feature matrix, the violation of each constraint is quantified using an indicator function and normalized distance. A sigmoid function is then used to map the penalty coefficients to generate a constraint matrix, thus characterizing the overall degree of violation of environmental constraints by the fused features, expressed as:
[0144]
[0145] In the formula, The constraint matrix, representing a quantitative indicator of constraint violation, characterizes the overall degree to which fusion features violate environmental constraints, with a value range of [value range missing]. The closer the value is to 1, the more serious the violation.
[0146] This represents the Sigmoid activation function;
[0147] To determine the number of constraints, it is preferable to set... ;
[0148] Indicates the constraint index;
[0149] This indicates an indicator function that outputs 1 when the condition is true and 0 otherwise.
[0150] Indicates the first The environmental feature values involved in each constraint condition are derived from the fusion feature matrix. The values mapped back to the original environmental features are obtained through feature indexes, for example, if the feature matrix is fused. If the temperature feature is located in a specific dimension, then the value of that dimension is directly extracted as... ;
[0151] Indicates the first The lower limit of the safe range of each constraint condition. Indicates the first The upper limit of the safety range of a constraint condition. Characterizing the first The safe range of each constraint is determined by agronomic knowledge;
[0152] Indicates the first The midpoint value of the safe range of each constraint condition is denoted as... .
[0153] In the specific implementation process, the preferred five constraints are air temperature. air humidity Light intensity Soil moisture carbon dioxide concentration .
[0154] In the specific implementation process, the safety range is determined by agronomical knowledge, such as the corresponding temperature constraints. , Lighting constraints , .
[0155] 2) Constraint-aware convolution
[0156] Based on the fused features and constraint matrix, the constraint matrix is used as a feature weight adjustment factor through the Hadamard product. This achieves adaptive enhancement of feature channel weights when constraints are violated during convolution operations, thereby outputting constraint features. This makes the network focus more on regions that violate constraints, improving the safety of feature extraction. This can be represented as:
[0157]
[0158] In the formula, Indicates the first The constraint-aware convolution output features constrained characteristics, representing features under environmental constraints. When a constraint is violated, the weights of the corresponding feature channels are increased, causing the network to focus more on regions that violate the constraints. This avoids the model generating infeasible control strategies and improves the safety of feature extraction. hour ;
[0159] For convolutional layer index, ;
[0160] To constrain the total number of layers in a perceptual convolutional network, the optimal settings are: ;
[0161] This represents the modified linear unit activation function, used to introduce nonlinearity;
[0162] This represents the convolution kernel weight matrix, with dimension 1. , are trainable parameters, with the format corresponding to [kernel height × kernel width × number of input channels × number of output channels], where the number of input channels 228 corresponds to the fused feature dimension, and the number of output channels 64 is the preset output feature dimension;
[0163] Indicates the convolution operation;
[0164] Indicates the first Layer fusion feature input, when The time is the initial fusion feature ;
[0165] Represents the Hadamard product;
[0166] The bias term representing the convolution operation is a trainable parameter with dimension . .
[0167] It should be noted that, The term represents the constraint modulation factor, which increases the weight of the corresponding feature channel when the constraint is violated, making the network pay more attention to the feature regions that violate the constraint. By introducing constraint priors, the model is prevented from generating infeasible control strategies, thus improving the safety of feature extraction.
[0168] 3) Output constraint features
[0169] By using a multi-layer constraint-aware convolutional network to output constraint features, the features output by the multi-layer constraint-aware convolutional network are defined as follows: ,definition Indicates the first The constraint features output by the layer constraint-aware convolution are 64-dimensional feature vectors.
[0170] In a specific implementation, the present invention quantifies the actual impact efficiency of environmental factors on growth by constructing a photosynthetically active radiation utilization rate and its sensitivity index, as detailed in S5 below:
[0171] 1) Calculate the photosynthetically active radiation utilization rate
[0172] Based on the increase in fruit diameter and cumulative photosynthetically active radiation, the photosynthetically active radiation utilization rate is calculated by using a ratio relationship and incorporating the previous day's fruit diameter for size effect correction. This rate characterizes the increase in fruit diameter per unit of photosynthetically active radiation and serves as a quantitative indicator of growth efficiency, expressed as:
[0173]
[0174] In the formula, It represents the photosynthetically active radiation utilization rate, which is a quantitative indicator of growth efficiency. It characterizes the increase in fruit diameter produced by a unit of photosynthetically active radiation. The larger the value, the higher the light energy utilization efficiency.
[0175] This represents the increase in fruit diameter over 24 hours, calculated as follows: ;
[0176] Index for the current time point, Represents a point in time 24 hours ago;
[0177] τ is the integral variable, representing the index of the time point that is distinct from t;
[0178] Represents an integral infinitesimal element;
[0179] For the first The fruit diameter at any given time can be measured using a sensor. Characterizes the fruit diameter 24 hours prior;
[0180] Indicates the first The photosynthetically active radiation sensor reading at time τ represents the photosynthetically active radiation value at time τ, and is obtained directly from environmental data.
[0181] 2) Constructing a growth efficiency feature vector
[0182] Based on the photosynthetically active radiation utilization rate and its partial derivatives with respect to air temperature and light intensity, a growth efficiency feature vector is formed by combining splicing operations with constraint features. This vector characterizes the growth efficiency under environmental constraints and its sensitivity to key factors, expressed as:
[0183]
[0184] In the formula, This represents the growth efficiency feature vector, characterizing the growth efficiency under environmental constraints and its sensitivity to key factors;
[0185] Indicates the photosynthetically active radiation utilization rate as a function of air temperature. The partial derivatives of the partial derivatives are used to characterize the marginal effect of air temperature on growth efficiency through differential calculation of historical data.
[0186] Air temperature;
[0187] Indicates the photosynthetically active radiation utilization rate as a function of light intensity. The partial derivatives of light intensity are used to characterize the marginal effect of light intensity on growth efficiency through differential calculation of historical data.
[0188] Light intensity.
[0189] S6 is detailed below:
[0190] In a specific implementation, the present invention dynamically adjusts the intensity of the exploration noise according to the growth stage of the peach tree to achieve differentiated and precise control. The stage-adaptive exploration strategy is as follows:
[0191] 1) Generation of stage exploration coefficients
[0192] Based on growth stage labels and optimal exploration centers, the standard deviation of stage-adaptive exploration noise is generated using a Gaussian kernel function to adapt to the control precision requirements of different growth stages and achieve dynamic adjustment of exploration intensity, expressed as:
[0193]
[0194] In the formula, The standard deviation of the adaptive exploration noise in the phase is used to control the exploration intensity;
[0195] This represents the basic exploration intensity coefficient, with preferred settings. Set a baseline level for the intensity of exploration;
[0196] Represents the natural exponential function;
[0197] This indicates the optimal exploration center for the current growth stage, set according to agronomic knowledge, such as the flowering period. , expansion stage ;
[0198] For the day index, the preferred value range is set to [value range]. ;
[0199] This indicates the stage width parameter, and the preferred setting is... Control the decay rate of exploration intensity as it changes with the stage.
[0200] In the specific implementation process, the optimal exploration center at the current growth stage Based on agronomical knowledge, and specifically considering the precise environmental control requirements at different growth stages of peach trees (e.g., flowering requires meticulous regulation, but the exploration intensity is low), the following settings were implemented. However, the fruit enlargement period allows for greater exploration intensity, therefore, it is set .
[0201] 2) Action Exploration
[0202] Based on the deterministic actions output by the parameterized policy network and the stage-adaptive exploration noise, an exploration action vector is generated by injecting Gaussian distributed noise, thereby achieving differentiated exploration based on the growth stage in action selection, as expressed below:
[0203]
[0204] In the formula, This represents the exploration action vector, which serves as the final action executed by the environment. Stage-adaptive Gaussian noise is injected into the action output by the policy network.
[0205] For parameterized policy networks, The term represents the deterministic action output by the parameterized policy network;
[0206] This represents the state vector, which is the state observed from the environment at time step t, including environmental features and growth stage information, specifically the growth efficiency feature vector. With constraint features The splicing has 131 dimensions;
[0207] This indicates that the mean is 0 and the covariance matrix is... Gaussian noise;
[0208] Represents the identity matrix.
[0209] In practice, the parameterized policy network specifically adopts a pre-defined deep neural network, with the input state vector... It outputs deterministic actions, and the parameters of the deep neural network are optimized through training.
[0210] In a specific implementation, this invention constructs a dual-branch action value function to evaluate short-term environmental optimization gains and long-term growth cumulative gains, and dynamically adjusts the weights of both based on growth efficiency characteristics, thereby achieving a balance between short-term and long-term gains in the control strategy. The dual-branch value function is calculated as follows:
[0211] 1) Construct a dual-branch action value network
[0212] Based on the state vector, action vector, and growth efficiency feature vector, two independent fully connected networks are used to output the short-term action value and long-term action value, respectively, thereby quantifying the immediate environment optimization benefit and the cumulative growth benefit, as expressed below:
[0213]
[0214]
[0215] In the formula, This represents the short-term action value function, evaluating the state vector. In the corresponding state, take action vectors The immediate environmental optimization benefits obtained after the corresponding action;
[0216] Represents the long-term action value function, evaluating the state vector. In the corresponding state, take action vectors Predictions of the long-term cumulative benefits of fruit growth following the corresponding actions;
[0217] The action vector represents the opening / closing top control action output by the policy network, and its dimension is... The preferred setting is the dimension of the action vector. The corresponding opening degree of the roof and the opening degree of the side windows are expressed as follows: ;
[0218] It is a Short-Term Action Value (STF) fully connected neural network. The parameters of the STF fully connected neural network are: The preferred network structure is set to 3 hidden layers, each with 128 neurons, using the ReLU activation function;
[0219] It is a Long-Term Action Value (LTV) fully connected neural network. The parameters of the LTV fully connected neural network are: The network structure is preferably set to 3 hidden layers, each with 128 neurons, using the ReLU activation function.
[0220] In practice, although the short-term action value fully connected neural network and the long-term action value fully connected neural network have the same network structure, their parameters differ. and They are independently initialized and trained. Through different training objectives, the short-term value network learns to estimate the immediate environmental optimization benefits, such as the effect of current temperature and humidity regulation, while the long-term value network learns to estimate the cumulative growth benefits, such as actual yield and quality. During training, the short-term value function is updated using immediate reward signals, while the long-term value function is updated using discounted cumulative rewards, thus enabling them to capture values at different time scales.
[0221] It should be noted that the dimension of the action vector This corresponds to two consecutive actions in greenhouse control: the opening / closing degree of the roof (range [0,1]) and the opening / closing degree of the side windows (range [0,1]), where 0 represents completely closed and 1 represents completely open. For example... Figure 6 and Figure 7 The images shown are the display interfaces for the opening and closing of the roof and side windows in the greenhouse control system.
[0222] 2) Value Integration and Advantage Calculation
[0223] Based on short-term and long-term action value functions, the fusion weights are dynamically calculated using the growth efficiency feature vector, and a comprehensive action value function is generated for policy optimization, expressed as:
[0224]
[0225] In the formula, This represents the comprehensive action value function, which integrates short-term and long-term value functions through dynamic weights to provide a value estimate that balances short-term environmental optimization and long-term growth benefits. It is used for policy gradient updates, enabling the control policy to achieve a balance between immediate adjustment and long-term benefits.
[0226] This represents the fusion weight vector, which is 2-dimensional, has a value range of (0,1), and a sum of 1. It is used to dynamically adjust the contributions of short-term and long-term values, and its calculation method is expressed as follows: ;
[0227] The fusion weights, representing the short-term action value function, are the fusion weight vector. The first element, with a value range of (0,1), is used to adjust the contribution of short-term value to the overall value;
[0228] The fusion weights, representing the long-term action value function, are the fusion weight vector. The second element, with a value range of (0,1), is used to adjust the contribution of long-term value to the overall value.
[0229] This represents the fusion weight matrix, with dimension 1. , are trainable parameters;
[0230] This represents the fusion bias vector, which is 2-dimensional and consists of trainable parameters.
[0231] This represents the softmax function.
[0232] In a specific implementation, the invention utilizes constraint features and a physical constraint model to project the actions output by the policy network into the feasible space, and introduces a constraint violation penalty term to ensure the feasibility of the actions. The specific action selection for constraint enhancement is as follows:
[0233] 1) Motion constraint projection
[0234] Based on constraint features and physical constraints, the actions output by the policy network are mapped to the action space through a projection function, thereby ensuring that the actions satisfy the physical constraints.
[0235] Specifically, definition Represents the projected action vector in the action space. Inside, and with the action vector The smallest deviation represents a feasible control action under physical constraints, such as the opening degree of the roof and side windows being within the range of [0,1]. Actions that might violate constraints are adjusted to feasible actions, preventing the control system from executing infeasible operations. The action constraint projection operation is represented as... ;
[0236] Represents the action vector The projection operator projects the action vector. Projected into feasible space The constraints followed are ;
[0237] Represents the action space, represented as , and Indicates the minimum and maximum values of the action, corresponding to the range of opening and closing angles;
[0238] Indicates the space of action. Any action vector in the vector is a variable in the projection optimization;
[0239] Indicates the minimum value of the action, preferred setting. ;
[0240] Indicates the maximum value of the action, preferred setting. ;
[0241] express 3D real vector space;
[0242] Indicates the space of action. Find the action vector that minimizes the objective function. ;
[0243] This represents the L2 norm, also known as the Euclidean norm.
[0244] In its implementation, the action projection operation solves an optimization problem to transform the action vectors output by the policy network. Projected into the movable space Specifically, by finding actionable space Neutral with action vector The action with the shortest Euclidean distance That is, the projected action vector The corresponding action is the closest action vector in the feasible space. The point is determined to ensure that the action meets the physical constraints.
[0245] 2) Restraints and penalties for violations
[0246] A constraint violation penalty term is introduced into the action value function. Based on the constraint characteristics, the degree of violation is quantified to further prevent actions that violate the constraints. This is expressed as:
[0247]
[0248] In the formula, This represents a penalty-based action value function, which reduces the value of actions that violate constraints, encourages the policy to choose feasible actions, and improves the safety and feasibility of the control policy.
[0249] Indicates the penalty coefficient, preferably set. Control the intensity of punishment;
[0250] Represents action vector The degree of constraint violation, combined with action space violation and environmental constraint violation, is expressed as: ;
[0251] This indicates an indicator function that outputs 1 when the condition is true and 0 otherwise.
[0252] Indicates the first A feasible subspace defined by constraints;
[0253] This represents the constraint index, specifically the dimension index of the action space box constraint, with a value range of [value missing]. ;
[0254] Represents action vector In the Distance that violates constraints in a dimension, if ,but ,if ,but ,otherwise ;
[0255] Represents action vector The first in The value of the nth element, i.e., the nth... The specific values of each control action, such as the degree of opening or closing of the roof or the side window;
[0256] Indicates environmental constraint weights, preferred settings This is used to adjust the intensity of the penalty for violating environmental constraints within the total penalty;
[0257] This represents the L1 norm.
[0258] In a specific implementation, the online strategy optimization and adaptive update are as follows:
[0259] Based on exploration action vectors Interacting with the environment, the system collects state-action-reward sample data online, calculates temporal difference error using a two-branch action value function, and synchronously updates policy network parameters, short-term value network parameters, and long-term value network parameters through gradient backpropagation.
[0260] Policy optimization employs a deterministic policy gradient algorithm to synthesize the action value function. To optimize the objective, the driving policy network is updated in the direction of enhancing overall value.
[0261] The standard deviation of the adaptive exploration noise in each phase is dynamically adjusted through an adaptive update mechanism. When the prediction error of the model continues to increase at a specific growth stage (such as the fruit enlargement period), the basic exploration intensity coefficient η is automatically increased to enhance exploration.
[0262] Furthermore, based on the growth efficiency eigenvector Real-time correction of fusion weight matrix When the PUL index decreases, the weight of long-term value is increased to ensure that the strategy prioritizes the cumulative growth benefits of the fruit.
[0263] The updated strategy network is deployed to the greenhouse control system in real time, forming a closed-loop optimization process of "interaction-evaluation-update".
[0264] In a specific implementation, S7 is as follows:
[0265] After training, the artificial intelligence control method for opening and closing greenhouses entered the actual deployment stage, realizing automated and intelligent greenhouse environment management.
[0266] The system first collects multi-source environmental data in real time through a sensor network, including 10 factors such as light intensity, temperature, humidity, and carbon dioxide concentration, and transmits them to the central processing unit at a frequency of one second. At the same time, manual labeling of peach trees' growth stages, such as budding stage or flowering stage, is used as auxiliary input.
[0267] The collected data undergoes dynamic alignment processing between environmental data and growth stages. A dynamic time warping algorithm aggregates second-level environmental data into hour-level features, which are then adaptively matched with growth stage labels to form an aligned data cube. A multimodal environmental feature tensor fusion module combines the aligned data with agricultural operations (such as irrigation and fertilization), extracting cross-modal interaction features through tensor decomposition. An environmental constraint feature extraction module uses a constraint-aware convolutional network to embed hard environmental constraints (such as temperature and safe range), generating constraint features to enhance control safety. A growth efficiency feature construction module calculates photosynthetically active radiation utilization and its sensitivity, quantifying the actual impact of environmental factors on growth. A stage-adaptive exploration strategy dynamically adjusts exploration noise based on the current growth stage, ensuring refined control actions. A bi-branch value function calculates short-term and long-term returns and generates a comprehensive action value through value fusion to guide strategy optimization.
[0268] Finally, the constraint-enhanced action selection module projects the actions output by the policy network onto the feasible space to avoid violating physical constraints and outputs the final control commands, such as the opening and closing degree of the roof and the opening and closing degree of the side windows.
[0269] The aforementioned commands drive greenhouse equipment via actuators, adjusting the internal environment in real time. The system continuously monitors data and periodically updates the model to maintain the accuracy and adaptability of the control, thereby improving peach tree growth efficiency and fruit quality. Figure 8 The image shows the interface for motion vector feedback adjustment in a greenhouse control system.
[0270] Example 2
[0271] An artificial intelligence control system for a retractable roof greenhouse for peach tree cultivation includes modules for executing processing instructions for each step in the artificial intelligence control method for a retractable roof greenhouse for peach tree cultivation, including: an Internet of Things sensing module, a data alignment and fusion module, a constraint feature extraction module, a growth efficiency quantification module, a strategy network optimization module, and a control execution module;
[0272] The Internet of Things (IoT) sensing module is used to deploy a sensor network to collect multi-source data on the greenhouse environment in real time, set the collection frequency, and label the data according to the growth stages of peach trees. At the same time, it defines the optimization tasks and action space for the opening and closing of the greenhouse roof and side windows based on the collected data.
[0273] The data alignment and fusion module is used to adaptively align environmental data and growth stage labels of different frequencies using a dynamic time warping algorithm, and then use tensor decomposition technology to fuse environmental features and agricultural operations in the aligned data, capture cross-modal nonlinear interaction relationships, and output a fusion feature matrix.
[0274] The constraint feature extraction module is used to extract features from the fused feature matrix using constraint-aware convolution. During the extraction process, environmental constraints are explicitly embedded to improve the safety of the control strategy and output constraint features.
[0275] Growth efficiency quantification module: used to construct photosynthetically active radiation utilization rate and its sensitivity index, concatenate the index with constraint features, quantify the actual impact efficiency of environmental factors on peach tree growth, and output growth efficiency feature vector;
[0276] The strategy network optimization module is used to implement an adaptive exploration strategy during the execution phase to dynamically adjust the exploration noise intensity. It calculates the short-term environmental optimization benefits and long-term growth cumulative benefits through a two-branch value function and dynamically adjusts the weights based on the growth efficiency characteristics. After constraint-enhanced action selection, the actions are projected onto the feasible space and a constraint violation penalty term is introduced. The strategy optimization and update are completed using a deterministic strategy gradient algorithm and an adaptive mechanism, and the optimized strategy network is deployed to the control system.
[0277] Control execution module: It is used to receive the actions output by the strategy network and project them into the feasible space, generate the final control instructions, and drive the greenhouse roof and side windows to perform corresponding opening and closing actions through the actuators.
[0278] Example 3
[0279] like Figure 2 As shown, to verify the accuracy advantage of the proposed dynamic time warping algorithm in the growth stage alignment task, the method of this invention will be compared with three different data alignment techniques: linear interpolation, nearest neighbor, and linear interpolation. Linear interpolation is a commonly used data processing method in conventional greenhouse control, which forces data of different frequencies to be aligned to the same time scale through linear calculation; the nearest neighbor method is another benchmark method, directly using the data from the most recent time point as the representative of the current stage. For example... Figure 2 The experimental results shown demonstrate that the method of this invention is significantly superior to conventional methods in terms of alignment accuracy. Figure 2 The actual growth stage curves showed the best fit with the predicted curves of the proposed method, while the predicted curves of linear interpolation and nearest neighbor methods exhibited significant deviations at stage transitions. Experimental results demonstrate that the dynamic time warping algorithm can more accurately capture the nonlinear relationship between environmental data and growth stages, avoiding spurious feature mappings caused by simple interpolation in conventional methods.
[0280] Example 4
[0281] like Figures 3 to 5 As shown, the effect of constraint-sensing control on improving greenhouse environmental stability is verified. Environmental stability is an important guarantee for ensuring the healthy growth of peach trees. The experiment compares the constraint-sensing control method proposed in this invention with conventional control methods in terms of temperature ( Figure 3 ),humidity( Figure 4 ) and carbon dioxide concentration ( Figure 5 The experiment assessed the effects of regulation on three key environmental parameters. The conventional control method employed a traditional greenhouse environmental control approach based on a fixed threshold and a simple proportional-integral-differential algorithm. The experimental setup simulated 24-hour environmental changes. The horizontal axis represents time in hours, and the vertical axis represents temperature (degrees Celsius), air humidity (percentage), and carbon dioxide concentration (ppm), respectively. The safe upper and lower limits for each environmental parameter are also indicated in the figure. Figures 3 to 5 The results show that the method of this invention can strictly control various environmental parameters within a safe range, and the fluctuation range is significantly smaller than that of conventional methods. Especially in temperature control, the method of this invention avoids extreme high and low temperatures, maintains a more stable level in humidity control, and also exhibits better stability in carbon dioxide concentration regulation. The experimental results demonstrate that this invention, through explicit embedding of environmental constraints into a constraint-aware convolutional network, can effectively identify and avoid constraint violations, generate a safer and more reliable control strategy, and provide more stable environmental conditions for peach tree growth.
[0282] Although the specific embodiments of the invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the invention. Based on the technical solutions of the invention, various modifications or variations that can be made by those skilled in the art without creative effort are still within the scope of protection of the invention.
Claims
1. An artificial intelligence control method for a retractable roof greenhouse for peach tree cultivation, characterized in that, Includes the following steps: S1. Deploy an IoT sensor network to collect environmental data in the greenhouse in real time, set the collection frequency, and label the collected data with growth stages. Based on the collected multi-source data, the optimization tasks of the greenhouse roof opening and closing degree and the side window opening and closing degree are defined, and the action space is defined. S2. Using a dynamic time warping algorithm, environmental data of different frequencies are adaptively aligned with growth stage labels to obtain aligned data. S3. For the aligned data, tensor decomposition technology is used to fuse environmental features and agricultural operations to capture cross-modal nonlinear interaction relationships and obtain a fused feature matrix. S4. Constraint-aware convolution is used to explicitly embed environmental constraints during the feature extraction process of the fused feature matrix to improve the safety of the control strategy and output constraint features. S5. By constructing the photosynthetically effective radiation utilization rate and its sensitivity index, and then splicing it with the constraint features, the actual impact efficiency of environmental factors on growth is quantified, and the growth efficiency feature vector is obtained. S5 is detailed below: Based on the increase in peach fruit diameter and cumulative photosynthetically active radiation, the photosynthetically active radiation utilization rate is calculated by using the ratio relationship and incorporating the previous day's fruit diameter for size effect correction. The photosynthetically active radiation utilization rate represents the increase in fruit diameter per unit of photosynthetically active radiation, serving as a quantitative indicator of growth efficiency. Based on the photosynthetically active radiation utilization rate and its partial derivatives with respect to air temperature and light intensity, a growth efficiency feature vector is formed by combining splicing operations with constraint features. The growth efficiency feature vector represents the growth efficiency under environmental constraints and its sensitivity to key factors. S6. Optimize the policy network. First, dynamically adjust the intensity of exploration noise according to the growth stage of the peach tree using a stage-adaptive exploration strategy. Then, calculate the dual-branch value function to evaluate the short-term environmental optimization benefits and long-term growth cumulative benefits, and dynamically adjust the weights of the two based on growth efficiency characteristics to obtain a comprehensive action value function. Next, select actions with enhanced constraints. Using constraint features and physical constraint models, project the actions output by the policy network onto the feasible space and introduce a constraint violation penalty term to output a penalized action value function. Finally, use a deterministic policy gradient algorithm to optimize the policy and use an adaptive mechanism to update the policy. Deploy the optimized and updated policy network into the greenhouse control system. S7. Project the actions output by the optimized and updated strategy network onto the feasible space, and output the final control command. The command drives the greenhouse equipment through the actuator.
2. The artificial intelligence control method for a retractable roof greenhouse for peach tree planting according to claim 1, characterized in that, S2 is as follows: The collected environmental data is aggregated into mean features by hour to form an environmental feature sequence matrix; definition The environmental feature sequence matrix has dimensions of . This represents the trend of multi-source environmental characteristics at the hourly granularity. Each row corresponds to the average environmental conditions for one hour, and each column corresponds to the time series of an environmental factor. The number of time steps is in the hourly range. The aggregation method involves aggregating second-level environmental data by performing an arithmetic average over an hourly window. Based on the environmental feature sequence matrix and the growth stage sequence, the importance of each environmental factor is adjusted by the environmental factor weight coefficient preset by experts, and the historical best mean is used as the reference benchmark for stage correlation. The Euclidean distance matrix is calculated to quantify the difference between environmental data and growth stage. The growth stage sequence represents the growth stage sequence corresponding to each day in the total number of days d of the peach tree growth stage. Based on the Euclidean distance matrix, the minimum cost curved path is solved by dynamic programming, and a time warp penalty term is introduced to control the penalty intensity of cross-stage mapping. The hourly environmental data is adaptively aligned with the day-level growth stage to obtain the minimum cost curved path. Finally, the environmental feature sequence matrix is obtained through a minimum-cost tortuous path. The data is extracted to obtain an aligned data cube.
3. The artificial intelligence control method for a retractable roof greenhouse for peach tree planting according to claim 1, characterized in that, S3 is as follows: The aligned data cube and the agricultural operation matrix are concatenated to form a fused third-order feature tensor. This fused third-order feature tensor unifies multimodal information. The agricultural operation matrix has the following dimensions: d represents the total number of days in the peach tree's growth stage. Indicates the number of agricultural operation types; Based on the fusion of third-order feature tensors, the Tucker decomposition method is employed to approximate the original tensor through the product of the core tensor and the factor matrix, capturing the cross-modal nonlinear interaction relationships between the time dimension, environmental features, and agricultural operations. The core tensor represents the high-order cross-modal interaction patterns obtained through the Tucker decomposition method, with a dimension of [missing information]. The factor matrix includes Time factor matrix, characteristic factor matrix and operation factor matrix The dimensions are respectively , and , Describes the rank of the time dimension. Denotes the rank of the feature dimension. Denotes the rank of the operation dimension. This indicates the number of environmental factors in the collected environmental data; Then, based on the core tensor and factor matrix, the core tensor is expanded into a vector through vectorization operations, and the factor matrix is flattened into a vector. Finally, a fusion feature matrix is formed through concatenation operations.
4. The artificial intelligence control method for a retractable roof greenhouse for peach tree planting according to claim 1, characterized in that, S4 is as follows: Based on the fused feature matrix, the violation of each constraint condition is quantified by the indicator function and the normalized distance, and the penalty coefficient is mapped to generate the constraint matrix using the Sigmoid function. Based on the fusion features and constraint matrix, the constraint matrix is used as a feature weight adjustment factor through the Hadamard product. The feature channel weights are adaptively enhanced when the constraints are violated through the operation of a multi-layer constraint-aware convolutional network, so as to obtain the constraint features output by each layer of constraint-aware convolution. By using a multi-layer constraint-aware convolutional network to output constraint features, the first... Constraint features of the output of a layer constraint-aware convolutional network. This indicates the last layer.
5. The artificial intelligence control method for a retractable roof greenhouse for peach tree planting according to claim 1, characterized in that, The specific phase-adaptive exploration strategy is as follows: Based on growth stage labels and optimal exploration centers, the standard deviation of stage-adaptive exploration noise is generated in the form of a Gaussian kernel function. The optimal exploration center represents the optimal exploration center for the current growth stage as set according to agronomic knowledge. Based on the deterministic actions and stage-adaptive exploration noise output by the parameterized policy network, exploration action vectors are generated by injecting Gaussian distributed noise. These exploration action vectors serve as the final actions executed by the environment. The input to the parameterized policy network is a state vector, which represents the state observed from the environment, including environmental features and growth stage information.
6. The artificial intelligence control method for a retractable roof greenhouse for peach tree planting according to claim 1, characterized in that, The specific calculation process of the two-branch value function is as follows: Based on state vector, action vector and growth efficiency feature vector, short-term action value and long-term action value are output through two independent fully connected networks, respectively, to quantify the immediate environmental optimization benefits and cumulative growth benefits, and obtain short-term action value function and long-term action value function. Based on short-term and long-term action value functions, the fusion weights are dynamically calculated through the growth efficiency feature vector, and a comprehensive action value function is generated. The strategy is then optimized using the comprehensive action value function.
7. The artificial intelligence control method for a retractable roof greenhouse for peach tree planting according to claim 1, characterized in that, The specific action selection operation for constraint enhancement is as follows: Based on constraint features and physical constraints, the action vectors output by the policy network are mapped to the action space through a projection function so that the actions satisfy the physical constraints. Define the projection action vector of the projection function as: Within the action space, the projected motion vector is The smallest deviation from the action vector indicates a feasible control action under physical constraints; By introducing a constraint violation penalty term into the comprehensive action value function, the degree of violation is quantified based on constraint characteristics, and actions that violate the constraints are further prevented, resulting in an action value function with penalty.
8. The artificial intelligence control method for a retractable roof greenhouse for peach tree planting according to claim 1, characterized in that, S1 is as follows: The collected greenhouse environmental data included light intensity, carbon dioxide concentration, soil moisture, air temperature, leaf temperature, photosynthetically active radiation, fruit diameter, air humidity, soil electrical conductivity, and chlorophyll fluorescence index. Set environmental data to be collected continuously at a frequency of one second; Agricultural experts combined fruit morphology observations and leaf development status to make a comprehensive judgment, and labeled the collected environmental data with the label of peach tree growth stage.
9. An artificial intelligence control system for a retractable roof greenhouse for peach tree cultivation, characterized in that: The system includes modules for executing the processing instructions of each step in the artificial intelligence control method for opening and closing roof greenhouses for peach tree planting as described in any one of claims 1 to 8, including: an Internet of Things sensing module, a data alignment and fusion module, a constraint feature extraction module, a growth efficiency quantification module, a strategy network optimization module, and a control execution module; The Internet of Things (IoT) sensing module is used to deploy a sensor network to collect multi-source data on the greenhouse environment in real time, set the collection frequency, and label the data according to the growth stages of peach trees. At the same time, it defines the optimization tasks and action space for the opening and closing of the greenhouse roof and side windows based on the collected data. The data alignment and fusion module is used to adaptively align environmental data and growth stage labels of different frequencies using a dynamic time warping algorithm, and then use tensor decomposition technology to fuse environmental features and agricultural operations in the aligned data, capture cross-modal nonlinear interaction relationships, and output a fusion feature matrix. The constraint feature extraction module is used to extract features from the fused feature matrix using constraint-aware convolution. During the extraction process, environmental constraints are explicitly embedded to improve the safety of the control strategy and output constraint features. Growth efficiency quantification module: used to construct photosynthetically active radiation utilization rate and its sensitivity index, concatenate the index with constraint features, quantify the actual impact efficiency of environmental factors on peach tree growth, and output growth efficiency feature vector; The strategy network optimization module is used to implement an adaptive exploration strategy during the execution phase to dynamically adjust the exploration noise intensity. It calculates the short-term environmental optimization benefits and long-term growth cumulative benefits through a two-branch value function and dynamically adjusts the weights based on the growth efficiency characteristics. After constraint-enhanced action selection, the actions are projected onto the feasible space and a constraint violation penalty term is introduced. The strategy optimization and update are completed using a deterministic strategy gradient algorithm and an adaptive mechanism, and the optimized strategy network is deployed to the control system. Control execution module: It is used to receive the actions output by the strategy network and project them into the feasible space, generate the final control instructions, and drive the greenhouse roof and side windows to perform corresponding opening and closing actions through the actuators.
Citation Information
Patent Citations
Greenhouse multi-model information fusion based methods and system for regulating and controlling greenhouse environment
CN102937785A
Greenhouse environment control method based on adaptive control vector parameterization
CN116820158A