A method for AIAgent to perform real tasks based on digital twin environment pre-simulation

By constructing a digital twin environment and structuring the simulation results into a machine-readable simulation execution package, the problem that the simulation results cannot directly control the actual execution in the existing technology is solved, realizing the efficient connection between the digital twin environment and the real environment and the controllability of task execution.

CN123067969APending Publication Date: 2026-11-10NINETECH INFORMATION TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611576564.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-13
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

The simulation results of existing digital twin or simulation pre-running schemes have not been structured and transformed into execution control basis that can be directly called in the real environment. This results in a lack of effective connection between simulation pre-running and real execution, making it difficult to perform access judgment, path verification and feedback updates when the environment changes.

Method used

By acquiring real-world environmental feature data, a digital twin environment is constructed. Simulations are performed and the results are structured into a machine-readable pre-execution package, which includes candidate action unit sequences, key observation points, expected state transition relationships, and abnormal simulation branches. Execution admission results are generated and the AI ​​Agent is driven to execute in the real environment. The model is then used to update data and optimize environmental adaptability.

Benefits of technology

It improves the connection and usability between digital twin simulation results and real task execution, ensuring that AI Agent can accurately execute and update expected state transition relationships when the environment changes, thus enhancing the adaptability, continuity and controllability of task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067969A_ABST
    Figure CN123067969A_ABST
Patent Text Reader

Abstract

This invention provides an AIAgent real task execution method based on digital twin environment pre-simulation, relating to the fields of digital twin, model simulation, and intelligent task execution control technology. The method includes: acquiring real environment feature data corresponding to the task to be executed; constructing or updating a digital twin environment corresponding to the real environment based on the real environment feature data; converting the task to be executed into a set of action units that can be simulated and pre-simulated in the digital twin environment; and driving the AIAgent to simulate and pre-simulate the action unit set in the digital twin environment. This AIAgent real task execution method based on digital twin environment pre-simulation ensures that the pre-simulation results are no longer merely saved as test records or reference logs, but can serve as a direct basis for real environment execution control, thereby improving the connection and usability between digital twin simulation results and the real task execution process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of digital twin, model simulation, and intelligent task execution control technology, specifically to an AIAgent real task execution method based on digital twin environment pre-simulation. Background Technology

[0002] With the development of artificial intelligence and digital twin technologies, AI agents have been gradually applied to scenarios such as page interaction, interface calls, data writing, status submission, and cross-system task execution in real digital business environments. Among existing technologies, one type of solution mainly relies on the AI ​​agent to directly infer and execute in a real environment based on real-time context; another type uses script replay, process orchestration, sandbox verification, or simulation environments to assist execution; and some solutions introduce digital twins or simulation environments to simulate and verify the execution process of the target task. These solutions can reduce execution uncertainty in real-world environments to some extent, but they typically remain at the level of real-time inference execution, fixed process verification, or simulation test recording.

[0003] Currently, the main drawback of existing digital twin or simulation pre-running solutions is that pre-running results are usually only stored as test records or reference information, and are not structured and transformed into execution control criteria that can be directly invoked in the real environment. This results in a lack of effective connection between simulation pre-running and actual execution. When the state of the real environment changes or deviations occur during actual execution, the system struggles to use the pre-running results for execution admission judgment, path verification, branch switching, or feedback updates, thereby weakening the control role of digital twin simulation over the execution of real tasks. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method for AIAgent to execute real tasks based on digital twin environment pre-simulation. By converting the digital twin simulation pre-simulation results into a machine-readable pre-simulation execution package, the problem of pre-simulation results being difficult to directly control real execution is solved.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for AIAgent to execute real tasks based on digital twin environment pre-simulation, comprising: S1. Obtain the real environment feature data corresponding to the task to be executed, and construct or update the digital twin environment corresponding to the real environment based on the real environment feature data; S2. The task to be executed is converted into a set of action units that can be simulated and pre-performed in the digital twin environment, and the AIAgent is driven to perform simulation and pre-performation on the set of action units in the digital twin environment to obtain simulation and pre-performation results for actual execution control. The simulation and pre-performation results include candidate action unit sequences, simulation preconditions corresponding to the action units, key observation point sets, expected state transition relationships, and abnormal simulation branch sets formed and verified in the pre-performation stage. S3. The simulation pre-run results are structured and encapsulated into a machine-readable pre-run execution package for execution control in a real environment. The machine-readable pre-run execution package includes the candidate action unit sequence, the set of key observation points, the consistency verification rules corresponding to the set of key observation points, the expected state transition relationship, the set of abnormal simulation branches, the branch preconditions and branch triggering conditions corresponding to the set of abnormal simulation branches. S4. Before executing the task to be executed in the real environment, collect the current observation values ​​of the real environment, and generate an execution admission result indicating whether the real environment is suitable for the machine-readable pre-execution package based on the current observation values ​​of the real environment, the set of key observation points, and the consistency verification rules; when the execution admission result indicates that it passes, drive the AIAgent to execute the real task based on the machine-readable pre-execution package; when the execution admission result indicates that it fails, select an abnormal simulation branch that meets the branch precondition from the machine-readable pre-execution package, or trigger a local re-pre-execution or terminate the execution. S5. During the actual task execution, based on the deviation between the actual execution result and the expected state transition relationship, determine whether the branch triggering condition is met; when the branch triggering condition is met, call the corresponding abnormal simulation branch to continue execution, and generate model fusion update data based on the actual execution path, actual execution deviation and the called abnormal simulation branch, and update the key observation points, expected state transition relationship or branch triggering condition in the digital twin environment based on the model fusion update data.

