An AI-based agricultural decision-making method and system

CN122573208APending Publication Date: 2026-08-14SICHUAN MAIGU IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明提供了一种基于人工智能的农业决策方法及系统,以解决现有技术中系统缺乏全局逻辑验证机制,只能通过预设简单优先级或人工排查处理冲突,不仅效率低下、难以覆盖大规模规则库,还会导致决策方案存在逻辑漏洞,造成水肥资源浪费甚至作物减产的问题

Benefits of technology

1. 本发明通过反事实对比识别关键规则子集,结合逻辑关系图与传递闭包算法全局检测规则间的直接与间接矛盾,实现了规则冲突的自动识别与系统性消解。相较于传统预设优先级或人工排查的方式,本方法能够覆盖大规模规则库中所有潜在冲突,从根本上避免因规则矛盾导致的错误决策。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122573208A_ABST
    Figure CN122573208A_ABST
Patent Text Reader

Abstract

This invention discloses an artificial intelligence-based agricultural decision-making method and system, belonging to the field of intelligent agricultural decision-making technology. Addressing the problems of traditional agricultural decision-making, such as reliance on experience, frequent rule conflicts, low reliability, and inability to self-optimize, this invention extracts initial decision rules by acquiring static environmental attributes of the target farmland. It then combines forward logical deduction to generate a baseline strategy and reverse counterfactual deduction to generate a comparative strategy, identifying a subset of key rules leading to decision discrepancies. Logical consistency verification outputs rule credibility scores, and rules that do not reach a threshold undergo conflict resolution and iterative correction, ultimately generating standardized agricultural execution instructions. Simultaneously, it dynamically adjusts the confidence level of rules in the knowledge base based on actual output feedback, achieving knowledge evolution. This invention effectively solves the rule conflict problem in agricultural decision-making, significantly improving the accuracy and reliability of decisions. The system is self-optimizable and adaptable to different farmland conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to an agricultural decision-making method and system based on artificial intelligence. Background Technology

[0002] With the deepening of agricultural digital transformation, rule-based intelligent agricultural decision-making systems, due to their clear logic and strong interpretability, have become the core technological support for large-scale and standardized planting. These systems integrate national planting standards, agricultural technology extension procedures, and expert experience to construct an agronomic rule base, matching environmental data such as farmland soil, topography, and irrigation to automatically generate agricultural operation plans for the entire growth cycle, effectively replacing the traditional experience-driven production model.

[0003] However, existing systems have consistently failed to overcome the core technological bottleneck of the inability to automatically identify and systematically resolve rule conflicts. Agronomic rules originate from highly diverse sources; rules summarized from different regions, experts, and periods inevitably contain logical contradictions due to differences in applicable scenarios and verification conditions. This includes direct conflicts where the preconditions are identical but the conclusions are diametrically opposed, such as contradictory rules advocating both immediate and delayed irrigation for the same soil moisture threshold; it also includes indirect conflicts with overlapping preconditions and ambiguous application boundaries, such as one rule requiring the application of organic fertilizer to low-organic-matter soils, while another stipulates that no topdressing is necessary if the preceding crop was leguminous.

[0004] Existing systems lack a global logic verification mechanism and can only handle conflicts by setting simple priorities or manual checks. This is not only inefficient and difficult to cover a large-scale rule base, but also leads to logical loopholes in decision-making schemes, resulting in waste of water and fertilizer resources and even crop yield reduction, which seriously restricts the reliability and widespread application of intelligent decision-making systems. Summary of the Invention

[0005] In view of this, the present invention provides an artificial intelligence-based agricultural decision-making method and system to solve the problem that existing systems lack a global logic verification mechanism and can only handle conflicts by setting simple priorities or manual investigation. This is not only inefficient and difficult to cover a large-scale rule base, but also leads to logical loopholes in the decision-making scheme, resulting in waste of water and fertilizer resources and even crop yield reduction.

[0006] The technical solution adopted in this invention is as follows: An artificial intelligence-based agricultural decision-making method includes: Step S1: Obtain the static environmental attributes of the target farmland, and extract a set of initial decision rules from the pre-constructed agronomic logic knowledge base based on the static environmental attributes. Step S1 specifically includes: The soil physicochemical properties, topographic properties, irrigation and drainage properties, and historical planting properties of the target farmland are collected as static environmental properties. The collected static environmental properties are converted into standardized attribute labels predefined in the agronomic logic knowledge base. Based on the standardized attribute labels, multi-dimensional attribute matching retrieval is performed in the agronomic logic knowledge base. All decision rules that match the static environmental properties of the target farmland with a degree exceeding a preset matching threshold are extracted to form an initial decision rule set.

