A cloud platform-based garden fertilization optimization method

By constructing a garden fertilization action matrix and an iterative completion model, and combining causal gain and cost-risk rules, a dynamic fertilization plan is generated, which solves the problems of the scientificity and adaptability of fertilization strategies in complex garden environments, and achieves efficient resource utilization and plant nutrient balance.

CN123180670APending Publication Date: 2026-11-27NINGBO FUJIN GARDEN & IRRIGATION EQUIP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611683969.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies are insufficient to accurately assess the true causal effects of fertilization actions in different management units at different time points in complex garden environments, lacking scientific rigor and dynamic adaptability.

Method used

By constructing a fertilization action matrix, an outcome matrix, a covariate matrix, and a neighborhood exposure matrix, and using iterative completion and marginal structure models to calculate causal gains, a fertilization plan is generated in conjunction with preset cost and risk rules, and the action value table is iteratively updated based on actual execution feedback to achieve dynamic fertilization decision-making.

Benefits of technology

It improves the scientific nature, robustness, and resource utilization of fertilization strategies, ensures the accuracy and adaptability of fertilization plans, and reduces resource waste and plant nutrient imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180670A_ABST
    Figure CN123180670A_ABST
Patent Text Reader

Abstract

The application discloses a kind of garden fertilization optimization methods based on cloud platform, it is related to data processing technical field, including obtaining garden business data and resource configuration data, based on garden business data constructs fertilization action matrix, result matrix, covariant matrix and neighborhood exposure matrix, and generates corresponding observation instruction matrix;According to corresponding observation instruction matrix, iteration is completed to result matrix and covariant matrix, and output is completed result matrix group;Based on completed result matrix group, fertilization action matrix and neighborhood exposure matrix, marginal structure model is constructed to calculate causal gain, and first action value table is generated in combination with preset cost risk rule;In current time slice, based on first action value table, decidable domain mark, resource configuration data and current action generation rule, fertilization plan is generated and decision risk check is solved, and fertilization plan instruction is issued.The scientificity, robustness and resource utilization rate of fertilization strategy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a cloud-based method for optimizing garden fertilization. Background Technology

[0002] With the development of smart landscaping, fertilization, as a key maintenance step, directly impacts plant growth and ecological benefits. Traditional fertilization relies mainly on manual experience or static guidelines, typically performed at fixed intervals and dosages. However, the landscape environment is highly complex in terms of time and space. Plant growth is not only affected by dynamic covariates such as current soil and weather conditions, but also by the cumulative lag effect of historical fertilization actions and the neighboring exposure effect. Existing technologies struggle to comprehensively process multi-source, heterogeneous landscape business data, and lack effective imputation methods to address the prevalent data gaps in real-world scenarios. This often leads to fertilization strategies deviating from the optimal solution, failing to adapt to dynamic environmental changes, and easily resulting in resource waste or nutrient imbalances in plants.

[0003] Currently, Chinese invention patent application CN116721348A discloses an automated fertilization control system and method for landscape seedlings. It first acquires images of seedlings using a camera, then extracts multi-scale feature vectors from the images, and finally determines whether fertilization is needed based on these feature vectors. This allows for grayscale processing and analysis of the seedling images using deep learning-based machine vision technology, leveraging the growth status information of the seedlings within the images for intelligent control of fertilization operations. This optimizes the fertilization effect and efficiency for landscape seedlings, ensuring their normal growth. Summary of the Invention

[0004] The technical problem solved by this invention is that related technologies are difficult to accurately assess the true causal effects of fertilization actions of management units at different time points in complex garden environments, and lack scientific rigor and dynamic adaptability.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: A cloud-based method for optimizing garden fertilization includes the following steps: Step S1: Obtain landscaping business data and resource allocation data; construct fertilization action matrix, result matrix, covariate matrix and neighborhood exposure matrix based on landscaping business data; and generate corresponding observation indicator matrix. Step S2: Based on the corresponding observation indicator matrix, iteratively complete the result matrix and covariate matrix, and output the completed result matrix set; Step S3: Based on the completed result matrix group, fertilization action matrix and neighborhood exposure matrix, construct a marginal structure model to calculate causal gain, and combine it with preset cost risk rules to generate the first action value table; Step S4: In the current time slice, based on the first action value table, the decisionable domain marker, resource configuration data and the current action generation rule, solve to generate a fertilization plan and perform decision risk verification, and issue a fertilization plan instruction. Step S5: Based on the actual execution feedback, construct and update the second action value table, obtain the updated second action value table, and map and store it as the current action generation rule for the next time slice.

[0006] Preferably, step S1 specifically includes: Step S11: Obtain gardening business data and resource allocation data. The gardening business data includes fertilization record data, irrigation record data, pruning record data, soil observation data, meteorological observation data, and remote sensing observation data. Step S12: Perform partitioning and alignment processing on the garden business data to obtain management units and time slices. Record the fertilization actions, result variables, and covariates implemented for each management unit in each time slice through the garden business data. The fertilization actions are combined to obtain the fertilization action matrix, the result variables are combined to obtain the result matrix, and the covariates are combined to obtain the covariate matrix. The covariates include irrigation records, pruning records, soil observation records, and meteorological observation records; Step S13: Construct a lagged action sequence and a cumulative action sequence based on the fertilization action matrix, and write the lagged action sequence and the cumulative action sequence into the covariate matrix; Step S14: Construct a neighborhood set based on the spatial relationship between management units, and map the fertilization action matrix into a neighborhood exposure matrix according to the neighborhood set; Among them, the elements of the neighborhood exposure matrix represent the aggregated amount of neighborhood fertilization actions; Step S15: Perform an element-wise scan of the fertilization action matrix, result matrix, covariate matrix, and neighborhood exposure matrix respectively. Mark the elements with valid records as observations and the elements without valid records as missing, and obtain the corresponding observation indication matrices respectively.

[0007] Preferably, step S2 specifically includes: Step S21: Take the result matrix and covariate matrix as the object matrix to be completed, respectively, and extract the set of observed elements and the set of missing elements from the observation indicator matrix corresponding to the object matrix to be completed; The matrix elements belonging to the observed element set are kept consistent with the observed elements of the matrix to be completed. The matrix elements belonging to the missing element set are used as variables to be completed. The first objective function is established by combining the regularization term. Step S22: Iteratively solve the first objective function using the alternating direction multiplier method. Terminate the iteration when the preset convergence criterion is met, and output the completed result matrix set. The completion result matrix group includes the completion result matrix and the completion covariate matrix.

[0008] Preferably, step S3 specifically includes: Step S31: Construct longitudinal data based on the completion result matrix group, fertilization action matrix and neighborhood exposure matrix. The longitudinal data includes fertilization actions, neighborhood fertilization action aggregation, completion covariates and completion result variables. Arrange the longitudinal data of the same management unit in time slice order to obtain a longitudinal data sequence. A fertilization action condition distribution model is constructed by fitting the longitudinal data sequence, and the fertilization action condition probability for each time slice is output. The fertilization action condition probability includes the numerator fertilization action condition probability and the denominator fertilization action condition probability. Step S32: Calculate the stable inverse probability weight based on the conditional probability of fertilization action, fill it into the vertical data sequence to obtain the stable inverse probability weight sequence, and redistribute the weights based on the stable inverse probability weight sequence to generate the redistributed stable inverse probability weight.

[0009] The preferred expression for calculating the stabilized inverse probability weight is: ; in, For management unit In time slice The stabilized inverse probability weights, For management unit Time slice The fertilization action, For management unit From the start time slice to the time slice The fertilization action, For management unit From the start time slice to the time slice Complete covariates, For management unit From the start time slice to the time slice The aggregate amount of neighboring fertilization actions, This is the time slice index in the product. To stabilize the time slice index corresponding to the inverse probability weight, Let be the conditional probability of the molecular fertilization action. The denominator is the conditional probability of the fertilization action.

