A digital twin irrigation district intelligent interaction method, device and system based on a large language model
By using structured intent descriptions and intermediate data models, fuzzy natural language instructions are transformed into standardized information. Combined with rule matching and state machine algorithms, compliant API call sequences are generated, which solves the problems of fuzziness and complexity in user irrigation management instructions, improves irrigation district management efficiency, and reduces the risk of system misoperation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, user irrigation management instructions are vague, highly dependent on specific scenarios, and complex to operate. This makes it difficult for large language models to accurately translate them into executable instructions for the digital twin platform, reducing management efficiency and increasing the risk of misoperation in the irrigation system.
Through a two-layer transformation mechanism of structured intent description and intermediate data model, fuzzy natural language instructions are transformed into standardized information layer by layer. Combined with rule matching and state machine algorithm, atomic operation instructions are decomposed and generated into compliant API call sequences after grammatical and logical verification.
It significantly reduces the need for manual corrections, improves irrigation district management efficiency, reduces the risk of system misoperation, and achieves efficient integration of natural language interaction with precise control.
Smart Images

Figure CN120746758B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent management technology for agricultural irrigation districts, specifically to a digital twin intelligent interaction method, device, and system for irrigation districts based on a large language model. Background Technology
[0002] In the field of modern agricultural irrigation district management, digital twin technology enables dynamic monitoring and intelligent control of irrigation systems by constructing virtual mapping models. Meanwhile, the rise of large language models provides technical support for natural language interaction between users and digital twin platforms, and is gradually becoming an important means to improve the efficiency of irrigation district management.
[0003] However, in practical applications, user instructions for irrigation district management are often ambiguous, scenario-dependent, and complex. For example, statements like "a drought-stricken area needs sufficient irrigation" lack clear parameter definitions and execution logic. When existing large language models directly interface with digital twin platforms, it is difficult to accurately translate such natural language intentions into executable instruction sequences that conform to system specifications. This leads to the need for multiple manual corrections during the interaction process, which not only reduces management efficiency but also increases the risk of malfunctions in the irrigation system due to instruction deviations, thus hindering the in-depth application of digital twin technology in intelligent decision-making in irrigation districts. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a digital twin irrigation district intelligent interaction method, device, and system based on a large language model. This solves the problem in existing technologies where user irrigation management instructions are vague, scenario-dependent, and complex to operate, making it difficult for the large language model to accurately translate them into executable instructions for the digital twin platform.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a digital twin irrigation district interaction method based on a large language model, the method comprising the following steps:
[0006] S1. Using the natural language commands input by the user as the initial data source, extract key information from them through word segmentation and semantic parsing techniques;
[0007] S2. Reorganize the key information according to a preset structured template to generate a structured intent description that includes the operation area, target object, execution action and constraints.
[0008] S3. Based on the structured intent description, extract control parameters related to the digital twin platform from it using a rule matching algorithm; map the control parameters to a set of intermediate variables to construct an intermediate layer data model;
[0009] S4. In the intermediate layer data model, each intermediate variable is logically verified to remove outliers that do not conform to the irrigation district management scenario; the intermediate variables are decomposed using a state machine algorithm to generate a series of atomic operation instruction sequences.
[0010] S5. The atomic operation instruction sequence is converted into an API call sequence for the digital twin platform, and the API call sequence is subjected to syntax and logic verification by the verification module.
[0011] S6. Send the verified API call sequence to the digital twin platform to complete the dynamic control of the irrigation system.
[0012] Furthermore, the generation process of the structured intent description is as follows:
[0013] Natural language processing technology is used to segment the user-input text, extract the core words and their contextual relationships, and classify the core words into operation areas, target objects, execution actions and constraints according to preset semantic classification rules.
[0014] The operation area is associated with the geographic information database of the irrigation district management system to obtain the corresponding area identifier; the target object is matched with the equipment list database of the irrigation district management system to obtain the corresponding target equipment identifier.
[0015] The execution action is compared with a preset action library to determine its corresponding operation type; the constraint conditions are parsed into quantitative parameters such as time range, flow threshold or pressure limit; and the above information is combined into a structured intent description.
[0016] Furthermore, the method for constructing the intermediate layer data model is as follows:
[0017] The operation area, target object, execution action, and constraints in the structured intent description are respectively mapped to area identifier, device identifier, operation type, and quantization parameter;
[0018] The region identifier is associated with the virtual geographic partitioning module of the digital twin platform to determine its corresponding spatial range; the device identifier is matched with the device management module of the digital twin platform to determine its corresponding physical device.
[0019] The operation type is compared with the control instruction library of the digital twin platform to determine its corresponding basic operation instruction; the quantization parameter is calibrated with the parameter configuration module of the digital twin platform to determine its corresponding numerical range.
[0020] The above mapping results are integrated into an intermediate data model for subsequent instruction decomposition and logic verification.
[0021] Furthermore, the generation process of the atomic operation instruction sequence is as follows:
[0022] Based on the region identifier, device identifier, operation type, and quantization parameters in the intermediate layer data model, it is decomposed into multiple independent subtasks using a state machine algorithm; each subtask corresponds to an atomic operation instruction.
[0023] Each atomized operation instruction is further refined into specific execution steps, including equipment start-up and shutdown, valve opening adjustment, and water pump power regulation;
[0024] Each execution step is logically validated to ensure it meets the actual needs of irrigation district management; if an anomaly is found, it is traced back to the intermediate layer data model for correction.
[0025] Furthermore, the method for generating the API call sequence is as follows:
[0026] Map the device identifier, operation type, and quantization parameters in each atomic operation instruction to the standard API interface of the digital twin platform;
[0027] Based on the calling specifications of the standard API interface, generate an API call request containing the device address, operation code, and parameter values;
[0028] All API call requests are arranged in the order of execution to form a complete API call sequence.
[0029] Furthermore, the verification module is implemented as follows:
[0030] The API call sequence is grammatically checked by a parser to ensure it conforms to the interface specifications of the digital twin platform.
[0031] The API call sequence is logically checked by a logic analyzer to ensure that its execution order and parameter settings do not cause device conflicts or system abnormalities.
[0032] If a syntax or logic error is found, an error report is generated and the user is prompted to re-enter the command.
[0033] Furthermore, the specific method for updating the state information of the digital twin platform based on the execution results of the API call sequence is as follows:
[0034] The system collects operational data of the irrigation system through a real-time monitoring module, including equipment status, flow rate changes, and pressure distribution.
[0035] The running data is compared with the expected results of the API call sequence, and the degree of deviation is calculated.
[0036] If the deviation exceeds a preset threshold, an alarm mechanism is triggered and abnormal information is recorded; otherwise, the operating data is synchronized to the virtual mapping model of the digital twin platform to update its status information.
[0037] The present invention also provides a digital twin irrigation district interaction device based on a large language model, wherein the device stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method described in any of the above.
[0038] The present invention also provides a digital twin irrigation district interaction system based on a large language model, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the above.
[0039] Furthermore, the system includes a user input module, an intent parsing module, an intermediate layer data model construction module, an instruction decomposition module, a verification module, and a digital twin platform interface module. The modules are connected through a data transmission channel to achieve data transmission and processing.
[0040] Beneficial Effects: This invention utilizes a two-layer conversion mechanism of structured intent description and intermediate data model to progressively transform fuzzy natural language instructions into standardized information. Combined with rule matching and state machine algorithms, it decomposes these instructions into atomic operation commands, which are then validated through syntax and logic to generate compliant API call sequences. This significantly reduces the need for manual corrections and improves irrigation district management efficiency. Simultaneously, the logic validation and real-time state update mechanism reduces the risk of system misoperation due to command deviations, promoting the deep application of digital twin technology in intelligent decision-making in irrigation districts. It achieves efficient integration from natural language interaction to precise control, effectively solving the problem in existing technologies where ambiguous user irrigation management commands, strong scenario dependencies, and complex operations make it difficult for large language models to accurately convert them into executable commands for the digital twin platform. Attached Figure Description
[0041] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;
[0042] Figure 2 This is a system structure diagram of an embodiment of the present invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] Please see Figures 1-2 This invention provides a digital twin irrigation district interaction method based on a large language model, the method comprising the following steps:
[0045] S1. Using the natural language commands input by the user as the initial data source, extract key information from them through word segmentation and semantic parsing techniques;
[0046] S2. Reorganize the key information according to a preset structured template to generate a structured intent description that includes the operation area, target object, execution action and constraints.
[0047] S3. Based on the structured intent description, extract control parameters related to the digital twin platform from it using a rule matching algorithm; map the control parameters to a set of intermediate variables to construct an intermediate layer data model;
[0048] S4. In the intermediate layer data model, each intermediate variable is logically verified to remove outliers that do not conform to the irrigation district management scenario; the intermediate variables are decomposed using a state machine algorithm to generate a series of atomic operation instruction sequences.
[0049] S5. The atomic operation instruction sequence is converted into an API call sequence for the digital twin platform, and the API call sequence is subjected to syntax and logic verification by the verification module.
[0050] S6. Send the verified API call sequence to the digital twin platform to complete the dynamic control of the irrigation system.
[0051] Among them, natural language instructions as the initial data source means processing the text input by the user as raw data. Specifically, this can be achieved using the text receiving interface in the natural language processing framework to capture the original expression of the user's intent.
[0052] Word segmentation and semantic parsing techniques for extracting key information refer to the lexical breakdown and semantic analysis of user commands. Specifically, this can be achieved using dictionary-based word segmentation algorithms and dependency parsing models, which are used to identify entities and actions with operational significance from unstructured text.
[0053] Reorganizing a pre-defined structured template to generate a structured intent description refers to reorganizing information according to a predefined field format. Specifically, it can be implemented using a JSON or XML template engine, which is used to transform ambiguous natural language into a standardized data structure containing operation areas, target objects, execution actions, and constraints.
[0054] Rule matching algorithms for extracting control parameters refer to filtering parameters related to the digital twin platform based on preset rules. Specifically, regular expression matching or decision tree algorithms can be used to filter irrelevant information and extract executable system parameters.
[0055] Intermediate variable mapping to build an intermediate layer data model refers to converting control parameters into platform-independent data representations. This can be achieved using class structures or data dictionaries in object-oriented programming, and is used to establish a transition layer between natural language instructions and machine instructions.
[0056] Logical verification to remove outliers refers to verifying the rationality of intermediate variables. This can be achieved using boundary value checks or business rule validators to exclude invalid parameters that do not conform to the physical constraints of the irrigation area.
[0057] State machine algorithms decompose and generate atomic operation instruction sequences by breaking down complex operations into independent steps. Specifically, this can be achieved using a finite state machine model or a flow control engine to ensure the independence and executability of each instruction step.
[0058] Syntax and logic verification of API call sequences refers to the standardization check of interface calls. This can be achieved using static code analysis tools or logic conflict detection algorithms to prevent system anomalies caused by incorrect instruction format or contradictory execution order.
[0059] The core innovation of this application lies in the fact that through a two-layer conversion mechanism of structured intent description and intermediate data model, ambiguous natural language instructions are transformed layer by layer into atomic operation instruction sequences that conform to the specifications of digital twin platform. Combined with logical verification and syntax verification, a high-precision mapping from natural language interaction to machine-executable instructions is achieved, thereby solving the problem of system misoperation caused by instruction deviation.
[0060] The working process and principle of this application are as follows: using user-input natural language commands as the initial data source, key information is extracted through word segmentation and semantic parsing techniques. This step utilizes natural language processing algorithms to perform lexical and syntactic analysis on the input text, identifying the core vocabulary and semantic structure in the commands.
[0061] Next, the extracted key information is reorganized according to a pre-defined structured template. This step integrates the scattered semantic elements into a standardized intent description format, including four main parts: the operation area, the target object, the execution action, and the constraints. The use of structured templates ensures the consistency and reliability of subsequent processing.
[0062] Based on structured intent descriptions, control parameters related to the digital twin platform are extracted using a rule-matching algorithm. The rule-matching algorithm predefines a series of semantic-to-control-parameter mapping rules, which are used to convert natural language descriptions into machine-understandable control instructions.
[0063] The extracted control parameters are mapped to a set of intermediate variables to construct an intermediate-layer data model. This intermediate-layer data model acts as a bridge between natural language instructions and machine control instructions, providing an abstraction layer that facilitates subsequent logical processing and instruction generation.
[0064] In the intermediate data model, logical validation is performed on each intermediate variable to remove outliers that do not conform to the irrigation district management scenario. This step, through preset rationality check rules, ensures that the generated instructions meet actual operational requirements and avoids system anomalies caused by incorrect parameters.
[0065] The state machine algorithm decomposes intermediate variables to generate a series of atomic operation instructions. It breaks down complex control logic into a series of simple, independent state transitions, with each state corresponding to a basic operation instruction. This decomposition method improves the reliability and controllability of instruction execution.
[0066] Transform the atomic operation instruction sequence into an API call sequence for the digital twin platform. This step involves mapping abstract operation instructions to specific API function calls, including setting the correct function parameters and call order.
[0067] The API call sequence is syntaxally and logically validated using a verification module. This module checks the API call format for correctness, parameter validity, and logical conflicts within the entire call sequence. This step further enhances the security of instruction execution.
[0068] Finally, the verified API call sequence is sent to the digital twin platform to complete the dynamic control of the irrigation system. Upon receiving the API call sequence, the digital twin platform executes the corresponding operations, enabling real-time control and adjustment of the irrigation system.
[0069] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0070] The user inputs a command into the system via voice input device: "Please irrigate plot 1 in the East Zone between 2 PM and 4 PM today, maintaining soil moisture between 60% and 70%."
[0071] The system first calls the natural language processing module to perform word segmentation and semantic parsing on the input command. The word segmentation results include keywords such as "today", "afternoon", "2 o'clock", "4 o'clock", "East District", "Plot No. 1", "irrigation", "soil moisture", "60%", and "70%".
[0072] The semantic parsing module reorganizes these keywords according to a preset structured template. The generated structured intent description is: Operation area: Plot 1, East Zone; Target object: Irrigation system; Action: Start Irrigation; Constraints: Time range (2 PM to 4 PM today), Soil moisture range (60% to 70%).
[0073] Rule matching algorithms extract control parameters from structured intent descriptions:
[0074] Zone identifier: EAST_ZONE_01
[0075] Device type: IRRIGATION_SYSTEM
[0076] Operation type: START_IRRIGATION
[0077] Time window: 14:00-16:00 Humidity threshold: 60%-70%
[0078] These control parameters are mapped to intermediate variables to construct the intermediate layer data model:
[0079] zone_id = "EAST_ZONE_01"
[0080] device_type = \"IRRIGATION_SYSTEM\"
[0081] operation = \"START_IRRIGATION\"
[0082] time_window = [1400, 1600]
[0083] humidity_range = [60, 70]
[0084] The logic verification module checks these intermediate variables. For example, it confirms that the time window is within the valid range and that the humidity threshold does not exceed the maximum value allowed by the system.
[0085] The state machine algorithm decomposes intermediate variables into a sequence of atomic operation instructions:
[0086] Check equipment status
[0087] Set up irrigation areas
[0088] Configure humidity sensor threshold
[0089] Set a scheduled start time
[0090] Set a timer to turn off
[0091] Activate irrigation system
[0092] These atomic instructions are translated into a sequence of API calls:
[0093] check_device_status(zone_id, device_type)
[0094] set_irrigation_zone(zone_id)
[0095] configure_humidity_sensor(zone_id,humidity_range)
[0096] set_timer_start(zone_id, time_window[0])
[0097] set_timer_stop(zone_id,time_window[1])
[0098] activate_irrigation_system(zone_id)
[0099] The validation module performs syntax and logic validation on the API call sequence to ensure that all parameters are in the correct format and the call order is reasonable.
[0100] After successful verification, the API call sequence is sent to the digital twin platform for execution, enabling precise control of the irrigation system in the designated area.
[0101] This application further proposes a method for generating structured intent descriptions, including the following steps: using natural language processing technology to segment the user-input text and extract core words and their contextual relationships; classifying the core words into operation areas, target objects, execution actions, and constraints according to semantic classification rules; associating the operation area with a geographic information database to obtain area identifiers; matching the target object with a device list database to obtain device identifiers; comparing the execution action with a preset action library to determine the operation type; parsing the constraints into quantitative parameters such as time range, traffic threshold, or pressure limit; and combining the above information to form a structured intent description.
[0102] In this process, word segmentation uses a bidirectional long short-term memory network model to identify the boundaries of core words, and contextual relationships are constructed by constructing a semantic graph through dependency parsing.
[0103] The geographic information database stores the geographic coordinates and topological relationships of the irrigation area. The area identifier includes the latitude and longitude range and the number of the canal system to which it belongs.
[0104] The equipment inventory database records equipment type, installation location, and unique code. The equipment identifier is generated by concatenating the equipment type code and the installation location code.
[0105] The preset action library includes three basic operation types: start / stop, adjust, and switch. User input actions are matched using cosine similarity calculation.
[0106] The constraint parsing process uses regular expressions to extract numerical units and then converts them into a standard parameter format based on irrigation district management standards.
[0107] Specifically, when a user inputs "a drought-stricken area needs sufficient irrigation," word segmentation extracts core terms such as "area," "drought-stricken area," and "irrigation." Contextual analysis determines "area" as the operation region and "irrigation" as the action. The operation region is matched against a geographic information database, identifying the corresponding region identifier as A-03-2, encompassing a geographical range from 118.5° to 118.7° east longitude and 34.2° to 34.4° north latitude. The target object is semantically classified as the irrigation equipment group within this region, and equipment identifiers P-12 to P-15 are obtained by matching the equipment list database. The action is determined to be "start" after comparison with the action library. Constraints are parsed as a flow threshold of no less than 50 m³ / h and a duration of 2 hours. The final generated structured intent description includes the region identifier, equipment identifier, operation type, and quantitative parameters, providing accurate input for the subsequent construction of the intermediate layer data model.
[0108] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0109] User-input natural language commands are segmented to extract core words and contextual relationships. Core words are categorized according to preset semantic classification rules into operation area, target object, execution action, and constraints. The operation area is linked to the irrigation district management system's geographic information database to obtain an area identifier. The target object is matched against the irrigation district management system's equipment list database to obtain target equipment identifiers. The execution action is compared with a preset action library to determine the operation type. Constraints are parsed into quantitative parameters such as time range, flow threshold, or pressure limit. All of this information is combined to form a structured intent description.
[0110] For example, a user inputs "Increase irrigation water volume by 20% in area A for 2 hours". After word segmentation, the core keywords are extracted: "area A", "increase", "irrigation water volume", "20%", and "2 hours". "Area A" is categorized as the operation area and associated with a geographic information database to obtain the area identifier "ZONE_A". "Irrigation water volume" is categorized as the target object and matched with an equipment list database to obtain the equipment identifiers "PUMP_01" and "VALVE_03". "Increase" is categorized as an action and compared with the action database to determine the operation type as "INCREASE_FLOW". "20%" and "2 hours" are categorized as constraints, parsed as the flow increase percentage and execution time. The final structured intent description is generated as follows: {ZONE:ZONE_A, Device:[PUMP_01,VALVE_03], Operation:INCREASE_FLOW, Parameter:{Increase Ratio:20%, Duration:2h}}.
[0111] This application further proposes mapping the operation area, target object, execution action, and constraints in the structured intent description to area identifiers, device identifiers, operation types, and quantification parameters, respectively; associating the area identifiers with the virtual geographic partitioning module of the digital twin platform to determine their corresponding spatial range; matching the device identifiers with the device management module of the digital twin platform to determine their corresponding physical devices; comparing the operation type with the control instruction library of the digital twin platform to determine its corresponding basic operation instruction; calibrating the quantification parameters with the parameter configuration module of the digital twin platform to determine its corresponding numerical range; and integrating the above mapping results into an intermediate layer data model for subsequent instruction decomposition and logic verification.
[0112] Among them, the regional identifier is generated using geocoding rules, such as a string format divided by latitude and longitude intervals; the device identifier is matched one-to-one through the registry of the device management module, for example, the water pump device identifier includes the model code and the installation location code; the comparison between the operation type and the control command library uses a hash table indexing method, for example, mapping "valve opening adjustment" to the command code V_CTRL_001; the quantitative parameter calibration is achieved through the threshold database of the parameter configuration module, for example, limiting the flow threshold to the range of 0-100m³ / h.
[0113] Specifically, the operational area in the structured intent description is converted into a region identifier by the geographic information database and then mapped to the spatial coordinate system of the virtual geographic partitioning module. For example, "North Area No. 3 Field" is converted into the N3_Zone coordinate range. The device identifier is matched with the communication address of the physical device through the registry of the device management module. For example, "Water Pump P-203" is mapped to the IP address 192.168.3.15. The operation type is quickly retrieved from the predefined instructions in the control instruction library through a hash table. For example, the "Start" action is mapped to the ON instruction code. The quantization parameters are checked against the allowable range of the parameter configuration module during the calibration process. For example, the user-set flow rate of 120m³ / h is automatically corrected to 100m³ / h. The above mapping results are integrated into an intermediate layer data model through the data bus. This model contains three data fields: device control address, instruction code, and parameter value, ensuring the executableness of the atomic operation instructions decomposed by the subsequent state machine.
[0114] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0115] The method for constructing the intermediate-tier data model includes the following steps:
[0116] In the structured intent description, the operating area, target object, execution action, and constraints are mapped to area identifiers, device identifiers, operation types, and quantization parameters, respectively. For example, the operating area "East of Area A" is mapped to the area identifier "AE-001", the target object "Water Pump No. 1" is mapped to the device identifier "PUMP-001", the execution action "Start" is mapped to the operation type "START", and the constraint "Flow rate not exceeding 100 cubic meters / hour" is mapped to the quantization parameter "MAX_FLOW=100".
[0117] The region identifier is associated with the virtual geographic partitioning module of the digital twin platform to determine the corresponding spatial range. For example, the region identifier "AE-001" is associated with the set of polygon region coordinates {(x1,y1), (x2,y2), ..., (xn,yn)} in the virtual geographic partitioning module.
[0118] The device identifier is matched with the device management module of the digital twin platform to determine the corresponding physical device. For example, the device identifier "PUMP-001" matches a water pump object in the device management module, which includes attribute information such as model, location, and rated power.
[0119] The operation type is compared with the control instruction library of the digital twin platform to determine the corresponding basic operation instruction. For example, the operation type "START" is compared with the "DEVICE_START" instruction in the control instruction library, which includes the specific steps and parameter settings for starting the device.
[0120] The quantization parameters are calibrated with the parameter configuration module of the digital twin platform to determine the corresponding numerical range. For example, the quantization parameter "MAX_FLOW=100" is calibrated to the flow control parameter in the parameter configuration module, with an upper limit of 100 cubic meters per hour.
[0121] The mapping results are integrated into an intermediate data model for subsequent instruction decomposition and logic verification. This integrated intermediate data model includes information such as region scope, device objects, operation instructions, and parameter configurations, forming a structured dataset.
[0122] This application further proposes a method for generating atomic operation instruction sequences. Based on the region identifier, device identifier, operation type, and quantization parameters in the intermediate layer data model, it decomposes them into multiple independent subtasks using a state machine algorithm. Each subtask corresponds to an atomic operation instruction. Each atomic operation instruction is further refined into specific execution steps, including equipment start-up and shutdown, valve opening adjustment, and water pump power regulation. Logical verification is performed on each execution step to ensure that it meets the actual needs of irrigation area management. If an anomaly is found, it is backtracked to the intermediate layer data model for correction.
[0123] The state machine algorithm employs finite state transition rules, mapping region identifiers to geographic partition codes, converting device identifiers to device control addresses, matching operation types to preset instruction sets, and calibrating quantization parameters to percentages or absolute values. During the execution step refinement process, the valve opening adjustment step is broken down into three sub-steps: opening target value calculation, execution time threshold setting, and feedback signal monitoring. The pump power adjustment step correlates with flow sensor data and dynamically adjusts the speed parameters. The logic verification process incorporates a device status detection mechanism; when the target device is detected to be offline, an anomaly flag is triggered, and a correction request is generated.
[0124] Specifically, the state machine algorithm first parses the region identifier in the intermediate layer data model, matches it with the irrigation district geographic zoning database, and determines the physical boundary of the area to be operated on. Then, it matches the device identifier with the device control address mapping table to generate the target address field of the device control command. The operation type is converted into a hexadecimal control code by the command encoder, and the quantization parameters are normalized and written into the command parameter segment. When decomposing into subtasks, each subtask is encapsulated as an independent command package, containing the target address, operation code, and parameter values. In the execution step refinement stage, the valve opening adjustment command is converted into a 0-100% linear control signal, with an additional execution time limit parameter, such as completing the opening adjustment within 30 seconds. The pump power adjustment command is associated with real-time flow data; when the flow value exceeds the set threshold, the power output is automatically reduced. Before sending the command, the logic verification module checks the online status of the equipment and the rationality of the parameters. If a pump power adjustment command is found to be outside the rated range, the command is marked as abnormal and a backtracking process is triggered to recalibrate the quantization parameters in the intermediate layer data model.
[0125] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0126] Based on the region identifier, device identifier, operation type, and quantization parameters in the intermediate layer data model, a state machine algorithm is used to decompose it into multiple independent subtasks. Each subtask corresponds to an atomic operation instruction. For example, the instruction "Region A needs additional irrigation" can be decomposed into subtasks such as "Start the water pump in region A", "Open the main valve in region A", and "Adjust the branch valve in region A".
[0127] Each atomic operation instruction is further refined into specific execution steps, including equipment start-up and shutdown, valve opening adjustment, and water pump power regulation. Specifically, "start the water pump in area A" can be broken down into steps such as "check water pump status", "set water pump power to 50%", and "start water pump".
[0128] Each execution step undergoes logical verification to ensure it meets the actual needs of irrigation district management. If an anomaly is detected, the process is traced back to the intermediate data model for correction. For example, if the water pump is detected to be running, the "start water pump" step is skipped, and power adjustment is performed directly.
[0129] This application further proposes mapping the device identifier, operation type, and quantization parameters in each atomic operation instruction to a standard API interface of the digital twin platform; generating an API call request containing device address, operation code, and parameter values according to the calling specifications of the standard API interface; and arranging all API call requests in the execution order to form a complete API call sequence.
[0130] The device identifier corresponds to the unique physical device code in the platform's device management module, ensuring accurate device addressing for interface calls. Operation types are converted to basic operation codes in the platform's control instruction library using a predefined instruction lookup table; for example, "valve opening adjustment" is mapped to the "valve_angle_set" operation code. Quantified parameters, after numerical range verification, are encapsulated according to the data format of the platform's parameter configuration module; for example, flow thresholds are converted to floating-point numbers and retained to two decimal places. API call requests are generated according to the platform's interface protocol, using JSON format to encapsulate the device address, operation code, and parameter values, for example: {"device_id":"Pump_001","operation":"power_adjust","value":75.0}. The execution order is arranged according to the subtask dependencies after state machine decomposition, using a queue structure to store call requests, ensuring that the instruction execution sequence conforms to the irrigation system's control logic.
[0131] Specifically, when the atomic operation instruction includes "adjust pump power to 75%", the device identifier "Pump_001" is mapped to the physical device address registered in the platform's device management module. The operation type "power adjustment" is converted to the standard operation code "power_adjust" through an instruction lookup table. The quantized parameter 75% is validated and converted to the floating-point number 75.0, with a unit identifier added according to the platform's parameter format. The generated API call request encapsulates the above information in a JSON structure, ensuring that the syntax conforms to the platform's interface specifications. Multiple such call requests are arranged according to the order of the irrigation process, for example, executing the pump start instruction first and then the power adjustment instruction, forming a conflict-free call sequence. This sequence is checked for JSON format correctness by a syntax analyzer, and the logic analyzer verifies the rationality of the device operation order before finally being sent to the digital twin platform for execution, avoiding device anomalies caused by incorrect parameter formats or reversed execution order.
[0132] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0133] The method for generating an API call sequence includes the following steps:
[0134] First, the device identifier, operation type, and quantization parameter in each atomic operation instruction are mapped to the standard API interface of the digital twin platform. For example, for an atomic operation instruction that controls the opening of an irrigation valve, its device identifier might be "Valve_001", the operation type is "adjust opening", and the quantization parameter is "50%". This information is mapped to the "setValveOpeningDegree" API interface of the digital twin platform.
[0135] Secondly, based on the standard API interface calling specifications, an API call request containing the device address, operation code, and parameter values is generated. Continuing the example above, the generated API call request might look like this:
[0136] {\"deviceAddress\": \"Valve_001\",
[0137] \"operationCode\": \"setValveOpeningDegree\",
[0138] "parameterValue": 50
[0139] Finally, all API call requests are arranged in execution order to form a complete API call sequence. This sequence may contain multiple API call requests similar to those described above, arranged sequentially according to the irrigation system's operational logic.
[0140] This application further proposes an implementation method for the verification module: performing a syntax check on the API call sequence using a syntax analyzer to ensure that it conforms to the interface specifications of the digital twin platform; performing a logic check on the API call sequence using a logic analyzer to ensure that its execution order and parameter settings will not cause device conflicts or system abnormalities; and generating an error report and prompting the user to re-enter the command if a syntax or logic error is found.
[0141] The syntax analyzer, based on the interface protocol defined by the digital twin platform, verifies whether the device address format, operation code length, and parameter value type in API call requests conform to the specifications. The logic analyzer, based on the physical connection relationships between devices and the operational status database, determines whether there is a risk of resource preemption or parameter exceeding limits in the operation instructions of multiple devices within the same area. Error reports include error type codes, location of occurrence, and correction suggestions, and are fed back to the user through a visual interface.
[0142] Specifically, the syntax analyzer traverses each request in the API call sequence, checking if the device address is the platform-registered hexadecimal code, if the operation code has a matching entry in the instruction library, and if the parameter value is within a preset value range. The logic analyzer obtains the current water pump power threshold through the device management module. If there are instructions in the call sequence that simultaneously open multiple valves of the same water source and the total flow exceeds the water pump's capacity limit, it is determined to be a logic conflict. When an error is detected, the verification module marks the error type as a syntax error or a logic error, associates it with the corresponding API request sequence number and parameter exception items, generates a structured error report, returns it to the user input module, and triggers the instruction re-parsing process.
[0143] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0144] The validation module uses a syntax analyzer to perform grammatical checks on the API call sequence to ensure it conforms to the interface specifications of the digital twin platform. Specifically, the syntax analyzer first parses each request in the API call sequence, checking whether its format conforms to predefined syntax rules. For example, it verifies whether the request contains necessary fields such as device address, operation code, and parameter values, and whether the data types of these fields are correct.
[0145] Furthermore, the logic analyzer performs logical checks on the API call sequence to ensure that its execution order and parameter settings do not lead to device conflicts or system anomalies. Thus, the logic analyzer simulates the execution process of the API call sequence to check for potential conflicts. For example, it checks for contradictory instructions that simultaneously turn the same device on and off, or whether parameter settings exceed the device's safe operating range.
[0146] If a syntax or logic error is detected, the validation module will generate an error report and prompt the user to re-enter the command. Specifically, the error report includes the error type, location, and suggested corrections. The user can correct the error based on the error report and resubmit the command for validation.
[0147] This application further proposes a specific method for updating the status information of a digital twin platform based on the execution results of API call sequences. This method includes collecting the operation data of the irrigation system through a real-time monitoring module, comparing the operation data with the expected results of the API call sequence to calculate the degree of deviation, triggering an alarm mechanism and recording abnormal information if the deviation exceeds a preset threshold, and otherwise synchronizing the operation data to the virtual mapping model of the digital twin platform to update the status information.
[0148] The real-time monitoring module collects data on device status, flow rate changes, and pressure distribution through a sensor network, with a data sampling frequency set to once per second. The deviation calculation uses the root mean square error algorithm, and the preset threshold is set to 5% to 10% depending on the device type. The alarm mechanism notifies operators through both SMS and platform pop-up windows, and the abnormal information record includes a timestamp, device number, and deviation value. The virtual mapping model is updated using an incremental synchronization method, modifying only the changed data fields.
[0149] Specifically, the real-time monitoring module continuously collects equipment status, flow, and pressure data after the irrigation system executes the API call sequence. The data is preprocessed and then input into the comparison module. The comparison module compares the actual operating data with the preset equipment addresses, operation codes, and parameter values in the API call sequence item by item, and calculates the root mean square value of the deviation of each parameter. When the calculation result exceeds the preset threshold, the alarm mechanism is immediately triggered and generates a report containing the specific abnormal location and value, while suspending the execution of subsequent instructions. If the deviation is within the allowable range, the data synchronization module classifies the operating data according to the equipment identifier and writes it into the equipment status table corresponding to the virtual mapping model through incremental updates, ensuring that the digital twin platform reflects the real status of the physical system in real time.
[0150] As a preferred embodiment, the solution of this application is specifically implemented as follows:
[0151] The specific method for updating the state information of the digital twin platform based on the execution results of the API call sequence includes the following steps:
[0152] First, operational data of the irrigation system is collected through a real-time monitoring module. Specifically, multiple sensor nodes, including flow meters, pressure sensors, and water level gauges, are deployed within the irrigation area. These sensors collect data on equipment status, flow changes, and pressure distribution every 5 seconds and transmit this data to the central data processing unit via a wireless network.
[0153] Secondly, the operational data is compared with the expected results of the API call sequence to calculate the degree of deviation. After receiving real-time data, the central data processing unit compares it with the pre-set expected results of the API call sequence. For example, for an irrigation valve opening adjustment command, the difference between the actual opening and the target opening is compared. The root mean square error (RMSE) method is used to calculate the degree of deviation, comprehensively considering the deviations of multiple parameters.
[0154] Furthermore, the system assesses and processes deviations based on the calculated degree of deviation. A preset deviation threshold is established, for example, an RMSE value not exceeding 5%. When the deviation exceeds this threshold, an alarm mechanism is triggered. Alarm information is sent to administrators via SMS, email, etc., and the abnormal device or area is simultaneously displayed in red on the system interface. Additionally, the abnormal information is recorded in the system log, including timestamps, device IDs, and anomaly types, facilitating subsequent analysis and processing.
[0155] Conversely, if the deviation is within the threshold range, the execution result is considered to meet expectations. At this point, the running data is synchronized to the virtual mapping model of the digital twin platform, updating its status information. The update process uses incremental synchronization, transmitting only the data that has changed to reduce network load. Upon receiving new data, the virtual mapping model immediately refreshes the corresponding virtual object attributes, ensuring that the digital twin platform always reflects the latest status of the irrigation district.
[0156] This application further proposes a digital twin irrigation district interaction device based on a large language model. The device stores a computer program, which, when executed by a processor, implements a method to convert user instructions into API call sequences.
[0157] The device includes a memory and a processor hardware entity. The memory uses a non-volatile storage medium to store computer program code, and the processor establishes a data channel with the memory through a bus architecture. The computer program code includes an instruction set containing multiple functional modules such as user input parsing, structured intent generation, intermediate layer model construction, instruction sequence decomposition, and API call generation. When the processor executes instructions, it reads the code from the memory segment by segment according to a preset clock cycle, temporarily stores intermediate calculation results in registers, and completes data mapping and verification operations within the logic operation unit.
[0158] Specifically, when the computer program loaded into memory is executed by the processor, a multi-threaded processing mechanism is initiated. The main thread is responsible for receiving natural language instructions input by the user, while sub-threads perform word segmentation, semantic parsing, and structured template matching operations in parallel. When the processor builds the intermediate data model in memory, it uses an address mapping mechanism to associate the operation region identifier and device identifier in the structured intent description with the virtual partition and device management module of the digital twin platform. When performing logic verification, the processor calls a built-in anomaly detection algorithm to scan intermediate variables in real time, and abnormal data is automatically released from storage space through a memory reclamation mechanism. The atomic operation instruction sequence that has completed verification is encoded by the processor and generated into a binary format API call request according to the digital twin platform interface protocol, and finally sent to the target device through the physical communication interface. This device, through hardware-level data processing, solidifies software algorithms into dedicated circuit execution logic, reducing the latency of natural language to machine instructions to the millisecond level, while avoiding the environmental configuration problems of general computing platforms.
[0159] As a preferred embodiment, the solution of this application is specifically implemented as follows: A digital twin-based irrigation district interaction device includes a memory and a processor. The computer program stored in the memory includes a natural language processing unit, a structured template mapping unit, an intermediate variable generation unit, a state machine decomposition unit, and an API conversion unit. When the processor executes the program, the natural language processing unit performs word segmentation processing on the user-input command "a certain area of arid land needs sufficient irrigation", extracting the core words "area", "arid land", and "sufficient irrigation"; the structured template mapping unit classifies the words into operation areas, target objects, and execution actions, and matches them with a geographic information database to generate area identifiers; the intermediate variable generation unit maps the identifiers to virtual geographic partition parameters and equipment control parameters of the digital twin platform; the state machine decomposition unit decomposes the parameters into atomic commands for valve opening and pump power adjustment; the API conversion unit converts the atomic commands into platform standard interface call requests, which are then verified by the verification module and sent to the digital twin platform for execution.
[0160] Within the platform's fault tolerance threshold, the operation response latency is reduced simultaneously.
[0161] Please see Figure 2 This application further proposes a digital twin irrigation district interaction system based on a large language model, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it realizes the complete process of natural language instruction parsing, intermediate layer data model construction, atomic operation instruction generation, and API call sequence verification.
[0162] The memory stores the geographic information database, equipment list database, and action library. The processor connects to the user input module, intent parsing module, intermediate layer data model construction module, instruction decomposition module, verification module, and digital twin platform interface module via a data transmission channel. After receiving natural language instructions, the user input module extracts key information through word segmentation and semantic analysis to generate a structured intent description. The intermediate layer data model construction module maps the structured description to region identifiers, equipment identifiers, operation types, and quantization parameters to form the intermediate layer data model. The instruction decomposition module decomposes the intermediate layer data model into atomic operation instruction sequences using a state machine algorithm. The verification module performs syntactic and logical verification on the API call sequences to ensure they conform to the digital twin platform's interface specifications. The digital twin platform interface module sends the verified instruction sequence to the digital twin platform.
[0163] Specifically, user-inputted natural language commands are transmitted to the intent parsing module via the user input module. This module uses natural language processing technology to extract core words and categorize them into operation area, target object, execution action, and constraints. The intermediate layer data model construction module associates the operation area with a geographic information database, matches the target object with an equipment list database, compares the execution action with an action library, and parses the constraints into quantifiable parameters. The instruction decomposition module decomposes the parameters in the intermediate layer data model into atomic operation commands such as equipment start / stop and valve opening adjustment. The verification module checks the compliance of the API call sequence using a syntax analyzer and a logic analyzer. For example, when the user command includes "adjust the power of the water pump in area A to 50%", the system sequentially generates a structured description, intermediate model, atomic command, and API call request through the above modules, and finally completes the power adjustment through the interface module. Through the coordinated operation of these modules, the system achieves automated conversion of natural language commands into executable commands, avoiding efficiency losses and operational errors caused by manual intervention.
[0164] As a preferred embodiment, the solution of this application is implemented as follows: The system consists of an industrial control server equipped with an Intel Xeon E5-2687W processor and a Samsung 860 Pro solid-state drive. The control server runs a CentOS 7.6 operating system and is configured with a Python 3.8 runtime environment. The natural language processing module loads a pre-trained BERT-based Chinese model for instruction parsing, and the structured template is stored in a MySQL 8.0 database in JSON format. The intermediate layer data model defines the mapping relationship between device identifiers and spatial coordinates through XML Schema, and the instruction decomposition engine adopts a distributed architecture based on the RabbitMQ message queue. The verification module integrates the ANTLR 4.9 parser and the Drools 7.59 rule engine, and the digital twin platform interface interacts with the virtual irrigation district model built by the Unity3D engine through the gRPC 1.38 protocol. During system operation, user instructions are transmitted to the Nginx 1.20 reverse proxy server via the HTTPS protocol, and after load balancing, they are distributed to processing nodes for end-to-end parsing and verification.
[0165] This application further proposes a digital twin irrigation district interaction system based on a large language model, including a user input module, an intent parsing module, an intermediate layer data model construction module, an instruction decomposition module, a verification module, and a digital twin platform interface module. The modules are connected through a data transmission channel to realize data transmission and processing.
[0166] The user input module receives natural language instructions and transmits them to the intent parsing module. The intent parsing module extracts the operation area, target object, execution action, and constraints using natural language processing technology to generate a structured intent description. The intermediate layer data model construction module maps the structured intent description to area identifiers, device identifiers, operation types, and quantization parameters to construct the intermediate layer data model. The instruction decomposition module generates atomic operation instruction sequences based on the intermediate layer data model and corrects anomalies through logical verification. The verification module performs syntactic and logical verification on the API call sequences converted from the atomic operation instruction sequences. The digital twin platform interface module sends the verified API call sequences to the digital twin platform. The data transmission channel uses a standardized protocol to achieve efficient data flow transmission between modules, ensuring the real-time performance and consistency of the processing.
[0167] Specifically, the user input module receives user commands via a graphical interface or voice interface and transmits the raw data to the intent parsing module. The intent parsing module uses word segmentation algorithms and semantic analysis models to extract key information and generates a structured intent description by combining a geographic information database and an equipment inventory database. The intermediate-layer data model construction module maps the structured data into identifiers and parameters recognizable by the digital twin platform, establishing data associations through the virtual geographic partitioning module and the equipment management module. The instruction decomposition module uses a state machine algorithm to decompose the intermediate-layer data into atomic operation commands such as equipment start / stop and valve adjustment, and triggers data model corrections through anomaly detection rules. The verification module uses a syntax analyzer and a logic analyzer to check the format standardization and execution logic rationality of the API call sequence, and error reports are fed back to the instruction decomposition module through the data transmission channel. The digital twin platform interface module generates a request sequence of device addresses, operation codes, and parameter values according to the API call specifications and synchronizes system status updates through the real-time monitoring module. All modules form a closed-loop processing link through the data transmission channel, reducing manual intervention and improving instruction generation efficiency and execution reliability.
[0168] As a preferred embodiment, the solution of this application is implemented as follows: The user input module receives natural language instructions submitted by the user via the WebSocket protocol, and the instruction text is transmitted to the intent parsing module. The intent parsing module has a built-in BERT pre-trained model, which performs word segmentation on the input text and extracts entity tags, where entity tags include geographic coordinates, device number, action verbs, and numerical parameters. After receiving the parsing results, the intermediate layer data model construction module matches and maps the geographic coordinates with the block codes in the GIS database, associates and binds the device number with the registration ID of the device management system, and converts the action verbs into preset OPC-UA protocol operation codes.
[0169] The instruction decomposition module employs a finite state machine algorithm to decompose composite operations in the intermediate layer data model into atomic instructions for device control. Specifically, when the intermediate layer data model contains the composite instruction "Area A1 water pump runs for 2 hours," this module generates three atomic operations: a pump start instruction, a countdown instruction, and a stop instruction. The verification module establishes an SSH connection via the JSch library, simulates sending the atomic instruction sequence to the digital twin platform, and receives syntax error codes and logic conflict warnings returned by the platform. After successful verification, the digital twin platform interface module encapsulates the atomic instruction sequence into a RESTful API request and sends POST requests to the platform's control server in a predetermined order.
[0170] In summary, this invention utilizes a two-layer conversion mechanism of structured intent description and intermediate data model to progressively transform fuzzy natural language instructions into standardized information. Combined with rule matching and state machine algorithms, it decomposes these instructions into atomic operation commands, which are then validated through syntax and logic to generate compliant API call sequences. This significantly reduces the need for manual corrections and improves irrigation district management efficiency. Simultaneously, the logic validation and real-time state update mechanism reduces the risk of system misoperation due to command deviations, promoting the deep application of digital twin technology in intelligent decision-making in irrigation districts. It achieves efficient integration from natural language interaction to precise control, effectively solving the problem in existing technologies where ambiguous user irrigation management commands, strong scenario dependencies, and complex operations make it difficult for large language models to accurately convert them into executable commands for the digital twin platform.
[0171] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0172] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A digital twin irrigation district interaction method based on a large language model, characterized in that, The method includes the following steps: S1. Using the natural language commands input by the user as the initial data source, extract key information from them through word segmentation and semantic parsing techniques; S2. Reorganize the key information according to a preset structured template to generate a structured intent description that includes the operation area, target object, execution action and constraints. S3. Based on the structured intent description, extract control parameters related to the digital twin platform from it using a rule matching algorithm; map the control parameters to a set of intermediate variables to construct an intermediate layer data model; The method for constructing the intermediate layer data model is as follows: The operation area, target object, execution action, and constraints in the structured intent description are respectively mapped to area identifier, device identifier, operation type, and quantization parameter; The region identifier is associated with the virtual geographic partitioning module of the digital twin platform to determine its corresponding spatial range; the device identifier is matched with the device management module of the digital twin platform to determine its corresponding physical device. The operation type is compared with the control instruction library of the digital twin platform to determine its corresponding basic operation instruction; the quantization parameter is calibrated with the parameter configuration module of the digital twin platform to determine its corresponding numerical range. The mapping results are integrated into an intermediate data model for subsequent instruction decomposition and logic verification. S4. In the intermediate layer data model, each intermediate variable is logically verified to remove outliers that do not conform to the irrigation district management scenario; the intermediate variables are decomposed using a state machine algorithm to generate a series of atomic operation instruction sequences. S5. The atomic operation instruction sequence is converted into an API call sequence for the digital twin platform, and the API call sequence is subjected to syntax and logic verification by the verification module. S6. Send the verified API call sequence to the digital twin platform to complete the dynamic control of the irrigation system.
2. The digital twin irrigation district interaction method for a large language model as described in claim 1, characterized in that, The generation process of the structured intent description is as follows: Natural language processing technology is used to segment the user-input text, extract the core words and their contextual relationships, and classify the core words into operation areas, target objects, execution actions and constraints according to preset semantic classification rules. The operation area is associated with the geographic information database of the irrigation district management system to obtain the corresponding area identifier; The target object is matched with the equipment list database of the irrigation district management system to obtain the corresponding target equipment identifier; The execution action is compared with a preset action library to determine its corresponding operation type; The constraints are parsed into quantitative parameters such as time range, flow threshold, or pressure limit; the above information is then combined into a structured intent description.
3. The digital twin irrigation district interaction method for a large language model as described in claim 1, characterized in that, The process of generating the atomic operation instruction sequence is as follows: Based on the region identifier, device identifier, operation type, and quantization parameters in the intermediate layer data model, it is decomposed into multiple independent subtasks using a state machine algorithm; each subtask corresponds to an atomic operation instruction. Each atomized operation instruction is broken down into specific execution steps, including equipment start-up and shutdown, valve opening adjustment, and water pump power regulation; Each execution step is logically validated to ensure it meets the actual needs of irrigation district management; if an anomaly is found, it is traced back to the intermediate layer data model for correction.
4. The digital twin irrigation district interaction method for a large language model as described in claim 1, characterized in that, The method for generating the API call sequence is as follows: Map the device identifier, operation type, and quantization parameters in each atomic operation instruction to the standard API interface of the digital twin platform; Based on the calling specifications of the standard API interface, generate an API call request containing the device address, operation code, and parameter values; All API call requests are arranged in the order of execution to form a complete API call sequence.
5. The digital twin irrigation district interaction method for a large language model as described in claim 1, characterized in that, The verification module is implemented as follows: The API call sequence is grammatically checked by a parser to ensure it conforms to the interface specifications of the digital twin platform. The API call sequence is logically checked by a logic analyzer to ensure that its execution order and parameter settings do not cause device conflicts or system abnormalities. If a syntax or logic error is found, an error report is generated and the user is prompted to re-enter the command.
6. The digital twin irrigation district interaction method for a large language model as described in claim 1, characterized in that, The specific method for updating the status information of the digital twin platform based on the execution results of the API call sequence is as follows: The system collects operational data of the irrigation system through a real-time monitoring module, including equipment status, flow rate changes, and pressure distribution. The running data is compared with the expected results of the API call sequence, and the degree of deviation is calculated. If the deviation exceeds a preset threshold, an alarm mechanism is triggered and abnormal information is recorded; otherwise, the operating data is synchronized to the virtual mapping model of the digital twin platform to update its status information.
7. A digital twin irrigation district interactive device with a large language model, characterized in that, The device stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 6.
8. A digital twin irrigation district interactive system with a large language model, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the method as claimed in any one of claims 1 to 6.
9. The digital twin irrigation district interactive system with a large language model as described in claim 8, characterized in that, The system includes a user input module, an intent parsing module, a middle-layer data model construction module, an instruction decomposition module, a verification module, and a digital twin platform interface module. These modules are connected via a data transmission channel to achieve data transfer and processing. The user input module is used to take the natural language commands input by the user as the initial data source and extract key information from them through word segmentation and semantic parsing techniques; The intent parsing module is used to reorganize the key information according to a preset structured template to generate a structured intent description that includes the operation area, target object, execution action and constraints. The intermediate layer data model construction module is used to extract control parameters related to the digital twin platform from the structured intent description through a rule matching algorithm; and to map the control parameters to a set of intermediate variables to construct an intermediate layer data model. The instruction decomposition module is used to perform logical verification on each intermediate variable in the intermediate layer data model, and remove outliers that do not conform to the irrigation district management scenario; the intermediate variables are decomposed through a state machine algorithm to generate a series of atomic operation instruction sequences. The verification module is used to convert the atomic operation instruction sequence into an API call sequence for the digital twin platform, and to perform syntax and logic verification on the API call sequence. The digital twin platform interface module is used to send the verified API call sequence to the digital twin platform to complete the dynamic control of the irrigation system.
Citation Information
Patent Citations
Natural language processing system based on human-computer interaction
CN111324708A
A method and device for executing intention based on digital twin
CN119739858A
Manufacturing execution system natural language interaction method and system based on large language model
CN120336355A