[0007] Step S2: Based on the initial decision rules, a benchmark agricultural decision strategy is generated through forward logical deduction, and at the same time, at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision strategy is generated through reverse counterfactual deduction. In step S2, the step of generating at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision-making strategy through reverse counterfactual deduction specifically includes: For each decision rule upon which the benchmark agricultural decision-making strategy depends, at least one condition variable is selected from the preconditions of that decision rule. Specifically, this includes: for each rule upon which the benchmark decision-making strategy depends, extracting all its precondition variables to form a corresponding variable set; calculating the degree of influence of each condition variable on the expected output of the benchmark decision-making strategy, whereby the degree of influence is measured by the fluctuation range of the expected output when the variable's value changes. Specifically, this includes: for the condition variable to be calculated, keeping the values ​​of all other precondition variables of that rule fixed; discretizing the value of the condition variable within its allowed complete value range; calculating the expected output value of the benchmark decision-making strategy for each discrete value of the condition variable; calculating the dispersion index of all expected output values, and using this dispersion index as the degree of influence of the condition variable on the expected output of the benchmark decision-making strategy. All condition variables in the variable set are sorted in descending order of influence; several condition variables with the highest sorting order are selected as candidate condition variables; condition variables whose inverted values ​​would violate the basic axioms of the agronomic logic knowledge base are removed from the candidate condition variables; the remaining candidate condition variables are selected as the final condition variables. Invert the value of the condition variable to obtain a set of counterfactual premises; wherein, if the condition variable is a logical true or logical false value, it is modified to the opposite logical value; if the condition variable is a continuous value, it is replaced with the upper or lower boundary value within the allowed range of the static environment attribute. Using the counterfactual premises as a new starting point for reasoning, the inference is deduced step by step along the rule chain in the initial decision rule until a complete decision conclusion is reached; the agricultural operation sequence corresponding to the new decision conclusion is used as the counterfactual comparison strategy.

[0008] Step S3: Perform a rule-by-rule comparative analysis between the benchmark agricultural decision-making strategy and the at least one counterfactual comparison strategy to identify the key decision rule subset that leads to the difference in decision results; Step S3 specifically includes: Obtain all rules upon which the benchmark agricultural decision-making strategy depends, forming a first rule set; obtain all rules upon which the counterfactual comparison strategy depends, forming a second rule set; match each rule in the first rule set with each rule in the second rule set, and if a rule appears in both sets, mark it as a shared rule; remove all rules marked as shared rules from the first rule set, and use the remaining rules as the subset of key decision rules.

[0009] Step S4: Input the rules in the subset of key decision rules into a logical consistency verification process, and output a rule credibility score by checking the logical implication and contradiction relationships between the rules. Step S4 specifically includes: for each rule in the subset of key decision rules, retrieving the premise rule chain supporting the rule from the agronomic logic knowledge base; calculating the logical implication support between any two rules in the subset of key decision rules, wherein the logical implication support is calculated as follows: if the conclusion of the first rule implies the premise of the second rule, then add one positive support count; if the conclusion of the first rule and the conclusion of the second rule are mutually exclusive, then add one contradiction count; specifically including: A logical relationship graph of a subset of key decision rules is constructed, where each vertex corresponds to a rule in the subset, and each directed edge corresponds to a direct logical relationship between two rules. The indirect logical relationship between any two rules in the logical relationship graph is calculated using a transitive closure algorithm, including indirect implication and indirect contradiction relationships. For each pair of rules with an indirect logical relationship, a corresponding weight coefficient is assigned based on the transitive level of the logical relationship. The counts of direct logical relationships and the weighted counts of indirect logical relationships are then summed to obtain the positive support count and the contradiction count.

[0010] The total number of rule pairs in the subset of key decision rules is counted. The ratio of the positive support count to the total number of rule pairs is used as the first factor, and the ratio of the contradiction count to the total number of rule pairs is used as the second factor. The difference between the first factor and the second factor is used as the rule credibility score.

[0011] Step S5: When the credibility score of the rule exceeds the preset credibility threshold, an agricultural decision-making strategy is generated and the process proceeds to step S7. When the credibility score of the rule does not exceed the credibility threshold, a set of corrective rules is generated based on the contradictory relationships in the subset of key decision rules, and the conflicting rules are replaced with the corrective rules to obtain an updated set of decision rules. The specific methods for generating correction rules based on contradictory relationships in step S5 include: Search for two rules with direct logical contradictions within the subset of key decision rules. A direct logical contradiction manifests as two rules having the same or similar preconditions but mutually exclusive conclusions, or the conclusion of the first rule being mutually exclusive with the preconditions of the second rule. Record the two searched rules as a pair of contradictory rules, and extract the conflicting condition variables or conclusion variables from each pair. Based on the static environmental attributes, construct a new constraint to eliminate the conflict. The new constraint requires that the value of the conflicting condition variable must fall within a sub-interval that excludes the contradictory relationship. Select the rule with the higher confidence weight from the pair of contradictory rules as the main rule, and add the new constraint as an additional condition to the preconditions of the main rule to generate a corrective rule. Step S6: Based on the updated decision rule set, re-execute steps S2 to S5 until the output strategy passes the trust threshold verification. Step S7: The validated strategy is adopted as the final agricultural decision-making strategy, and corresponding agricultural execution instructions are generated.

[0012] The revised rule is added to the decision rule set, and the rule with the lower confidence weight in the contradictory rule pair is marked as an abandoned rule and will not be used in subsequent inferences.