[0010] Preferably, step S3 further includes: Step S33: Based on the fertilization action condition distribution model, the overlap of the longitudinal data sequence is determined, and a decisionable domain label is generated for the longitudinal data that does not meet the overlap determination. Step S34: Under the redistribution of stabilization inverse probability weights, the longitudinal data sequence is weighted and fitted to construct a marginal structure model. Based on the fertilization action set and the decision domain label, a decision domain fertilization action set is generated. The aggregation of each decision domain fertilization action and the neighboring domain fertilization action in the decision domain fertilization action set is input into the marginal structure model to obtain the corresponding counterfactual results. The causal gain is obtained by subtracting the counterfactual results of the preset baseline fertilization actions from the counterfactual results corresponding to the decision domain fertilization actions. Step S35: Using the management unit, time slice, and fertilization action as indexes, associate them one-to-one with causal gains to obtain the first action value table; The cost value and risk value are obtained by processing the fertilization action in the decision domain and the complete covariates and the aggregated amount of the fertilization action in the neighboring domain corresponding to the management unit where the fertilization action in the decision domain is located using the preset cost and risk rules. The cost value and risk value are then written into the first action value table.

[0011] Preferably, step S4 specifically includes: Step S41: If it is the initial time slice, then map the first action value table to the current action generation rule; If it is not the initial time slice, then the updated action generation rule is read as the current action generation rule; Based on the current action generation rules, construct a set of candidate fertilization actions for each management unit in the current time slice, perform consistency verification on the set of candidate fertilization actions, and obtain a set of verified candidate fertilization actions. Step S42: Subtract the cost value and risk value from the causal gain to obtain the robust target value for each candidate fertilization action; Step S43: Read the resource configuration data to obtain global resource constraints. If the global resource constraints are empty, independently select the candidate fertilization action with the largest robust target value for each management unit and generate a fertilization plan. If the global resource constraints are not empty, set a candidate fertilization action selection variable for each candidate fertilization action in each management unit, take the sum of robust objective values ​​as the second objective function, and take the global resource constraints and the maximum selection of one fertilization action in each management unit as constraints to solve for the fertilization plan. Step S44: Extract the complementary covariates corresponding to the fertilization actions selected for each management unit in the fertilization plan, and calculate the decision risk score; If the decision risk scores of all management units are lower than the preset safety threshold, the fertilization plan will be converted into a fertilization plan instruction and sent to the execution system. The fertilization plan instruction includes a management unit identifier, a time slice identifier, and a fertilization action identifier. If the decision risk score of any management unit is higher than the preset safety threshold, the fertilization plan of that management unit will be cancelled, a new fertilization plan will be generated from the preset baseline fertilization action, and a safety alarm will be recorded and sent to the execution system.

[0012] Preferably, the consistency check specifically includes: If a candidate fertilization action has a decisionable domain label and satisfies the preset constraint rules, it is determined to pass the consistency check and is included in the set of candidate fertilization actions after the check. If a candidate fertilization action does not have a decisionable domain label or does not meet the preset constraint rules, it is determined to have failed the consistency check and is removed from the candidate fertilization action set.

[0013] Preferably, step S5 specifically includes: Step S51: Receive the execution records of the execution system and the newly added soil observation data and remote sensing observation data in the current time slice, and align and update the fertilization action matrix, covariate matrix, result matrix and neighborhood exposure matrix according to the management unit and time slice respectively. Obtain a local sliding window with the current time slice as the endpoint and a preset time step forward. Extract the result matrix and covariate matrix within the local sliding window as online objects to be completed. Perform local completion operation using the incremental matrix completion algorithm to obtain a new completed result matrix group. Based on the management unit of the newly completed result matrix group in the current time slice, and combined with the aggregation amount of neighborhood fertilization actions, the lag action sequence and the cumulative action sequence in the neighborhood exposure matrix of the current time slice, a state set is obtained; Calculate the actual reward using the causal gain and reward calculation rules corresponding to the action in the previous time slice; Step S52: When the second action value table does not exist, construct a fertilization strategy game tree based on the state set, the verified candidate fertilization action set and the reward calculation rule, perform virtual regret minimization iteration on the fertilization strategy game tree, output the initial fertilization strategy, and initialize the second action value table using the initial fertilization strategy. If the second action value table already exists, read the second action value table from the previous time slice as the current second action value table; Step S53: Use the SARSA update rule to iteratively update the second action value table to obtain the updated second action value table; Step S54: Map the updated second action value table to the updated action generation rule, and store the updated action generation rule as the current action generation rule for the next time slice.

[0014] Preferably, the calculation expression for the updated second action value table is: ; in, State in the second action value table Choose the fertilization action below The value estimate, This refers to the state of the management unit in the previous time slice's state set. This refers to the fertilization action performed on the management unit in the previous time frame. For actual rewards, This refers to the current time slice state corresponding to the management unit within the current time slice state set. Generate rules for the current action in the current time slice state. The following refers to the fertilization actions selected by the management unit. For learning rate, As a discount factor, This is the assignment operator.

[0015] The beneficial effects of this invention are as follows: This method achieves dynamic fertilization decision-making under complex constraints by combining matrix iterative completion and marginal structure model to calculate causal gains. Based on horticultural business data, a matrix of fertilization actions, results, covariates, and neighborhood exposures is constructed. Neighborhood mapping is performed considering spatial transformation relationships, and the matrix is ​​completed using the alternating direction multiplier method. The effective completion of the result variable matrix lays a complete data foundation for subsequent accurate evaluation of counterfactual results and calculation of actual rewards. The close relationship between management units, time slices, and fertilization actions is deeply coupled, using this as a core index to generate a first action value table linked one-to-one with causal gains. The gains of specific fertilization actions of management units under each time slice are accurately evaluated using stabilized inverse probability weights. Under global resource constraints, a robust fertilization plan is generated by comprehensively considering costs and risks. Based on execution feedback, the second action value table is continuously iterated using SARSA rules, greatly improving the scientific nature, robustness, and resource utilization of the fertilization strategy. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the steps of a cloud-based garden fertilization optimization method according to an embodiment of the present invention. Detailed Implementation

[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0018] Example, refer to Figure 1 This paper provides a cloud-based method for optimizing garden fertilization, which includes the following steps: Step S1: Obtain landscaping business data and resource allocation data; construct fertilization action matrix, result matrix, covariate matrix and neighborhood exposure matrix based on landscaping business data; and generate corresponding observation indicator matrix. Step S2: Based on the corresponding observation indicator matrix, iteratively complete the result matrix and covariate matrix, and output the completed result matrix set; Step S3: Based on the completed result matrix group, fertilization action matrix and neighborhood exposure matrix, construct a marginal structure model to calculate causal gain, and combine it with preset cost risk rules to generate the first action value table; Step S4: In the current time slice, based on the first action value table, the decisionable domain marker, resource configuration data and the current action generation rule, solve to generate a fertilization plan and perform decision risk verification, and issue a fertilization plan instruction. Step S5: Based on the actual execution feedback, construct and update the second action value table, obtain the updated second action value table, and map and store it as the current action generation rule for the next time slice.

[0019] In a specific embodiment, step S1 specifically includes: Step S11: Obtain landscaping business data and resource allocation data. Landscaping business data includes fertilization record data, irrigation record data, pruning record data, soil observation data, meteorological observation data, and remote sensing observation data. Step S12: Perform partitioning and alignment processing on the garden business data to obtain management units and time slices. Record the fertilization actions, result variables, and covariates implemented for each management unit in each time slice through the garden business data. The fertilization actions are combined to obtain the fertilization action matrix, the result variables are combined to obtain the result matrix, and the covariates are combined to obtain the covariate matrix. Covariates include irrigation records, pruning records, soil observation records, and meteorological observation records; Step S13: Construct a lagged action sequence and a cumulative action sequence based on the fertilization action matrix, and write the lagged action sequence and the cumulative action sequence into the covariate matrix; Step S14: Construct a neighborhood set based on the spatial relationship between management units, and map the fertilization action matrix into a neighborhood exposure matrix according to the neighborhood set; Among them, the elements of the neighborhood exposure matrix represent the aggregated amount of neighborhood fertilization actions; Step S15: Perform an element-wise scan of the fertilization action matrix, result matrix, covariate matrix, and neighborhood exposure matrix respectively. Mark the elements with valid records as observations and the elements without valid records as missing, and obtain the corresponding observation indication matrices respectively.