[0006] Preferably, the real environment feature data is organized according to an environment mapping record, which includes an interaction object identifier, an interface field identifier, a permission identifier, a business object status identifier, a tool call identifier, and an environment version identifier. When constructing or updating the digital twin environment based on the environment mapping record, twin objects corresponding to the interaction object, interface field, permission status, business object status, and tool status are generated respectively, and expected state transition constraints and tool call constraints are configured for the twin objects.

[0007] Preferably, each action unit in the action unit set includes an action identifier, action type, target twin object, input parameter structure, simulation preconditions, expected output state, and action dependency relationship. The action dependency relationship is used to determine the execution order, branch connection relationship, and stopping condition of each action unit in the candidate action unit sequence.

[0008] Preferably, when performing simulation pre-play of the action unit set in the digital twin environment, each action unit is executed sequentially according to the action dependency relationship, and an abnormal state event is injected during the simulation execution of at least one action unit; the abnormal state event includes changes in the state of the interaction object, changes in the structure of the interface field, changes in the permission state, changes in the state of the business object, or changes in the state of the tool call; when the abnormal state event causes the candidate action unit sequence to no longer meet the corresponding simulation preconditions, a candidate abnormal simulation branch is generated, and when the candidate abnormal simulation branch is verified to meet the corresponding branch preconditions and stopping conditions in the digital twin environment, the candidate abnormal simulation branch is recorded in the abnormal simulation branch set.

[0009] Preferably, each key observation point in the set of key observation points includes an observation object identifier, an observation field, an observation path, a desired observation value, and an observation timing, wherein the observation timing includes at least one of the following: before the execution of the actual task, before the execution of the action unit, or after the execution of the action unit.

[0010] Preferably, the consistency verification rules include one or more of the following: structural consistency rules, field consistency rules, permission consistency rules, object state consistency rules, and tool state consistency rules corresponding to the key observation points. The key observation points are set with verification levels, including mandatory verification. When generating the execution admission result, the current observation values ​​of the real environment are matched with the expected observation values ​​of the corresponding key observation points. When all key observation points marked as mandatory verification meet the corresponding consistency verification rules, an execution admission result indicating success is generated.

[0011] Preferably, the machine-readable pre-simulation execution package further includes a package identifier, an environment version identifier, an action control record, an observation point record, a consistency rule record, an abnormal branch record, and a feedback field record. The action control record is used to record the candidate action unit sequence and the simulation preconditions corresponding to the action unit. The observation point record is used to record the set of key observation points. The consistency rule record is used to record the consistency verification rules. The abnormal branch record is used to record the set of abnormal simulation branches, the branch preconditions, and the branch triggering conditions. The feedback field record is used to record the field source of the model fusion update data.

[0012] Preferably, when the execution admission result indicates failure, the target key observation point that does not meet the consistency verification rules is identified, and the target key observation point is matched with the branch triggering conditions in the abnormal simulation branch set; when there is an abnormal simulation branch that matches the target key observation point and meets the corresponding branch prerequisites, the abnormal simulation branch is selected; when there is no abnormal simulation branch that matches the target key observation point and meets the corresponding branch prerequisites, a local re-preview of the action unit associated with the target key observation point is triggered based on the current observation value of the real environment, or execution is aborted.

[0013] Preferably, during the execution of the actual task, after each action unit is executed, post-action observations are collected, and the actual execution deviation is determined based on the comparison between the post-action observations and the expected state transition relationship. The actual execution deviation includes one or more of the following: return field deviation, object state deviation, permission state deviation, tool call result deviation, or action execution order deviation.

[0014] Preferably, the model fusion update data includes the actual execution path, the action unit identifier where the actual execution deviation occurred, the deviation type, the actual environmental observation value when the deviation occurred, the identifier of the abnormal simulation branch called, and the execution result of the abnormal simulation branch. When updating the digital twin environment based on the model fusion update data, the key observation points, expected state transition relationships, branch preconditions or branch triggering conditions in the digital twin environment are updated in a versioned manner.