[0013] An artificial intelligence-based agricultural decision-making system, the system comprising: The rule extraction module obtains the static environmental attributes of the target farmland and extracts a set of initial decision rules from a pre-built agronomic logic knowledge base based on the static environmental attributes. The bidirectional deduction module, based on the initial decision rules, generates a benchmark agricultural decision strategy through forward logical deduction, and simultaneously generates at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision strategy through reverse counterfactual deduction. The comparative analysis module performs a rule-by-rule comparative analysis between the benchmark agricultural decision-making strategy and the at least one counterfactual comparison strategy to identify the key decision rule subset that leads to the difference in decision results. The consistency verification module inputs the rules from the subset of key decision rules into a logical consistency verification process, and outputs a rule credibility score by checking the logical implications and contradictions between the rules. The rule update module, when the rule credibility score exceeds a preset credibility threshold, uses the benchmark agricultural decision-making strategy as the output strategy; when the rule credibility score does not exceed the credibility threshold, it generates a set of corrective rules based on the contradictory relationships in the subset of key decision rules, and replaces the conflicting rules with the corrective rules to obtain an updated set of decision rules. The iterative control module, based on the updated decision rule set, executes steps S2 to S5 until the output strategy passes the trust threshold verification. The policy output module is used to convert policies that have passed the trusted threshold verification into agricultural execution instructions.

[0014] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. This invention identifies a subset of key rules through counterfactual comparison and, combined with a logical relationship diagram and a transitive closure algorithm, globally detects direct and indirect contradictions between rules, achieving automatic identification and systematic resolution of rule conflicts. Compared to traditional methods of preset priorities or manual screening, this method can cover all potential conflicts in a large-scale rule base, fundamentally avoiding erroneous decisions caused by rule contradictions.

[0015] 2. This invention applies counterfactual reasoning to agricultural decision-making. By analyzing the differences between the generated baseline strategy and the counterfactual comparison strategy, it clearly reveals the causal logic of "which conditions led to this decision." This breaks away from the drawbacks of traditional "black box" decision-making systems, enabling farmers to intuitively understand the basis for their decisions and significantly improving the acceptance and trust of intelligent decision-making systems.

[0016] 3. This invention constructs a credibility scoring system based on rule implication and contradictory relationships, which can quantitatively evaluate the logical consistency of decision-making schemes. By pre-setting a credibility threshold to screen qualified decisions, and automatically iteratively correcting substandard schemes, it ensures that every output decision undergoes rigorous logical verification, providing a scientific and rigorous guiding basis for agricultural production.

[0017] 4. This invention automates the entire agricultural decision-making process, generating scientific and reliable agricultural execution instructions without human intervention, which significantly reduces the workload and labor costs of agricultural technicians. Attached Figure Description

[0018] The present invention will be described by way of example and with reference to the accompanying drawings, wherein: Figure 1 This is a schematic diagram of the process structure of the present invention; Figure 2 This is a schematic diagram of the process structure of step S3 of the present invention; Figure 3 This is a system diagram of Embodiment 2 of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0020] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other.

[0022] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0023] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other.

[0025] Example 1

[0026] like Figures 1-2 As shown in the figure, an agricultural decision-making method based on artificial intelligence is disclosed in this embodiment of the invention, including: Step S1: Obtain the static environmental attributes of the target farmland, and extract a set of initial decision rules from the pre-constructed agronomic logic knowledge base based on the static environmental attributes. Step S1 specifically includes: The soil physicochemical properties, topographic properties, irrigation and drainage properties, and historical planting properties of the target farmland were collected as static environmental attributes. Soil physicochemical properties included soil pH, organic matter content, total nitrogen content, available phosphorus content, available potassium content, and soil texture. Topographic properties included altitude, slope, and aspect. Irrigation and drainage properties included irrigation method, irrigation guarantee rate, and drainage capacity level. Historical planting properties included previous crop type, average yield over the past three years, and frequency of major pests and diseases. The collected static environmental attributes were then converted into an agronomic logic knowledge base. The system uses predefined standardized attribute labels, such as classifying soil pH into three labels: acidic (pH<6.0), neutral (6.0≤pH≤7.5), and alkaline (pH>7.5); classifying terrain slope into three labels: flat (<5°), gentle slope (5°-15°), and steep slope (>15°); and classifying irrigation guarantee rate into three levels: low (<60%), medium (60%-80%), and high (>80%). The agronomic logic knowledge base stores standardized agricultural decision-making rules that have been verified by experts, conform to common agronomic knowledge, and can be recognized and logically deduced by machines. All decision rules in the database uniformly adopt the causal logic format of (IF farmland environmental conditions THEN agricultural operation conclusion), which is a structured and conditional agricultural production judgment rule. For example: IF soil organic matter content <10g / kg, crop in jointing stage THEN apply organic fertilizer; IF soil moisture <20%, irrigation guarantee rate high THEN implement irrigation operations. The core function of this knowledge base is to provide the system with standardized and authoritative agronomic reasoning basis, supporting the entire process of decision-making operations, including farmland attribute matching, initial rule extraction, positive and negative logical deduction, rule contradiction verification, and rule iterative correction. Based on standardized attribute tags, multi-dimensional attribute matching retrieval is performed in the agronomic logic knowledge base. A weighted matching degree calculation method is used to evaluate the suitability of each rule with the target farmland. The matching degree calculation formula is:

[0027] in For the first The degree of matching of the decision rules. For the first The weights of each attribute are set according to their importance in agronomy: soil attribute weight is 0.15, irrigation attribute weight is 0.12, topography attribute weight is 0.08, historical planting attribute weight is 0.05, and the sum of all weights is 1. For the first The matching score of each attribute, if the rule Attribute requirements and target farmland attributes A score of 1 is awarded for complete consistency, 0.5 for partial consistency, and 0 for inconsistency. All decision rules with a matching degree exceeding the preset matching threshold (0.7) with the static environmental attributes of the target farmland are extracted. The extracted rules are deduplicated to remove duplicate rule entries with identical preconditions and conclusions. The rules are then sorted from high to low according to the matching degree to form an initial decision rule set.