[0020] Specifically, data is acquired in real time through IoT devices deployed in various management units of the park. For example, soil sensors acquire soil observation data such as temperature, humidity, EC value, and pH value; small weather stations acquire meteorological observation data such as temperature, humidity, light intensity, and rainfall within the area. This data is then aggregated via edge gateways through IoT protocols and transmitted encrypted to the cloud platform's data access service.

[0021] By calling the remote sensing satellite data service API, high-resolution multispectral images of a designated garden area are periodically acquired, i.e., remote sensing observation data. The cloud platform's background tasks automatically pull, parse, and store this image data weekly.

[0022] Garden managers use handheld devices to input fertilization, irrigation, and pruning records. This data is then submitted to the cloud platform's business database via HTTPS.

[0023] The system administrator configures and enters the data in the cloud platform management backend. Resource configuration data includes fertilizer inventory information, fertilizer unit price, number of available equipment, operating costs, and budget constraints. This data is stored in the cloud platform's configuration database.

[0024] The specific processing logic for partitioning and aligning the garden's business data to obtain management units and time slices includes: based on the garden's GIS data, dividing the entire garden into several independently identified management units according to plot boundaries, vegetation type, soil characteristics, and irrigation system partitioning. Each management unit physically corresponds to a specific piece of land. The garden's GIS data includes plot vector data and infrastructure vector data. The plot vector data includes geometric and attribute information. The geometric information, in the form of polygons, records the geographic boundary outline of each management unit. Each polygon is defined by a series of closed vertices with geographic coordinates. The attribute information includes a unique identifier, area, vegetation type, soil type, and slope aspect.

[0025] Infrastructure vector data includes point data, line data, and attribute data.

[0026] Point data includes the precise geographic coordinates of soil sensors, weather stations, irrigation system nozzles, and valves.

[0027] Line data includes the routes of the park's road network and underground irrigation pipe network.

[0028] The attribute data includes sensor ID, device model, and pipe diameter.

[0029] The continuous timeline is discretized into a series of time slices of equal length. For example, all acquired landscaping operational data, regardless of their original timestamps, will be normalized to their respective time slices on a weekly basis. For instance, fertilization records at 10:00 AM on Monday and soil observation records at 3:00 AM on Wednesday both belong to the same time slice of the same week. This alignment process ensures that data from different sources can be correlated and analyzed within the same time slice.

[0030] For each time slice and each management unit, fertilization actions are extracted from the aligned fertilization records. These actions can be encoded as discrete categorical variables, such as {0 no fertilization, 1 20 kg of type A nitrogen fertilizer, 2 15 kg of type B compound fertilizer, ...}. Outcome variables are calculated from remote sensing data to measure the effectiveness of fertilization. For example, the normalized difference vegetation index (NDVI) can be calculated using remote sensing imagery as an outcome variable. Covariates refer to factors other than fertilization actions that may influence the outcome variables. These include current irrigation amount and pruning type extracted from irrigation and pruning records; current soil temperature and humidity, EC value, air temperature, and sunshine duration extracted from soil and meteorological observations; and lagged action sequences and cumulative action sequences.

[0031] The lagged action sequence refers to the fertilization action history of the management unit over the past k time slices, used to capture the impact of recent fertilization history on the current state. The cumulative action sequence refers to the total amount of various fertilizers received by the management unit from the initial time slice to the current time slice. These sequences are used as new features and combined into the covariate matrix of the corresponding management unit and time slice.

[0032] The spatial relationship of constructing a neighborhood set based on the spatial relationship between management units refers to the geographical adjacency relationship between management units based on the GIS data of the garden. The geographical adjacency relationship includes first-order adjacency and distance threshold. First-order adjacency means that two management units share a common boundary. The distance threshold means that the centroid distance between two management units is less than a preset distance threshold, which is preferably set to 5 meters.

[0033] Based on spatial relationships, a neighborhood set is constructed for each management unit, which includes all other management units adjacent to that management unit.

[0034] For each fertilization action element in the fertilization action matrix, if management unit j belongs to the neighborhood set of management unit i, then the fertilization action element of management unit j will generate neighborhood exposure to management unit i. The neighborhood fertilization action aggregation amount of the neighborhood exposure matrix is ​​obtained by summing the fertilization actions of all management units in the neighborhood set of management unit i at time slice t.

[0035] Elements with valid records are marked as observations. Valid records refer to numerical values ​​or categories with actual physical meaning that were successfully acquired and recorded in the database during the raw data acquisition process. Conversely, the absence of valid records is due to reasons such as sensor failure, network interruption, manual omission, and cloud cover obscuring remote sensing imagery, resulting in a lack of recording of a specific variable for a particular management unit at a certain time slice.

[0036] In a specific embodiment, step S2 specifically includes: Step S21: Take the result matrix and covariate matrix as the object matrix to be completed, respectively, and extract the set of observed elements and the set of missing elements from the observation indicator matrix corresponding to the object matrix to be completed; The matrix elements belonging to the observed element set are kept consistent with the observed elements of the matrix to be completed. The matrix elements belonging to the missing element set are used as variables to be completed. The first objective function is established by combining the regularization term. Step S22: Iteratively solve the first objective function using the alternating direction multiplier method. Terminate the iteration when the preset convergence criterion is met, and output the completed result matrix set. The completed result matrix group includes the completed result matrix and the completed covariate matrix.

[0037] Specifically, the expression for calculating the first objective function is: ; in, Let the first objective function be... For variables to be completed, Let be the set of indices of the observed elements, representing the positions (i,t) of all valid records in the matrix to be completed. This is a loss item. The regularization term represents the nuclear norm of matrix X, which is the sum of all singular values ​​of the matrix. In this invention, a key prior assumption is that the dynamic changes of the garden system are structured and driven by a few dominant factors; therefore, its resulting matrix naturally possesses low-rank properties. The nuclear norm is the optimal convex approximation of the matrix's rank function. Minimizing the nuclear norm means finding a solution with the lowest possible rank, which helps to recover the global structure from sparse observations and to make reasonable inferences about missing values. λ is the regularization coefficient, used to balance the loss term and the regularization term. A larger λ tends to produce a low-rank solution, but may sacrifice the accuracy of fitting the observed data; a smaller λ will be closer to the observed data, but may lead to overfitting and poor generalization ability. ,in It is the larger of the number of rows (number of management units) and the number of columns (number of time slices). This setting has proven to be robust and effective in many matrix completion problems, as it can adaptively adjust the strength of regularization according to the data size.

[0038] Introduce an auxiliary matrix Z of the exact same size as the variable X to be completed, and equivalently transform the original problem into a constrained optimization problem. The objective is to minimize the loss term, with the constraint that X must equal Z. Initialize X, Z, and the dual variable matrix U. In each iteration, fix other variables and update X, Z, and U sequentially. Given a fixed auxiliary matrix Z and dual variable U, solve a subproblem that relates only to X. The goal of this subproblem is to make X both close to Z and fit the existing observation data. This is a least-squares problem; for positions in X that belong to the set of observed elements, the updated values ​​will approach the original observations; while for positions that belong to the set of missing elements, the updated values ​​will approach Z.

[0039] With the recently updated X and dual variable U fixed, solve a subproblem that depends only on Z. The core of this subproblem is to minimize the nuclear norm of Z while ensuring that Z doesn't stray too far from X. This step is crucial for applying low-rank structure, which can be precisely solved by performing singular value decomposition on an intermediate matrix and then applying a soft-thresholding operator to the resulting singular values. The soft-thresholding operation compresses smaller singular values ​​to zero and reduces larger singular values, effectively lowering the matrix's rank.