[0015] This invention provides a method for AIAgent to execute real tasks based on digital twin environment pre-simulation. It has the following beneficial effects: This AIAgent real-world task execution method based on digital twin environment pre-simulation first acquires real-world environment feature data and constructs or updates the corresponding digital twin environment. Then, the task to be executed is converted into a set of action units and simulated in the digital twin environment. This allows the AIAgent to form candidate action unit sequences, key observation point sets, expected state transition relationships, and a set of abnormal simulation branches verified through pre-simulation before entering the real-world execution environment. Furthermore, this invention structurally encapsulates the simulation pre-simulation results into a machine-readable pre-simulation execution package, so that the pre-simulation results are no longer merely stored as test records or reference logs, but can serve as a direct basis for real-world execution control, thereby improving the connection and usability between the digital twin simulation results and the real-world task execution process.

[0016] This invention generates execution admission results based on current observations in the real environment, a set of key observation points, and consistency verification rules before actual execution. This allows the invention to determine whether the real environment is still compatible with the pre-simulated execution package, preventing the AIAgent from continuing to use mismatched paths when the environment has changed. During actual execution, this invention can also invoke abnormal simulation branches formed and verified in the pre-simulation stage based on the deviation between the actual execution results and the expected state transition relationships. It then merges and updates the data of the actual execution path, actual execution deviation, and the invoked abnormal simulation branch generation model to update key observation points, expected state transition relationships, or branch triggering conditions in the digital twin environment, thereby forming a closed loop and improving the adaptability, continuity, and controllability of the AIAgent's real task execution. Attached Figure Description

[0017] Figure 1 This is a flowchart of the overall method of the present invention; Figure 2 This is a flowchart illustrating the real-world environmental feature data mapping and digital twin environment construction process of this invention. Figure 3 This is a flowchart of the simulation pre-run and abnormal simulation branch formation of the action unit in this invention; Figure 4 This is a flowchart illustrating the generation and execution admission judgment of the machine-readable pre-execution package of the present invention; Figure 5 This is a flowchart illustrating the actual execution deviation determination and model fusion update process of this invention. Detailed Implementation

[0018] 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.

[0019] Example 1 like Figure 1As shown, this embodiment of the invention provides a method for AIAgent to execute real tasks based on digital twin environment pre-simulation, including: S1. Obtaining real environment feature data corresponding to the task to be executed, and constructing or updating a digital twin environment corresponding to the real environment based on the real environment feature data. The real environment feature data is organized according to environment mapping records. The environment mapping records include interaction object identifiers, interface field identifiers, permission identifiers, business object status identifiers, tool call identifiers, and environment version identifiers. When constructing or updating the digital twin environment based on the environment mapping records, twin objects corresponding to the interaction object, interface field, permission status, business object status, and tool status are generated respectively, and expected state transition constraints and tool call constraints are configured for the twin objects.

[0020] Specifically, in this embodiment, real environment feature data is recorded in snapshot form using environment version identifier as index, and a mapping relationship is established based on interaction object identifier, interface field identifier, permission identifier, business object status identifier, and tool call identifier. When any environment mapping record changes relative to the previous environment version, only the twin object corresponding to the changed record and its expected state transition constraints or tool call constraints are incrementally updated to reduce the amount of repeated construction of the digital twin environment.

[0021] S2. Convert the task to be executed into a set of action units that can be simulated and pre-performed in the digital twin environment, and drive the AIAgent to simulate and pre-perform the action unit set in the digital twin environment to obtain the simulation and pre-performed results for actual execution control. The simulation and pre-performed results include candidate action unit sequences, simulation preconditions corresponding to the action units, key observation point sets, expected state transition relationships, and abnormal simulation branch sets formed and verified in the pre-performed stage.

[0022] Each action unit in the action unit set includes an action identifier, action type, target twin object, input parameter structure, simulation preconditions, expected output state, and action dependencies. Action dependencies are used to determine the execution order, branch connection relationship, and stopping condition of each action unit in the candidate action unit sequence.

[0023] The simulation pre-run includes: executing each action unit sequentially according to the action dependency relationship, and injecting abnormal state events during the simulation execution of at least one action unit; abnormal state events include changes in the state of interactive objects, changes in the structure of interface fields, changes in permission states, changes in the state of business objects, or changes in the state of tool calls; when an abnormal state event causes the candidate action unit sequence to no longer meet the corresponding simulation preconditions, a candidate abnormal simulation branch is generated, and when the candidate abnormal simulation branch is verified to meet the corresponding branch preconditions and stopping conditions in the digital twin environment, the candidate abnormal simulation branch is recorded in the abnormal simulation branch set.