[0028] Step S2: Based on the initial decision rules, a benchmark agricultural decision strategy is generated through forward logical deduction, and at the same time, at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision strategy is generated through reverse counterfactual deduction. Forward logical deduction is implemented using a forward chain reasoning algorithm. The standardized static environmental attributes of the target farmland serve as the initial fact set, stored as key-value pairs where the key is the attribute name and the value is the standardized attribute value. Each rule in the initial decision rule set is traversed sequentially according to its confidence weight, from highest to lowest. If all preconditions of a rule can be matched with key-value pairs in the current fact set, the rule is triggered, its conclusion is added as a new fact, and the rule is marked as triggered to prevent duplicate triggering. This matching and triggering process is repeated until all rules have been traversed and no new facts can be added. The final fact set contains all agricultural operations arranged chronologically according to the crop growth stages, forming the baseline agricultural decision-making strategy. Based on the WOFOST crop growth model, all agricultural operation parameters of the strategy are input, and the expected output corresponding to the strategy is calculated. (Unit: kg / mu); In step S2, the step of generating at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision-making strategy through reverse counterfactual deduction specifically includes: For each decision rule upon which the benchmark agricultural decision-making strategy relies, at least one condition variable is selected from the preconditions of that decision rule. Specifically, this includes: for each rule upon which the benchmark decision-making strategy relies, extracting all its precondition variables to form a corresponding variable set, categorizing variables into logical variables (e.g., "whether it is loam") and continuous variables (e.g., "soil organic matter content"); calculating the degree of influence of each condition variable on the expected output of the benchmark decision-making strategy, whereby the degree of influence is measured by the fluctuation range of the expected output when the value of the variable changes. Specifically, this includes: for the condition variable to be calculated, keeping the values ​​of all other precondition variables of that rule fixed; setting the value of the condition variable within its allowable range... The entire range of values ​​is discretized at equal intervals to obtain a sequence of values ​​containing 5-10 discrete points. For example, the allowable range of soil organic matter content is 5g / kg-30g / kg, which is discretized into six discrete points: 5g / kg, 10g / kg, 15g / kg, 20g / kg, 25g / kg, and 30g / kg. The expected output value corresponding to the baseline decision strategy is calculated for each discrete value of the condition variable. During the calculation, all other rules, parameters, and facts remain unchanged; only the value of the current condition variable is modified. The standard deviation of all expected output values ​​is calculated as the dispersion index. This dispersion index is used as the degree of influence of the condition variable on the expected output of the baseline decision strategy. The calculation formula is:

[0029] in For the first Rule number 1 The degree of influence of each condition variable The number of discrete points. For the first The expected output corresponding to each discrete value The average of all expected outputs. Sort all condition variables in the variable set according to their impact from largest to smallest; select the top two condition variables as candidate condition variables to ensure that the selected variables have the greatest impact on the expected output; remove condition variables from the candidate condition variables whose values, when inverted, would violate the basic axioms of the agronomic logic knowledge base, such as variables like "soil moisture ≥ 0" which violate physical axioms when inverted, and variables like "crop growth period ≥ 0" which violate crop growth patterns when inverted; use the remaining candidate condition variables as the final selected condition variables. Inverting the value of the condition variable yields a set of counterfactual premises. If the condition variable is a logical true or false value, it is modified to its opposite logical value, for example, "is loam" is modified to "is not loam". If the condition variable is a continuous value, it is replaced with the upper or lower boundary value within the allowable range of the static environmental attribute. For example, if the allowable range of soil moisture is 10%-30%, and the current value is 20%, it is inverted to 10% (lower limit) or 30% (upper limit), prioritizing the boundary value with the largest difference from the current value. Using the counterfactual premises as the new starting point for reasoning, the derivation proceeds step-by-step along the rule chain of the initial decision rule. During the derivation, only the negated condition variables are modified, while all other facts and rules remain unchanged, until a complete decision conclusion is reached. Specifically, the implementation involves: first, constructing a counterfactual fact set by deeply copying the initial fact set from the baseline derivation to generate an independent counterfactual fact set, avoiding modification of the original facts; then, replacing the corresponding original key-value pairs in the counterfactual fact set with the key-value pairs from the counterfactual premises, overwriting the original facts; and finally, employing the same forward chain reasoning algorithm and rule priority sorting method as the forward derivation, re-traversing the initial decision rule starting from the updated counterfactual fact set. The set of counterfactual facts includes all rules. If all the preconditions of a rule exist in the current counterfactual fact set, then the rule is triggered, its conclusion is added to the counterfactual fact set, and it is marked as triggered. During the derivation process, if two rules have mutually exclusive conclusions but satisfy the preconditions simultaneously, then the confidence weights of the two rules are compared, and the rule with the higher confidence weight is selected for execution, while the rule with the lower weight is ignored. The above matching and triggering process is repeated until no new rules can be triggered. At this point, all agricultural operations contained in the counterfactual fact set constitute the complete counterfactual decision conclusion. The agricultural operation sequence corresponding to the new decision conclusion is sorted according to the crop growth period and used as the counterfactual comparison strategy. The expected output was calculated using the same WOFOST crop growth model. .