[0040] The soft thresholding operator works by processing the intermediate matrix when updating the auxiliary matrix Z. First, singular value decomposition (SVD) is performed on the intermediate matrix, yielding a series of singular values. The soft thresholding operator iterates through each singular value, comparing it to a preset threshold. If the absolute value of the singular value is less than the preset threshold, it is set to zero. If the absolute value is greater than the preset threshold, it is shrunk towards zero by the preset threshold distance (i.e., positive singular values ​​are subtracted from the preset threshold, and negative singular values ​​are added to the preset threshold). The matrix is ​​then reconstructed using these processed singular values, resulting in the updated Z. In this scheme, the preset threshold is a regularization coefficient.

[0041] Based on the difference between X and Z after this iteration, the dual variable matrix U is updated. The role of U is to record the cumulative error of the inconsistency between X and Z, and to drive them to eventually converge through a penalty term in subsequent iterations.

[0042] The alternating iterative update process is repeated until a preset convergence criterion is met. This criterion includes either reaching a preset maximum number of iterations or terminating the iteration when the relative change in the objective function value between two consecutive iterations is less than a change threshold. The preset maximum number of iterations is preferably set to 200. This value ensures sufficient convergence in most cases while also controlling the maximum computation time for a single completion operation. The change threshold is preferably set to 1e-4. The algorithm is considered convergent and the iteration can be terminated when the relative change rate of the first objective function value calculated between two consecutive iterations is less than one ten-thousandth.

[0043] It should be noted that in current technologies, environmental characteristic data representing the state of garden operations are usually obtained by directly removing missing values ​​and using simple mean interpolation. However, this invention creatively integrates the observation indicator matrix into the iterative completion process of the result matrix and covariate matrix, resulting in a set of corresponding completed result matrices based on valid observation records. The data in this completed result matrix set can simultaneously represent the meaning of real observation business characteristics and potential hidden environmental patterns, solving the problem of a large loss of effective information and observation bias in traditional data preprocessing. This lays a complete and unbiased data foundation for inputting into the marginal structure model and subsequent causal inference processing, thereby achieving the innovative effect of improving global data quality and enhancing model fitting accuracy through the alternating direction multiplier method.

[0044] In a specific embodiment, step S3 specifically includes: Step S31: Construct longitudinal data based on the completion result matrix group, fertilization action matrix and neighborhood exposure matrix. The longitudinal data includes fertilization actions, neighborhood fertilization action aggregation, completion covariates and completion result variables. Arrange the longitudinal data of the same management unit in time slice order to obtain the longitudinal data sequence. A fertilization action condition distribution model is constructed by fitting the longitudinal data sequence, and the fertilization action condition probability for each time slice is output. The fertilization action condition probability includes the numerator fertilization action condition probability and the denominator fertilization action condition probability. Step S32: Calculate the stable inverse probability weight based on the conditional probability of fertilization action, fill it into the vertical data sequence to obtain the stable inverse probability weight sequence, and redistribute the weights based on the stable inverse probability weight sequence to generate the redistributed stable inverse probability weight.

[0045] Specifically, the fertilization action condition distribution model includes a numerator model and a denominator model; The specific processing logic for constructing a conditional distribution model of fertilization actions based on fitting longitudinal data sequences includes building a molecular model using a Naive Bayes classifier. This molecular model estimates the probability of the current fertilization action given only historical fertilization information. Its input features are the lagged action sequence portions of the completed covariates in the longitudinal data sequence, and its output is the probability distribution of the current fertilization action.

[0046] A denominator model is constructed using random forest to estimate the probability of the current fertilization action given all historical information. Its input features include the lagged action sequence portion of the completed covariates in the longitudinal data sequence, the current completed covariates, and the aggregated amount of neighboring fertilization actions. The output is the probability distribution of the current fertilization action. By training on longitudinal data from all management units and time slices, the conditional distribution model of fertilization actions can be obtained.

[0047] The calculated stable inverse probability weights themselves may have a large variance, meaning that the weights for some sample points may become extremely large. This can cause the model to be dominated by a few sample points during weighted fitting, resulting in unstable results. Weight redistribution aims to alleviate this problem. The specific processing logic involves setting an upper limit, such as the 99th percentile of all stable inverse probability weights. All stable inverse probability weights greater than this upper limit are then forced to be set to that upper limit value. This yields the redistributed stable inverse probability weights.

[0048] In a specific embodiment, the calculation expression for the stabilized inverse probability weight is as follows: ; in, For management unit In time slice The stabilized inverse probability weights, For management unit Time slice The fertilization action, For management unit From the start time slice to the time slice The fertilization action, For management unit From the start time slice to the time slice Complete covariates, For management unit From the start time slice to the time slice The aggregate amount of neighboring fertilization actions, This is the time slice index in the product. To stabilize the time slice index corresponding to the inverse probability weight, Let be the conditional probability of the molecular fertilization action. The denominator is the conditional probability of the fertilization action.

[0049] Specifically, the starting time slice refers to the earliest time point considered in the data processing and model calculation of the method of this invention. The starting time slice is the time slice in which all garden business data begins to have complete records.

[0050] In a specific embodiment, step S3 further includes: Step S33: Based on the fertilization action condition distribution model, the overlap of the longitudinal data sequence is determined, and a decisionable domain label is generated for the longitudinal data that does not meet the overlap determination. Step S34: Under the redistribution of stabilization inverse probability weights, the longitudinal data sequence is weighted and fitted to construct a marginal structure model. Based on the fertilization action set and the decision domain label, a decision domain fertilization action set is generated. The aggregation of each decision domain fertilization action and the neighboring domain fertilization action in the decision domain fertilization action set is input into the marginal structure model to obtain the corresponding counterfactual results. The causal gain is obtained by subtracting the counterfactual results of the preset baseline fertilization actions from the counterfactual results corresponding to the decision domain fertilization actions. Step S35: Using the management unit, time slice, and fertilization action as indexes, associate them one-to-one with causal gains to obtain the first action value table; The cost value and risk value are obtained by processing the fertilization action in the decision domain and the complete covariates and the aggregated amount of the fertilization action in the neighboring domain corresponding to the management unit where the fertilization action in the decision domain is located using the preset cost and risk rules. The cost value and risk value are then written into the first action value table.

[0051] Specifically, the overlap of longitudinal data sequences is determined based on the fertilization action conditional distribution model. Using the denominator model in the fertilization action conditional distribution model, for each management unit i in the longitudinal data sequence at time slice t, the conditional probability of it accepting each possible fertilization action is calculated. If there exists a management unit i at time slice t whose predicted probability of accepting one or more fertilization actions is less than a minimum threshold 1e-5, then the sample is considered not to satisfy the overlap requirement for that fertilization action. In a population with similar covariates, this fertilization action has never been observed, therefore, the counterfactual outcome of this action cannot be reliably inferred. For fertilization actions that do not satisfy the overlap requirement, a decisionable domain label is generated, indicating that the action is not decisionable or the inferred outcome is unreliable in this specific context.

[0052] The marginal structure model is a statistical model used to estimate the causal effect of fertilization on outcomes, correcting for time-varying confounding factors through weighting. The specific processing logic for constructing the marginal structure model involves weighted fitting of longitudinal data sequences under redistributed stabilization inverse probability weights. Define a marginal structure model that connects the fertilization action with the desired outcome; its computational expression is as follows: ; in, For the expected counterfactual outcome in time slice t when fertilization action a is taken, The fertilization action at time slice t. This represents the aggregated amount of neighboring fertilization actions related to fertilization action a at time slice t. , , These are the parameters to be fitted to the marginal structure model.

[0053] We use redistributed stabilization inverse probability weights to weight the longitudinal data sequence and fit a marginal structure model. The calculation expression is as follows: ; in, The model parameters obtained by minimizing the objective function The estimated value, To minimize, To sum over all management units i and all time slices t, The redistribution of stable inverse probability weights for management unit i in time slice t. The actual observed result variable values ​​in management unit i and time slice t. This is a quantitative value representing the actual fertilization action in management unit i and time slice t. To expose the quantized value of the aggregation amount in the actual neighborhood of management unit i and time slice t, The baseline expected outcome is under the condition of no fertilization and no neighboring exposure. for The expected result of each additional unit The first marginal causal change, for The expected result of each additional unit The second marginal causal change.