[0024] Specifically, in this embodiment, the action unit set establishes a correspondence with the target twin object before the simulation pre-run, and forms at least one candidate action unit sequence according to the action dependency relationship; during the simulation pre-run, the simulation input, simulation output, state change result and abnormal trigger result of each action unit are recorded to form simulation trajectory data that can be used for subsequent encapsulation.

[0025] S3. The simulation pre-run results are structured and encapsulated into a machine-readable pre-run execution package for execution control in a real environment. The machine-readable pre-run execution package includes candidate action unit sequences, key observation point sets, consistency verification rules corresponding to the key observation point sets, expected state transition relationships, abnormal simulation branch sets, branch preconditions corresponding to the abnormal simulation branch sets, and branch triggering conditions.

[0026] Each key observation point in the set of key observation points includes the observation object identifier, observation field, observation path, expected observation value, and observation timing. The observation timing includes at least one of the following: before the actual task is executed, before the action unit is executed, or after the action unit is executed.

[0027] Specifically, in this embodiment, the candidate action unit sequence, key observation point set, expected state transition relationship and abnormal simulation branch set in the machine-readable pre-execution package are associated through action identifier, observation object identifier and branch identifier, so that the actual execution stage can locate the corresponding verification rule, expected state transition relationship and callable abnormal simulation branch based on the same action unit.

[0028] S4. Before executing the task in the real environment, collect the current observation values ​​of the real environment, and generate an execution admission result indicating whether the real environment is suitable for the machine-readable pre-execution package based on the current observation values ​​of the real environment, the set of key observation points, and the consistency verification rules. When the execution admission result indicates that it passes, drive the AIAgent to execute the real task based on the machine-readable pre-execution package. When the execution admission result indicates that it fails, select the abnormal simulation branch that meets the branch precondition from the machine-readable pre-execution package, or trigger a local re-pre-execution or terminate the execution.

[0029] Consistency verification rules include one or more of the following: structural consistency rules, field consistency rules, permission consistency rules, object state consistency rules, and tool state consistency rules corresponding to key observation points. Key observation points are set with verification levels, including mandatory verification. When generating execution admission results, the current observation values ​​of the real environment are matched with the expected observation values ​​of the corresponding key observation points. When all key observation points marked as mandatory verification meet the corresponding consistency verification rules, an execution admission result indicating that the verification has passed is generated.

[0030] The machine-readable pre-simulation execution package also includes package identifier, environment version identifier, action control record, observation point record, consistency rule record, abnormal branch record, and feedback field record. The action control record is used to record the candidate action unit sequence and the simulation preconditions corresponding to the action unit. The observation point record is used to record the set of key observation points. The consistency rule record is used to record the consistency verification rules. The abnormal branch record is used to record the abnormal simulation branch set, branch preconditions, and branch triggering conditions. The feedback field record is used to record the field source of the model fusion update data.

[0031] When the admission result indicates failure, the target key observation point that does not meet the consistency verification rules is identified, and the target key observation point is matched with the branch triggering conditions in the abnormal simulation branch set. If there is an abnormal simulation branch that matches the target key observation point and meets the corresponding branch prerequisites, the abnormal simulation branch is selected. If there is no abnormal simulation branch that matches the target key observation point and meets the corresponding branch prerequisites, a local re-pre-play of the action unit associated with the target key observation point is triggered based on the current observation value of the real environment, or the execution is aborted.

[0032] During the actual task execution, post-action observations are collected after each action unit is executed, and the actual execution deviation is determined based on the comparison between the post-action observations and the expected state transition relationship. The actual execution deviation includes one or more of the following: return field deviation, object state deviation, permission state deviation, tool call result deviation, or action execution order deviation.

[0033] Specifically, in this embodiment, the admission result includes admission identifier, target key observation points that do not meet the consistency verification rules, and corresponding processing types; the processing types include continue execution, select abnormal simulation branches, trigger local re-preview, or terminate execution, so that the adaptation status between the real environment and the simulation preview conditions can be determined based on the machine-readable preview execution package before actual execution.

[0034] S5. During the execution of the actual task, based on the deviation between the actual execution result and the expected state transition relationship, determine whether the branch triggering condition is met; when the branch triggering condition is met, call the corresponding abnormal simulation branch to continue execution, and generate model fusion update data based on the actual execution path, actual execution deviation and the called abnormal simulation branch. Update the key observation points, expected state transition relationship or branch triggering condition in the digital twin environment based on the model fusion update data.