[0030] Step S3: Perform a rule-by-rule comparative analysis between the benchmark agricultural decision-making strategy and the at least one counterfactual comparison strategy to identify the key decision rule subset that leads to the difference in decision results; Step S3 specifically includes: Obtain all rules relied upon by the benchmark agricultural decision-making strategy to form a first rule set. Generate a unique hash value for each rule as an identifier. The hash value is calculated by concatenating the precondition string and conclusion string of the rule in a fixed order and then using the MD5 algorithm. If a hash collision occurs (i.e., two different rules generate the same hash value), add the rule ID to the end of the string and recalculate the hash value to ensure that the same rule has the same hash value and different rules have different hash values. Obtain all rules relied upon by the counterfactual comparison strategy to form a second rule set, and similarly generate a corresponding hash value for each rule. Then, combine the rules from the first rule set... The hash value of each rule is compared one by one with all hash values ​​in the second rule set. If a hash value appears in both sets, the rule corresponding to that hash value is marked as a shared rule. All rules marked as shared rules are removed from the first rule set, and the remaining rules are used as a preliminary subset of key decision rules. When multiple counterfactual comparison strategies are generated, each counterfactual comparison strategy is compared with the baseline strategy in the above process. The number of times each rule is marked as a non-shared rule in all comparisons is counted, and only the rules that appear more than half the number of counterfactual strategies are retained to form the final subset of key decision rules.

[0031] Step S4: Input the rules in the subset of key decision rules into a logical consistency verification process, and output a rule credibility score by checking the logical implication and contradiction relationships between the rules. Step S4 specifically includes: for each rule in the subset of key decision rules, retrieving the premise rule chain supporting the rule from the agronomic logic knowledge base; calculating the logical implication support between any two rules in the subset of key decision rules, wherein the logical implication support is calculated as follows: if the conclusion of the first rule implies the premise of the second rule, then add one positive support count; if the conclusion of the first rule and the conclusion of the second rule are mutually exclusive, then add one contradiction count; specifically including: For each rule in the subset of key decision rules, the prerequisite rule chain supporting the rule is retrieved from the agronomic logic knowledge base, that is, all upstream rules that can derive the prerequisite conditions of the rule, forming a rule dependency tree with the rule as the root node; the specific process of forming the rule dependency tree is as follows: taking the current key rule as the root node... As the root node, extract all the preconditions of the rule; traverse all rules in the agronomic logic knowledge base to find the conclusion and... Rules that perfectly match a given precondition are designated as first-level child nodes of the root node. For each first-level child node, the above process is repeated, extracting its preconditions and finding the corresponding upstream rules, which are then designated as second-level child nodes. This process is repeated recursively until all preconditions of a node are basic facts (i.e., no corresponding upstream rule can be found), at which point that node becomes a leaf node. The resulting tree structure is the rule tree. The rule dependency tree stores the rule ID, preconditions, and conclusion for each node. Each edge represents the logical relationship that "the conclusion of a child node supports the preconditions of its parent node." The logical implication support between any two rules in the subset of key decision rules is calculated as follows: if the conclusion of the first rule implies the preconditions of the second rule, a positive support count is added; if the conclusions of the first and second rules are mutually exclusive, a contradiction count is added. Specifically, this includes: Logical relationship diagram for constructing a subset of key decision rules , where the vertex set The corresponding subset There are 14 key rules, and each directed edge corresponds to a direct logical relationship between two rules; the rule for generating edges is: for any two rules... and ,like The conclusion and If a certain precondition is completely matched, then add a line from arrive A positive edge with a weight of 1 represents a direct implication relation; if The conclusion and If the conclusions are mutually exclusive in agronomical logic (e.g., "watering" and "not watering," "applying nitrogen fertilizer" and "applying phosphorus fertilizer" are mutually exclusive within the same time window), then add a clause from... arrive Negative edges with a weight of -1 represent direct contradictions. The indirect logical relationships between any two rules in the logical relationship graph are calculated using the Warshall transitive closure algorithm. These indirect logical relationships include indirect implication and indirect contradiction. The specific implementation of the Warshall algorithm is as follows: initialize a... transitive closure matrix The matrix elements in the closure matrix are passed. Initialize as a logical relationship diagram from arrive The weight of the direct edge is 0 if there is no direct edge; for each intermediate node ( ), Traverse all node pairs ,like and Then calculate the indirect relationship weight: if and If the signs are the same, the indirect relationship is an implication relationship, and the weight is... If the signs are opposite, the indirect relationship is contradictory, and the weight is [value missing]. ;like Then update For indirect relationship weights; ultimately, if Then it means and There is an indirect implication relationship between them, if This indicates the existence of an indirect contradictory relationship. This indicates no indirect logical relationship; for each pair of rules with an indirect logical relationship, a corresponding weight coefficient is assigned according to the transitivity of the logical relationship, where the transitivity is from... arrive The shortest path length is calculated using a breadth-first search algorithm; the weight coefficient decreases exponentially with increasing transmission level, and the calculation formula is as follows: ,in To pass on the hierarchy, when The value is set to 0.2 to avoid the indirect relationship being ignored due to excessively low weight. The counts of direct logical relationships and the weighted counts of indirect logical relationships are summarized to obtain the positive support count and the contradiction count. The positive support count is the sum of the number of all direct implication relationships plus the weights of all indirect implication relationships, and the contradiction count is the sum of the number of all direct contradiction relationships plus the absolute values ​​of the weights of all indirect contradiction relationships.

