Intelligent agricultural instruction identification method based on deep semantic analysis
Through deep semantic parsing and trust region strategy optimization algorithm, the problems of low parsing accuracy and unreasonable strategy update in the intelligent agricultural system are solved, high-precision agricultural task identification and equipment control are achieved, and a closed-loop intelligent agricultural operation process is formed.
Patent Information
- Application Number
- CN202510844849.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-14
AI Technical Summary
Existing intelligent agricultural systems have problems such as low parsing accuracy, poor versatility, slow strategy updates, and unreasonable parameter adjustments in the process of agricultural task identification and execution, making it difficult to achieve efficient and intelligent equipment control.
A method based on deep semantic parsing is adopted, combined with deep semantic modeling, adaptive instruction parsing, agricultural environment status perception and trust region optimization strategy control, to construct a multi-layer semantic understanding of natural language instructions for agricultural tasks, a control strategy optimization iteration and an operation feedback closed-loop mechanism. Through the deep semantic parsing model and trust region strategy optimization algorithm, high-precision instruction recognition and strategy adjustment are achieved.
It significantly improves the ability to understand agricultural natural language commands and the intelligence level of equipment control strategies, realizes high-precision identification of operation intentions, key parameters and environmental conditions, ensures the robustness of strategy adjustments and real-time response of operation execution, and forms a closed-loop intelligent agricultural operation control.
Smart Images

