Agricultural planning state machine-based vectorless intelligent retrieval method
By constructing a structured dimensional model for agricultural planning and configuring intelligent agents using state machines, the semantic drift and lack of autonomy issues of existing intelligent knowledge bases for agricultural planning are resolved, enabling the generation of accurate, autonomous, and efficient agricultural planning schemes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-10
Smart Images

Figure CN122364428A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical fields of artificial intelligence and agricultural planning, and in particular to a vectorless intelligent retrieval method for agricultural planning based on state machines. Background Technology
[0002] With the rapid development of the smart agriculture industry, agricultural planning, as a core prerequisite for agricultural production, directly determines the final benefits of agricultural production through the scientific nature, adaptability, and feasibility of its solutions. Currently, the agricultural sector has accumulated a wealth of reusable successful planning cases, standardized planting models, and industry technical specifications. Building a domain knowledge base based on historical cases, enabling rapid retrieval and reuse of cases, and intelligent generation of planning solutions have become core requirements and mainstream development directions for the intelligent upgrading of agricultural planning.
[0003] Current intelligent knowledge base solutions applied in the field of agricultural planning are mostly based on large language models and retrieval-enhanced generation (RAG) technology. Although they attempt to solve the problems of low efficiency of traditional manual retrieval and reliance on experience for solution generation, they have many prominent shortcomings due to the limitations of the technical approach itself, and are particularly unsuitable for the needs of experience reuse and solution planning in the field of agricultural planning.
[0004] These solutions rely heavily on vector retrieval technology, which has significant limitations. They cannot achieve precise logical matching based on agricultural planning business dimensions and are prone to semantic drift, leading to retrieved cases that are disconnected from the user's actual planning needs—matches that are semantically similar but unrelated, hindering effective experience reuse. Furthermore, the solutions over-rely on large language models, resulting in high deployment costs and a rigid, fixed retrieval process. The agent lacks autonomy, unable to identify user needs gaps or dynamically adjust retrieval strategies based on results, passively responding to user queries and requiring repeated query adjustments and manual case selection. Moreover, the retrieval and decision-making processes of existing solutions are black-boxed, relying on vector computation and large model inference. The retrieval matching criteria, case selection standards, and solution generation logic are untraceable and unoptimizable, further hindering their adaptability to the entire agricultural planning process and failing to meet the field's demands for efficient, accurate, and autonomous applications. Summary of the Invention
[0005] The purpose of this invention is to provide a vectorless intelligent retrieval method for agricultural planning based on state machines. This method can overcome the limitations of vector retrieval in existing solutions to avoid semantic drift, get rid of excessive dependence on large models, and endow the agent with autonomous retrieval capabilities. It can autonomously identify demand gaps and dynamically adjust retrieval strategies. At the same time, it breaks the black box mode of retrieval and decision-making, realizes full-process traceability, adapts to the experience reuse and scheme planning needs in the field of agricultural planning, and efficiently generates standardized implementation schemes that meet the actual needs of users.
[0006] To achieve the above objectives, the technical solution provided by this invention is: a vectorless intelligent retrieval method for agricultural planning based on state machines, comprising the following steps:
[0007] S1: Obtain the original case text set and professional terminology set in the field of agricultural planning. Based on the professional terminology set, construct a structured dimensional model of agricultural planning and supporting domain dictionary, dimensional decomposition rules, dimensional matching rules and toolset.
[0008] S2: Based on the dimensional decomposition rules and agricultural planning structured dimensional model constructed in step S1, the original case text set is decomposed into business dimensions to obtain agricultural planning structured knowledge data and store it in the database to obtain a standardized case library for agricultural planning.
[0009] S3: Based on the structured dimensional model and toolset of agricultural planning, set the built-in state machine and task judgment rules of the intelligent agent to complete the execution logic configuration of the intelligent agent;
[0010] S4: Use the intelligent agent that has completed the execution logic configuration to obtain the user's input requirements. Based on the domain dictionary and dimension decomposition rules constructed in step S2, decompose the requirements into standardized dimension condition objects that are compatible with the structured dimension model of agricultural planning.
[0011] S5: Based on the generated standardized dimension condition objects, the business dimension logic matching and retrieval of the agricultural planning standardized case library is performed according to the state machine and task judgment rules configured in step S3. The retrieval strategy is adjusted by dynamically calling the toolset according to the real-time state of the state machine, and finally a complete structured case dataset is obtained.
[0012] S6: The agent, having completed the execution logic configuration, performs commonality extraction and difference labeling on the acquired structured case dataset, generates a landing solution that meets user needs, and completes the entire process of autonomous retrieval and organization by the agent from requirement analysis to solution generation.
[0013] Furthermore, in step S1, the structured dimensional model for agricultural planning is a six-dimensional model:
[0014] ;
[0015] In the formula, K represents the structured dimension model of agricultural planning; E = {region, climate, soil, facilities}, representing the environmental dimension; O = {crop, variety, scale}, representing the object dimension; M = {crop rotation pattern, water and fertilizer strategy, plant protection plan, production and sales path}, representing the pattern dimension; I = {cost, equipment, manpower}, representing the input dimension; P = {yield, benefit, cycle}, representing the output dimension; C = {risk, applicable conditions, taboos}, representing the constraint dimension; {} represents the set of standardized fields under the corresponding dimension.
[0016] Furthermore, in step S1, the construction of the agricultural planning structured dimensional model and its supporting domain dictionary, dimensional decomposition rules, dimensional matching rules, and toolset is as follows:
[0017] The acquired set of professional terms is mapped one-to-one with the standardized fields of each dimension. Synonyms and near-synonyms are uniformly expressed. Standard words are pre-defined for fuzzy descriptions of frequency of use and scope. Hyper- and hypo-terms are hierarchically assigned and mapped. A domain dictionary containing term names, dimensions, corresponding fields and matching priorities is compiled.
[0018] The specific content of the dimensional decomposition rules is as follows: For each standardized business dimension, the professional terms belonging to that dimension and the corresponding standardized field in the domain dictionary are searched in the case text. The sentence fragments containing the professional terms are identified, and the business information in them is directly extracted and assigned to the standardized field of the corresponding dimension. For fuzzy descriptions of degree, scope, and orientation in the text, the corresponding business dimension and standardized field are matched first, and then the fuzzy descriptions are normalized to standard expressions through the preset fuzzy description mapping relationship in the domain dictionary. For fuzzy descriptions not covered by the domain dictionary, they are converted into unified standard expressions through the large language model and then assigned to the corresponding standardized fields.
[0019] For standardized fields of different data types, corresponding logical matching rules are formulated: For numeric fields, interval matching rules and threshold ranges are set, that is, when the field value of the case falls within the numeric range specified by the user requirement conditions, it is considered a match; for enumeration fields, exact matching and inclusion matching rules are set, that is, when the enumeration value of the case is included or the same as the enumeration value of the user requirement, it is considered a match; for text fields, terminology matching rules based on the domain dictionary are set, that is, after the case text and the user requirement text are standardized by the domain dictionary, equivalent matching is directly performed; the above logical matching rules are encapsulated into dimension matching rules that can be executed by the intelligent agent to complete the execution logic;
[0020] The toolset consists of four core tools that are functionally independent and can be called individually as needed: a condition query tool, a condition completion tool, a case comparison tool, and a plan generation tool. Each tool corresponds to the core steps of the retrieval and organization process.
[0021] Furthermore, in step S2, the generation of structured knowledge data for agricultural planning involves standardized information extraction from the original case text set. The specific steps are as follows:
[0022] First, based on the domain dictionary, the case text content is scanned to identify professional terms and related core information fragments that can directly correspond to each dimension in the structured dimensional model of agricultural planning, and the information fragments are assigned to the standardized fields of the corresponding dimensions.
[0023] Then, according to the dimensional decomposition rules, the fuzzy descriptions of the degree, scope or orientation of expression in the case text are processed. That is, firstly, based on the domain dictionary, the specific business dimension under the corresponding agricultural planning structured dimension model is determined. Then, the fuzzy description mapping relationship preset in the domain dictionary is used to normalize it into a standard expression. Finally, the standard expression is filled into the standardized field matched under the corresponding business dimension.
[0024] When both technical terminology recognition and fuzzy description processing fail to handle the fuzzy descriptions in the case text, the large language model is called to extract the corresponding information and restore it to the standardized fields of the corresponding dimensions. The content output by the large language model is then validated for compliance. Once the validation is passed, the fields are filled in.
[0025] After completing the identification of technical terms, processing of fuzzy descriptions, and large language model-assisted completion, all extracted information is then individually filled into the standardized fields corresponding to the structured dimensional model of agricultural planning, completing the transformation from the original case text to structured knowledge data of agricultural planning; among them, each piece of agricultural structured knowledge data... It can be represented in the following form:
[0026] .
[0027] Furthermore, in step S3, the built-in state machine configured for the agent includes three types of core task states, and these three types of core task states are in an orderly and connected flow relationship, namely, condition completion, case retrieval, and comparative analysis; wherein, condition completion is the working state after the agent identifies the missing conditions of the user's needs, case retrieval is the working state after the agent searches for cases based on the conditions, and comparative analysis is the working state after the agent obtains the retrieved cases.
[0028] The transition relationships of the built-in state machine satisfy the following formula:
[0029] ;
[0030] In the formula, Let t represent the task state of the agent at time t. For the current business data, This is the decision function for the task judgment rules. For state transition functions, The target task state at time t+1;
[0031] The task judgment rules consist of three core components: identifying gaps in demand conditions, determining the sufficiency of cases, and assessing the coverage of case dimensions. These are detailed below:
[0032] The specific content of identifying the gap in demand conditions is as follows: Let the initial user dimension condition object obtained after decomposing user demands be... The necessary set of dimensions specified by the six-dimensional model is: ,in For the j-th business dimension in the initial user dimension condition object, Let i be the i-th dimension in the six-dimensional model, and satisfy... as well as After decomposing user requirements, if the resulting dimension condition objects do not fully cover the necessary dimensions, that is... If a condition gap is found, the agent's state transitions to the condition completion state, and the condition completion tool is invoked to prioritize the completion of the missing dimensions in order to obtain a standardized dimension condition object that meets the requirements.
[0033] The determination of whether the cases are sufficient means that the agent determines whether the number of cases in the retrieved structured case dataset has reached the preset minimum reference number.
[0034] The specific content of judging the case dimension coverage is as follows: The agent uses all the standardized business dimensions with clearly defined conditions and corresponding standardized fields in the standardized dimension condition object corresponding to the user's needs as the verification benchmark to judge whether the retrieved structured case dataset meets two requirements at the same time. First, the dataset as a whole completely covers all standardized business dimensions within the verification benchmark; second, under each covered dimension, there are valid case data that meet the preset dimension matching rules in step S2. If both requirements are met at the same time, it is determined that the case dimension coverage requirement is met.
[0035] The intelligent agent monitors its own task execution status in real time and matches the real-time status with the three core contents mentioned above. Based on the matching results, it autonomously determines the calling order, calling timing, and number of loop calls for each tool in the toolset.
[0036] Furthermore, in step S4, user requirements are broken down into standardized dimensional condition objects, including the following steps:
[0037] S41: The intelligent agent performs semantic parsing of the user's input and extracts the core content;
[0038] S42: The agent matches the parsed core content with the domain dictionary to convert everyday expressions into standardized expressions that are compatible with the structured dimensional model of agricultural planning.
[0039] S43: According to the dimensional decomposition rules, the standardized content is decomposed one by one into each standardized dimension corresponding to the agricultural planning structured dimensional model, and the specific business conditions under each standardized dimension are extracted.
[0040] S44: Organize the split standardized dimensions and their specific business conditions into key-value pairs to generate the initial user dimension condition object:
[0041] ;
[0042] In the formula, This is the set of all standardized business dimensions in the six-dimensional model. For the user in the j-th business dimension The condition value is as follows; at this point, the user dimension condition object does not explicitly contain the necessary dimensions in the six-dimensional model, and the agent's built-in state machine needs to determine the necessary dimension set. Make judgments and supplements to ensure that all necessary dimensions are covered, thereby constructing a standardized dimension condition object.
[0043] Furthermore, in step S5, the logical matching and retrieval of the business dimension do not rely on traditional vector embedding and semantic similarity calculation, specifically including:
[0044] a. The intelligent agent generates a structured query statement based on the standardized dimensional condition objects, and executes a multi-dimensional condition combination query based on the index of the preset relational database and the standardized case library of agricultural planning. Its core mechanism is as follows:
[0045] The standardized dimension condition object is represented in the following form:
[0046] ;
[0047] In the formula, For standardized dimension condition objects, For the standardized conditional object in the i-th business dimension The condition value below;
[0048] Each structured case data in the agricultural planning standardization case library corresponds completely to the set of all standardized dimensions of the six-dimensional model, and is represented in the following form:
[0049] ;
[0050] In the formula, C represents structured case data. For the corresponding s-th standardized dimension The specific condition value below;
[0051] During the query, the agent that has completed the execution logic configuration applies the corresponding dimension matching rules according to the data type of each dimension field: for numeric fields, range matching is used for judgment. Whether the value falls within the range of the corresponding field in the standardized dimension condition object; for enumerated fields, use exact match or containment match to determine the match. or For text fields, term matching based on a domain dictionary is used for determination. Meanwhile, B+ tree database indexes are pre-built for core high-frequency query fields to improve the efficiency of multi-dimensional combined queries;
[0052] b. During the retrieval process, the agent monitors the status of the retrieval results in real time. If the retrieval results do not meet the case sufficiency judgment rule or case dimension coverage judgment rule in the task judgment rules, the agent dynamically calls the condition completion tool or condition query tool in the toolset to expand the retrieval by relaxing the matching conditions or expanding the retrieval dimension range until a complete structured case dataset that meets the task requirements is obtained.
[0053] Furthermore, in step S6, the agent performs commonality extraction and difference annotation on the acquired structured case dataset, as follows:
[0054] First, a case comparison tool is used to conduct a multi-dimensional comparative analysis of the acquired complete structured case dataset. On the one hand, commonalities in successful experiences are extracted to identify general successful experiences applicable to user needs across all cases—that is, business implementation strategies that can be directly reused across all cases. On the other hand, differentiated feature annotation is performed to mark the different implementation strategies and applicable conditions among the cases, while clarifying the applicable scenarios and constraints of each differentiated strategy, providing multiple options for solution generation. Then, a centralized planning and generation tool is used to use the extracted common successful experiences as the basis for the solution. Combined with the annotated differentiated features and the user's target dimensions, differentiated strategies that meet user needs are selected and integrated to form a domain-standardized solution that fits the user's actual needs and can be directly implemented.
[0055] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0056] 1. This invention abandons the vector retrieval mode and constructs a structured dimensional model for agricultural planning, which realizes accurate logical matching of business dimensions, effectively avoids semantic drift, improves the accuracy of case retrieval, and solves the problem of existing solution retrieval being out of touch with needs.
[0057] 2. This invention configures a state machine and task judgment rules for an intelligent agent, giving it the ability to autonomously identify demand gaps, fill in dimensions, and dynamically adjust retrieval strategies, breaking the limitations of passive retrieval, improving efficiency, and freeing up manpower.
[0058] 3. This invention adopts a rule-driven approach, which eliminates the over-reliance on large language models, resulting in low deployment costs and low barriers to entry. It can be adapted to grassroots agricultural application scenarios and achieve large-scale implementation.
[0059] 4. This invention breaks the black-box model of retrieval and decision-making, realizes full-process traceability and optimization, and meets the needs of agricultural planning for the rigor and verifiability of the solution.
[0060] 5. This invention enables the efficient reuse of agricultural planning experience through the construction of a standardized case library for agricultural planning and the analysis capabilities of intelligent agents, forming a closed loop throughout the entire process and generating standardized implementation solutions that meet user needs. Attached Figure Description
[0061] Figure 1 This is a schematic diagram of the overall logic flow of the method of the present invention.
[0062] Figure 2 This is a schematic diagram of the structured dimensional model for agricultural planning.
[0063] Figure 3 A schematic diagram of the state transition and task judgment rules of the built-in state machine of the intelligent agent.
[0064] Figure 4 A schematic diagram illustrating the architecture and calling logic of the entire agricultural planning toolset. Detailed Implementation
[0065] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0066] This embodiment discloses a vectorless intelligent retrieval method for agricultural planning based on a state machine, the overall logical flow of which corresponds to... Figure 1As shown, the first step is the preliminary data processing, the core of which is to transform unstructured data in the field of agricultural planning into structured data. Specifically, this involves first acquiring a collection of original case studies and a terminology set from the agricultural planning field. The original case studies collection covers various complete project cases, industry standard texts, and implementation materials in the agricultural planning field, covering all business scenarios in agricultural planning. The terminology set, on the other hand, organizes and integrates core specialized terms in the agricultural planning field, completing the standardized collection and classification of terms to form a unified terminology system.
[0067] Based on the previously acquired terminology set, a structured dimensional model for agricultural planning, a domain dictionary, dimensional decomposition rules, dimensional matching rules, and a full-process toolset are constructed, with specific processes tailored to actual implementation needs.
[0068] Firstly, the structured dimensional model for agricultural planning is a six-dimensional model, specifically... Figure 2 The details are as follows:
[0069] ;
[0070] In the formula, K represents the structured dimension model of agricultural planning; E = {region, climate, soil, facilities}, representing the environmental dimension; O = {crop, variety, scale}, representing the object dimension; M = {crop rotation pattern, water and fertilizer strategy, plant protection plan, production and sales path}, representing the pattern dimension; I = {cost, equipment, manpower}, representing the input dimension; P = {yield, benefit, cycle}, representing the output dimension; C = {risk, applicable conditions, taboos}, representing the constraint dimension; {} represents the set of standardized fields under the corresponding dimension;
[0071] The construction of the structured dimensional model for agricultural planning, along with its supporting domain dictionary, dimensional decomposition rules, dimensional matching rules, and toolset, is detailed below:
[0072] The acquired set of professional terms is mapped one-to-one with the standardized fields of the above dimensions. Synonyms and near-synonyms are uniformly expressed. Standard words are pre-defined for fuzzy descriptions of frequency of use and scope. Hypernyms and hyponyms are hierarchically assigned and mapped. A domain dictionary containing term names, dimensions, corresponding fields and matching priorities is compiled.
[0073] The specific details of the dimensional decomposition rules are as follows: For each standardized business dimension, the professional terms belonging to that dimension and its corresponding standardized fields in the domain dictionary are searched in the case text. The sentence fragments containing the professional terms are identified, and the business information in them is directly extracted and assigned to the standardized fields of the corresponding dimension. For fuzzy descriptions in the text that express degree, scope, or orientation, the corresponding business dimension and standardized fields are matched first, and then the fuzzy descriptions are normalized to standard expressions through the preset fuzzy description mapping relationship in the domain dictionary. For fuzzy descriptions not covered by the domain dictionary, they are converted into unified standard expressions through a large language model and then assigned to the corresponding standardized fields.
[0074] For standardized fields of different data types, corresponding logical matching rules are formulated: For numeric fields, interval matching rules and threshold ranges are set, that is, when the field value of the case falls within the numeric range specified by the user requirement conditions, it is considered a match; for enumeration fields, exact matching and inclusion matching rules are set, that is, when the enumeration value of the case is included or the same as the enumeration value of the user requirement, it is considered a match; for text fields, terminology matching rules based on the domain dictionary are set, that is, after the case text and the user requirement text are standardized by the domain dictionary, equivalent matching is directly performed; the above logical matching rules are encapsulated into dimension matching rules that can be executed by the intelligent agent to complete the execution logic;
[0075] The toolset consists of four core tools that are functionally independent and can be called individually as needed: a condition query tool, a condition completion tool, a case comparison tool, and a plan generation tool. Each tool corresponds to the core steps of the retrieval and organization process.
[0076] After setting the dimensional decomposition rules and basic toolset, the original case text set is decomposed into business dimensions according to the dimensional decomposition rules, including three core execution logics: First, keyword triggering, which accurately identifies core information fragments of the text based on a professional terminology set and directly assigns them to the corresponding business dimension; second, processing fuzzy data, first matching the corresponding business dimension with standardized fields, and then prioritizing normalization to standard expressions through the preset fuzzy description mapping relationship in the domain dictionary; for fuzzy descriptions not covered by the domain dictionary, they are converted into unified standard expressions through a large language model and then assigned to the corresponding standardized fields; third, large language model-assisted completion, which, for fuzzy expressions and information gap scenarios not covered by the first two types of execution logic, calls the large language model to complete information restoration and missing content completion, ensuring data integrity. After information extraction, compliance verification is carried out to remove data contradictions, missing core information, and invalid redundant content, ultimately generating agricultural planning structured knowledge data. Based on the agricultural planning structured dimensional model, a single agricultural planning structured knowledge data... It can be precisely defined through formal formulas, as follows:
[0077] ;
[0078] These structured knowledge data on agricultural planning are archived and stored in mainstream relational databases to form a standardized case library for agricultural planning. Mainstream relational databases themselves support multi-dimensional combined retrieval and precise conditional retrieval, and the standardized case library can also adopt these retrieval methods.
[0079] After the basic capability system is established, the core execution logic of the intelligent agent is configured. Relying on a six-dimensional structured model and a full-process toolset, the built-in state machine and task judgment rules of the intelligent agent are customized and configured to achieve autonomous operation of the intelligent agent throughout the entire process. The built-in state machine of the intelligent agent sets three sequentially connected working states: condition completion, case retrieval, and comparative analysis. Condition completion corresponds to the working state after identifying gaps in the requirement dimension; case retrieval corresponds to the working state of standardized condition matching retrieval; and comparative analysis corresponds to the analysis generation state after obtaining qualified cases. The three states flow unidirectionally and sequentially according to the process, and the flow relationship is defined by the following formal formula:
[0080] ;
[0081] In the formula, Let t represent the task state of the agent at time t. For the current business data, This is the decision function for the task judgment rules. For state transition functions, The target task state at time t+1;
[0082] The task judgment rules include three core components: identifying gaps in demand conditions, judging whether cases are sufficient, and judging the coverage of case dimensions.
[0083] The implementation logic for identifying gaps in demand conditions is as follows: The initial user dimension condition object after decomposing user requirements is set as... The necessary set of dimensions specified by the six-dimensional model is: ,in For the j-th business dimension in the initial user dimension condition object, This refers to the i-th dimension in the six-dimensional model. If the initial dimension condition object does not completely cover the necessary dimensions, it is determined that there is a condition gap. The agent automatically transitions to the condition completion state, calls the condition completion tool to complete the missing dimensions, and generates a compliant and standardized dimension condition object.
[0084] Determining whether there are enough cases means that the agent determines whether the number of cases in the retrieved structured case dataset reaches the preset minimum reference number.
[0085] The specific content of judging the case dimension coverage is as follows: The agent uses all the standardized business dimensions with clearly defined conditions and corresponding standardized fields in the standardized dimension condition object corresponding to the user's needs as the verification benchmark to judge whether the retrieved structured case dataset meets two requirements at the same time. First, the dataset as a whole completely covers all standardized business dimensions within the verification benchmark; second, under each covered dimension, there are valid case data that meet the dimension matching rules. If both requirements are met at the same time, it is determined to meet the case dimension coverage requirements.
[0086] The agent monitors its own operational status in real time, matches the real-time status with the three core elements mentioned above, and autonomously determines the tool invocation order, timing, and number of loops. The specific state transition logic process is detailed in [link to relevant documentation]. Figure 3 As shown.
[0087] After the intelligent agent is configured, the user requirement standardization and parsing phase begins, where the intelligent agent directly obtains the user's original input requirements. In practice, based on the domain dictionary and dimensional decomposition rules, the intelligent agent first performs semantic parsing of the user's original requirements, removing redundant expressions and invalid interjections, and extracting core requirement information. Then, the parsed core information is precisely matched with the domain dictionary to convert colloquial and non-standard expressions into standardized expressions adapted to the six-dimensional model. Subsequently, according to the dimensional decomposition rules, the standardized information is split into the corresponding dimensions of the six-dimensional model, extracting the specific business conditions for each dimension. Finally, each dimension and its corresponding conditions are organized into standardized key-value pairs to generate the initial user dimension condition object, whose formal expression is as follows:
[0088] ;
[0089] In the formula, This is the set of all standardized dimensions of the six-dimensional model. Let j be the j-th dimension in the six-dimensional model. For users Condition values under a dimension. Initial user dimension condition objects generally lack necessary dimensions. After verification by the agent's built-in state machine, the condition completion tool is invoked to complete the missing dimensions. More specific tool invocation logic is detailed in... Figure 4 The details are provided, and the final result is a complete and compliant standardized dimension condition object.
[0090] After the requirements analysis is completed, the intelligent retrieval process is initiated. Based on standardized dimensional condition objects, and combined with the built-in state machine and task judgment rules, a multi-dimensional logical matching retrieval is performed on the standardized case library for agricultural planning. The retrieval strategy is dynamically adjusted until a qualified case dataset is obtained. During implementation, the agent first generates a structured query statement based on the standardized dimensional condition objects. Relying on the B+ tree index pre-built on the core high-frequency fields of the database, a multi-dimensional combination precise retrieval is performed. The core matching mechanism is as follows:
[0091] Define the standardized dimension condition object as:
[0092] ;
[0093] In the agricultural planning standardization case database, each structured case data point corresponds completely to the set of all standardized dimensions of the six-dimensional model. Each structured case data point C is represented in the following form:
[0094] ;
[0095] In the formula, For corresponding standardized dimensions The specific condition values below.
[0096] During retrieval, the agent, having completed the execution logic configuration, adapts to the corresponding matching rules based on the field data type. Numeric fields undergo range matching, enumerated fields undergo exact or containment matching, and text fields undergo dictionary terminology matching. Indexes are used concurrently to improve retrieval efficiency. Throughout the retrieval process, the agent verifies the results in real-time based on state machine transitions. For specific logic, please refer to [link / reference]. Figure 3 If the criteria for case sufficiency or dimensional coverage are not met, the toolkit is dynamically invoked to adjust the search strategy. By relaxing the matching conditions and expanding the search scope, an expanded search is performed. The search and verification process is repeated until a complete structured case dataset that meets all the rules is obtained.
[0097] After the retrieval is completed, the final solution generation stage begins. The intelligent agent then moves to the comparative analysis stage, conducting in-depth analysis of the qualified case dataset and generating implementation plans. First, a case comparison tool is invoked to perform a comprehensive comparative analysis of the dataset. This involves extracting universally applicable and reusable implementation strategies from all cases, identifying core common experiences, and highlighting differentiated implementation strategies, applicable scenarios, and constraints among the cases to create a diverse range of alternative solutions. Following case analysis, a planning generation tool is invoked. Based on these common experiences and considering the user's core needs and the adaptability of differentiated strategies, an integrated and optimized agricultural planning implementation plan is formed that is tailored to the user's actual situation and possesses feasibility for implementation. This completes the entire process of autonomous retrieval and organization, from data processing and needs analysis to intelligent retrieval and solution generation, achieving the core technical objective of this invention.
[0098] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A vectorless intelligent retrieval method for agricultural planning based on state machines, characterized in that, Includes the following steps: S1: Obtain the original case text set and professional terminology set in the field of agricultural planning. Based on the professional terminology set, construct a structured dimensional model of agricultural planning and supporting domain dictionary, dimensional decomposition rules, dimensional matching rules and toolset. S2: Based on the dimensional decomposition rules and agricultural planning structured dimensional model constructed in step S1, the original case text set is decomposed into business dimensions to obtain agricultural planning structured knowledge data and store it in the database to obtain a standardized case library for agricultural planning. S3: Based on the structured dimensional model and toolset of agricultural planning, set the built-in state machine and task judgment rules of the intelligent agent to complete the execution logic configuration of the intelligent agent; S4: Use the intelligent agent that has completed the execution logic configuration to obtain the user's input requirements. Based on the domain dictionary and dimension decomposition rules constructed in step S2, decompose the requirements into standardized dimension condition objects that are compatible with the structured dimension model of agricultural planning. S5: Based on the generated standardized dimension condition objects, the business dimension logic matching and retrieval of the agricultural planning standardized case library is performed according to the state machine and task judgment rules configured in step S3. The retrieval strategy is adjusted by dynamically calling the toolset according to the real-time state of the state machine, and finally a complete structured case dataset is obtained. S6: The agent, having completed the execution logic configuration, performs commonality extraction and difference labeling on the acquired structured case dataset, generates a landing solution that meets user needs, and completes the entire process of autonomous retrieval and organization by the agent from requirement analysis to solution generation.
2. The vectorless intelligent retrieval method for agricultural planning based on state machines according to claim 1, characterized in that, In step S1, the structured dimensional model for agricultural planning is a six-dimensional model: ; In the formula, K represents the structured dimension model of agricultural planning; E = {region, climate, soil, facilities}, representing the environmental dimension; O = {crops, varieties, scale}, representing the object dimension; M = {crop rotation pattern, water and fertilizer strategy, plant protection plan, production and sales path}, representing the pattern dimension; I = {cost, equipment, manpower}, representing the input dimension; P = {yield, benefit, cycle}, representing the output dimension; C = {risk, applicable conditions, taboos}, representing the constraint dimension. {} represents a set of standardized fields under the corresponding dimension.
3. The vectorless intelligent retrieval method for agricultural planning based on state machines according to claim 2, characterized in that, In step S1, the construction of the agricultural planning structured dimensional model and its supporting domain dictionary, dimensional decomposition rules, dimensional matching rules, and toolset is as follows: The acquired set of professional terms is mapped one-to-one with the standardized fields of each dimension. Synonyms and near-synonyms are uniformly expressed. Standard words are pre-defined for fuzzy descriptions of frequency of use and scope. Hyper- and hypo-terms are hierarchically assigned and mapped. A domain dictionary containing term names, dimensions, corresponding fields and matching priorities is compiled. The specific content of the dimensional decomposition rules is as follows: For each standardized business dimension, the professional terms belonging to that dimension and the corresponding standardized field in the domain dictionary are searched in the case text. The sentence fragments containing the professional terms are identified, and the business information in them is directly extracted and assigned to the standardized field of the corresponding dimension. For fuzzy descriptions of degree, scope, and orientation in the text, the corresponding business dimension and standardized field are matched first, and then the fuzzy descriptions are normalized to standard expressions through the preset fuzzy description mapping relationship in the domain dictionary. For fuzzy descriptions not covered by the domain dictionary, they are converted into unified standard expressions through the large language model and then assigned to the corresponding standardized fields. For standardized fields of different data types, corresponding logical matching rules are formulated: For numeric fields, interval matching rules and threshold ranges are set, that is, when the field value of the case falls within the numeric range specified by the user requirement conditions, it is considered a match; for enumeration fields, exact matching and inclusion matching rules are set, that is, when the enumeration value of the case is included or the same as the enumeration value of the user requirement, it is considered a match; for text fields, terminology matching rules based on the domain dictionary are set, that is, after the case text and the user requirement text are standardized by the domain dictionary, equivalent matching is directly performed; the above logical matching rules are encapsulated into dimension matching rules that can be executed by the intelligent agent to complete the execution logic; The toolset consists of four core tools that are functionally independent and can be called individually as needed: a condition query tool, a condition completion tool, a case comparison tool, and a plan generation tool. Each tool corresponds to the core steps of the retrieval and organization process.
4. The vectorless intelligent retrieval method for agricultural planning based on state machines according to claim 3, characterized in that, In step S2, the generation of structured knowledge data for agricultural planning involves standardized information extraction from the original case text set. The specific steps are as follows: First, based on the domain dictionary, the case text content is scanned to identify professional terms and related core information fragments that can directly correspond to each dimension in the structured dimensional model of agricultural planning, and the information fragments are assigned to the standardized fields of the corresponding dimensions. Then, according to the dimensional decomposition rules, the fuzzy descriptions of the degree, scope or orientation of expression in the case text are processed. That is, firstly, based on the domain dictionary, the specific business dimension under the corresponding agricultural planning structured dimension model is determined. Then, the fuzzy description mapping relationship preset in the domain dictionary is used to normalize it into a standard expression. Finally, the standard expression is filled into the standardized field matched under the corresponding business dimension. When both technical terminology recognition and fuzzy description processing fail to handle the fuzzy descriptions in the case text, the large language model is called to extract the corresponding information and restore it to the standardized fields of the corresponding dimensions. The content output by the large language model is then validated for compliance. Once the validation is passed, the fields are filled in. After completing the identification of technical terms, processing of fuzzy descriptions, and large language model-assisted completion, all extracted information is then individually filled into the standardized fields corresponding to the structured dimensional model of agricultural planning, completing the transformation from the original case text to structured knowledge data of agricultural planning; among them, each piece of agricultural structured knowledge data... It can be represented in the following form: 。 5. The vectorless intelligent retrieval method for agricultural planning based on state machines according to claim 4, characterized in that, In step S3, the built-in state machine configured for the agent includes three types of core task states, and these three types of core task states are in an orderly and connected flow relationship, namely, condition completion, case retrieval, and comparison analysis. Among them, the condition completion is the working state of the agent after recognizing the missing conditions of the user's needs, the case retrieval is the working state of the agent after searching for cases based on the conditions, and the comparative analysis is the working state of the agent after obtaining the retrieved cases. The transition relationships of the built-in state machine satisfy the following formula: ; In the formula, Let t represent the task state of the agent at time t. For the current business data, This is the decision function for the task judgment rules. For state transition functions, The target task state at time t+1; The task judgment rules consist of three core components: identifying gaps in demand conditions, determining the sufficiency of cases, and assessing the coverage of case dimensions. These are detailed below: The specific content of identifying the gap in demand conditions is as follows: Let the initial user dimension condition object obtained after decomposing user demands be... The necessary set of dimensions specified by the six-dimensional model is: ,in For the j-th business dimension in the initial user dimension condition object, Let i be the i-th dimension in the six-dimensional model, and satisfy... as well as After decomposing user requirements, if the resulting dimension condition objects do not fully cover the necessary dimensions, that is... If a condition gap is found, the agent's state transitions to the condition completion state, and the condition completion tool is invoked to prioritize the completion of the missing dimensions in order to obtain a standardized dimension condition object that meets the requirements. The determination of whether the cases are sufficient means that the agent determines whether the number of cases in the retrieved structured case dataset reaches the preset minimum reference number. The specific content of judging the case dimension coverage is as follows: The agent uses all the standardized business dimensions with clearly defined conditions and corresponding standardized fields in the standardized dimension condition object corresponding to the user's needs as the verification benchmark to judge whether the retrieved structured case dataset meets two requirements at the same time. First, the dataset as a whole completely covers all standardized business dimensions within the verification benchmark; second, under each covered dimension, there are valid case data that meet the preset dimension matching rules in step S2. If both requirements are met at the same time, it is determined that the case dimension coverage requirement is met. The intelligent agent monitors its own task execution status in real time and matches the real-time status with the three core contents mentioned above. Based on the matching results, it autonomously determines the calling order, calling timing, and number of loop calls for each tool in the toolset.
6. The vectorless intelligent retrieval method for agricultural planning based on state machines according to claim 5, characterized in that, In step S4, user requirements are broken down into standardized dimensional condition objects, including the following steps: S41: The intelligent agent performs semantic parsing of the user's input and extracts the core content; S42: The agent matches the parsed core content with the domain dictionary to convert everyday expressions into standardized expressions that are compatible with the structured dimensional model of agricultural planning. S43: According to the dimensional decomposition rules, the standardized content is decomposed one by one into each standardized dimension corresponding to the agricultural planning structured dimensional model, and the specific business conditions under each standardized dimension are extracted. S44: Organize the split standardized dimensions and their specific business conditions into key-value pairs to generate the initial user dimension condition object: ; In the formula, This is the set of all standardized business dimensions of the six-dimensional model. For the user in the j-th business dimension The condition value is as follows; at this point, the user dimension condition object does not explicitly contain the necessary dimensions in the six-dimensional model, and the agent's built-in state machine needs to determine the necessary dimension set. Make judgments and supplements to ensure that all necessary dimensions are covered, thereby constructing a standardized dimension condition object.
7. The vectorless intelligent retrieval method for agricultural planning based on state machines according to claim 6, characterized in that, In step S5, the logical matching and retrieval of the business dimension do not rely on traditional vector embedding and semantic similarity calculation, and specifically include: a. The intelligent agent generates a structured query statement based on the standardized dimensional condition objects, and executes a multi-dimensional condition combination query based on the index of the preset relational database and the standardized case library of agricultural planning. Its core mechanism is as follows: The standardized dimension condition object is represented in the following form: ; In the formula, For standardized dimension condition objects, For the standardized conditional object in the i-th business dimension The condition value below; Each structured case data in the agricultural planning standardization case library corresponds completely to the set of all standardized dimensions of the six-dimensional model, and is represented in the following form: ; In the formula, C represents structured case data. For the corresponding s-th standardized dimension The specific condition value below; During the query, the agent that has completed the execution logic configuration applies the corresponding dimension matching rules according to the data type of each dimension field: for numeric fields, range matching is used for judgment. Whether the value falls within the range of the corresponding field in the standardized dimension condition object; for enumerated fields, use exact match or containment match to determine the match. or For text fields, term matching based on a domain dictionary is used for determination. Meanwhile, B+ tree database indexes are pre-built for core high-frequency query fields to improve the efficiency of multi-dimensional combined queries; b. During the retrieval process, the agent monitors the status of the retrieval results in real time. If the retrieval results do not meet the case sufficiency judgment rule or case dimension coverage judgment rule in the task judgment rules, the agent dynamically calls the condition completion tool or condition query tool in the toolset to expand the retrieval by relaxing the matching conditions or expanding the retrieval dimension range until a complete structured case dataset that meets the task requirements is obtained.
8. The vectorless intelligent retrieval method for agricultural planning based on state machines according to claim 7, characterized in that, In step S6, the agent performs commonality extraction and difference annotation on the acquired structured case dataset, as follows: First, a case comparison tool is used to conduct a multi-dimensional comparative analysis of the acquired complete structured case dataset. On the one hand, commonalities in successful experiences are extracted to identify general successful experiences applicable to user needs across all cases—that is, business implementation strategies that can be directly reused across all cases. On the other hand, differentiated feature annotation is performed to mark the different implementation strategies and applicable conditions among the cases, while clarifying the applicable scenarios and constraints of each differentiated strategy, providing multiple options for solution generation. Then, a centralized planning and generation tool is used to use the extracted common successful experiences as the basis for the solution. Combined with the annotated differentiated features and the user's target dimensions, differentiated strategies that meet user needs are selected and integrated to form a domain-standardized solution that fits the user's actual needs and can be directly implemented.