[0035] The model fusion update data includes the actual execution path, the action unit identifier where the actual execution deviation occurred, the deviation type, the actual environmental observation value when the deviation occurred, the identifier of the abnormal simulation branch called, and the execution result of the abnormal simulation branch. When updating the digital twin environment based on the model fusion update data, the key observation points, expected state transition relationships, branch preconditions or branch triggering conditions in the digital twin environment are updated in a versioned manner.

[0036] Specifically, in this embodiment, the model fusion update data is associated and stored according to the environment version identifier and the package identifier of the machine-readable pre-simulation execution package. When updating the digital twin environment, the version differences of key observation points, expected state transition relationships or branch triggering conditions before and after the update are retained, so as to select the model version that matches the current real environment during subsequent simulation pre-simulation.

[0037] Example 2 like Figure 2 As shown in Example 1, this example further illustrates the organization of real-world environmental feature data and the construction or updating of digital twin environments.

[0038] In this embodiment, real-world environment feature data is organized according to environment mapping records. Each environment mapping record describes a mappable object in the real-world environment related to the task to be executed. The environment mapping record includes one or more of the following: interaction object identifier, interface field identifier, permission identifier, business object status identifier, tool call identifier, and environment version identifier. Specifically, the interaction object identifier identifies interactive objects in the real-world environment; the interface field identifier identifies interface input fields, output fields, or return fields; the permission identifier identifies whether the corresponding action has execution permission; the business object status identifier identifies the current state of the target business object; the tool call identifier identifies the input structure, output structure, and call status of the callable tool; and the environment version identifier distinguishes the real-world environment state corresponding to different data collection times.

[0039] Specifically, when constructing or updating a digital twin environment based on environment mapping records, the system generates twin objects corresponding to interaction objects, interface fields, permission states, business object states, and tool states, and configures the current state, observable fields, expected state transition constraints, and tool invocation constraints for each twin object. Thus, the digital twin environment can represent the interaction states, interface states, permission states, object states, and tool states related to the task to be executed in the real environment.

[0040] Furthermore, when acquiring real-world environment feature data again, the system compares the current environment mapping record with the environment mapping record corresponding to the previous environment version based on the environment version identifier. If the corresponding record has not changed, the original twin object and its constraints are retained; if any environment mapping record changes, only the twin object corresponding to the changed record is incrementally updated, and the expected state transition constraints or tool invocation constraints of the twin object are updated synchronously. For example, when the interface field structure changes, the field type or return field structure of the interface field twin object is updated; when the permission status changes, the executable action range of the permission status twin object is updated; when the tool invocation status changes, the callable status or input / output structure of the tool status twin object is updated.

[0041] In this way, the digital twin environment can be constructed or incrementally updated based on real environment feature data, and provides a foundation for the simulation and pre-running of subsequent action units, the judgment of simulation preconditions, and the generation of machine-readable pre-running execution packages.

[0042] Example 3 like Figure 3 As shown, based on Embodiment 1 and Embodiment 2, this embodiment further illustrates the generation method of the action unit set, the simulation pre-run method, and the formation method of the abnormal simulation branch.

[0043] In this embodiment, the system converts the task to be executed into multiple action units, forming a set of action units capable of simulation and pre-playing in a digital twin environment. Each action unit includes an action identifier, action type, target twin object, input parameter structure, simulation preconditions, expected output state, and action dependencies.

[0044] For example, the set of action units corresponding to the task to be executed may include: action unit AU01, action unit AU02, and action unit AU03. AU01's action type is object state reading, the target twin object is OBJ-01, the simulation precondition is that the permission identifier P-READ is valid, and the expected output state is that the object state value is processable. AU02's action type is interface constraint verification, the target twin object is API-02, the input parameter structure includes fields F1 and F2, the simulation precondition is that the interface version is V3.2, and the expected output state is that the verification result is passed. AU03's action type is state change execution, the target twin object is OBJ-01, the simulation precondition is that the object state value is processable and the verification result is passed, and the expected output state is that the object state value has changed to processed. The above action units form a candidate action unit sequence according to the sequential dependency relationship from AU01 to AU02 to AU03.

[0045] During simulation pre-runs in a digital twin environment, the system executes each action unit sequentially according to action dependencies, and records the simulation input, simulation output, state change results, and exception trigger results for each action unit. For example, when the simulation output of AU01 indicates that the object's state value is processable, and the simulation output of AU02 indicates that the verification result is passed, the system continues to simulate and execute AU03; when the state change result of any action unit does not meet the corresponding expected output state, the system records the corresponding deviation type and the location where the deviation occurred.