Figure CN120781841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent control and agricultural information technology, and in particular to an intelligent agricultural instruction recognition method based on deep semantic analysis. Background Art
[0002] With the continuous development of smart agricultural technologies, agricultural production is transforming towards digitalization, automation, and intelligence. In this context, leveraging natural language processing (NLP) technology for human-machine interactive control has become a crucial tool for improving operational efficiency and human-machine collaboration within smart agricultural systems. Currently, some systems can initially recognize operational instructions input by farmers via voice or text, and perform basic semantic recognition and device-linked operations. These systems often employ bag-of-words models, shallow neural networks, or rule-based template-driven semantic recognition methods. However, these methods have limited understanding of complex agricultural task instructions, making it difficult to accurately extract the operational intent, key parameters, and environmental conditions contained in the instructions. Consequently, they suffer from low parsing accuracy and poor versatility.
[0003] When it comes to optimizing agricultural task execution strategies, existing systems often rely on preset rules, heuristic algorithms, or reinforcement learning techniques to make equipment control decisions. These approaches often struggle to balance strategy stability and dynamic adaptability in agricultural applications, where operational scenarios vary widely and environmental conditions are complex. They suffer from slow strategy updates and irrational parameter adjustments. Furthermore, most current agricultural control systems lack a closed-loop mechanism for command recognition and task execution, making it impossible to effectively adjust recognition results and execution strategies based on real-time feedback, resulting in limited intelligent agricultural operations.
[0004] Existing technologies still have significant defects in the deep semantic understanding of agricultural natural language instructions, the stable optimization of equipment control strategies, and the construction of a closed-loop recognition-execution-feedback system.
[0005] Therefore, how to provide an intelligent agricultural instruction recognition method based on deep semantic analysis is an urgent problem that technicians in this field need to solve. Summary of the Invention
[0006] One purpose of the present invention is to propose an intelligent agricultural instruction recognition method based on deep semantic analysis. The present invention fully combines deep semantic modeling, adaptive instruction analysis, agricultural environment status perception and trust region optimization strategy control technology, and describes in detail the complete process of multi-layer semantic understanding of natural language instructions for agricultural tasks, channel optimization iteration of control strategies, agricultural equipment control instruction generation and operation feedback closed-loop mechanism. It has the advantages of high instruction recognition accuracy, strong strategy adjustment robustness and timely execution feedback response.
[0007] According to an embodiment of the present invention, a method for intelligent agricultural instruction recognition based on deep semantic parsing includes the following steps:
[0008] S1, receiving agricultural task natural language instructions from users or sensors, and preprocessing the agricultural task natural language instructions to generate text data;
[0009] S2. Build a deep semantic parsing model and use it to perform semantic modeling and feature extraction on text data. Extract the work intentions, key parameters, and environmental conditions from natural language instructions for agricultural tasks and convert them into structured semantic feature vectors.
[0010] S3, collects real-time data in the target agricultural environment and fuses the real-time data with the structured semantic feature vector to construct the state information vector of the current agricultural task;
[0011] S4. Based on the state information vector, the trust region strategy optimization algorithm is used to establish the strategy network and value function, and the operation strategy of the agricultural equipment is optimized and iterated;
[0012] S5. Generate control instructions for agricultural equipment based on the optimized operation strategy, send the control instructions to the agricultural operation equipment, and drive the agricultural equipment to perform the corresponding operation;
[0013] S6. Collect feedback data during the operation in real time, conduct real-time analysis and evaluation based on the feedback data, update the status information vector of agricultural task execution, and make adjustments in combination with the deep semantic parsing model to form a closed-loop intelligent agricultural command recognition and execution mechanism.
[0014] Optionally, the agricultural task natural language instructions specifically include operation type, crop object, operation area, time requirements and environmental constraints.
[0015] Optionally, the preprocessing of the natural language instructions for agricultural tasks specifically includes removing stop words, word segmentation, part-of-speech tagging and syntactic structure analysis.
[0016] Optionally, the S2 specifically includes:
[0017] S21. Based on the generated text data, construct a structural prompt template, and combine the instruction text with a preset agricultural task semantic structure template to form an input sequence containing a Prompt structure. The structural prompt template includes five types of semantic slot information: task type, crop object, operation area, time requirement, and environmental conditions. The preset agricultural task semantic structure template is a standardized language structure constructed according to the characteristics of the agricultural task and consists of task slot fields and fill-in-the-blank placeholders.
[0018] S22. Construct a dual-semantic channel deep semantic parsing model, which includes two parallel structures: a main semantic channel and a parameter semantic channel. The main semantic channel uses a Transformer encoder to extract the global contextual semantics of natural language instructions for agricultural tasks, and the parameter semantic channel uses positional encoding and dependency analysis to extract local semantic features of key parameter words.
[0019] S23, inputting the input sequence containing the Prompt structure into the main semantic channel and the parameter semantic channel of the dual-semantic channel deep semantic parsing model to obtain a context semantic representation sequence and a parameter semantic representation sequence respectively;
[0020] S24, fusing the output representations of the main semantic channel and the parameter semantic channel, and constructing a unified word semantic vector representation using a weighted fusion method;
[0021] S25. Based on the unified word semantic vector representation, an agricultural knowledge graph enhancement module is constructed to perform entity recognition on crop names, operation areas, agricultural tool categories, and application methods in natural language instructions for agricultural tasks. Entity nodes and adjacency relationships in the agricultural knowledge graph are then queried. Entity nodes and first-order and second-order adjacent nodes are extracted to construct a knowledge subgraph corresponding to the agricultural task.
[0022] S26. Use a graph neural network to learn the graph representation of the acquired knowledge subgraph, obtain the semantically enhanced embedding representation of each text entity in the agricultural knowledge graph, and concatenate it with the unified word semantic vector representation to obtain the final embedding representation;
[0023] S27. Build a two-stage semantic parsing architecture. The first stage is the intent recognition submodule, which uses a multi-layer perceptron to aggregate the final embedded representation and output the operation intent label of the agricultural task.
[0024] S28. Determine the corresponding parameter recognition task structure based on the job intent label, perform a sequence labeling operation on the final embedded representation, and output the corresponding key parameter set and environmental condition set. The sequence labeling operation uses a unified BIO labeling system to identify the corresponding parameter words and environmental information words in the text;
[0025] S29, integrating the operation intention label, key parameter set, and environmental condition set to construct a semantic structure unit;
[0026] S210: vectorize and encode the semantic structure unit to convert it into a structured semantic feature vector.
[0027] Optionally, the S3 specifically includes:
[0028] S31, collecting real-time data in the target agricultural environment, wherein the real-time data includes soil moisture, temperature, light intensity, rainfall probability, and wind speed;
[0029] S32, standardizing the real-time data, performing interval mapping using a minimum-maximum normalization method, and generating a standardized environmental feature vector;
[0030] S33. Obtain an output structured semantic feature vector, wherein the structured semantic feature vector includes an embedded representation of the agricultural task's operation intention, a key parameter set, and an environmental condition set;
[0031] S34, performing linear transformation and feature compression processing on the structured semantic feature vector and the standardized environmental feature vector, respectively, to extract a semantic feature vector for representing the agricultural operation task and an environmental feature vector for the agricultural environment feature, wherein the linear transformation and feature compression processing process is used to regularize the dimensions of features from different sources;
[0032] S35. Based on the processed semantic feature vector and environmental feature vector, a semantic-environment interaction attention operation is performed. The semantic-environment interaction attention weight reflecting the dependency strength between the semantics and the environment is obtained by calculating the similarity relationship between each dimension in the semantic feature and each dimension in the environmental feature. The environmental features are weighted and combined using the semantic-environment interaction attention weight to generate an interaction feature vector representing the interaction information between the semantics and the environment.
[0033] S36, performing three-way splicing on the processed semantic feature vector, the environmental feature vector, and the obtained interaction feature vector to construct a fusion state feature vector, wherein the splicing order includes the semantic feature vector, the environmental feature vector, and the interaction feature vector, and the spliced fusion state feature vector uniformly represents the comprehensive state information of the agricultural task under the current environmental conditions in terms of dimension;
[0034] S37. Perform dimension regularization and feature fusion operations on the fused state feature vector. Through continuous linear mapping and nonlinear activation processing, the fused feature vector is transformed into a state information vector with a fixed dimension. The state information vector comprehensively represents the overall state characteristics of the task semantics, environmental data and interaction relationship under the current task conditions.
[0035] Optionally, the S4 specifically includes:
[0036] S41. Obtain the generated state information vector S ′ , as the input state features of the current agricultural task;
[0037] S42. Constructing a strategy function π based on the state information vector θ (a|S ′), where a represents the agricultural operation action, θ is the policy function parameter, and the policy function is used to output the state S ′ The probability distribution of the selected operation action a is:
[0038] S43. Construct state value function V ω (S ′ ), using channelized attention mechanism, nonlinear mapping and state difference regularization for joint modeling;
[0039] S44, the agricultural operation action space is divided into multiple sub-channels, including the path planning channel, the resource allocation channel and the operation timing channel, and an independent trust region constraint boundary δ is defined for each channel. (i) , used to control the maximum KL divergence of the policy update in the corresponding channel;
[0040] S45. Define the advantage function value
[0041] S46. Based on the obtained advantage function value and the policy output of each channel, a channelized trust region optimization objective is constructed. A local optimization problem with KL constraints is constructed in each action channel, and the control policy update direction is within the trust region of each channel.
[0042] S47, according to the state information vector S ′ Dynamically adjust the global trust region radius δ based on the fluctuation characteristics, environmental change indicators and historical execution feedback information t , when the state changes greatly or the environmental uncertainty is high, increase δ t , otherwise reduce δ t ;
[0043] S48, introduce the strategy update direction correction factor ∈ t , based on historical job feedback information, including job execution deviation, resource utilization efficiency and actual task completion rate, the policy parameter update amplitude is scaled to control the update direction and step size of the policy parameter θ;
[0044] S49, solve the trust region optimization target by approximate natural gradient method, combine the adjusted global trust region and the introduced policy update direction correction factor to calculate the updated policy parameter θ ′ , and generate a new strategy function;
[0045] S410: Apply the updated strategy function to the current state information vector, and output the optimized agricultural equipment control strategy result.
[0046] Optionally, the S5 specifically includes:
[0047] S51, obtain the output optimized agricultural equipment control strategy result, the agricultural equipment control strategy result includes operation action type, execution intensity, operation time length and resource allocation scheme;
[0048] S52, based on the equipment specification parameters of the agricultural equipment and the known operation execution capability information, perform instruction parameter mapping on the control strategy result to generate an initial instruction data set containing equipment control actions, control parameter values and execution timing;
[0049] S53, according to the current agricultural environment state information and the running state of the agricultural equipment, perform consistency check and safety boundary detection on the initial instruction data set to generate an effective control instruction set that meets the execution conditions;
[0050] S54, input the effective control instruction set to the agricultural equipment control interface, and perform instruction packaging, format coding and instruction cache processing through a standardized control protocol;
[0051] S55, through the communication interface of the agricultural equipment, the packaged control instruction is sent to the corresponding agricultural operation equipment, the real-time transmission and operation triggering operation of the control instruction are completed, and the agricultural operation equipment is driven to perform the corresponding operation operation according to the received control instruction.
[0052] Optionally, the S6 specifically includes:
[0053] S61, in the process of executing the control instruction by the agricultural operation equipment, feedback data in the operation process is collected in real time, the feedback data includes equipment execution state information, operation completion progress, resource consumption condition and environmental response information;
[0054] S62, standardize the collected feedback data, align the data format, timestamp and remove outliers to generate structured feedback data samples;
[0055] S63, based on the structured feedback data samples, real-time analysis and evaluation are performed to output agricultural task execution effect indicators and current operation deviation information;
[0056] S64, according to the agricultural task execution effect indicators and the current operation deviation information, the state information vector of the current agricultural task execution is dynamically updated, and the update content includes operation execution progress, equipment state and environmental response factors;
[0057] S65, input the updated state information vector into the deep semantic analysis model to perform semantic level adjustment operation to correct the operation intention deviation, parameter setting deviation and environmental adaptation error in the instruction;
[0058] S66. Regenerate the structured semantic feature vector representation based on the adjusted semantic results and provide feedback to build a closed-loop intelligent agricultural command recognition and execution mechanism.
[0059] The beneficial effects of the present invention are:
[0060] This invention significantly improves the understanding of agricultural natural language instructions and the intelligence of equipment control strategies by integrating a deep semantic parsing model with a trust region strategy optimization algorithm. Compared to existing technologies that suffer from insufficient semantic modeling capabilities for agricultural instructions, inaccurate parameter extraction, and delayed operational strategy adjustments, this invention constructs a dual-channel fusion semantic parsing structure. Combining an agricultural knowledge graph with a structural prompting mechanism, this approach effectively identifies operational intent, key parameters, and environmental conditions in complex agricultural task instructions, ensuring the integrity and enforceability of semantic parsing results.
[0061] At the same time, the present invention adopts a trust region strategy optimization algorithm in the process of equipment operation strategy optimization, and realizes stable optimization and dynamic response control of agricultural equipment operation strategy through multi-channel action space division, state-adaptive trust region radius adjustment mechanism and strategy update direction correction mechanism, effectively avoiding performance fluctuations and unreasonable exploration in the strategy update process, and improving the robustness of the control strategy in complex agricultural environments.
[0062] In addition, the present invention forms a closed-loop mechanism from instruction parsing to strategy optimization to operation execution and feedback update, which can realize information perception, strategy reasoning and dynamic adjustment of the entire agricultural task process, ensuring that agricultural equipment continuously optimizes control instructions according to the real-time operating environment and execution effect, achieving the goal of intelligent, high-precision and fast-response agricultural operation control, and has significant practical value and promotion significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0064] Figure 1 This is a flow chart of a method for intelligent agricultural instruction recognition based on deep semantic analysis proposed by the present invention;
[0065] Figure 2 This is a schematic diagram of the improved structure of the trust region strategy optimization algorithm for the intelligent agricultural instruction recognition method based on deep semantic analysis proposed in the present invention. DETAILED DESCRIPTION
[0066] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0067] refer to Figure 1 and Figure 2 , a smart agricultural instruction recognition method based on deep semantic parsing, comprising the following steps:
[0068] S1, receiving agricultural task natural language instructions from users or sensors, and preprocessing the agricultural task natural language instructions to generate text data;
[0069] S2. Build a deep semantic parsing model and use it to perform semantic modeling and feature extraction on text data. Extract the work intentions, key parameters, and environmental conditions from natural language instructions for agricultural tasks and convert them into structured semantic feature vectors.
[0070] S3, collects real-time data in the target agricultural environment and fuses the real-time data with the structured semantic feature vector to construct the state information vector of the current agricultural task;
[0071] S4. Based on the state information vector, the trust region strategy optimization algorithm is used to establish the strategy network and value function, and the operation strategy of the agricultural equipment is optimized and iterated;
[0072] S5. Generate control instructions for agricultural equipment based on the optimized operation strategy, send the control instructions to the agricultural operation equipment, and drive the agricultural equipment to perform the corresponding operation;
[0073] S6. Collect feedback data during the operation in real time, conduct real-time analysis and evaluation based on the feedback data, update the status information vector of agricultural task execution, and make adjustments in combination with the deep semantic parsing model to form a closed-loop intelligent agricultural command recognition and execution mechanism.
[0074] By constructing a deep semantic parsing model, this invention achieves high-precision extraction of operational intent, key parameters, and environmental conditions from natural language instructions for agricultural tasks, effectively improving natural language comprehension capabilities and reducing human involvement costs. Furthermore, by integrating real-time environmental data and constructing a state information vector, the agricultural instruction recognition process possesses dynamic perception capabilities, enhancing adaptability to complex agricultural scenarios. Furthermore, an improved trust region policy optimization algorithm is employed to iteratively optimize operational strategies, making the generated control instructions more precise and executable, effectively improving agricultural equipment operating efficiency and resource utilization. Ultimately, through a feedback-driven closed-loop mechanism, full-process collaboration between semantic recognition, policy optimization, and operation execution is achieved, providing an efficient end-to-end solution for intelligent agricultural systems. In practical applications, this method demonstrates advantages such as high recognition accuracy, intelligent operational decision-making, and rational resource scheduling, significantly advancing the intelligent and automated development of agricultural operations.
[0075] In this embodiment, the agricultural task natural language instructions specifically include operation type, crop object, operation area, time requirement and environmental constraints.
[0076] In this embodiment, the preprocessing of the natural language instructions for agricultural tasks specifically includes removing stop words, word segmentation, part-of-speech tagging, and syntactic structure analysis.
[0077] In this embodiment, S2 specifically includes:
[0078] S21. Based on the generated text data, construct a structural prompt template, and combine the instruction text with a preset agricultural task semantic structure template to form an input sequence containing a Prompt structure. The structural prompt template includes five types of semantic slot information: task type, crop object, operation area, time requirement, and environmental conditions. The preset agricultural task semantic structure template is a standardized language structure constructed according to the characteristics of the agricultural task and consists of task slot fields and fill-in-the-blank placeholders.
[0079] S22. Construct a dual-semantic channel deep semantic parsing model, which includes two parallel structures: a main semantic channel and a parameter semantic channel. The main semantic channel uses a Transformer encoder to extract the global contextual semantics of natural language instructions for agricultural tasks, and the parameter semantic channel uses positional encoding and dependency analysis to extract local semantic features of key parameter words.
[0080] S23, inputting the input sequence containing the Prompt structure into the main semantic channel and the parameter semantic channel of the dual-semantic channel deep semantic parsing model to obtain a context semantic representation sequence and a parameter semantic representation sequence respectively;
[0081] S24, fusing the output representations of the main semantic channel and the parameter semantic channel, and constructing a unified word semantic vector representation using a weighted fusion method;
[0082] S25. Based on the unified word semantic vector representation, an agricultural knowledge graph enhancement module is constructed to perform entity recognition on crop names, operation areas, agricultural tool categories, and application methods in natural language instructions for agricultural tasks. Entity nodes and adjacency relationships in the agricultural knowledge graph are then queried. Entity nodes and first-order and second-order adjacent nodes are extracted to construct a knowledge subgraph corresponding to the agricultural task.
[0083] S26. Use a graph neural network to learn the graph representation of the acquired knowledge subgraph, obtain the semantically enhanced embedding representation of each text entity in the agricultural knowledge graph, and concatenate it with the unified word semantic vector representation to obtain the final embedding representation;
[0084] S27. Build a two-stage semantic parsing architecture. The first stage is the intent recognition submodule, which uses a multi-layer perceptron to aggregate the final embedded representation and output the operation intent label of the agricultural task.
[0085] S28. Determine the corresponding parameter recognition task structure based on the job intent label, perform a sequence labeling operation on the final embedded representation, and output the corresponding key parameter set and environmental condition set. The sequence labeling operation uses a unified BIO labeling system to identify the corresponding parameter words and environmental information words in the text;
[0086] S29, integrating the operation intention label, key parameter set, and environmental condition set to construct a semantic structure unit;
[0087] S210: vectorize and encode the semantic structure unit to convert it into a structured semantic feature vector.
[0088] This paper introduces several improvements into the deep semantic parsing process, including a structural hint mechanism, a dual-semantic channel model, an agricultural knowledge graph enhancement, and a two-stage semantic parsing architecture. These improvements significantly enhance the understanding accuracy and semantic parsing capabilities of agricultural natural language instructions. A structural hint template guides the model to focus on key slots in agricultural tasks, improving context alignment capabilities. The dual-semantic channel design extracts global and local semantic features, respectively, enabling detailed modeling of task intent and parameter terms. The introduction of the agricultural knowledge graph enhances the model's understanding of the logical relationships between domain-specific nouns and entities, effectively reducing the risk of ambiguity. The two-stage architecture integrates intent recognition and parameter extraction in a layered manner, improving parsing accuracy while maintaining the scalability of the parsing structure. The synergistic effects of these technical approaches enable the present invention to accurately extract core information such as task type, crop object, operation area, and environmental conditions even when faced with complex, ambiguous, or non-standardized agricultural natural language instructions. This outputs high-quality structured semantic feature vectors, providing a solid foundation for subsequent state construction and strategy optimization. Overall, this method boasts high semantic understanding accuracy, strong scalability, and excellent domain adaptability, demonstrating significant practical value.
[0089] In this embodiment, S3 specifically includes:
[0090] S31, collecting real-time data in the target agricultural environment, wherein the real-time data includes soil moisture, temperature, light intensity, rainfall probability, and wind speed;
[0091] S32, standardizing the real-time data, performing interval mapping using a minimum-maximum normalization method, and generating a standardized environmental feature vector;
[0092] S33. Obtain an output structured semantic feature vector, wherein the structured semantic feature vector includes an embedded representation of the agricultural task's operation intention, a key parameter set, and an environmental condition set;
[0093] S34, performing linear transformation and feature compression processing on the structured semantic feature vector and the standardized environmental feature vector, respectively, to extract a semantic feature vector for representing the agricultural operation task and an environmental feature vector for the agricultural environment feature, wherein the linear transformation and feature compression processing process is used to regularize the dimensions of features from different sources;
[0094] S35. Based on the processed semantic feature vector and environmental feature vector, a semantic-environment interaction attention operation is performed. The semantic-environment interaction attention weight reflecting the dependency strength between the semantics and the environment is obtained by calculating the similarity relationship between each dimension in the semantic feature and each dimension in the environmental feature. The environmental features are weighted and combined using the semantic-environment interaction attention weight to generate an interaction feature vector representing the interaction information between the semantics and the environment.
[0095] S36, performing three-way splicing on the processed semantic feature vector, the environmental feature vector, and the obtained interaction feature vector to construct a fusion state feature vector, wherein the splicing order includes the semantic feature vector, the environmental feature vector, and the interaction feature vector, and the spliced fusion state feature vector uniformly represents the comprehensive state information of the agricultural task under the current environmental conditions in terms of dimension;
[0096] S37. Perform dimension regularization and feature fusion operations on the fused state feature vector. Through continuous linear mapping and nonlinear activation processing, the fused feature vector is transformed into a state information vector with a fixed dimension. The state information vector comprehensively represents the overall state characteristics of the task semantics, environmental data and interaction relationship under the current task conditions.
[0097] This paper proposes a state information construction method that integrates semantics, environment, and interaction relationships in the agricultural task state modeling process, significantly improving the accuracy and environmental adaptability of intelligent agricultural operation decision-making. By collecting multidimensional environmental factors such as soil moisture, temperature, and light intensity, and normalizing and dimensionally regularizing them with structured semantic feature vectors, a unified representation of task semantics and environmental information is achieved. Furthermore, a semantic-environment interaction attention mechanism is introduced to capture the dependencies between task intent and environmental conditions in agricultural instructions, obtaining interaction features that reflect the requirements of actual operational scenarios, thereby constructing a three-way fused state representation that integrates semantics, environment, and dependency relationships. Finally, a nonlinear mapping is used to compress the multi-source features into a state information vector of unified dimension, providing a fully contextualized input foundation for subsequent policy optimization. This method can adapt to agricultural task requirements under different environmental conditions, improving the system's perception and response efficiency to dynamic agricultural scenarios. It exhibits good versatility and stability, and has broad application value in intelligent agricultural scheduling and equipment control.
[0098] In this embodiment, the S4 specifically includes:
[0099] S41. Obtain the generated state information vector S ′ , as the input state features of the current agricultural task;
[0100] S42. Constructing a strategy function π based on the state information vector θ (a|S ′ ), where a represents the agricultural operation action, θ is the policy function parameter, and the policy function is used to output the state S ′ The probability distribution of the selected operation action a is:
[0101] S43. Construct state value function V ω (S ′ ), using channelized attention mechanism, nonlinear mapping and state difference regularization to jointly model:
[0102]
[0103] Where M represents the number of nested channels, γ (i) is the channel weighting factor, α (i) is the channel attention coefficient, σ() is the activation function, W (i) 、b (i) are the weight and bias terms of the i-th channel, λ is the state difference regularization weight, is the mean of the historical state of the i-th dimension, ° is the element-by-element multiplication;
[0104] State value function V ω (S ′ The practical significance of this approach lies in providing a more refined and dynamic estimate of the long-term reward of the current state of an agricultural task. This formula integrates an attention mechanism, a nonlinear activation function, and a state-difference regularization term, enabling the model to better represent complex, multidimensional agricultural state information. Specifically, the state information vector is assigned to multiple channels, each of which learns the representation of the state within a specific semantic dimension, such as resource allocation, work path, or time scheduling. Each channel encodes the input state using a channel weight coefficient and a nonlinear mapping function to obtain a value estimate for that channel. Furthermore, a channel-wise attention mechanism is introduced to weight the contributions of different channels, strengthening the influence of key channels on the final state value prediction. Furthermore, the inclusion of a state-difference regularization term further constrains the historical mean deviation of the state input, making the model more sensitive and generalizable to sudden changes in state. This structure not only enhances the model's ability to represent agricultural state changes but also helps improve the accuracy of state evaluation during policy optimization, providing a more stable and differentiated state value foundation for constructing the advantage function in trust region policy optimization. Overall, this formula provides a more rational underlying foundation for value estimation during policy training.
[0105] S44, the agricultural operation action space is divided into multiple sub-channels, including the path planning channel, the resource allocation channel and the operation timing channel, and an independent trust region constraint boundary δ is defined for each channel. (i) , used to control the maximum KL divergence of the policy update in the corresponding channel;
[0106] S45. Define the advantage function value
[0107]
[0108] Among them, R t is the actual return value at time t, λ h is the entropy regularization factor, λ G is the task constraint sensitivity factor, C(at ) represents the resource cost function of the job action, is the gradient, log2 is the logarithmic function;
[0109] Advantage function value The practical significance of [ 1 ] lies in its ability to more comprehensively measure the relative merits of a particular action relative to the current policy by integrating multiple key factors, thereby guiding the direction and intensity of policy parameter updates. This advantage function consists of three components: the first is the difference between the actual reward and the state value function, measuring the fundamental advantage of the current action; the second is the entropy regularization term, which controls the diversity of policy outputs and prevents the policy from falling into over-determinism or over-stochasticity by adjusting the entropy factor; and the third is the operation constraint sensitivity term, which, by applying a gradient penalty to the resource costs associated with the current action, guides the policy optimization process to focus more on the resource efficiency and operational feasibility of agricultural equipment. This advantage function structure enables unified modeling of complex factors such as uncertainty, high resource sensitivity, and multi-objective constraints in agricultural tasks. It ensures that the policy update direction not only improves returns but also takes into account actual operating conditions and equipment capabilities, thereby enhancing overall operation success rate and system robustness. It is a key foundation for the trusted optimization of agricultural operation strategies.
[0110] S46. Based on the obtained advantage function value and the policy output of each channel, a channelized trust region optimization objective is constructed. A local optimization problem with KL constraints is constructed in each action channel, and the control policy update direction is within the trust region of each channel.
[0111] S47, according to the state information vector S ′ Dynamically adjust the global trust region radius δ based on the fluctuation characteristics, environmental change indicators and historical execution feedback information t , when the state changes greatly or the environmental uncertainty is high, increase δ t , otherwise reduce δ t ;
[0112] S48, introduce the strategy update direction correction factor ∈ t , based on historical job feedback information, including job execution deviation, resource utilization efficiency and actual task completion rate, the policy parameter update amplitude is scaled to control the update direction and step size of the policy parameter θ;
[0113] S49, solve the trust region optimization target by approximate natural gradient method, combine the adjusted global trust region and the introduced policy update direction correction factor to calculate the updated policy parameter θ ′ , and generate a new strategy function;
[0114] S410: Apply the updated strategy function to the current state information vector, and output the optimized agricultural equipment control strategy result.
[0115] The present application realizes fine strategy modeling and efficient optimization updating for agricultural equipment operation tasks by introducing an improved trust region strategy optimization algorithm, significantly enhancing the stability and adaptability of intelligent agricultural decision-making systems. The method first constructs a strategy function and a state value function based on a state information vector, and integrates a channelized attention mechanism and a state difference regularization term in the value function, effectively improving the sensitivity of the model to key elements in multi-source state data. Subsequently, the operation action space is divided into multiple sub-channels such as path planning, resource allocation, and operation timing, and each sub-channel is independently set with a trust region constraint boundary, thereby realizing sub-channel control of the strategy optimization process and effectively avoiding the risk of direction drift and strategy collapse in strategy updating. In addition, the dynamic weighting mechanism of the entropy regularization term and the resource cost term in the advantage function is combined to realize the collaborative optimization between task revenue maximization and resource usage balance. By dynamically adjusting the trust region radius and introducing a strategy update direction correction mechanism, the method further improves the robustness and response sensitivity of strategy updating. While maintaining the effectiveness of the strategy, the method has excellent convergence speed and generalization ability, is suitable for various agricultural operation scenarios, and can significantly improve the efficiency and success rate of agricultural equipment operation.
[0116] In the embodiment, the S5 specifically includes:
[0117] S51, obtaining an output optimized agricultural equipment control strategy result, the agricultural equipment control strategy result including operation action type, execution intensity, operation duration, and resource allocation scheme;
[0118] S52, based on the device specification parameters and known operation execution capability information of the agricultural equipment, performing instruction parameter mapping on the control strategy result to generate an initial instruction data set containing device control actions, control parameter values, and execution timing;
[0119] S53, according to the current agricultural environment state information and the running state of the agricultural equipment, combining the initial instruction data set to perform consistency checking and safety boundary detection, and generating an effective control instruction set that meets the execution conditions;
[0120] S54, inputting the effective control instruction set to the agricultural equipment control interface, and performing instruction packaging, format coding, and instruction cache processing through a standardized control protocol;
[0121] S55, through the communication interface of the agricultural equipment, the packaged control instruction is sent to the corresponding agricultural operation equipment, completing real-time transmission and operation triggering operation of the control instruction, and driving the agricultural operation equipment to perform corresponding operation operation according to the received control instruction.
[0122] The application realizes efficient conversion from intelligent operation strategy results to actual execution actions of agricultural equipment by designing a complete and highly adaptive agricultural equipment control instruction generation and delivery process, significantly improving the response capability and execution precision of the agricultural automation operation system. The method first obtains the optimized agricultural equipment control strategy results, covering core elements such as operation action type, execution intensity, operation duration, and resource allocation scheme, and combines the actual specifications and known operation capability information of the agricultural equipment to perform parameter mapping, ensuring that the control instruction generation process has high equipment adaptability and execution feasibility. After the generation of instructions, consistency verification and safety boundary detection are performed in conjunction with the current agricultural environment state and equipment operating conditions, which can effectively avoid abnormal instructions, overload instructions or conflict instructions that may occur during operation, ensuring the stability and safety of system operation. Subsequently, the instructions are encapsulated, encoded and cached through a standardized control protocol, improving the communication efficiency and execution real-time performance of the control signals. Finally, the instructions are accurately delivered to the target equipment through the agricultural equipment communication interface, realizing fast response and high-precision driving of agricultural operation tasks. The overall process has high safety, high compatibility and portability, and is suitable for multiple types of agricultural equipment and various operation scenarios, effectively promoting the implementation of agricultural intelligent operation.
[0123] In the embodiment, S6 specifically includes:
[0124] S61, in the process of executing the control instruction by the agricultural operation equipment, real-time collection of feedback data in the operation process is performed, and the feedback data includes equipment execution state information, operation completion progress, resource consumption condition and environmental response information;
[0125] S62, standardization processing of the collected feedback data is performed to unify the data format, align the time stamp and exclude abnormal values, and a structured feedback data sample is generated;
[0126] S63, real-time analysis and evaluation based on the structured feedback data sample are performed, and operation effect indicators of the agricultural task and current operation deviation information are output;
[0127] S64, according to the operation effect indicators of the agricultural task and the current operation deviation information, a dynamic update is performed on a state information vector of the current agricultural task execution, and the update content includes operation execution progress, equipment state and environmental response factors;
[0128] S65, the updated state information vector is input into a deep semantic analysis model to perform semantic level adjustment operation, and the operation intention deviation, parameter setting deviation and environmental adaptation error in the instruction are corrected;
[0129] S66, a structured semantic feature vector representation is regenerated according to the adjusted semantic results, and feedback is performed to build a closed-loop intelligent agricultural instruction recognition and execution mechanism.
[0130] Example 1:
[0131] To verify the feasibility of the application in practice, the application is applied to an agricultural plantation covering an area of about 300 mu, which is divided into several different operation blocks. Each operation block is equipped with different types of agricultural equipment, such as automatic irrigation systems, unmanned fertilizer applicators, and plant protection robots. To improve the efficiency of equipment operation and reduce the cost of manual intervention, the plantation introduces the "intelligent agricultural instruction recognition method based on deep semantic analysis" proposed by the application.
[0132] During the spring field management stage, the management personnel input agricultural natural language instructions through a voice assistant or a mobile App, such as "please perform irrigation work in the south area No. 1 field", "fertilize the corn field in the southwest area, preferentially using organic fertilizer", "remove the weeds in the southeast corner block, taking care to avoid shrubs", and other instruction systems will first use the semantic analysis module to deeply model the instructions, extract the operation intent, key parameters, and environmental conditions in the instructions, and construct a structured semantic vector.
[0133] Subsequently, the system accesses real-time data of the corresponding operation area, including current soil moisture, weather changes, resource inventories, and equipment status, and performs multi-modal fusion with the semantic vector to generate a state information vector. This state vector is input into the control strategy module based on the improved trust region policy optimization to complete the combination reasoning of the operation type and parameters, and output precise and executable agricultural equipment control strategies.
[0134] Taking a set of test data in April 2025 as an example, a total of 10 different types of agricultural operation simulations were carried out. The test results show that the accuracy of the system in the semantic analysis stage is 96.15% on average, with a maximum of 99.20%. The optimization strategy converges in an average of 6 iterations, with an average single operation time of about 42 minutes, and a resource usage rate of more than 90%. The operation success rate is always higher than 95%, and the individual precision control task reaches 99.7%.
[0135] Compared with traditional intelligent systems that rely on manual rule writing task flow or fixed mode response of equipment, the biggest advantage of the application is the combination of the universality of natural language analysis and real-time environmental perception ability, and the continuous adjustment of the control strategy through the strategy optimization mechanism, which realizes the truly closed-loop intelligent agricultural operation process. Especially in the aspects of instruction recognition and multi-channel operation space control, it shows high flexibility and accuracy.
[0136] Table 1 Comparison of intelligent agricultural instruction recognition and execution system performance test data
[0137]
[0138] According to the data in Table 1 above, the recognition accuracy, strategy optimization efficiency, resource scheduling ability and job execution stability of the system in real agricultural scenarios can be systematically analyzed.
[0139] Firstly, in terms of "job type recognition accuracy", the system maintains an accuracy rate of 93.6% to 99.2% in ten common agricultural natural language instruction recognition tasks, with an average of 96.56%. In particular, the accuracy rate in the "spraying east orchard" task is as high as 99.2%, indicating that the job type recognition mechanism based on the deep semantic analysis model has strong stability and generalization ability in diversified contexts. The "key parameter recognition accuracy" also performs well, with most tasks maintaining above 94%, among which "spraying east orchard" and "fertilizing southwest corn field" reach 98.9% and 97.1% respectively, reflecting the system's high-precision extraction ability in extracting parameters such as "location, job object, and operation method", effectively supporting subsequent strategy generation.
[0140] Secondly, in terms of "average strategy optimization iteration times", the system completes the generation of optimal control strategy within 5 to 7 strategy iterations, showing that the trust domain strategy optimization algorithm has good convergence speed and computational efficiency in the agricultural multi-channel action space. Typical action channel switching tasks such as "harvesting southwest paddy field" and "weeding southeast corner" can also complete optimization within 6 times, balancing efficiency and stability.
[0141] In terms of "single job time consumption", the time consumption of different tasks mainly concentrates in 38 to 50 minutes. The "checking north area sensor" and "soil loosening northwest field" tasks, which take longer time, have a large span of operation path, reflecting that the system can flexibly adapt to different operation content and scope, and the operation time control is reasonable, which is beneficial to the scheduling of agricultural equipment resources.
[0142] The "resource utilization rate" indicates that the system can maintain a resource utilization rate of more than 89% in most tasks, with a maximum of 93.8%, indicating that the optimized operation strategy can reasonably allocate the operation intensity, path length and operation time of agricultural equipment, avoiding resource idling or waste. In terms of "job success rate", the completion rate of all tasks is higher than 94%, with a maximum of 98.95%, proving that the overall operation execution stability and instruction understanding consistency of the system are good, and it can be widely applied to various conventional agricultural operations.
[0143] In summary, the system fully embodies the high precision, high efficiency and high stability of the invention in natural language instruction understanding, parameter extraction, strategy optimization and job execution. The system can realize precise control and scheduling of agricultural operations in various task types and environments, providing solid data support and practical application value for building an intelligent, adaptive and high-response agricultural management system.
[0144] The above description is only the preferred embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can make equivalent substitutions or changes according to the technical solution and the inventive concept of the present application within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.
Claims
1. A method for intelligent agricultural instruction recognition based on deep semantic analysis, characterized in that: The steps include: S1, receiving agricultural task natural language instructions from users or sensors, and preprocessing the agricultural task natural language instructions to generate text data; S2. Build a deep semantic parsing model and use it to perform semantic modeling and feature extraction on text data. Extract the work intentions, key parameters, and environmental conditions from natural language instructions for agricultural tasks and convert them into structured semantic feature vectors. S3, collects real-time data in the target agricultural environment and fuses the real-time data with the structured semantic feature vector to construct the state information vector of the current agricultural task; S4. Based on the state information vector, the trust region strategy optimization algorithm is used to establish the strategy network and value function, and the operation strategy of the agricultural equipment is optimized and iterated; S5. Generate control instructions for agricultural equipment based on the optimized operation strategy, send the control instructions to the agricultural operation equipment, and drive the agricultural equipment to perform the corresponding operation; S6. Collect feedback data during the operation in real time, conduct real-time analysis and evaluation based on the feedback data, update the status information vector of agricultural task execution, and make adjustments in combination with the deep semantic parsing model to form a closed-loop intelligent agricultural command recognition and execution mechanism.
2. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 1, characterized in that: The agricultural task natural language instructions specifically include operation type, crop object, operation area, time requirements and environmental constraints.
3. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 1, characterized in that: The preprocessing of the natural language instructions for agricultural tasks specifically includes removing stop words, word segmentation, part-of-speech tagging and syntactic structure analysis.
4. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 1, characterized in that: The S2 specifically includes: S21. Based on the generated text data, a structure prompt template is constructed, and the instruction text is spliced with a preset agricultural task semantic structure template to form an input sequence containing a Prompt structure. The structure prompt template includes five types of semantic slot information: task type, crop object, operation area, time requirement, and environmental conditions; S22, constructing a dual-semantic channel deep semantic parsing model, wherein the dual-semantic channel deep semantic parsing model includes two parallel structures: a main semantic channel and a parameter semantic channel; S23, inputting the input sequence containing the Prompt structure into the main semantic channel and the parameter semantic channel of the dual-semantic channel deep semantic parsing model to obtain a context semantic representation sequence and a parameter semantic representation sequence respectively; S24, fusing the output representations of the main semantic channel and the parameter semantic channel, and constructing a unified word semantic vector representation using a weighted fusion method; S25. Based on the unified word semantic vector representation, an agricultural knowledge graph enhancement module is constructed to perform entity recognition on crop names, operation areas, agricultural tool categories, and application methods in natural language instructions for agricultural tasks. Entity nodes and adjacency relationships in the agricultural knowledge graph are then queried. Entity nodes and first-order and second-order adjacent nodes are extracted to construct a knowledge subgraph corresponding to the agricultural task. S26. Use a graph neural network to learn the graph representation of the acquired knowledge subgraph, obtain the semantically enhanced embedding representation of each text entity in the agricultural knowledge graph, and concatenate it with the unified word semantic vector representation to obtain the final embedding representation; S27. Build a two-stage semantic parsing architecture. The first stage is the intent recognition submodule, which uses a multi-layer perceptron to aggregate the final embedded representation and output the operation intent label of the agricultural task. S28. Determine the corresponding parameter recognition task structure based on the job intent label, perform a sequence labeling operation on the final embedded representation, and output the corresponding key parameter set and environmental condition set. The sequence labeling operation uses a unified BIO labeling system to identify the corresponding parameter words and environmental information words in the text; S29, integrating the operation intention label, key parameter set, and environmental condition set to construct a semantic structure unit; S210: vectorize and encode the semantic structure unit to convert it into a structured semantic feature vector.
5. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 1, characterized in that: The S3 specifically includes: S31, collecting real-time data in the target agricultural environment, wherein the real-time data includes soil moisture, temperature, light intensity, rainfall probability, and wind speed; S32, standardizing the real-time data, performing interval mapping using a minimum-maximum normalization method, and generating a standardized environmental feature vector; S33. Obtain an output structured semantic feature vector, wherein the structured semantic feature vector includes an embedded representation of the agricultural task's operation intention, a key parameter set, and an environmental condition set; S34, performing linear transformation and feature compression processing on the structured semantic feature vector and the standardized environmental feature vector, respectively, to extract a semantic feature vector for representing the agricultural operation task and an environmental feature vector for the agricultural environment feature, wherein the linear transformation and feature compression processing process is used to regularize the dimensions of features from different sources; S35. Based on the processed semantic feature vector and environmental feature vector, a semantic-environment interaction attention operation is performed. The semantic-environment interaction attention weight reflecting the dependency strength between the semantics and the environment is obtained by calculating the similarity relationship between each dimension in the semantic feature and each dimension in the environmental feature. The environmental features are weighted and combined using the semantic-environment interaction attention weight to generate an interaction feature vector representing the interaction information between the semantics and the environment. S36, performing three-way splicing on the processed semantic feature vector, the environmental feature vector, and the obtained interaction feature vector to construct a fusion state feature vector, wherein the splicing order includes the semantic feature vector, the environmental feature vector, and the interaction feature vector, and the spliced fusion state feature vector uniformly represents the comprehensive state information of the agricultural task under the current environmental conditions in terms of dimension; S37. Perform dimension regularization and feature fusion operations on the fused state feature vector. Through continuous linear mapping and nonlinear activation processing, the fused feature vector is transformed into a state information vector with a fixed dimension. The state information vector comprehensively represents the overall state characteristics of the task semantics, environmental data and interaction relationship under the current task conditions.
6. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 1, characterized in that: The S4 specifically includes: S41. Obtain the generated state information vector S ′ , as the input state features of the current agricultural task; S42. Constructing a strategy function π based on the state information vector θ (a|S ′ ), where a represents the agricultural operation action, θ is the policy function parameter, and the policy function is used to output the state S ′ The probability distribution of the selected operation action a is: S43. Construct state value function V ω (S ′ ), using channelized attention mechanism, nonlinear mapping and state difference regularization for joint modeling; S44, the agricultural operation action space is divided into multiple sub-channels, including the path planning channel, the resource allocation channel and the operation timing channel, and an independent trust region constraint boundary δ is defined for each channel. (i) , used to control the maximum KL divergence of the policy update in the corresponding channel; S45. Define the advantage function value S46. Based on the obtained advantage function value and the policy output of each channel, a channelized trust region optimization objective is constructed. A local optimization problem with KL constraints is constructed in each action channel, and the control policy update direction is within the trust region of each channel. S47, according to the state information vector S ′ Dynamically adjust the global trust region radius δ based on the fluctuation characteristics, environmental change indicators and historical execution feedback information t , when the state changes greatly or the environmental uncertainty is high, increase δ t , otherwise reduce δ t ; S48, introduce the strategy update direction correction factor ∈ t , based on historical job feedback information, including job execution deviation, resource utilization efficiency and actual task completion rate, the policy parameter update amplitude is scaled to control the update direction and step size of the policy parameter θ; S49, solve the trust region optimization target by approximate natural gradient method, combine the adjusted global trust region and the introduced policy update direction correction factor to calculate the updated policy parameter θ ′ , and generate a new strategy function; S410: Apply the updated strategy function to the current state information vector, and output the optimized agricultural equipment control strategy result.
7. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 1, characterized in that: The S5 specifically includes: S51, obtaining an output optimized agricultural equipment control strategy result, wherein the agricultural equipment control strategy result includes operation action type, execution intensity, operation duration, and resource allocation plan; S52. Based on the equipment specifications and known operation execution capability information of the agricultural equipment, perform instruction parameter mapping on the control strategy results to generate an initial instruction data set including equipment control actions, control parameter values, and execution timing; S53, performing consistency check and safety boundary detection based on the current agricultural environment status information and the operating status of the agricultural equipment in combination with the initial instruction data set, and generating a valid control instruction set that meets the execution conditions; S54, inputting the effective control instruction set into the agricultural equipment control interface, and performing instruction encapsulation, format encoding and instruction caching processing through a standardized control protocol; S55. Send the packaged control instructions to the corresponding agricultural operation equipment through the communication interface of the agricultural equipment, complete the real-time transmission of the control instructions and the operation triggering operation, and drive the agricultural operation equipment to perform the corresponding operation according to the received control instructions.
8. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 1, characterized in that: The S6 specifically includes: S61. During the process of the agricultural operation equipment executing the control instructions, real-time feedback data of the operation process is collected, wherein the feedback data includes equipment execution status information, operation completion progress, resource consumption, and environmental response information; S62: Standardize the collected feedback data, unify the data format, align timestamps, and remove outliers to generate structured feedback data samples; S63: Perform real-time analysis and evaluation based on structured feedback data samples, and output agricultural task execution effect indicators and current operation deviation information; S64. Dynamically update the state information vector of the current agricultural task execution based on the agricultural task execution effect index and the current operation deviation information. The updated content includes the operation execution progress, equipment status, and environmental response factors. S65: Input the updated state information vector into the deep semantic parsing model to perform semantic-level adjustment operations to correct the work intention deviation, parameter setting deviation, and environment adaptation error in the instruction; S66. Regenerate the structured semantic feature vector representation based on the adjusted semantic results and provide feedback to build a closed-loop intelligent agricultural command recognition and execution mechanism.
9. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 4, characterized in that: In step S21, the preset agricultural task semantic structure template is a standardized language structure constructed according to the characteristics of the agricultural task and composed of task slot fields and fill-in-the-blank placeholders.
10. The method for intelligent agricultural instruction recognition based on deep semantic analysis according to claim 4, characterized in that: In step S22, the main semantic channel uses the Transformer encoder to extract the global context semantics of the natural language instructions of the agricultural task, and the parameter semantic channel uses position encoding and dependency analysis to extract the local semantic features of the key parameter words.
Citation Information
Cited By
Iterative task execution method and system based on dynamic feedback and causal fault tolerance
CN121301846A