[0054] The input to the marginal structure model during the fitting phase is the longitudinal data sequence and the redistributed stabilization inverse probability weights. During the counterfactual outcome calculation phase, the input is an arbitrarily assumed fertilization action 'a' and the associated aggregate amount 'G' of neighboring fertilization actions.

[0055] During the fitting phase, the output is the parameter β of the marginal structure model. During the counterfactual calculation phase, the output is the counterfactual result given the fertilization action a.

[0056] The baseline fertilization action is the application of a standard amount of balanced compound fertilizer. Causal gain is obtained by subtracting the counterfactual results of other fertilization actions from the counterfactual results of this baseline action, thus quantifying how much additional benefit the new practice brings compared to the conventional practice.

[0057] Pre-defined cost and risk rules include cost rules and risk rules; The cost rule is: Cost = Fertilizer unit price × Application rate + Operating costs.

[0058] The risk rule is: Risk = f(soil salinity, fertilizer concentration) + g(weather forecast, fertilizer type), where f represents the increased risk of seedling burn from high-concentration fertilizer application in saline-alkali soils, and g represents the increased risk of leaching when applying quick-dissolving fertilizer during forecasted heavy rains. Historical data from landscaping operations is used to identify records of negative events. Covariates and fertilization actions within the time slices preceding these negative events are analyzed, and logistic regression is used to predict the probability of these events occurring.

[0059] Throughout the method, the management unit, time slice, and fertilization action constitute the three core elements of decision-making. The goal of the method is to select the optimal fertilization action from multiple candidate actions for each management unit in each time slice.

[0060] It should be noted that in current technologies, the target expected value representing the fertilization effect is usually obtained through correlation analysis of historical data. However, this invention creatively incorporates the stabilization of inverse probability weights into the longitudinal data weighted fitting of the marginal structure model, obtaining a corresponding causal gain that can be inferred based on counterfactual facts. The data in this causal gain can simultaneously represent the true net utility of the fertilization action and the meaning of the objective feedback after removing environmental interference. This solves the problems of confusion between correlation and causality and self-selection bias of historical data in traditional fertilization assessment. It lays a scientific and reliable quantitative assessment foundation for inputting into the action value table and further generating robust target value decisions in the following text. By comparing the counterfactual results and subtracting the baseline counterfactual results, the innovative effect of accurately removing environmental interference and directly targeting the true benefits of fertilization is obtained.

[0061] In a specific embodiment, step S4 specifically includes: Step S41: If it is the initial time slice, then map the first action value table to the current action generation rule; If it is not the initial time slice, then the updated action generation rule is read as the current action generation rule; Based on the current action generation rules, construct a set of candidate fertilization actions for each management unit in the current time slice, perform consistency verification on the set of candidate fertilization actions, and obtain a set of verified candidate fertilization actions. Step S42: Subtract the cost value and risk value from the causal gain to obtain the robust target value for each candidate fertilization action; Step S43: Read the resource configuration data to obtain global resource constraints. If the global resource constraints are empty, independently select the candidate fertilization action with the largest robust target value for each management unit and generate a fertilization plan. If the global resource constraints are not empty, set a candidate fertilization action selection variable for each candidate fertilization action in each management unit, take the sum of robust objective values ​​as the second objective function, and take the global resource constraints and the maximum selection of one fertilization action in each management unit as constraints to solve for the fertilization plan. Step S44: Extract the complementary covariates corresponding to the fertilization actions selected for each management unit in the fertilization plan, and calculate the decision risk score; If the decision risk scores of all management units are lower than the preset safety threshold, the fertilization plan will be converted into a fertilization plan instruction and sent to the execution system. The fertilization plan instruction includes the management unit identifier, time slice identifier, and fertilization action identifier. If the decision risk score of any management unit is higher than the preset safety threshold, the fertilization plan of that management unit will be cancelled, a new fertilization plan will be generated from the preset baseline fertilization action, and a safety alarm will be recorded and sent to the execution system.

[0062] Specifically, the processing logic for obtaining the robust target value of each candidate fertilization action by subtracting the cost value and risk value from the causal gain includes first making all indicators dimensionless, and then performing linear weighting through preset weight coefficients.

[0063] For all candidate fertilization actions of all management units in a certain time slice, the causal gain, cost value and risk value are calculated and normalized to their maximum and minimum values ​​respectively. The causal gain, cost value and risk value are converted into dimensionless relative values. The causal gain is forward normalized, and the larger the value, the higher the relative gain. The cost and risk are reverse normalized, and the larger the value, the lower the cost and the lower the risk.

[0064] The dimensionless values ​​are summed using preset weighting coefficients, and the sum of the preset weighting coefficients is usually normalized to 1.

[0065] The expression for calculating the robust objective value is: ; in, Select candidate fertilization actions for management unit i The robust target value calculated at time. For causal gain weighting coefficients, Select candidate fertilization actions for management unit i Normalized causal gain This is the cost weighting coefficient. Select candidate fertilization actions for management unit i Normalized cost For risk weighting coefficients, Select candidate fertilization actions for management unit i The risk of normalization.

[0066] The causal gain weighting coefficient, cost weighting coefficient, and risk weighting coefficient are preferably set to 0.4, 0.3, and 0.3, respectively. This configuration assigns the greatest weight to causal gain, reflecting the primary goal of improving garden quality and long-term benefits. At the same time, it also gives sufficient attention to cost and risk, making it a relatively robust and universal strategy suitable for most routine management periods.

[0067] The robust target value calculated by this expression is a dimensionless comprehensive score. The higher the score, the better the overall performance of the candidate fertilization action.

[0068] Global resource constraints refer to the total resource limits imposed on fertilization actions by all management units within the current time slice. These constraints are read from resource configuration data, such as the current total inventory of a specific fertilizer, the number of available fertilization drone flights, and their cost values ​​from the database. Specifically, for all management units, the planned total amount of a certain type of fertilizer to be applied must not exceed the current inventory of that fertilizer; for all management units, the total number of planned drone flights must not exceed the total number of currently available drone flights; and for all management units, the total cost of planned fertilization actions must not exceed the total budget set for this fertilization cycle.

[0069] The second objective function is to maximize the sum of the robust objective values ​​of the fertilization actions selected by all management units, and its calculation expression is as follows: ; in, To maximize the formula, The sum of robust objective values. Select candidate fertilization actions for management unit i The robust target value calculated at time. For the collection of all management units, It is the set of candidate fertilization actions for management unit i. For binary decision variables, when management unit i selects a candidate fertilization action... hour Otherwise, it is 0.

[0070] The optimal solution is obtained by using an optimization solver. The value of the optimal solution output by the solver determines which fertilization action to select for each management unit, thus obtaining the fertilization plan.

[0071] The specific processing logic for extracting the complementary covariates corresponding to the fertilization actions selected for each management unit in the fertilization plan and calculating the decision risk score includes: Based on all historically reliable complete covariate data, the statistical mean and standard deviation of each covariate dimension are calculated and stored to establish a multidimensional distribution benchmark describing the normal state of covariates. For the fertilization plan generated in the current time slice, the corresponding complete covariate vector is extracted for the fertilization action selected for a specific management unit. The deviation between this complete covariate vector and the pre-stored normal distribution benchmark is calculated. This deviation is preferably quantified by calculating the standardized Mahalanobis distance. The larger the distance, the more the current covariate combination deviates from the historical normal state, i.e., the more abnormal it is. Finally, this quantified abnormal distance value is converted into a value between 0 and 1 using the Sigmoid function. This value is the decision risk score. When the abnormal distance is small, the output risk score is close to 0; while when the abnormal distance exceeds the 95th percentile of the historical distance, the output risk score increases sharply and approaches 1.