[0032] The total number of rule pairs in the subset of key decision rules is calculated using the following formula: ,in The key rule subset is the number of rules; the ratio of the positive support count to the total number of rule pairs is used as the first factor, and the ratio of the contradiction count to the total number of rule pairs is used as the second factor; the difference between the first factor and the second factor is used as the rule credibility score, with a score range of [-1, 1]. The higher the score, the better the logical consistency of the rule subset. The preset credibility threshold is 0.6, which is determined by cross-validation of 100 sets of historical agricultural decision data, and can balance the reliability of decision-making and computational efficiency.

[0033] Step S5: When the rule credibility score exceeds the preset credibility threshold, an agricultural decision-making strategy is generated and the process proceeds to step S7; when the rule credibility score does not exceed the credibility threshold, a set of corrective rules is generated based on the contradictory relationships in the subset of key decision rules, and the corrective rules are used to replace the conflicting rules to obtain an updated set of decision rules. The specific methods for generating correction rules based on contradictory relationships in step S5 include: The search for two rules with direct logical contradictions within the subset of key decision rules involves a depth-first search algorithm that traverses all negative edges in the logical relationship graph, with each negative edge corresponding to a pair of contradictory rules. Direct logical contradictions manifest as two rules having the same or similar preconditions but mutually exclusive conclusions, such as "IF soil moisture < 20% THEN water" and "IF soil moisture < 20% THEN do not water," or the conclusion of the first rule being mutually exclusive with the precondition of the second rule, for example, the first rule's conclusion being "soil moisture > 30%" while the second rule's precondition is "soil moisture ≤ 30%." Precondition similarity is calculated using an edit distance algorithm, converting the precondition strings of the two rules into character sequences and calculating their Levenshtein distance. If the distance is less than 20% of the total length of the preconditions, the preconditions are considered similar. The two rules found are then recorded as a pair of contradictory rules. The conflicting condition variables or conclusion variables in the contradictory rule pairs are extracted. For example, in cases where the premises are the same but the conclusions are mutually exclusive, the conflicting variable is the conclusion variable; in cases where the conclusion and premise are mutually exclusive, the conflicting variables are the corresponding premise and conclusion variables. Based on the static environmental attributes, a new constraint condition is constructed to eliminate the conflict. The new constraint condition requires that the value of the conflicting condition variable must fall within a sub-interval that excludes the contradictory relationship. For example, the soil moisture threshold is divided into finer sub-intervals based on soil texture and irrigation capacity: "When the soil texture is loam and the irrigation guarantee rate is >80%, the soil moisture threshold is 25%; when the soil texture is sandy soil and the irrigation guarantee rate is <60%, the soil moisture threshold is 15%." The rule with the higher confidence weight is selected as the master rule from the contradictory rule pairs. The new constraint is added as an additional condition to the prerequisites of the main rule to generate a modified rule. The format of the revised rule remains consistent with the original rule: "IF original premise AND new constraint THEN original conclusion". The revised rule is added to the decision rule set, and the rule with the lower confidence weight among the contradictory rules is marked as a discarded rule and will not be used in subsequent deductions. Simultaneously, according to the formula... The confidence weights of the initialization correction rule are as follows: and These are the original confidence levels of the contradictory rules against the medium-high weight and low weight rules, respectively, ensuring that the confidence level of the modified rules is mainly determined by the more reliable high-weight rules.

[0034] Step S6: Based on the updated decision rule set, re-execute steps S2 to S5 until the output strategy passes the trust threshold verification. Each iteration is based on the updated decision rule set from the previous round, regenerating the baseline strategy and counterfactual comparison strategy, identifying key rule subsets and verifying logical consistency, and setting a maximum of 10 iterations to avoid infinite iterations. A convergence condition is also set: if the change in rule credibility score between two consecutive iterations is less than 0.01, the iteration is considered converged, and the process is terminated early. If the credibility threshold is not reached after 10 iterations, the strategy with the highest credibility score in the current iteration is output and marked as a "limited credibility strategy," while a risk warning is generated explaining the potential logical contradictions and possible impacts of this strategy. An iteration history is maintained during the iteration process, storing the rule set, credibility score, updated rules, and generated strategies for each iteration, facilitating subsequent backtracking and analysis.

[0035] Step S7: The validated strategy is adopted as the final agricultural decision-making strategy, and corresponding agricultural execution instructions are generated.

[0036] The final agricultural decision-making strategy is converted into standardized agricultural execution instructions. The strategy is broken down into specific operations for multiple stages such as sowing, fertilization, irrigation, pest and disease control, and harvesting, according to the crop growth stage. Each instruction includes the operation name, operation time window (accurate to the day), standard agricultural input dosage (unit: kg / mu or L / mu), requirements for operating machinery, and safety precautions. For example, "June 10-12, 2024, spray urea at a dosage of 15 kg / mu, use a backpack sprayer, and avoid operation during rainy days and high-temperature periods." After the instruction is generated, it is pushed to farmers via mobile APP, SMS, or paper report. It also supports dynamic adjustment of instruction content based on real-time weather data and farmland sensor data. For example, if real-time weather data shows that there will be moderate to heavy rain in the next 3 days, the irrigation operation will be automatically postponed until after the rainfall ends, and the fertilizer dosage will be adjusted accordingly.

