Emulation instruction processing method and system
By employing a multi-layered domain ontology architecture and semantic verification mechanism, the problem of insufficient dynamic interaction in simulation instruction processing in existing technologies is solved, achieving high accuracy and security of industrial simulation instructions and avoiding logical conflicts and errors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2026-04-15
- Publication Date
- 2026-06-26
Smart Images

Figure CN122287618A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing technology, and in particular to a simulation instruction processing method and system. Background Technology
[0002] In industrial simulation instruction processing, existing rule generation schemes based on large models mainly rely on relatively static tool context information to fill fields. They lack dynamic interaction and instance mapping mechanisms with the real-time running status of the simulation engine. As a result, the generated instructions cannot perceive the current physical limitations and real-time occupancy of the production line, and are prone to generating invalid instructions that are logically correct but physically unexecutable. This makes it difficult to meet the high reliability requirements of industrial production scenarios for the rigor, safety, and absolute accuracy of instruction intent.
[0003] Therefore, there is an urgent need for a simulation instruction processing method and system to solve the above problems. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention provides a simulation instruction processing method and system.
[0005] This invention provides a simulation instruction processing method, comprising: The multi-layered prompt words are obtained, wherein the multi-layered prompt words are constructed based on the natural language simulation instructions input by the user and the current snapshot state of the simulation system; Based on the ontology knowledge base and the current snapshot state of the simulation system, semantic retrieval and multi-level semantic alignment processing are performed on the natural language simulation instructions in the multi-layer prompt words to obtain target action primitives and target dynamic instances. The ontology knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer. The ontology within the core ontology layer, the sub-domain ontology layer, and the task ontology layer are constructed with corresponding vectorized graph structures. The domain core ontology layer is used to define the physical rules of the simulation system; the sub-domain ontology layer is used to define the attribute sets and function sets of different simulated industrial objects; and the task ontology layer is used to define the semantic constraints of different simulated industrial scenarios. Based on the target action primitive and the target dynamic instance, construct intermediate state instruction data; Based on the natural language simulation instructions, the target structured instruction code generated from the intermediate instruction data is verified, and if the verification is successful, the target structured instruction code is written into the execution queue of the simulation system.
[0006] According to a simulation instruction processing method provided by the present invention, the step of obtaining multi-layer prompt words includes: Based on a pre-defined industrial domain dictionary, the natural language simulation instructions are cleaned and segmented to obtain pre-processed natural language simulation instructions. The current state of the simulation system is collected to obtain a snapshot of the current simulation system state; The multi-layered prompt words are obtained based on the preprocessed natural language simulation instructions, the current simulation system snapshot status, and the preset prompt word structure.
[0007] According to a simulation instruction processing method provided by the present invention, the target action primitive is obtained through the following steps: The natural language simulation instructions are semantically vectorized to obtain a simulation instruction vector representation; The action primitive corresponding to the semantic constraint with the closest distance to the simulation instruction vector representation in the task ontology layer is determined as the standard action primitive; Based on the current snapshot state of the simulation system, determine the task ontology subtree to which the standard action primitive belongs in the task ontology layer; and obtain the target action primitive according to the semantic constraints corresponding to the task ontology subtree.
[0008] According to a simulation instruction processing method provided by the present invention, the target dynamic instance is obtained through the following steps: Align the main vocabulary in the natural language simulation instructions with the entity classes in the core ontology layer to obtain the target entity; Based on the attribute set and function set in the subdomain ontology layer, the target entity is subjected to attribute constraint alignment processing to obtain target attribute function features. Based on the target entity, the target attribute features, and the current simulation system snapshot state, dynamic instance alignment processing is performed with the task ontology layer, and the target dynamic instance is obtained from the simulation instances of the task ontology layer according to the dynamic instance alignment processing result.
[0009] According to a simulation instruction processing method provided by the present invention, the step of constructing intermediate state instruction data based on the target action primitive and the target dynamic instance includes: Based on the target action primitive, the corresponding parameter structure template is obtained from the ontology knowledge base; Based on the instance ID and attribute value corresponding to the target dynamic instance, the parameter structure template is filled with slots to obtain the intermediate state instruction data.
[0010] According to a simulation instruction processing method provided by the present invention, the step of verifying the target structured instruction code generated from the intermediate instruction data based on the natural language simulation instruction, and writing the target structured instruction code into the execution queue of the simulation system if the verification is successful, includes: The target structured instruction code is reverse-translated to obtain the target natural language description content corresponding to the target structured instruction code; The semantic consistency comparison processing of the target natural language description content and the natural language simulation instructions is performed to obtain the semantic similarity; If the semantic similarity is determined to be greater than or equal to the preset similarity, the target structured instruction code is written into the execution queue of the simulation system; If the semantic similarity is determined to be less than the preset similarity, or if the target natural language description content contains a preset risk action that is not present in the natural language simulation instruction, a warning message is generated.
[0011] The present invention also provides a simulation instruction processing system, comprising: The prompt word construction module is used to obtain multi-layer prompt words, wherein the multi-layer prompt words are constructed based on the natural language simulation instructions input by the user and the current snapshot state of the simulation system; The simulation instruction processing module is used to perform semantic retrieval and multi-level semantic alignment processing on the natural language simulation instructions in the multi-layer prompt words based on the ontology knowledge base and the current snapshot state of the simulation system, to obtain target action primitives and target dynamic instances. The ontology knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer. The ontology in the core ontology layer, the sub-domain ontology layer, and the task ontology layer is constructed with corresponding vectorized graph structures. The domain core ontology layer is used to define the physical rules of the simulation system; the sub-domain ontology layer is used to define the attribute sets and function sets of different simulated industrial objects; and the task ontology layer is used to define the semantic constraints of different simulated industrial scenarios. The instruction data construction module is used to construct intermediate state instruction data based on the target action primitive and the target dynamic instance; The verification module is used to verify the target structured instruction code generated from the intermediate instruction data based on the natural language simulation instructions, and write the target structured instruction code into the execution queue of the simulation system if the verification is successful.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the simulation instruction processing method described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the simulation instruction processing method as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the simulation instruction processing method as described above.
[0015] The simulation instruction processing method and system provided by this invention constructs multi-layered prompt words based on user natural language simulation instructions and the current snapshot state of the simulation system. Then, utilizing an ontology knowledge base containing multiple levels and a vectorized graph structure, combined with the system snapshot state, semantic retrieval and multi-level semantic alignment are performed on the natural language instructions. Next, based on the obtained target action primitives and dynamic instances, intermediate state instruction data is constructed. Finally, after the target structured instruction code generated from the intermediate state instruction data passes verification, it is written into the execution queue, thereby improving the accuracy and security of industrial simulation instruction processing. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating the simulation instruction processing method provided by this invention; Figure 2 A schematic diagram of the structure of the simulation instruction processing system provided by the present invention; Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0019] The core of industrial digital twins and intelligent manufacturing systems lies in the accurate simulation and extrapolation of production processes. Typically, operators issue control commands through a human-machine interface to drive robotic arms, automated guided vehicles (AGVs), or CNC machine tools in the virtual workshop to perform specific actions. To lower the operational threshold and improve debugging efficiency, existing technologies widely employ natural language processing to convert users' colloquial descriptions into control codes that the simulation system can recognize.
[0020] To achieve the conversion from natural language to control commands, a key approach is typically based on keyword matching and static template filling. The system pre-builds a static dictionary containing a mapping between words and commands. When the system receives text, it extracts verbs and nouns using regular expression matching or word segmentation tools and directly fills this information into pre-defined code template slots. This allows users without low-level programming skills to perform basic scheduling and control of devices in a simulation scenario using simple text commands.
[0021] Because industrial production scenarios place extremely high demands on the rigor and safety of process logic, instruction processing must possess a high degree of context awareness and dynamic adaptability. When facing complex flexible production line scheduling, the accuracy of simulation is the top priority. However, traditional mechanical matching based on static dictionaries can no longer meet system requirements. It cannot distinguish the semantic differences of the same action in different processes, nor can it perceive the dynamic state during simulation operation, making it prone to generating dead instructions with logical conflicts.
[0022] Existing solutions can only populate fields based on pre-defined, relatively static tool context information, lacking a dynamic interaction and instance mapping mechanism with the real-time running status of the simulation engine. If relying solely on static context, the generated instructions cannot perceive the physical limitations and real-time occupancy of the current production line, easily leading to invalid instructions that are logically correct but physically unexecutable.
[0023] Furthermore, existing solutions address the issues of logical consistency, mutual exclusion, and boundary coverage of test inputs within rules by introducing symbolic verifiers. However, this verification method focuses on the logical "legitimacy" at the code level, failing to validate the semantic consistency between the user's original natural language intent and the generated instructions through methods such as natural language back-translation. It struggles to detect risks of parameter value tampering or semantic shifts caused by the illusion of a large model, thus failing to meet the high reliability requirements of industrial simulation for absolutely accurate instruction intent.
[0024] To address the problems of the aforementioned technologies, this invention provides a simulation instruction processing method. Through a multi-layer domain ontology architecture, it accurately distinguishes the complex instruction semantics under specific industrial tasks and integrates dynamic instances of the simulation environment in real time to ensure that the generated industrial simulation instructions have safe instruction logic and accurate parameters.
[0025] This invention establishes a three-layer ontology architecture of "domain core - subdomain - task," which can lock the semantic space based on the task context. Experiments show that, in a complex simulation test set containing multiple processes such as welding, handling, and assembly, this invention improves the accuracy of intent recognition for polysemous instructions from approximately 80% in existing technologies to over 90%, effectively avoiding simulation action errors caused by semantic understanding biases.
[0026] Simultaneously, a logical security closed loop is constructed to effectively intercept the risk of large model illusion. Addressing the shortcomings of existing technologies, which generate code unidirectionally from natural language and lack self-checking mechanisms for the generated results, making them susceptible to the influence of large model illusion and prone to generating instructions with fictitious parameters or logical conflicts, this invention introduces a bidirectional semantic verification mechanism. Through reverse translation and semantic consistency comparison, test data shows that this mechanism can successfully intercept over 90% of illegal instructions, thereby ensuring the safety and reliability of the industrial simulation process and preventing damage to virtual assets or distortion of verification conclusions due to erroneous instructions.
[0027] Figure 1 This is a flowchart illustrating the simulation instruction processing method provided by the present invention, as shown below. Figure 1 As shown, the present invention provides a simulation instruction processing method, including: Step 101: Obtain multi-layered prompt words, wherein the multi-layered prompt words are constructed based on the natural language simulation instructions input by the user and the current snapshot state of the simulation system.
[0028] In this invention, natural language simulation commands input from the user terminal can be received through a human-computer interaction interface; that is, the original text information corresponding to the simulation requirements conveyed by the user. Simultaneously, a snapshot of the current simulation system is acquired. This snapshot reflects the complete operational status of the simulation system at a specific moment, including key information such as the status of each entity and parameter settings.
[0029] Then, based on the user's input of natural language simulation commands and the current snapshot state of the simulation system, a multi-layered prompt word structure is constructed. This multi-layered prompt word structure contains richer information, incorporating not only the original command content but also current system state information. This helps subsequent steps to more accurately understand the user's intent, improving the accuracy and relevance of command processing. For example, in an industrial simulation scenario, if the user inputs "make machine A run faster," and the system snapshot state shows that machine A is currently running at low speed and under light load, this information together constitutes the multi-layered prompt word, providing a more comprehensive basis for subsequent processing.
[0030] Step 102: Based on the ontology knowledge base and the current snapshot state of the simulation system, perform semantic retrieval and multi-level semantic alignment processing on the natural language simulation instructions in the multi-layer prompt words to obtain target action primitives and target dynamic instances. The ontology knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer. The ontology within the core ontology layer, the sub-domain ontology layer, and the task ontology layer is constructed with corresponding vectorized graph structures. The domain core ontology layer is used to define the physical rules of the simulation system; the sub-domain ontology layer is used to define the attribute sets and function sets of different simulated industrial objects; and the task ontology layer is used to define the semantic constraints of different simulated industrial scenarios.
[0031] In this invention, the ontology knowledge base adopts a three-layer pyramid structure, including a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer. Furthermore, the ontology within each of the core ontology layer, sub-domain ontology layer, and task ontology layer is constructed with corresponding vectorized graph structures. This graph structure supports fast traversal based on semantic distance, providing a data structure foundation for efficient retrieval. Specifically, the domain core ontology layer defines the fundamental physical rules of the simulation system, such as time, space, entities, and basic physical quantities, serving as the cornerstone of the entire simulation system. The sub-domain ontology layer defines unique attribute sets and function sets for specific industrial objects; for example, for automotive simulation, it might define engine attributes and transmission system functions. The task ontology layer defines semantic constraints under specific technological scenarios, such as specifying the assembly sequence and conditions of various components in an automotive assembly process scenario.
[0032] In this invention, semantic vectorization is first performed by using a pre-trained domain embedding model to map the input natural language verbs (natural language simulation instructions from multi-layered prompts) into high-dimensional vectors. Then, in the task ontology layer, the distance between the input vector and the standard action primitive vector is calculated, and the standard action primitive closest to the input vector is retrieved. This process extracts the core intent from natural language and maps it to standardized action primitives, i.e., the target action primitive. Simultaneously, based on the identified target action primitive, the task ontology subtree to which it belongs is activated in reverse, filtering out irrelevant semantic interference and further focusing on semantic information related to the current instruction.
[0033] After determining the target action primitive, it is necessary to align the descriptive vocabulary in the instruction with the standard terminology in the ontology library. In this invention, a coarse-to-fine alignment strategy can be adopted. First, entity class alignment is performed, matching the entities in the instruction with the entities in the ontology library; next, attribute constraint alignment is performed, ensuring that the attribute descriptions in the instruction are consistent with the attributes defined in the ontology library; finally, alignment is performed with the dynamic instances in the simulation, combining the current snapshot state of the simulation system to find the actual dynamic instances corresponding to the instruction descriptions. Through this series of alignment operations, the target action primitive and the target dynamic instance are obtained, providing accurate information for the subsequent construction of intermediate instruction data.
[0034] This invention constructs a three-layer pyramid-shaped ontology knowledge base consisting of "domain core - subdomain - task". In particular, the introduction of the task ontology layer ensures that all intent recognition and parameter extraction are constrained based on specific task subtrees, achieving precise semantic isolation and disambiguation. This avoids the confusion in polysemous word processing that is common in traditional single-layer knowledge bases and significantly improves the accuracy of instruction recognition in complex process scenarios.
[0035] Step 103: Construct intermediate state instruction data based on the target action primitive and the target dynamic instance.
[0036] In this invention, based on the target action primitive and the target dynamic instance, the parameter structure template required for the action is called from the ontology library. For example, a standard template for the action primitive is retrieved, which specifies the various parameters and their formats required for the action to be executed.
[0037] Next, slot filling is performed, where the parsed instance IDs and attribute values are filled into the corresponding positions in the template. For parameters not explicitly mentioned in the instruction, they can be automatically completed according to the default rules in the task ontology, generating complete intermediate instruction data. This step transforms semantic-level information into data with a certain structure and format, preparing for the generation of executable instruction code.
[0038] Step 104: Based on the natural language simulation instructions, verify the target structured instruction code generated from the intermediate instruction data, and if the verification is successful, write the target structured instruction code into the execution queue of the simulation system.
[0039] In this invention, the filled intermediate data is converted into standard code that can be executed by the simulation engine, such as a JSON structure or other script instruction structure required by the simulation engine, thereby converting the intermediate instruction data into code that can actually run in the simulation system.
[0040] Furthermore, the natural language generation module is invoked to translate the generated structured code back into a natural language description. Then, a semantic consistency comparison is performed by calculating the semantic similarity between the user's original instruction (i.e., the natural language simulation instruction) and the translated description (i.e., the natural language description corresponding to the target structured instruction code). If the similarity is below a preset threshold, it indicates a significant deviation between the generated structured instruction code and the user's original intent; or, if a high-risk action not present in the original instruction is observed during translation, it indicates an error or misunderstanding during instruction processing, resulting in the generation of an unsafe or non-compliant instruction. In this case, it is determined as intent drift, the instruction is rejected, and an alarm is triggered to prevent erroneous instructions from adversely affecting the simulation system. Only verified instructions—that is, target structured instruction code with a semantic similarity reaching the preset threshold and without high-risk actions—are written into the simulation engine's execution queue, awaiting execution by the simulation system, thereby ensuring the safety and accuracy of the simulation process.
[0041] The simulation instruction processing method provided by this invention constructs multi-layered prompt words based on user natural language simulation instructions and the current snapshot state of the simulation system. Then, utilizing an ontology knowledge base containing multiple levels and a vectorized graph structure, combined with the system snapshot state, semantic retrieval and multi-level semantic alignment are performed on the natural language instructions. Next, based on the obtained target action primitives and dynamic instances, intermediate state instruction data is constructed. Finally, after the target structured instruction code generated from the intermediate state instruction data passes verification, it is written into the execution queue, thereby improving the accuracy and security of industrial simulation instruction processing.
[0042] Based on the above embodiments, the acquisition of multi-layer prompt words includes: Based on a pre-defined industrial domain dictionary, the natural language simulation instructions are cleaned and segmented to obtain pre-processed natural language simulation instructions. The current state of the simulation system is collected to obtain a snapshot of the current simulation system state; The multi-layered prompt words are obtained based on the preprocessed natural language simulation instructions, the current simulation system snapshot status, and the preset prompt word structure.
[0043] In this invention, after receiving the natural language simulation command input by the user through the human-computer interaction interface, the first step is to perform text cleaning.
[0044] In natural language, there are many stop words that do not significantly aid in understanding the core intent of instructions. These stop words appear frequently in the text but do not carry substantial information related to the key operations of the simulation instructions. Removing these stop words reduces noise interference in the text, allowing subsequent processing to focus more on vocabulary directly related to the simulation task, thereby improving the efficiency and accuracy of instruction processing.
[0045] After text cleaning, word segmentation is performed using a pre-defined industrial-specific dictionary. Industrial fields have their own unique terminology and vocabulary systems. For example, in mechanical manufacturing simulation, there are terms like "CNC machine tool," "machining technology," and "tool compensation"; in electronic circuit simulation, there are terms like "resistor," "capacitor," and "integrated circuit." The pre-defined industrial-specific dictionary contains a rich vocabulary of industrial terms and can accurately segment natural language simulation instructions into individual word units based on the characteristics of these words and their context. After text cleaning and word segmentation, pre-processed natural language simulation instructions are obtained. At this point, the instruction text is more concise and standardized, facilitating further processing.
[0046] During operation, the various components, entities, and parameters within a simulation system are constantly changing. To accurately understand the meaning of user-inputted natural language simulation commands in the current system environment, it is also necessary to collect the current state information of the simulation system and form a snapshot of the current simulation system state.
[0047] Specifically, in this invention, the collected data may include attribute values of various simulation entities, such as the position, orientation, and assembly status of parts in industrial product assembly simulation; system operating parameters, such as temperature, pressure, and speed; and environmental information in the simulation scene, such as lighting conditions and background settings. By comprehensively collecting this information, the current actual state of the simulation system can be accurately reflected, providing necessary contextual information for the subsequent construction of multi-layered prompts, enabling the system to better understand the relationship between user commands and the current system state.
[0048] A pre-designed prompt word structure is a pre-defined data structure framework that specifies what information should be included in multi-level prompt words and how this information is organized. This structure is designed to organically combine user commands and system status information, providing richer and more accurate input for subsequent semantic retrieval and command processing.
[0049] In this invention, preprocessed natural language simulation instructions and the current snapshot state of the simulation system are integrated according to a preset prompt word structure. For example, the preset prompt word structure may be divided into several parts: one part stores key operational information from the user instructions, and another part records information related to the current system state, such as the currently selected entity and the system operating mode. In this invention, verbs, nouns, and other keywords from the preprocessed instructions are extracted and placed into the corresponding operational information section; simultaneously, collected system state information, such as entity attribute values and operating parameters, is filled into the system state-related sections. In this way, a composite prompt word structure containing the current system state snapshot and the original instructions is constructed, i.e., a multi-layered prompt word structure. This multi-layered prompt word structure provides the system with more comprehensive information, enabling the system to fully consider the current system state when processing instructions, more accurately understand user intent, and improve the accuracy and reliability of instruction processing.
[0050] Based on the above embodiments, the target action primitive is obtained through the following steps: The natural language simulation instructions are semantically vectorized to obtain a simulation instruction vector representation; The action primitive corresponding to the semantic constraint with the closest distance to the simulation instruction vector representation in the task ontology layer is determined as the standard action primitive; Based on the current snapshot state of the simulation system, determine the task ontology subtree to which the standard action primitive belongs in the task ontology layer; and obtain the target action primitive according to the semantic constraints corresponding to the task ontology subtree.
[0051] In this invention, semantic vectorization is used to convert words and sentences in natural language into numerical vectors that computers can understand and process, thereby extracting the semantic information contained therein.
[0052] Domain embedding models are trained on large amounts of text data within a specific industrial domain, enabling them to capture semantic relationships and contextual information between words within that domain. For example, in the field of mechanical manufacturing simulation, the model can learn the semantic similarities and differences between machining operations such as "drilling," "milling," and "turning." When natural language simulation instructions are input, the model maps the verbs in the instructions (which typically represent the operations the user wants to perform) and their surrounding contextual information into a high-dimensional vector. Each dimension of this high-dimensional vector represents a feature of the verb in the semantic space, and the position of the vectors of different verbs in the semantic space reflects their semantic similarity. For example, the vectors of "drilling" and "milling" may be relatively close in the semantic space because they are both common machining operations; while the vectors of "drilling" and "welding" may be relatively far apart because their operation methods and application scenarios differ significantly.
[0053] The task ontology layer defines semantic constraints for different simulated industrial scenarios, which include a large number of standardized action primitives. These action primitives are standardized descriptions of various operations in the simulation system. For example, in an automotive assembly simulation scenario, action primitives might include "install engine," "connect drive shaft," and "fix wheels." Each action primitive corresponds to specific semantic constraints, which specify the execution conditions, operation objects, and operation sequence of the action.
[0054] In the task ontology layer, each standard action primitive also has its corresponding vector representation (these vector representations can be obtained using the same vectorization methods as natural language verbs, or predefined when designing the task ontology). By calculating the distance between the input simulation instruction vector representation and the vectors of each standard action primitive in the task ontology layer (common distance metrics include Euclidean distance and cosine similarity), the closest vector is found. The closer the distance, the more semantically similar the two vectors are, indicating that the input natural language simulation instruction is closer to the operational intent represented by the standard action primitive. Therefore, the action primitive corresponding to the closest semantic constraint is determined as the standard action primitive, realizing the initial mapping from natural language to standardized actions.
[0055] The current snapshot state of the simulation system records the complete operation of the simulation system at a specific moment, including information such as the state of each entity, parameter settings, and operating mode. For example, in industrial robot simulation, the snapshot state may include the robot's current position, posture, and joint angles, as well as the position and state of workpieces in the surrounding environment. This information allows for a more accurate understanding of the meaning of user commands in the current system environment, because the same action primitive may have different execution methods and effects in different system states.
[0056] Furthermore, based on the identified standard action primitives, their respective task ontology subtrees are activated in reverse. The task ontology layer typically uses a tree structure to organize semantic information, with different subtrees representing different task scenarios or operation categories. For example, in a complex industrial production simulation system, the task ontology layer might be divided into "processing task subtrees," "assembly task subtrees," and "inspection task subtrees," etc., with the standard action primitive "install engine" belonging to the "assembly task subtree." By activating the corresponding subtree in reverse, the semantic scope related to the current action can be focused on, filtering out irrelevant semantic interference and improving the accuracy of intent recognition.
[0057] In this invention, the semantic constraints corresponding to the task ontology subtree further refine the execution conditions and operational requirements of the standard action primitives. Based on the current snapshot state of the simulation system and these semantic constraints, the standard action primitives are modified and refined to obtain target action primitives. For example, if the current snapshot state of the simulation system shows a certain deviation in the engine's installation position, and the semantic constraints in the task ontology subtree specify the precision requirements for engine installation, then the standard action primitive "install engine" may be adjusted to generate a more specific target action primitive that better reflects the current system state, such as "install the engine to the specified position with specific precision." In this way, the target action primitive can more accurately reflect the user's true intention in the current system state, providing a reliable basis for subsequent instruction execution.
[0058] Based on the above embodiments, the target dynamic instance is obtained through the following steps: Align the main vocabulary in the natural language simulation instructions with the entity classes in the core ontology layer to obtain the target entity; Based on the attribute set and function set in the subdomain ontology layer, the target entity is subjected to attribute constraint alignment processing to obtain target attribute function features. Based on the target entity, the target attribute features, and the current simulation system snapshot state, dynamic instance alignment processing is performed with the task ontology layer, and the target dynamic instance is obtained from the simulation instances of the task ontology layer according to the dynamic instance alignment processing result.
[0059] In this invention, the core ontology layer is the foundation of the entire semantic alignment system, defining the most basic and universal entity categories in the field of industrial simulation. These entity classes are highly abstracted and generalized representations of various industrial objects in the real world. For example, in the field of mechanical manufacturing simulation, the core ontology layer may include entity classes such as "parts," "equipment," and "tools." Each entity class has its own clear semantic scope and characteristics, providing a standard reference for subsequent semantic alignment.
[0060] Natural language simulation instructions contain the objects that the user wants to manipulate or describe; the words corresponding to these objects are the subject words. For example, in the instruction "machine the gears," "gears" is the subject word. These subject words need to be accurately extracted from the natural language simulation instructions for subsequent alignment operations.
[0061] Alignment processing involves matching and mapping extracted main vocabulary with entity classes in the core ontology layer. In this invention, the semantic features of the main vocabulary are analyzed and compared with the definitions and descriptions of each entity class in the core ontology layer to find the semantically closest entity class. For example, comparing "gear" with entity classes in the core ontology layer determines that "gear" belongs to the entity class "parts," so "parts" is the target entity after alignment with "gear." In this way, fuzzy descriptions in natural language are transformed into standard entity concepts in the ontology library, providing a unified foundation for subsequent semantic processing.
[0062] The subdomain ontology layer is derived from the core ontology layer, refined and expanded for specific industrial subdomains or tasks. It contains detailed attribute information and functional descriptions of entities within that subdomain. Attribute sets define the various characteristics and parameters possessed by an entity. For example, in the automotive engine simulation subdomain, the engine's attribute set might include "displacement," "power," and "speed." Function sets describe the operations or functions that an entity can perform, such as the engine's "start," "accelerate," and "decelerate" functions.
[0063] After obtaining the target entity, attribute constraint alignment processing is required based on the attribute set and function set in the subdomain ontology layer. This involves matching the descriptive information about the target entity in the natural language simulation command with the standard attribute constraints in the subdomain ontology layer. For example, if the command mentions "testing a 2.0L engine," then the description "2.0L displacement" is compared with the engine attribute set in the subdomain ontology layer to find the corresponding "displacement" attribute, and "2.0L" is used as the constraint value for that attribute. Simultaneously, if the command involves engine functional operations, such as "starting the engine," it is matched with the function set to determine the corresponding functional constraints.
[0064] By aligning attribute constraints, the specific attribute constraints and functional requirements of the target entity within the subdomain ontology layer can be extracted. This information, when combined, constitutes the target attribute functional features. For example, in the aforementioned engine embodiment, the target attribute functional features might include "displacement = 2.0L" and "function = start, test," etc. These features further refine the semantic information of the target entity, making it more aligned with the specific task requirements.
[0065] In this invention, the task ontology layer defines the specific processes, operation steps, and related semantic constraints for different simulation tasks. It contains a large number of simulation instances, which are specific operation objects generated based on the target entity and its attribute and functional characteristics under a specific task scenario. For example, in an automobile assembly simulation task, the task ontology layer may contain multiple simulation instances, such as the instance of "installing a 2.0L engine into a specified position on the vehicle body".
[0066] The current simulation system snapshot records the complete operational status of the simulation system at a specific moment, including information such as the status, parameter settings, and operating modes of each entity. This snapshot provides crucial contextual information during dynamic instance alignment. For example, if the vehicle body is already in a specific assembly position in the current simulation system, and the engine's mounting interface meets requirements, this information will affect the alignment result of the dynamic instance.
[0067] Furthermore, the target entity, target attribute functional characteristics, and the current snapshot state of the simulation system are used as inputs to match and correspond with simulation instances in the task ontology layer. Factors such as the type of the target entity, attribute constraints, functional requirements, and the current system state are comprehensively considered to find the most suitable simulation instance. For example, based on the target entity "engine" (2.0L displacement), target attribute functional characteristics (start-up and testing functions), and the current assembly position and interface status of the vehicle body, a matching simulation instance is searched in the task ontology layer.
[0068] Finally, based on the results of the dynamic instance alignment process, the target dynamic instance is obtained from the simulation instances in the task ontology layer. This target dynamic instance is the specific operation object that best matches the user's natural language simulation instructions in the current system state. For example, the system might obtain the target dynamic instance "Install a 2.0L engine with start and test functions at the current vehicle body position." In this way, natural language instructions can be transformed into specific operations that can be directly executed in the simulation system, achieving the ultimate goal of multi-level semantic alignment.
[0069] Based on the above embodiments, the step of constructing intermediate state instruction data according to the target action primitive and the target dynamic instance includes: Based on the target action primitive, the corresponding parameter structure template is obtained from the ontology knowledge base; Based on the instance ID and attribute value corresponding to the target dynamic instance, the parameter structure template is filled with slots to obtain the intermediate state instruction data.
[0070] In this invention, the target action primitives are standardized operation representations extracted from natural language simulation instructions after multi-level semantic processing. They clearly define the specific actions the user wants to perform in the simulation system, such as "installing parts" or "starting the equipment." These action primitives form the basis for subsequent operations of the simulation system and provide crucial information for obtaining parameter structure templates.
[0071] An ontology knowledge base is a database that stores various semantic information and knowledge in the field of industrial simulation. This database organizes a large number of ontology concepts, including action primitives, entities, attributes, and parameters, according to a hierarchical structure and logical relationships. In the ontology knowledge base, each action primitive has a corresponding detailed definition and description, which includes the parameter structure template required for that action.
[0072] In this invention, a search and matching process is performed in the ontology knowledge base based on the determined target action primitive. By analyzing the semantic features and categories of the target action primitive, a corresponding parameter structure template is found. For example, if the target action primitive is "drilling," a parameter structure template specifically defined for the "drilling" action will be found in the ontology knowledge base. This template specifies the various parameters required for drilling, such as the diameter, depth, feed rate, and spindle speed, as well as the data type and value range of these parameters, ensuring accurate and standardized execution of the corresponding action in the simulation system.
[0073] A target dynamic instance is a specific operational object determined during multi-level semantic alignment by combining natural language simulation instructions, ontology library information, and the current snapshot state of the simulation system. It not only contains basic information about the target entity but also reflects its specific state and attributes in the current simulation environment. For example, in a mechanical assembly simulation, a target dynamic instance might be "a bolt with a diameter of 10mm located at assembly station 3". The instance ID is a unique identifier for the target dynamic instance, used to accurately locate and reference the instance within the simulation system. Through the instance ID, all information related to the instance can be obtained, including its attributes, state, and location. Attribute values describe the specific characteristics and parameters of the target dynamic instance. For example, the attribute values for a bolt include "diameter = 10mm", "length = 20mm", and "material = steel". These attribute values are key data for filling the parameter structure template.
[0074] In this invention, the parameter structure template contains multiple slots, each corresponding to a specific parameter. Based on the instance ID and attribute values of the target dynamic instance, these data are filled into the corresponding slots of the parameter structure template. For example, for the parameter structure template of "drilling," the drilling-related attribute values from the target dynamic instance, such as the drilling diameter and depth, are filled into the corresponding slots in the template. If the target dynamic instance also contains information related to the processing environment, such as the workpiece material and hardness, this information is filled into the corresponding slots according to the requirements of the parameter structure template.
[0075] After slot filling, all slots in the parameter structure template are filled with specific data, generating intermediate-state instruction data. Intermediate-state instruction data is a structured data representation that fully describes all parameter information required to execute the target action primitive in the current simulation environment. For parameters not explicitly mentioned in the instruction, they can be automatically completed according to the default rules in the task body to generate complete intermediate-state instruction data.
[0076] The intermediate instruction data constructed in this invention can be directly understood and executed by the simulation system, providing an accurate data foundation for subsequent instruction instantiation and simulation operations. Simultaneously, the intermediate instruction data also facilitates further optimization and expansion of the system; for example, it can be used for parameter verification and conflict detection.
[0077] By employing a multi-level processing strategy that combines action primitive matching with dynamic parameter instantiation, the natural language is first mapped into standardized action primitives when processing instructions, and then specific parameters are filled in in conjunction with ontology constraints. This step-by-step processing mechanism reduces the computational complexity of a single inference, enabling the simulation system to achieve accurate parameter extraction with minimal computational cost when dealing with long and complex sentences or compound instructions.
[0078] Based on the above embodiments, the step of verifying the target structured instruction code generated from the intermediate instruction data based on the natural language simulation instructions, and writing the target structured instruction code into the execution queue of the simulation system if the verification is successful, includes: The target structured instruction code is reverse-translated to obtain the target natural language description content corresponding to the target structured instruction code; The semantic consistency comparison processing of the target natural language description content and the natural language simulation instructions is performed to obtain the semantic similarity; If the semantic similarity is determined to be greater than or equal to the preset similarity, the target structured instruction code is written into the execution queue of the simulation system; If the semantic similarity is determined to be less than the preset similarity, or if the target natural language description content contains a preset risk action that is not present in the natural language simulation instruction, a warning message is generated.
[0079] In this invention, the target structured instruction code is a code form that the simulation system can understand and execute, generated after the processing described in the above embodiments. It can be a JSON structure or a script instruction structure required by other specific simulation engines, which contains various parameters and action information required to perform the simulation operation. For example, in the simulation instruction code for a robotic arm to grasp an object, it may contain parameters such as the robotic arm's motion trajectory, grasping force, and the position of the target object.
[0080] The natural language generation module can understand the semantic information in structured instruction code and convert it into a natural language description. For example, the structured instruction code for the robotic arm to grasp an object is translated as "The robotic arm moves from the initial position to coordinates (10, 20, 30), grasps the red ball located at that position with a force of 5N, then moves it to coordinates (40, 50, 60) and puts it down." Through reverse translation, the originally machine-readable code is converted into a natural language description that is easy for users to understand and verify, i.e., the target natural language description content, presenting the operational intent expressed by the structured instruction code in natural language form.
[0081] Natural language simulation commands are the initial instructions entered by the user to guide the simulation operation. They are expressed in natural language, such as "Instruct the robotic arm to grab that red ball and place it in the designated location."
[0082] In this invention, specific semantic analysis algorithms and models are employed to perform in-depth analysis of target natural language descriptions and natural language simulation instructions. These algorithms and models are able to understand the vocabulary, grammatical structure, and semantic relationships within sentences, thereby extracting key information and making comparisons. For example, they analyze whether the actions (grabbing, moving, putting down), objects (red sphere, specified location), and other information involved in two sentences are consistent.
[0083] The semantic similarity between the target natural language description and the natural language simulation instruction is calculated. Semantic similarity is a value between 0 and 1; the closer the value is to 1, the more similar the two sentences are semantically; the closer the value is to 0, the greater the semantic difference. For example, if the target natural language description and the natural language simulation instruction match perfectly in terms of action and object, the semantic similarity might be close to 1; if there are some subtle differences, such as the target natural language description including a description of grasping force that is not mentioned in the original instruction, the semantic similarity might be slightly lower.
[0084] The preset similarity score is used to determine whether the semantics of the target natural language description and the natural language simulation instructions are sufficiently consistent. The preset similarity score needs to be determined based on the specific application scenario and requirements. To ensure the accuracy and safety of the simulation, the preset similarity score is set relatively high, such as 0.9 or higher.
[0085] When the semantic similarity is greater than or equal to the preset similarity, it indicates that the target structured instruction code accurately reflects the user's original intent without significant intent drift. At this point, the instruction is deemed safe and reliable and can be written into the simulation system's execution queue. The execution queue is where the simulation system manages and schedules instructions to be executed. After being written into the execution queue, the instructions will be executed by the simulation engine in a specific order, thereby achieving the simulation operation desired by the user.
[0086] When the semantic similarity is less than the preset similarity, it indicates a significant semantic difference between the target natural language description and the natural language simulation instruction. This may mean that a problem occurred during instruction generation or reverse translation, causing the structured instruction code to fail to accurately reflect the user's original intent, posing a risk of intent drift. For example, if the user's original instruction is for the robotic arm to grasp the red ball, but the reverse-translated description becomes grasping the blue ball, the semantic similarity will be significantly lower than the preset similarity.
[0087] Pre-defined risk actions are actions that are pre-defined in the system and may cause damage to the simulation system or the simulated object, such as excessive force or movement beyond the safe range. If these pre-defined risk actions appear in the target natural language description obtained through reverse translation, but are not mentioned in the original instructions, it indicates that an error or anomaly may have occurred during the instruction generation process.
[0088] When the semantic similarity is less than the preset similarity, or when the target natural language description contains a preset risk action that is not present in the natural language simulation instruction, a warning message will be generated. The warning message can be presented in various forms, such as a pop-up warning window on the system interface, or by sending an email or SMS notification to relevant personnel. The warning message will contain detailed information, such as the specific semantic similarity value and the existing risk action, so that relevant personnel can understand the situation in a timely manner and take appropriate measures to avoid simulation accidents caused by erroneous instruction execution.
[0089] This invention adds a reverse translation and semantic consistency comparison mechanism after the instruction generation stage, which can effectively intercept instructions with semantic drift or parameter errors, prevent erroneous logic from being sent to the simulation engine, and ensure the reliability of the simulation process.
[0090] The simulation instruction processing system provided by the present invention is described below. The simulation instruction processing system described below can be referred to in correspondence with the simulation instruction processing method described above.
[0091] Figure 2 A schematic diagram of the simulation instruction processing system provided by the present invention is shown below. Figure 2 As shown, this invention provides a simulation instruction processing system, including a prompt word construction module 201, a simulation instruction processing module 202, an instruction data construction module 203, and a verification module 204. The prompt word construction module 201 is used to acquire multi-layered prompt words, which are constructed based on natural language simulation instructions input by the user and the current snapshot state of the simulation system. The simulation instruction processing module 202 is used to perform semantic retrieval and multi-level semantic alignment processing on the natural language simulation instructions in the multi-layered prompt words based on an ontology knowledge base and the current snapshot state of the simulation system, to obtain target action primitives and target dynamic instances. The ontology knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology. The core ontology layer, the subdomain ontology layer, and the task ontology layer each have corresponding vectorized graph structures. The core ontology layer defines the physical rules of the simulation system. The subdomain ontology layer defines the attribute sets and function sets of different simulated industrial objects. The task ontology layer defines the semantic constraints of different simulated industrial scenarios. The instruction data construction module 203 constructs intermediate instruction data based on the target action primitives and the target dynamic instances. The verification module 204 verifies the target structured instruction code generated from the intermediate instruction data based on the natural language simulation instructions, and writes the target structured instruction code into the execution queue of the simulation system if the verification is successful.
[0092] The simulation instruction processing system provided by this invention constructs multi-layered prompt words based on user natural language simulation instructions and the current snapshot state of the simulation system. Then, utilizing an ontology knowledge base containing multiple levels and a vectorized graph structure, combined with the system snapshot state, it performs semantic retrieval and multi-level semantic alignment on the natural language instructions. Next, based on the obtained target action primitives and dynamic instances, it constructs intermediate-state instruction data. Finally, after the target structured instruction code generated from the intermediate-state instruction data passes verification, it is written into the execution queue, thereby improving the accuracy and security of industrial simulation instruction processing.
[0093] The system provided by this invention is used to execute the above-described method embodiments. For specific processes and details, please refer to the above embodiments, which will not be repeated here.
[0094] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 3As shown, the electronic device may include: a processor 301, a communications interface 302, a memory 303, and a communication bus 304, wherein the processor 301, the communications interface 302, and the memory 303 communicate with each other through the communication bus 304. The processor 301 can call logical instructions in the memory 303 to execute a simulation instruction processing method. This method includes: acquiring multi-layered prompt words, wherein the multi-layered prompt words are constructed based on natural language simulation instructions input by the user and the current snapshot state of the simulation system; performing semantic retrieval and multi-level semantic alignment processing on the natural language simulation instructions in the multi-layered prompt words based on an ontology knowledge base and the current snapshot state of the simulation system to obtain target action primitives and target dynamic instances, wherein the ontology knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer, and the ontology within the core ontology layer, the sub-domain ontology layer, and the task ontology layer constructs corresponding vectorized graph structures; the domain core ontology layer is used to define the physical rules of the simulation system; the sub-domain ontology layer is used to define attribute sets and function sets of different simulated industrial objects; the task ontology layer is used to define semantic constraints of different simulated industrial scenarios; constructing intermediate state instruction data based on the target action primitives and the target dynamic instances; verifying the target structured instruction code generated from the intermediate state instruction data based on the natural language simulation instructions, and writing the target structured instruction code into the execution queue of the simulation system if the verification is successful.
[0095] Furthermore, the logical instructions in the aforementioned memory 303 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0096] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the simulation instruction processing method provided by the above methods, the method comprising: acquiring multi-level prompt words, wherein the multi-level prompt words are constructed based on natural language simulation instructions input by the user and the current snapshot state of the simulation system; performing semantic retrieval and multi-level semantic alignment processing on the natural language simulation instructions in the multi-level prompt words based on an ontology knowledge base and the current snapshot state of the simulation system, to obtain target action primitives and target dynamic instances, wherein the ontology knowledge base... The knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer. The ontology layers within each layer have corresponding vectorized graph structures. The domain core ontology layer defines the physical rules of the simulation system. The sub-domain ontology layer defines the attribute sets and function sets of different simulated industrial objects. The task ontology layer defines the semantic constraints of different simulated industrial scenarios. Intermediate-state instruction data is constructed based on the target action primitives and the target dynamic instances. The target structured instruction code generated from the intermediate-state instruction data is verified based on the natural language simulation instructions. If the verification passes, the target structured instruction code is written into the execution queue of the simulation system.
[0097] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to execute the simulation instruction processing method provided in the above embodiments. The method includes: acquiring multi-layer prompt words, wherein the multi-layer prompt words are constructed based on natural language simulation instructions input by the user and the current snapshot state of the simulation system; and performing semantic retrieval and multi-level semantic alignment processing on the natural language simulation instructions in the multi-layer prompt words based on an ontology knowledge base and the current snapshot state of the simulation system to obtain target action primitives and target dynamic instances, wherein the ontology knowledge base includes a domain core ontology layer and a sub-domain ontology layer. The core ontology layer, the subdomain ontology layer, and the ontology within the task ontology layer are constructed with corresponding vectorized graph structures. The domain core ontology layer is used to define the physical rules of the simulation system. The subdomain ontology layer is used to define the attribute sets and function sets of different simulated industrial objects. The task ontology layer is used to define the semantic constraints of different simulated industrial scenarios. Intermediate state instruction data is constructed based on the target action primitives and the target dynamic instances. Based on the natural language simulation instructions, the target structured instruction code generated from the intermediate state instruction data is verified, and if the verification is successful, the target structured instruction code is written into the execution queue of the simulation system.
[0098] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A simulation instruction processing method, characterized in that, include: The multi-layered prompt words are obtained, wherein the multi-layered prompt words are constructed based on the natural language simulation instructions input by the user and the current snapshot state of the simulation system; Based on the ontology knowledge base and the current snapshot state of the simulation system, semantic retrieval and multi-level semantic alignment processing are performed on the natural language simulation instructions in the multi-layer prompt words to obtain target action primitives and target dynamic instances. The ontology knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer. The ontology within the core ontology layer, the sub-domain ontology layer, and the task ontology layer are constructed with corresponding vectorized graph structures. The domain core ontology layer is used to define the physical rules of the simulation system; the sub-domain ontology layer is used to define the attribute sets and function sets of different simulated industrial objects; and the task ontology layer is used to define the semantic constraints of different simulated industrial scenarios. Based on the target action primitive and the target dynamic instance, construct intermediate state instruction data; Based on the natural language simulation instructions, the target structured instruction code generated from the intermediate instruction data is verified, and if the verification is successful, the target structured instruction code is written into the execution queue of the simulation system.
2. The simulation instruction processing method according to claim 1, characterized in that, The acquisition of multi-layered prompt words includes: Based on a pre-defined industrial domain dictionary, the natural language simulation instructions are cleaned and segmented to obtain pre-processed natural language simulation instructions. The current state of the simulation system is collected to obtain a snapshot of the current simulation system state; The multi-layered prompt words are obtained based on the preprocessed natural language simulation instructions, the current simulation system snapshot status, and the preset prompt word structure.
3. The simulation instruction processing method according to claim 1, characterized in that, The target action primitive is obtained through the following steps: The natural language simulation instructions are semantically vectorized to obtain a simulation instruction vector representation; The action primitive corresponding to the semantic constraint with the closest distance to the simulation instruction vector representation in the task ontology layer is determined as the standard action primitive; Based on the current snapshot state of the simulation system, determine the task ontology subtree to which the standard action primitive belongs in the task ontology layer; and obtain the target action primitive according to the semantic constraints corresponding to the task ontology subtree.
4. The simulation instruction processing method according to claim 1, characterized in that, The target dynamic instance is obtained through the following steps: Align the main vocabulary in the natural language simulation instructions with the entity classes in the core ontology layer to obtain the target entity; Based on the attribute set and function set in the subdomain ontology layer, the target entity is subjected to attribute constraint alignment processing to obtain target attribute function features. Based on the target entity, the target attribute features, and the current simulation system snapshot state, dynamic instance alignment processing is performed with the task ontology layer, and the target dynamic instance is obtained from the simulation instances of the task ontology layer according to the dynamic instance alignment processing result.
5. The simulation instruction processing method according to any one of claims 1 to 4, characterized in that, The step of constructing intermediate state instruction data based on the target action primitive and the target dynamic instance includes: Based on the target action primitive, the corresponding parameter structure template is obtained from the ontology knowledge base; Based on the instance ID and attribute value corresponding to the target dynamic instance, the parameter structure template is filled with slots to obtain the intermediate state instruction data.
6. The simulation instruction processing method according to claim 1, characterized in that, The step of verifying the target structured instruction code generated from the intermediate instruction data based on the natural language simulation instructions, and writing the target structured instruction code into the execution queue of the simulation system if the verification is successful, includes: The target structured instruction code is reverse-translated to obtain the target natural language description content corresponding to the target structured instruction code; The semantic consistency comparison processing of the target natural language description content and the natural language simulation instructions is performed to obtain the semantic similarity; If the semantic similarity is determined to be greater than or equal to the preset similarity, the target structured instruction code is written into the execution queue of the simulation system; If the semantic similarity is determined to be less than the preset similarity, or if the target natural language description content contains a preset risk action that is not present in the natural language simulation instruction, a warning message is generated.
7. A simulation instruction processing system, characterized in that, include: The prompt word construction module is used to obtain multi-layer prompt words, wherein the multi-layer prompt words are constructed based on the natural language simulation instructions input by the user and the current snapshot state of the simulation system; The simulation instruction processing module is used to perform semantic retrieval and multi-level semantic alignment processing on the natural language simulation instructions in the multi-layer prompt words based on the ontology knowledge base and the current snapshot state of the simulation system, to obtain target action primitives and target dynamic instances. The ontology knowledge base includes a domain core ontology layer, a sub-domain ontology layer, and a task ontology layer. The ontology in the core ontology layer, the sub-domain ontology layer, and the task ontology layer is constructed with corresponding vectorized graph structures. The domain core ontology layer is used to define the physical rules of the simulation system; the sub-domain ontology layer is used to define the attribute sets and function sets of different simulated industrial objects; and the task ontology layer is used to define the semantic constraints of different simulated industrial scenarios. The instruction data construction module is used to construct intermediate state instruction data based on the target action primitive and the target dynamic instance; The verification module is used to verify the target structured instruction code generated from the intermediate instruction data based on the natural language simulation instructions, and write the target structured instruction code into the execution queue of the simulation system if the verification is successful.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the simulation instruction processing method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the simulation instruction processing method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the simulation instruction processing method as described in any one of claims 1 to 6.