[0072] The preset safety threshold is preferably set to 0.8. In this invention, the decision risk score is obtained by mapping a quantified anomaly distance value to the [0,1] interval using a Sigmoid function. This Sigmoid function is carefully designed so that its inflection point is calibrated to correspond to the 95th percentile of historical anomaly distances. Setting the threshold to 0.8 means that the system will only trigger safety intervention when the anomaly of a complement covariate vector is extremely significant, and its calculated anomaly distance far exceeds 95% of historical normal samples, such that the value mapped by the Sigmoid function reaches the high level of 0.8.

[0073] If the decision risk score of a management unit is lower than the preset safety threshold, its optimized fertilization action is adopted, and a corresponding fertilization plan instruction is generated. If the decision risk score of a management unit is higher than or equal to the preset safety threshold, its optimized fertilization action is rejected, and a fertilization plan instruction for that management unit is generated using the preset baseline fertilization action, and a safety alarm is recorded. All fertilization plan instructions generated by all management units are collected and uniformly distributed to the execution system.

[0074] In a specific embodiment, the consistency check includes: If a candidate fertilization action has a decisionable domain label and satisfies the preset constraint rules, it is determined to pass the consistency check and is included in the set of candidate fertilization actions after the check. If a candidate fertilization action does not have a decisionable domain label or does not meet the preset constraint rules, it is determined to have failed the consistency check and is removed from the candidate fertilization action set.

[0075] Specifically, the pre-defined constraint rules include agronomic rules, fertilization rotation rules, safety interval rules, and physical restriction rules; Agronomic rules include prohibiting the application of high-nitrogen, fast-acting fertilizers during plant dormancy and avoiding foliar fertilizer application during prolonged periods of overcast or rainy weather. The rotational fertilization rule states that if a certain type of fertilizer was applied in the previous time slot, it should not be applied again in the current time slot. The safety interval rule requires that for certain special-purpose gardens, the application of any chemical fertilizers should be prohibited for N time slots prior to the expected harvest period. The physical restriction rule stipulates that if a management unit cannot use large fertilization machinery due to terrain limitations, fertilization operations involving large machinery should be excluded.

[0076] It should be noted that traditional online decision generation for garden fertilization strategies typically relies on single empirical rule matching and online reinforcement learning from scratch to obtain fertilization plans. This approach suffers from highly unstable decision-making during system cold starts and is prone to causing garden management accidents. This invention, however, integrates a first action value table based on causal inference and updated action generation rules based on actual feedback through dynamic switching based on time slices. The resulting candidate fertilization actions undergo consistency verification based on decisionable domain labeling and preset constraint rules, as well as global resource constraint solving. Traditional online strategy generation systems often update using pure historical memory and random exploration methods, resulting in high initial trial-and-error costs and the potential to overlook global resource constraints. The architecture update method adopted in this invention, which maps prior rules to initial time slices and reads posterior update rules from non-initial time slices, perfectly integrates offline global static optimization with online local dynamic fine-tuning. This effectively solves the cold start dilemma of having no experience to rely on when launching a new system and eliminates the harm of invalid or high-risk actions to the execution system. It achieves a safe and robust optimal fertilization plan output while considering global resource constraints.

[0077] In a specific embodiment, step S5 specifically includes: Step S51: Receive the execution records of the execution system and the newly added soil observation data and remote sensing observation data in the current time slice, and align and update the fertilization action matrix, covariate matrix, result matrix and neighborhood exposure matrix according to the management unit and time slice respectively. Obtain a local sliding window with the current time slice as the endpoint and a preset time step forward. Extract the result matrix and covariate matrix within the local sliding window as online objects to be completed. Perform local completion operation using the incremental matrix completion algorithm to obtain a new completed result matrix group. Based on the management unit of the newly completed result matrix group in the current time slice, and combined with the aggregation amount of neighborhood fertilization actions, the lag action sequence and the cumulative action sequence in the neighborhood exposure matrix of the current time slice, a state set is obtained; Calculate the actual reward using the causal gain and reward calculation rules corresponding to the action in the previous time slice; Specifically, the preset time step is a key parameter when executing the incremental matrix completion algorithm. A preset time step of 12 is preferred, representing a 12-week time window. The sliding window always covers data from the past quarter. This length is sufficient and efficient for capturing the rapid dynamic changes of most garden vegetation within a key growing season.

[0078] When the system first starts running, and the total duration from the start time slice to the current time slice is less than a full preset time step (i.e., 12 weeks), the length of the sliding window will be dynamically adjusted. Specifically, at this time, the local sliding window will contain all available data from the start time slice to the current time slice. For example, when the system is running for 5 weeks, the length of the local sliding window will be 5. Only after the system has run for more than 12 weeks will the window length be fixed at 12, and the regular sliding operation of "slide out the oldest data and slide in the newest data" will begin. This approach ensures that all valuable historical information can be utilized to the maximum extent in the early stages of system startup.

[0079] In standard matrix completion, each new data entry requires a costly recalculation of the entire historical data matrix. Incremental matrix completion aims to solve this problem. The specific processing logic for performing local completion operations using the incremental matrix completion algorithm includes... The continuous time axis is logically divided into local sliding windows of a preset time step length. At the end of each computation cycle, a completion matrix is ​​output, and the corresponding previously calculated singular value decomposition (SVD) result is calculated and cached. This result includes a left singular vector matrix, a singular value diagonal matrix, and a right singular vector matrix, where the column vectors of the left singular vector matrix span an old low-rank subspace. When data from a new time slice arrives, a sliding update operation is performed, i.e., the time window advances, the oldest time slice data is removed, and the new time slice data is added to the window. The core advantage of the incremental matrix completion algorithm is that it does not require a costly new SVD for the new window matrix; instead, it quickly calculates an updated low-rank subspace based on the old low-rank subspace and the newly added data. The fast calculation process is preferably implemented through a two-step SVD update algorithm: First, the oldest column is removed, which mathematically corresponds to a rank-1 subtraction update. A fast algorithm is used to directly calculate the temporary singular value decomposition result after removing the column. Second, the addition of a new data column is handled, preferably using a folding technique. The observed portion of the new data column is projected onto the current low-rank subspace, and combined with the new data itself, a series of efficient matrix operations are used to correct and expand the temporary singular value decomposition result, obtaining an updated low-rank subspace that best accommodates the new data column. After obtaining this updated low-rank subspace, the algorithm can use it to make a final inference about the missing values ​​in the new data column. Specifically, through a process of solving a small least squares problem, it finds a complete vector that best fits the observed elements in the new data column and is completely located within this new subspace. This complete vector is the completed new data column. After the local completion operation is completed, the algorithm outputs a new completed result matrix that covers the latest time window. This incremental and localized processing method ensures that the invention has excellent computational efficiency and real-time response capability during continuous operation.

[0080] When calculating the actual reward in step S51, the causal gain corresponding to the action in the previous time slice is an important reference benchmark. This value is obtained from the first action value table generated in step S3.

[0081] The reward calculation rule defines how newly observed data is transformed into a scalar actual reward R, which is a direct and immediate evaluation of the quality of the decision made in the previous time slice. This rule serves as a bridge connecting causal inference and reinforcement learning.

[0082] The calculation expression for the reward calculation rule is as follows: ; in, The result variable value is the newly observed result at the current time slice t. The baseline result value can be the result variable value of the previous time slice t-1. It represents the actual short-term change of the outcome variable. This is a prediction of the counterfactual outcome of fertilization actions in the previous time slice. This refers to the deviation between the actual results and the results predicted by the causal model. If the actual results exceed the optimistic predictions of the causal model, it indicates that there may be favorable factors that were not captured by the model, and additional rewards should be given; otherwise, penalties should be imposed. This is a weighting coefficient used to balance short-term actual changes and deviations from long-term predictions. It is preferably set to 0.5. This invention believes that immediate, visible short-term effects are equally important as whether they conform to our long-term predictions based on extensive historical data and causal inferences. A good decision should not only appear good in the short term but also align with scientifically sound long-term expectations.