[0037] Example 2

[0038] like Figure 3 As shown, this embodiment proposes an artificial intelligence-based agricultural decision-making system based on embodiment 1. The system includes: The rule extraction module obtains the static environmental attributes of the target farmland and extracts a set of initial decision rules from a pre-built agronomic logic knowledge base based on the static environmental attributes. The bidirectional deduction module, based on the initial decision rules, generates a benchmark agricultural decision strategy through forward logical deduction, and simultaneously generates at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision strategy through reverse counterfactual deduction. The comparative analysis module performs a rule-by-rule comparative analysis between the benchmark agricultural decision-making strategy and the at least one counterfactual comparison strategy to identify the key decision rule subset that leads to the difference in decision results. The consistency verification module inputs the rules from the subset of key decision rules into a logical consistency verification process, and outputs a rule credibility score by checking the logical implications and contradictions between the rules. The rule update module, when the rule credibility score exceeds a preset credibility threshold, uses the benchmark agricultural decision-making strategy as the output strategy; when the rule credibility score does not exceed the credibility threshold, it generates a set of corrective rules based on the contradictory relationships in the subset of key decision rules, and replaces the conflicting rules with the corrective rules to obtain an updated set of decision rules. The iterative control module, based on the updated decision rule set, executes steps S2 to S5 until the output strategy passes the trust threshold verification. The policy output module is used to convert policies that have passed the trusted threshold verification into agricultural execution instructions.

[0039] The circuits, electronic components, and modules involved are all existing technologies, which can be fully implemented by those skilled in the art, and need not be elaborated upon. The scope of protection of this invention does not involve any improvement to the software and methods.

[0040] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0041] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An agricultural decision-making method based on artificial intelligence, characterized in that, include: Step S1: Obtain the static environmental attributes of the target farmland, and extract a set of initial decision rules from the pre-constructed agronomic logic knowledge base based on the static environmental attributes. Step S2: Based on the initial decision rules, a benchmark agricultural decision strategy is generated through forward logical deduction, and at the same time, at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision strategy is generated through reverse counterfactual deduction. Step S3: Perform a rule-by-rule comparative analysis between the benchmark agricultural decision-making strategy and the at least one counterfactual comparison strategy to identify the key decision rule subset that leads to the difference in decision results; Step S4: Input the rules in the subset of key decision rules into a logical consistency verification process, and output a rule credibility score by checking the logical implication and contradiction relationships between the rules. Step S5: When the credibility score of the rule exceeds the preset credibility threshold, an agricultural decision-making strategy is generated and the process proceeds to step S7. When the credibility score of the rule does not exceed the credibility threshold, a set of corrective rules is generated based on the contradictory relationships in the subset of key decision rules, and the conflicting rules are replaced with the corrective rules to obtain an updated set of decision rules. Step S6: Based on the updated decision rule set, re-execute steps S2 to S5 until the output strategy passes the trust threshold verification. Step S7: The verified agricultural decision-making strategy is taken as the final agricultural decision-making strategy, and the corresponding agricultural execution instructions are generated.

2. The agricultural decision-making method based on artificial intelligence according to claim 1, characterized in that, Step S1 specifically includes: The soil physicochemical properties, topographic properties, irrigation and drainage properties, and historical planting properties of the target farmland are collected as static environmental properties. The collected static environmental attributes are converted into standardized attribute tags predefined in the agronomic logic knowledge base; Based on standardized attribute tags, multi-dimensional attribute matching and retrieval are performed in the agronomic logic knowledge base; Extract all decision rules whose matching degree with the static environmental attributes of the target farmland exceeds a preset matching threshold to form an initial decision rule set.

3. The agricultural decision-making method based on artificial intelligence according to claim 1, characterized in that, In step S2, the step of generating at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision-making strategy through reverse counterfactual deduction specifically includes: For each decision rule upon which the benchmark agricultural decision-making strategy relies, at least one condition variable is selected from the preconditions of that decision rule, and the value of the condition variable is inverted to obtain a set of counterfactual preconditions; wherein, if the condition variable is a logical true value or a logical false value, it is modified to the opposite logical value; if the condition variable is a continuous value, it is replaced with the upper or lower boundary value within the allowable range of the static environmental attribute. Using the counterfactual premise as a new starting point for reasoning, the inference is deduced step by step along the rule chain in the initial decision rule until a complete decision conclusion is reached. The agricultural operation sequence corresponding to the new decision conclusion is used as the counterfactual comparison strategy.

4. The agricultural decision-making method based on artificial intelligence according to claim 3, characterized in that, The selection of at least one condition variable from the preconditions of the decision rule specifically includes: For each rule upon which the baseline decision-making strategy depends, extract all its precondition variables to form the corresponding variable set; Calculate the degree of influence of each condition variable on the expected output of the baseline decision strategy, and measure the degree of influence by the fluctuation of the expected output when the value of the variable changes; Sort all condition variables in the variable set in descending order of their impact. Select the top-ranked condition variables as candidate condition variables; Remove condition variables from the candidate condition variables that would violate the basic axioms in the agronomic logic knowledge base if their values ​​are inverted; The remaining candidate condition variables are used as the final selected condition variables.