[0046] Furthermore, the system injects abnormal state events during the simulation pre-run. Abnormal state events can include changes in permission status, changes in interface field structure, changes in business object status, or changes in tool call status. For example, abnormal state event E01 is the change of the permission identifier P-WRITE from valid to invalid; abnormal state event E02 is the change of the interface version from V3.2 to V3.3 with the addition of a required field F3; abnormal state event E03 is the change of the object status value of OBJ-01 from processable to locked. When the above abnormal state events cause the candidate action unit sequence to no longer meet the corresponding simulation preconditions, the system generates candidate abnormal simulation branches based on the current twin object status.

[0047] Specifically, when the abnormal state event E02 causes AU02 to no longer meet the simulation preconditions for interface version V3.2, the system generates a candidate abnormal simulation branch BR-02. The candidate abnormal simulation branch BR-02 includes re-acquiring the interface field structure, supplementing field F3 according to the updated input parameter structure, and re-executing the interface constraint verification. The system verifies in the digital twin environment whether BR-02 meets the corresponding branch preconditions and stopping conditions. When BR-02 can restore the interface constraint verification result to a pass state, BR-02 is recorded in the abnormal simulation branch set, and the corresponding branch preconditions and branch triggering conditions are configured.

[0048] In this way, the abnormal simulation branch is formed and verified in the digital twin environment before the actual task is executed. When the same or similar deviations occur during the actual execution, the verified abnormal simulation branch can be called first to continue the execution, instead of directly retrying the whole thing or temporarily regenerating the execution path.

[0049] Example 4 like Figure 4 As shown, based on Examples 1 to 3, this example further illustrates the generation method of machine-readable pre-execution packages, the generation method of execution admission results, and the selection method of abnormal simulation branches when execution admission fails.

[0050] In this embodiment, the system structurally encapsulates the simulation pre-running results in the digital twin environment into a machine-readable pre-running execution package. The machine-readable pre-running execution package includes a package identifier, an environment version identifier, action control records, observation point records, consistency rule records, anomaly branch records, and feedback field records. For example, the package identifier of the machine-readable pre-running execution package is PKG-202501-001, the environment version identifier is ENV-V3.2, the action control records include action units AU01, AU02, and AU03, and the anomaly branch records include the anomaly simulation branch BR-02.

[0051] The motion control record is used to record the candidate motion unit sequence and the simulation preconditions corresponding to the motion unit. For example, motion control record ACT-01 corresponds to motion unit AU01, and its simulation precondition is that the permission identifier P-READ is valid; motion control record ACT-02 corresponds to motion unit AU02, and its simulation precondition is that the interface version is V3.2 and the input parameters include fields F1 and F2; motion control record ACT-03 corresponds to motion unit AU03, and its simulation precondition is that the object state value is processable and the interface constraint verification result is passed.

[0052] In this embodiment, the observation point record is used to record a set of key observation points. Each key observation point includes an observation object identifier, an observation field, an observation path, an expected observation value, and an observation timing. For example, the observation object identifier of key observation point KP01 is OBJ-01, the observation field is the object status value, the observation path is OBJ-01.status, the expected observation value is "processable", and the observation timing is before the actual task is executed; the observation object identifier of key observation point KP02 is API-02, the observation field is the interface version, the observation path is API-02.version, the expected observation value is V3.2, and the observation timing is before the action unit AU02 is executed; the observation object identifier of key observation point KP03 is TOOL-01, the observation field is the tool call status, the observation path is TOOL-01.available, the expected observation value is "callable", and the observation timing is before the actual task is executed.

[0053] Consistency rule records are used to document the consistency verification rules corresponding to key observations. For example, KP01 corresponds to object state consistency rule R01, requiring the current observation value in the real environment to be "processable"; KP02 corresponds to field consistency rule R02, requiring the interface version to be V3.2 and the field structure to contain F1 and F2; KP03 corresponds to tool state consistency rule R03, requiring the tool call status to be callable. Key observations also have verification levels, with KP01 and KP02 set as required verifications and KP03 set as a normal verification.

[0054] Before executing the task in the real environment, the system collects the current observations of the real environment and compares them with the set of key observation points and consistency verification rules in the machine-readable pre-execution package. For example, if the system collects that OBJ-01.status is processable, API-02.version is V3.2, and TOOL-01.available is callable, then KP01, KP02, and KP03 all meet the corresponding consistency verification rules. The system generates an execution admission result ADMIT-01 indicating that the task has passed, and drives AIAgent to execute the real task based on the machine-readable pre-execution package.

[0055] When the current observations in the real environment do not meet the consistency verification rules, the system generates an execution admission result indicating failure. For example, if the system collects API-02.version as V3.3 and a new required field F3 has been added to the field structure, then KP02 does not meet the field consistency rule R02. In this case, the system identifies KP02 as the target key observation point and matches KP02 with the branch triggering conditions in the abnormal simulation branch set. If the branch triggering condition of the abnormal simulation branch BR-02 is "interface version inconsistency or new required field", and the current real environment meets the branch preconditions corresponding to BR-02, then the system selects the abnormal simulation branch BR-02 as the subsequent execution path.