[0083] Step S52: When the second action value table does not exist, construct a fertilization strategy game tree based on the state set, the verified candidate fertilization action set and the reward calculation rule, perform virtual regret minimization iteration on the fertilization strategy game tree, output the initial fertilization strategy, and initialize the second action value table using the initial fertilization strategy. If the second action value table already exists, read the second action value table from the previous time slice as the current second action value table; Step S53: Use the SARSA update rule to iteratively update the second action value table to obtain the updated second action value table; Step S54: Map the updated second action value table to the updated action generation rule, and store the updated action generation rule as the current action generation rule for the next time slice.

[0084] Specifically, a fertilization strategy game tree is constructed based on a set of states, a set of verified candidate fertilization actions, and reward calculation rules. In this game tree, the root node represents the initial state set of the current time slice, and each level extending downwards from the root node represents a decision stage. The tree contains two types of nodes: each branch of the decision node corresponds to an optional action in the set of verified candidate fertilization actions, while the branches of the chance node represent various uncertain outcomes that the natural environment may produce after executing an action, such as different weather changes and soil responses. The probability of these uncertain outcomes is estimated in advance. Each complete path from the root to a leaf in the tree simulates a complete decision sequence, and the value of the leaf node can be determined by the reward calculation rules. The algorithm iterates through the virtual regret minimization process on the fertilization strategy game tree to output the initial fertilization strategy. This iterative process is achieved through thousands of simulated games. In each simulation, the algorithm starts from the root node, selects an action at each decision node, and eventually traverses to the end of the tree. After completing one traversal, the algorithm backtracks the entire path and calculates a virtual regret value for each unselected action at each decision node. This regret value quantifies how much better the final payoff would have been if the unselected action had been chosen. By continuously accumulating these regret values ​​for each action, the algorithm learns which action at any decision node yields the highest average payoff in the long run. After a large number of iterations, the accumulated regret values ​​for each action converge. Based on these final regret values, a probability distribution for selecting each candidate fertilization action in any state can be derived. This probability distribution is the desired initial fertilization strategy that achieves an approximate Nash equilibrium. It is used to initialize the second action value table, providing a high-quality decision-making starting point that is far superior to random strategies for subsequent online learning.

[0085] The specific processing logic for initializing the second action value table using the initial fertilization strategy includes calculating the expected result of performing the preset baseline fertilization action in the given state using the previously constructed marginal structure model, and using this result as the initial value of the state. Next, a value is assigned to the value estimate of each state-action pair in the second action value table. If an action is assigned a higher selection probability in the initial fertilization strategy obtained through virtual regret minimization iteration, it means that it performs better in the simulated game, and therefore should be assigned a relatively higher initial value during initialization. The initial value of a state-action pair is the initial value benchmark of the state, plus a reward term positively correlated with the selection probability of that action in the initial fertilization strategy. The size of this reward term depends on how much higher the strategy probability of the action is compared to the probability of completely random selection. By traversing all states and actions and assigning values ​​according to this rule, the initialization of the second action value table can be completed. In this way, the initialized value table is no longer a blank slate, but already contains prior knowledge learned through simulated game theory. This allows subsequent online learning algorithms to start iterating from a very advantageous starting point, thereby significantly accelerating the convergence speed and helping to make more reasonable decisions in the early stages of learning.

[0086] Among them, the state-action pair is the basic index unit that constitutes the second action value table. A state is a comprehensive description of all relevant environmental and historical information of a management unit at a given time slice. This means that in management unit i, time slice t, when its soil moisture is X, temperature is Y, it has historically applied type Z fertilizer, and its neighbor is currently applying type W fertilizer, we decide to perform the fertilization action of applying 20 kg of type A nitrogen fertilizer.

[0087] It should be noted that in traditional technologies, updating the data and value table of online fertilization models usually involves calculating a new policy matrix by summarizing all historical data. This method suffers from the problem of exponential growth in computational load over time, leading to cloud platform computing power collapse. This invention, however, integrates a local sliding window mechanism and an incremental matrix completion algorithm to extract online objects to be completed. The resulting newly completed matrix set is then used to extract the state set and calculate the actual reward. Traditional reinforcement learning action value tables are usually updated using random number assignment or zero initialization, which results in extremely slow linear convergence and a tendency to get trapped in local optima. The virtual regret minimization iterative initialization of the second action value table based on the fertilization policy game tree and the SARSA online fine-tuning update method adopted in this invention can greatly reduce the online computational overhead of each time slice, effectively solving the problems of system computing power overload under high-frequency real-time updates and blind exploration in the initial stage of reinforcement learning. Furthermore, it achieves the effects of rapid response, computational friendliness, and strong policy adaptability.

[0088] In a specific embodiment, the calculation expression for the updated second action value table is: ; in, State in the second action value table Choose the fertilization action below The value estimate, This refers to the state of the management unit in the previous time slice's state set. This refers to the fertilization action performed on the management unit in the previous time frame. For actual rewards, This refers to the current time slice state corresponding to the management unit within the current time slice state set. Generate rules for the current action in the current time slice state. The following refers to the fertilization actions selected by the management unit. For learning rate, As a discount factor, This is the assignment operator.

[0089] This method achieves dynamic fertilization decision-making under complex constraints by combining matrix iterative completion, marginal structure model calculation of causal gain, and SARSA algorithm update of the action value table. Based on horticultural business data, a matrix of fertilization actions, results, covariates, and neighborhood exposures is constructed. Neighborhood mapping is performed considering spatial transformation relationships, and the matrix is ​​completed using the alternating direction multiplier method. The effective completion of the result variable matrix lays a complete data foundation for subsequent accurate evaluation of counterfactual results and calculation of actual rewards. The close relationship between management units, time slices, and fertilization actions is deeply coupled, using this as a core index to generate a first action value table linked one-to-one with causal gain. The gain of specific fertilization actions of management units under each time slice is accurately evaluated using stable inverse probability weights. Under global resource constraints, a robust fertilization plan is generated by comprehensively considering costs and risks. Based on execution feedback, the second action value table is continuously iterated using SARSA rules, greatly improving the scientific nature, robustness, and resource utilization of the fertilization strategy.

[0090] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0091] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.

Claims

1. A cloud-based method for optimizing garden fertilization, characterized in that, Includes the following steps: Step S1: Obtain landscaping business data and resource allocation data; construct fertilization action matrix, result matrix, covariate matrix and neighborhood exposure matrix based on landscaping business data; and generate corresponding observation indicator matrix. Step S2: Based on the corresponding observation indicator matrix, iteratively complete the result matrix and covariate matrix, and output the completed result matrix set; Step S3: Based on the completed result matrix group, fertilization action matrix and neighborhood exposure matrix, construct a marginal structure model to calculate causal gain, and combine it with preset cost risk rules to generate the first action value table; Step S4: In the current time slice, based on the first action value table, the decisionable domain marker, resource configuration data and the current action generation rule, solve to generate a fertilization plan and perform decision risk verification, and issue a fertilization plan instruction. Step S5: Based on the actual execution feedback, construct and update the second action value table, obtain the updated second action value table, and map and store it as the current action generation rule for the next time slice.

2. The cloud-based garden fertilization optimization method as described in claim 1, characterized in that, Step S1 specifically includes: Step S11: Obtain gardening business data and resource allocation data. The gardening business data includes fertilization record data, irrigation record data, pruning record data, soil observation data, meteorological observation data, and remote sensing observation data. Step S12: Perform partitioning and alignment processing on the garden business data to obtain management units and time slices. Record the fertilization actions, result variables, and covariates implemented for each management unit in each time slice through the garden business data. The fertilization actions are combined to obtain the fertilization action matrix, the result variables are combined to obtain the result matrix, and the covariates are combined to obtain the covariate matrix. The covariates include irrigation records, pruning records, soil observation records, and meteorological observation records; Step S13: Construct a lagged action sequence and a cumulative action sequence based on the fertilization action matrix, and write the lagged action sequence and the cumulative action sequence into the covariate matrix; Step S14: Construct a neighborhood set based on the spatial relationship between management units, and map the fertilization action matrix into a neighborhood exposure matrix according to the neighborhood set; Among them, the elements of the neighborhood exposure matrix represent the aggregated amount of neighborhood fertilization actions; Step S15: Perform an element-wise scan of the fertilization action matrix, result matrix, covariate matrix, and neighborhood exposure matrix respectively. Mark the elements with valid records as observations and the elements without valid records as missing, and obtain the corresponding observation indication matrices respectively.