5. The agricultural decision-making method based on artificial intelligence according to claim 4, characterized in that, The calculation of the impact of each condition variable on the expected output of the baseline decision strategy specifically includes: For the condition variable to be calculated, keep the values ​​of all other precondition variables of this rule fixed. Discretize and iterate through the full range of allowed values ​​for the condition variable; Calculate the expected output value of the benchmark decision strategy for each discrete value of the condition variable; Calculate the dispersion index of all expected output values, and use this dispersion index as the degree of influence of the condition variable on the expected output of the baseline decision strategy.

6. The agricultural decision-making method based on artificial intelligence according to claim 1, characterized in that, Step S3 specifically includes: Obtain all rules upon which the benchmark agricultural decision-making strategy depends, forming a first rule set; Obtain all the rules upon which the counterfactual comparison strategy depends, forming a second rule set; Each rule in the first rule set is matched with each rule in the second rule set. If a rule appears in both sets, it is marked as a shared rule. Remove all rules marked as shared rules from the first rule set, and use the remaining rules as the subset of key decision rules.

7. The agricultural decision-making method based on artificial intelligence according to claim 1, characterized in that, Step S4 specifically includes: For each rule in the subset of key decision rules, retrieve the prerequisite rule chain supporting the rule from the agronomic logic knowledge base; Calculate the logical implication support between any two rules in the subset of key decision rules. The logical implication support is calculated as follows: if the conclusion of the first rule implies the premise of the second rule, then add one positive support count; if the conclusion of the first rule and the conclusion of the second rule are mutually exclusive, then add one contradiction count. The total number of rule pairs in the subset of key decision rules is counted, and the ratio of the positive support count to the total number of rule pairs is used as the first factor, and the ratio of the contradiction count to the total number of rule pairs is used as the second factor. The difference between the first factor and the second factor is used as the rule credibility score.

8. The agricultural decision-making method based on artificial intelligence according to claim 7, characterized in that, The calculation of the logical implication support between any two rules in the subset of key decision rules specifically includes: Construct a logical relationship graph of the key decision rule subset, where each vertex corresponds to one rule in the subset, and each directed edge corresponds to the direct logical relationship between two rules; The indirect logical relationship between any two rules in the logical relationship graph is calculated by the transitive closure algorithm. The indirect logical relationship includes indirect implication relationship and indirect contradiction relationship. For each pair of rules with an indirect logical relationship, assign a corresponding weight coefficient according to the transmission level of the logical relationship; The counts of direct logical relationships and the weighted counts of indirect logical relationships are summarized to obtain the positive support count and the contradiction count.

9. The agricultural decision-making method based on artificial intelligence according to claim 1, characterized in that, The specific methods for generating correction rules based on contradictory relationships in step S5 include: Search for two rules that have a direct logical contradiction in the subset of key decision rules; the direct logical contradiction is manifested in two rules having the same or similar preconditions but mutually exclusive conclusions, or the conclusion of the first rule and the preconditions of the second rule being mutually exclusive. The two rules found are recorded as contradictory rule pairs, and the conflicting condition variables or conclusion variables in the contradictory rule pairs are extracted respectively; Based on the static environment attributes, a new constraint condition for eliminating conflict is constructed, wherein the value of the conflict condition variable must fall within a sub-interval that excludes the contradictory relationship. Select the rule with the higher confidence weight from the contradictory rule pair as the main rule, and add the new constraint as an additional condition to the premise of the main rule to generate a correction rule. The revised rule is added to the decision rule set, and the rule with the lower confidence weight in the contradictory rule pair is marked as an abandoned rule and will not be used in subsequent inferences.

10. An artificial intelligence-based agricultural decision-making system for executing the method of any one of claims 1 to 9, characterized in that, The system includes: The rule extraction module obtains the static environmental attributes of the target farmland and extracts a set of initial decision rules from a pre-built agronomic logic knowledge base based on the static environmental attributes. The bidirectional deduction module, based on the initial decision rules, generates a benchmark agricultural decision strategy through forward logical deduction, and simultaneously generates at least one counterfactual comparison strategy corresponding to the benchmark agricultural decision strategy through reverse counterfactual deduction. The comparative analysis module performs a rule-by-rule comparative analysis between the benchmark agricultural decision-making strategy and the at least one counterfactual comparison strategy to identify the key decision rule subset that leads to the difference in decision results. The consistency verification module inputs the rules from the subset of key decision rules into a logical consistency verification process, and outputs a rule credibility score by checking the logical implications and contradictions between the rules. The rule update module, when the rule credibility score exceeds a preset credibility threshold, uses the benchmark agricultural decision-making strategy as the output strategy; when the rule credibility score does not exceed the credibility threshold, it generates a set of corrective rules based on the contradictory relationships in the subset of key decision rules, and replaces the conflicting rules with the corrective rules to obtain an updated set of decision rules. The iterative control module, based on the updated decision rule set, goes through the bidirectional inference module, the comparative analysis module, the consistency verification module, and the rule update module again until the output strategy passes the trust threshold verification. The policy output module is used to convert policies that have passed the trusted threshold verification into agricultural execution instructions.