[0056] Specifically, BR-02 can include action units AU02-1 and AU02-2. AU02-1 is used to reacquire the interface field structure, and AU02-2 is used to supplement field F3 according to the updated input parameter structure and re-execute the interface constraint verification. When BR-02 restores the interface constraint verification result to a pass state, the system continues to execute subsequent action units in the candidate action unit sequence. If there is no abnormal simulation branch that matches KP02 and satisfies the corresponding branch preconditions, the system triggers a local re-pre-simulation of action unit AU02 associated with KP02 based on the current observations of the real environment, or suspends execution.

[0057] In this way, the machine-readable pre-simulation execution package not only saves the simulation pre-simulation results, but also provides the basis for execution access judgment before actual execution, and provides the basis for abnormal simulation branch selection when the real environment is inconsistent with the simulation pre-simulation conditions, so that the simulation pre-simulation results can directly participate in the actual execution control.

[0058] Example 5 like Figure 5 As shown, based on Examples 1 to 4, this example further illustrates the method for determining the actual execution deviation and the method for generating and updating model fusion update data.

[0059] In this embodiment, during the actual task execution, the system collects post-action observations after each action unit is executed and compares these post-action observations with the expected state transition relationships in the machine-readable pre-execution package to determine the actual execution deviation. For example, the expected state transition relationship for action unit AU03 is "OBJ-01.status changes from processable to processed". If the post-action observation shows that OBJ-01.status is still processable, then an object state deviation is determined; if the interface returns a field missing F3, then a return field deviation is determined; if the tool call result is a call failure, then a tool call result deviation is determined.

[0060] Once the actual execution deviation is determined, the system records the actual execution path, the action unit identifier where the deviation occurred, the deviation type, the actual environmental observation value at the time of the deviation, the identifier of the invoked abnormal simulation branch, and the execution result of the abnormal simulation branch, generating model fusion update data. For example, model fusion update data UPD-01 may include: action unit identifier AU03, deviation type as object state deviation, observation value at the time of deviation as OBJ-01.status as handleable, identifier of the invoked abnormal simulation branch as BR-02, and execution result of the abnormal simulation branch as verification recovery passed.

[0061] Furthermore, the system updates the digital twin environment in a versioned manner based on model fusion update data. For example, when UPD-01 indicates that a certain key observation point frequently deviates in the real environment, the system updates the expected observation value or verification level of that key observation point; when UPD-01 indicates that the abnormal simulation branch BR-02 can stably recover to a state that can continue to be executed, the system updates the corresponding branch trigger condition or branch precondition; when the actual execution result is inconsistent with the original expected state transition relationship, the system generates a new version of the expected state transition relationship and retains the version differences before and after the update.

[0062] In this way, the deviation data generated during the execution of real tasks is no longer just saved as execution logs, but is transformed into model fusion update data, which is used to update key observation points, expected state transition relationships, branch preconditions or branch triggering conditions in the digital twin environment, thereby improving the adaptability of subsequent simulations to the real environment.

[0063] 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 method for AIAgent real task execution based on digital twin environment pre-simulation, used to control AIAgent to execute tasks with environmental state changes in a real digital environment, characterized in that, include: S1. Obtain the real environment feature data corresponding to the task to be executed, and construct or update the digital twin environment corresponding to the real environment based on the real environment feature data; S2. The task to be executed is converted into a set of action units that can be simulated and pre-performed in the digital twin environment, and the AIAgent is driven to perform simulation and pre-performation on the set of action units in the digital twin environment to obtain simulation and pre-performation results for actual execution control. The simulation and pre-performation results include candidate action unit sequences, simulation preconditions corresponding to the action units, key observation point sets, expected state transition relationships, and abnormal simulation branch sets formed and verified in the pre-performation stage. S3. The simulation pre-run results are structured and encapsulated into a machine-readable pre-run execution package for execution control in a real environment. The machine-readable pre-run execution package includes the candidate action unit sequence, the set of key observation points, the consistency verification rules corresponding to the set of key observation points, the expected state transition relationship, the set of abnormal simulation branches, the branch preconditions and branch triggering conditions corresponding to the set of abnormal simulation branches. S4. Before executing the task to be executed in the real environment, collect the current observation values ​​of the real environment, and generate an execution admission result indicating whether the real environment is suitable for the machine-readable pre-execution package based on the current observation values ​​of the real environment, the set of key observation points, and the consistency verification rules. When the execution admission result indicates that it passes, drive the AIAgent to execute the real task based on the machine-readable pre-execution package. When the execution admission result indicates that it fails, select an abnormal simulation branch that meets the branch precondition from the machine-readable pre-execution package, or trigger a local re-pre-execution or terminate the execution. S5. During the actual task execution, based on the deviation between the actual execution result and the expected state transition relationship, determine whether the branch triggering condition is met. If the branch triggering condition is met, call the corresponding abnormal simulation branch to continue execution, and generate model fusion update data based on the actual execution path, actual execution deviation and the called abnormal simulation branch. Update the key observation points, expected state transition relationship or branch triggering condition in the digital twin environment based on the model fusion update data.

2. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 1, characterized in that: The real environment feature data is organized according to the environment mapping record. The environment mapping record includes the interaction object identifier, interface field identifier, permission identifier, business object status identifier, tool call identifier, and environment version identifier. When constructing or updating the digital twin environment based on the environment mapping record, twin objects corresponding to the interaction object, interface field, permission status, business object status, and tool status are generated respectively, and expected state transition constraints and tool call constraints are configured for the twin objects.

3. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 1, characterized in that: Each action unit in the action unit set includes an action identifier, action type, target twin object, input parameter structure, simulation preconditions, expected output state, and action dependencies. The action dependencies are used to determine the execution order, branch connection relationship, and stopping condition of each action unit in the candidate action unit sequence.

4. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 3, characterized in that: The simulation pre-run includes: executing each action unit sequentially according to the action dependency relationship, and injecting abnormal state events during the simulation execution of at least one action unit; the abnormal state events include changes in the state of interactive objects, changes in the structure of interface fields, changes in permission states, changes in the state of business objects, or changes in the state of tool calls. When the abnormal state event causes the candidate action unit sequence to no longer meet the corresponding simulation preconditions, a candidate abnormal simulation branch is generated, and when the candidate abnormal simulation branch is verified to meet the corresponding branch preconditions and stopping conditions in the digital twin environment, the candidate abnormal simulation branch is recorded in the abnormal simulation branch set.

5. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 1, characterized in that: Each key observation point in the set of key observation points includes an observation object identifier, an observation field, an observation path, a desired observation value, and an observation timing. The observation timing includes at least one of the following: before the execution of the actual task, before the execution of the action unit, or after the execution of the action unit.

6. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 5, characterized in that: The consistency verification rules include one or more of the following: structural consistency rules, field consistency rules, permission consistency rules, object state consistency rules, and tool state consistency rules corresponding to the key observation points. The key observation points are set with verification levels, including mandatory verification. When generating the execution admission result, the current observation values ​​of the real environment are matched with the expected observation values ​​of the corresponding key observation points. When all key observation points marked as mandatory verification meet the corresponding consistency verification rules, an execution admission result indicating that the verification has been passed is generated.

7. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 1, characterized in that: The machine-readable pre-simulation execution package also includes a package identifier, an environment version identifier, an action control record, an observation point record, a consistency rule record, an anomaly branch record, and a feedback field record. The action control record is used to record the candidate action unit sequence and the simulation preconditions corresponding to the action unit. The observation point record is used to record the set of key observation points. The consistency rule record is used to record the consistency verification rules. The anomaly branch record is used to record the set of anomaly simulation branches, the branch preconditions, and the branch triggering conditions. The feedback field record is used to record the field source of the model fusion update data.

8. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 1, characterized in that: When the execution admission result indicates failure, the target key observation point that does not meet the consistency verification rules is identified, and the target key observation point is matched with the branch triggering conditions in the abnormal simulation branch set. When there is an abnormal simulation branch that matches the target key observation point and meets the corresponding branch prerequisites, the abnormal simulation branch is selected. When there is no abnormal simulation branch that matches the target key observation point and meets the corresponding branch prerequisites, a local re-pre-enactment of the action unit associated with the target key observation point is triggered based on the current observation value of the real environment, or execution is aborted.

9. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 1, characterized in that: During the execution of the actual task, post-action observations are collected after each action unit is executed, and the actual execution deviation is determined based on the comparison between the post-action observations and the expected state transition relationship. The actual execution deviation includes one or more of the following: return field deviation, object state deviation, permission state deviation, tool call result deviation, or action execution order deviation.

10. The AIAgent real task execution method based on digital twin environment pre-simulation according to claim 9, characterized in that: The model fusion update data includes the actual execution path, the action unit identifier where the actual execution deviation occurred, the deviation type, the actual environmental observation value when the deviation occurred, the identifier of the abnormal simulation branch called, and the execution result of the abnormal simulation branch. When updating the digital twin environment based on the model fusion update data, the key observation points, expected state transition relationships, branch preconditions or branch triggering conditions in the digital twin environment are updated in a versioned manner.