3. The cloud-based garden fertilization optimization method as described in claim 2, characterized in that, Step S2 specifically includes: Step S21: Take the result matrix and covariate matrix as the object matrix to be completed, respectively, and extract the set of observed elements and the set of missing elements from the observation indicator matrix corresponding to the object matrix to be completed; The matrix elements belonging to the observed element set are kept consistent with the observed elements of the matrix to be completed. The matrix elements belonging to the missing element set are used as variables to be completed. The first objective function is established by combining the regularization term. Step S22: Iteratively solve the first objective function using the alternating direction multiplier method. Terminate the iteration when the preset convergence criterion is met, and output the completed result matrix set. The completion result matrix group includes the completion result matrix and the completion covariate matrix.

4. The cloud-based garden fertilization optimization method as described in claim 3, characterized in that, Step S3 specifically includes: Step S31: Construct longitudinal data based on the completion result matrix group, fertilization action matrix and neighborhood exposure matrix. The longitudinal data includes fertilization actions, neighborhood fertilization action aggregation, completion covariates and completion result variables. Arrange the longitudinal data of the same management unit in time slice order to obtain a longitudinal data sequence. A fertilization action condition distribution model is constructed by fitting the longitudinal data sequence, and the fertilization action condition probability for each time slice is output. The fertilization action condition probability includes the numerator fertilization action condition probability and the denominator fertilization action condition probability. Step S32: Calculate the stable inverse probability weight based on the conditional probability of fertilization action, fill it into the vertical data sequence to obtain the stable inverse probability weight sequence, and redistribute the weights based on the stable inverse probability weight sequence to generate the redistributed stable inverse probability weight.

5. The cloud-based garden fertilization optimization method as described in claim 4, characterized in that, The expression for calculating the stabilized inverse probability weight is: ; in, For management unit In time slice The stabilized inverse probability weights, For management unit Time slice The fertilization action, For management unit From the start time slice to the time slice The fertilization action, For management unit From the start time slice to the time slice Complete covariates, For management unit From the start time slice to the time slice The aggregate amount of neighboring fertilization actions, This is the time slice index in the product. To stabilize the time slice index corresponding to the inverse probability weight, Let be the conditional probability of the molecular fertilization action. The denominator is the conditional probability of the fertilization action.

6. The cloud-based garden fertilization optimization method as described in claim 5, characterized in that, Step S3 also includes: Step S33: Based on the fertilization action condition distribution model, the overlap of the longitudinal data sequence is determined, and a decisionable domain label is generated for the longitudinal data that does not meet the overlap determination. Step S34: Under the redistribution of stabilization inverse probability weights, the longitudinal data sequence is weighted and fitted to construct a marginal structure model. Based on the fertilization action set and the decision domain label, a decision domain fertilization action set is generated. The aggregation of each decision domain fertilization action and the neighboring domain fertilization action in the decision domain fertilization action set is input into the marginal structure model to obtain the corresponding counterfactual results. The causal gain is obtained by subtracting the counterfactual results of the preset baseline fertilization actions from the counterfactual results corresponding to the decision domain fertilization actions. Step S35: Using the management unit, time slice, and fertilization action as indexes, associate them one-to-one with causal gains to obtain the first action value table; The cost value and risk value are obtained by processing the fertilization action in the decision domain and the complete covariates and the aggregated amount of the fertilization action in the neighboring domain corresponding to the management unit where the fertilization action in the decision domain is located using the preset cost and risk rules. The cost value and risk value are then written into the first action value table.

7. The cloud-based garden fertilization optimization method as described in claim 6, characterized in that, Step S4 specifically includes: Step S41: If it is the initial time slice, then map the first action value table to the current action generation rule; If it is not the initial time slice, then the updated action generation rule is read as the current action generation rule; Based on the current action generation rules, construct a set of candidate fertilization actions for each management unit in the current time slice, perform consistency verification on the set of candidate fertilization actions, and obtain a set of verified candidate fertilization actions. Step S42: Subtract the cost value and risk value from the causal gain to obtain the robust target value for each candidate fertilization action; Step S43: Read the resource configuration data to obtain global resource constraints. If the global resource constraints are empty, independently select the candidate fertilization action with the largest robust target value for each management unit and generate a fertilization plan. If the global resource constraints are not empty, set a candidate fertilization action selection variable for each candidate fertilization action in each management unit, take the sum of robust objective values ​​as the second objective function, and take the global resource constraints and the maximum selection of one fertilization action in each management unit as constraints to solve for the fertilization plan. Step S44: Extract the complementary covariates corresponding to the fertilization actions selected for each management unit in the fertilization plan, and calculate the decision risk score; If the decision risk scores of all management units are lower than the preset safety threshold, the fertilization plan will be converted into a fertilization plan instruction and sent to the execution system. The fertilization plan instruction includes a management unit identifier, a time slice identifier, and a fertilization action identifier. If the decision risk score of any management unit is higher than the preset safety threshold, the fertilization plan of that management unit will be cancelled, a new fertilization plan will be generated from the preset baseline fertilization action, and a safety alarm will be recorded and sent to the execution system.

8. The cloud-based garden fertilization optimization method as described in claim 7, characterized in that, The consistency check specifically includes: If a candidate fertilization action has a decisionable domain label and satisfies the preset constraint rules, it is determined to pass the consistency check and is included in the set of candidate fertilization actions after the check. If a candidate fertilization action does not have a decisionable domain label or does not meet the preset constraint rules, it is determined to have failed the consistency check and is removed from the candidate fertilization action set.

9. The cloud-based garden fertilization optimization method as described in claim 8, characterized in that, Step S5 specifically includes: Step S51: Receive the execution records of the execution system and the newly added soil observation data and remote sensing observation data in the current time slice, and align and update the fertilization action matrix, covariate matrix, result matrix and neighborhood exposure matrix according to the management unit and time slice respectively. Obtain a local sliding window with the current time slice as the endpoint and a preset time step forward. Extract the result matrix and covariate matrix within the local sliding window as online objects to be completed. Perform local completion operation using the incremental matrix completion algorithm to obtain a new completed result matrix group. Based on the management unit of the newly completed result matrix group in the current time slice, and combined with the aggregation amount of neighborhood fertilization actions, the lag action sequence and the cumulative action sequence in the neighborhood exposure matrix of the current time slice, a state set is obtained; Calculate the actual reward using the causal gain and reward calculation rules corresponding to the action in the previous time slice; Step S52: When the second action value table does not exist, construct a fertilization strategy game tree based on the state set, the verified candidate fertilization action set and the reward calculation rule, perform virtual regret minimization iteration on the fertilization strategy game tree, output the initial fertilization strategy, and initialize the second action value table using the initial fertilization strategy. If the second action value table already exists, read the second action value table from the previous time slice as the current second action value table; Step S53: Use the SARSA update rule to iteratively update the second action value table to obtain the updated second action value table; Step S54: Map the updated second action value table to the updated action generation rule, and store the updated action generation rule as the current action generation rule for the next time slice.

10. The cloud-based garden fertilization optimization method as described in claim 9, characterized in that, The updated expression for calculating the value of the second action is: ; in, State in the second action value table Choose the fertilization action below The value estimate, This refers to the state of the management unit in the previous time slice's state set. This refers to the fertilization action performed on the management unit in the previous time frame. For actual rewards, This refers to the current time slice state corresponding to the management unit within the current time slice state set. Generate rules for the current action in the current time slice state. The following refers to the fertilization actions selected by the management unit. For learning rate, As a discount factor, This is the assignment operator.

Citation Information

Patent Citations

  • Automatic fertilization control system and method for nursery stock in landscape garden

    CN116721348A