A simulation scenario generation method and device based on a large language model

By using a simulation scene generation method based on a large language model, the problems of cognitive gap, scene arrangement, and tacit knowledge in simulation scene construction are solved. This enables deep reasoning of high-level natural language intent and automatic generation of simulation scenes, thereby improving the efficiency of the simulation system.

CN121365503BActive Publication Date: 2026-03-31BEIJING DINGCHENG ZHIZAO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies suffer from cognitive gaps, scene arrangement and combination explosion, difficulty in carrying implicit knowledge, and lack of intention reasoning ability in simulation scene construction, which limits the improvement of simulation system performance.

Method used

A simulation scenario generation method based on a large language model is adopted. By constructing a fine-tuning model to process the user's scenario description text, and combining domain knowledge for deep reasoning, a standardized and executable simulation scenario is automatically generated.

Benefits of technology

It achieves accurate understanding and deep reasoning of high-level natural language intent, generates standardized and executable optimal simulation scenarios and evaluation values, and improves the automation and intelligence level of simulation scenario construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365503B_ABST
    Figure CN121365503B_ABST
Patent Text Reader

Abstract

The application discloses a simulation scene generation method and device based on a large language model, and the method comprises the following steps: S1, constructing a fine-tuning model based on a preset first large language model and a second large language model; S2, acquiring a user scene description text; S3, processing the user scene description text by using the fine-tuning model to obtain an MSDL simulation text set; and S4, performing simulation evaluation processing on the MSDL simulation text set to obtain an optimal evaluation value and an optimal MSDL text. The application can perform deep reasoning on high-level natural language intentions in combination with domain knowledge, and automatically generate a standardized and executable optimal simulation scene and a corresponding evaluation value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of scenario simulation technology, specifically a method and apparatus for generating simulation scenarios based on a large-scale language model. Background Technology

[0002] With the deep integration of artificial intelligence, natural language processing, and computer simulation technologies, fields such as military simulations, unmanned system swarm control, and urban traffic simulations are placing higher demands on the accuracy and efficiency of simulation scenario construction. Currently, scenario construction in these fields heavily relies on structured languages, such as the XML-based Coalition Operational Management Language (C-BML), and various proprietary JSON and LUA scripts. However, existing technologies suffer from several deep-seated problems in practical applications, becoming key bottlenecks restricting the improvement of simulation system performance.

[0003] First, the cognitive gap is a significant issue. Tactical intentions expressed by commanders or domain experts are high-level statements, characterized by ambiguity and dynamism, while the machine language that simulation systems can recognize is low-level, precise, and static code. The lack of an effective bridge to connect these differences in the process of translating "tactical intentions" into "machine-executable code" makes it difficult to accurately convey the real needs of experts to the simulation system, significantly increasing the communication and conversion costs of scenario construction.

[0004] Secondly, scenario orchestration faces the challenges of combinatorial explosion and rigidity. Complex simulation scenarios require the integration of a large number of entities, events, rules, and spatiotemporal constraints. When manually writing structured languages, staff need to handle the combinatorial logic of massive amounts of elements, which is prone to oversights. Moreover, once the programming is completed, the scenario parameters and logic become fixed, making it impossible to quickly respond to tactical intention adjustments or conduct "what-if analysis," and making it difficult to adapt to dynamically changing simulation requirements.

[0005] Furthermore, tacit knowledge is difficult to effectively contain. Simulation scenario descriptions often rely on the operator's experiential tacit knowledge, such as the default combat mode of specific equipment and the rules of passage in different terrains. Existing structured languages ​​cannot standardize the expression and storage of this type of tacit knowledge. If it is forcibly described through redundant code, the scenario file will become bloated; if it is omitted, information will be missing, affecting the accuracy and rationality of the simulation results.

[0006] Finally, there is a lack of intent reasoning ability. Existing simulation tools can only execute explicit user commands and cannot deeply "understand" the underlying intent behind those commands. For example, when a user requests to "suppress the enemy's air defense system," the tool cannot automatically infer the possible combinations of tactical actions such as "electronic jamming," "hard-kill strikes," and "evasive maneuvers" involved in the task. Users still need to break down the task one by one and write the corresponding code, which severely limits the level of automation and intelligence in the construction of simulation scenarios.

[0007] In summary, there is an urgent need for a technical solution that can accurately understand high-level natural language intent, combine domain knowledge for deep reasoning, and ultimately automatically generate standardized and executable simulation scenarios. This solution would break through existing technological bottlenecks and drive the simulation field toward a higher level of intelligence. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a simulation scene generation method and apparatus based on a large language model, which can perform deep reasoning on high-level natural language intent in combination with domain knowledge, and automatically generate standardized and executable optimal simulation scenes and corresponding evaluation values.

[0009] To address the aforementioned technical problems, embodiments of the present invention disclose a method for generating simulation scenes based on a large-scale language model, the method comprising:

[0010] S1. Based on the preset first and second language models, a fine-tuned model is constructed.

[0011] S2. Obtain the user scenario description text;

[0012] S3. Using the fine-tuning model, process the user scenario description text to obtain an MSDL simulation text set; the MSDL simulation text set includes M MSDL texts; M is an integer greater than 1;

[0013] S4. Perform simulation evaluation processing on the MSDL simulation text set to obtain the optimal evaluation value and the optimal MSDL text.

[0014] As an optional implementation, in the first aspect of the present invention, the construction of the fine-tuning model based on a preset first and second major language model includes:

[0015] S11. A preset MSDL text training set is provided; the MSDL text training set includes several MSDL texts.

[0016] S12. Using the first large language model, the MSDL text training set is generated to obtain a scene description text training set; the scene description text training set includes the scene description text corresponding to each MSDL text in the MSDL text training set.

[0017] S13. Based on the MSDL text training set and the scene description text training set, fine-tune the second large language model to obtain the fine-tuned model.

[0018] As an optional implementation, in the first aspect of the present invention, the MSDL text includes an entity layer, a timing layer, a trigger layer, and a target layer;

[0019] The entity layer includes several entities; each entity includes an entity ID field, a main type field, a subtype field, an attribute sequence, and an initial state sequence; the attribute sequence includes several attribute fields; the initial state sequence includes several initial state fields.

[0020] The timing layer includes several simulation events; each simulation event includes an event ID field, an entity ID field, a start time field, an entity action, and / or a dependent event field; each entity action includes an action type field, and / or several action attribute fields.

[0021] The trigger layer includes several triggers; each trigger includes a trigger ID field, a trigger condition, and an action sequence; the trigger condition includes a condition type field and several trigger attribute fields; the action sequence includes several entity actions.

[0022] The target layer includes several simulation targets; each simulation target includes a target ID field, a target type field, a readable description field, a completion condition, a score type, and a target score; the completion condition includes a condition type field, the entity ID field, a detection attribute field, an operator field, and a target value field; the score type has a value of 0 or 1.

[0023] As an optional implementation, in the first aspect of the present invention, the step of processing the user scenario description text using the fine-tuning model to obtain an MSDL simulation text set includes:

[0024] S31. Using the fine-tuning model, the user scenario description text is clarified to obtain the clarified scenario description text;

[0025] S32. Using the fine-tuning model, perform initial transformation processing on the clarified scene description text to obtain the initial MSDL text;

[0026] S33. Using the fine-tuning model, the initial MSDL text is randomly replaced to obtain the MSDL simulation text set.

[0027] As an optional implementation, in the first aspect of the present invention, the step of using the fine-tuning model to clarify the user scenario description text to obtain clarified scenario description text includes:

[0028] S311. Using the fine-tuning model, perform fuzzy detection on the user scenario description text to obtain a fuzzy text set; the fuzzy text set includes several fuzzy texts.

[0029] S312. Based on the fuzzy text set, query a preset knowledge base to obtain a set of associated text sequences; the set of associated text sequences includes the associated text sequence corresponding to each fuzzy text in the fuzzy text set; the associated text sequence includes N associated texts; N is an integer greater than 1;

[0030] S313. Using the fine-tuning model, perform multiple rounds of confirmation processing on the fuzzy text set and the associated text sequence set to obtain the user confirmation text set.

[0031] S314. Using the fine-tuning model, based on the user confirmation text set, the user scenario description text is corrected to obtain the clarified scenario description text.

[0032] As an optional implementation, in the first aspect of the present invention, the step of using the fine-tuning model to perform multiple rounds of confirmation processing on the fuzzy text set and the associated text sequence set to obtain a user confirmation text set includes:

[0033] S3131. Set the initial confirmation text set to an empty set;

[0034] S3132. Set the current fuzzy text to any of the fuzzy texts in the fuzzy text set; set the current associated text sequence to the associated text sequence corresponding to the current fuzzy text in the associated text sequence set;

[0035] S3133. Using the fine-tuning model, perform user confirmation processing on the current fuzzy text and the current associated text sequence to obtain user confirmation text; add the user confirmation text to the user confirmation text set.

[0036] S3134. Delete the current fuzzy text from the fuzzy text set to obtain the fuzzy text set after deletion;

[0037] S3135. Repeat S3132 to S3134 until the set of fuzzy texts after deletion is an empty set;

[0038] S3136. The initial confirmation text set is determined as the user confirmation text set.

[0039] As an optional implementation, in the first aspect of the present invention, the step of performing simulation evaluation processing on the MSDL simulation text set to obtain the optimal evaluation value and the optimal MSDL text includes:

[0040] S41. Using a preset simulation engine, simulate the M MSDL texts in the MSDL simulation text set to obtain a simulation information set.

[0041] The simulation information set includes M simulation information items; the simulation information includes simulation time and several target completion information items; the target completion information includes a target completion flag and a completion time; the value of the target completion flag is 0 or 1;

[0042] S42. Using a simulation evaluation model, the simulation information set is processed to obtain a simulation evaluation value set; the simulation evaluation value set includes M simulation evaluation values;

[0043] S43. Set the optimal evaluation value as the largest simulation evaluation value in the set of simulation evaluation values;

[0044] S44. Set the optimal index p to the index of the optimal evaluation value in the set of simulation evaluation values;

[0045] S45. Set the optimal MSDL text as the p-th MSDL text in the MSDL simulation text set.

[0046] A second aspect of the present invention discloses a simulation scene generation device based on a large language model, the device comprising a model construction module, a text acquisition module, a simulation text generation module, and a simulation evaluation module;

[0047] The model construction module is used to construct a fine-tuned model based on a preset first and second language models.

[0048] The text acquisition module is used to acquire user scenario description text;

[0049] The simulation text generation module is used to process the user scenario description text using the fine-tuning model to obtain an MSDL simulation text set.

[0050] The simulation evaluation module is used to perform simulation evaluation processing on the MSDL simulation text set to obtain the optimal evaluation value and the optimal MSDL text.

[0051] A third aspect of this invention discloses another simulation scene generation device based on a large-scale language model, the device comprising:

[0052] Memory containing executable program code;

[0053] A processor coupled to the memory;

[0054] The processor calls the executable program code stored in the memory to execute some or all of the steps in the simulation scene generation method based on a large language model disclosed in the first aspect of the present invention.

[0055] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute some or all of the steps in the simulation scene generation method based on a large language model disclosed in the first aspect of the present invention.

[0056] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0057] This invention processes user scenario description text using a fine-tuned model to obtain a set of MSDL simulation texts. Further, through simulation evaluation, it obtains the optimal evaluation value and the optimal MSDL text. It can perform deep reasoning on high-level natural language intent in combination with domain knowledge, and automatically generate standardized and executable optimal simulation scenarios and corresponding evaluation values. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 This is a flowchart illustrating a simulation scene generation method based on a large language model disclosed in an embodiment of the present invention.

[0060] Figure 2 This is a schematic diagram of the structure of a simulation scene generation device based on a large language model disclosed in an embodiment of the present invention.

[0061] Figure 3 This is a schematic diagram of another simulation scene generation device based on a large language model disclosed in an embodiment of the present invention. Detailed Implementation

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

[0063] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0064] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0065] Example 1

[0066] Please see Figure 1 . Figure 1 This is a flowchart illustrating a simulation scene generation method based on a large language model disclosed in an embodiment of the present invention. Wherein, Figure 1 The described simulation scenario generation method based on a large language model is applicable to the field of scenario simulation, such as the generation of simulation scenarios for military exercises, unmanned system swarm control, and urban traffic simulation. This invention does not limit the scope of the application. Figure 1 As shown, the method includes:

[0067] S1. Based on the preset first and second language models, a fine-tuned model is constructed.

[0068] It should be noted that the first major language model mentioned above can be any commonly used major language model such as qwen-max-2025-08, Doubao-pro-2408, Hunyuanpro-2408, or ERNIE 4.0Turbo, and this embodiment of the invention does not limit it. The second major language model mentioned above can be any commonly used major language model that is different from the first major language model.

[0069] S2. Obtain the user scenario description text.

[0070] It should be noted that the above user scenario description text describes the specific content of the simulation task in natural language, including the timing and triggering conditions of entities and events, as well as the scoring method of the simulation results.

[0071] S3. Using the above fine-tuning model, process the above user scenario description text to obtain an MSDL simulation text set; the above MSDL simulation text set includes M MSDL texts; M is an integer greater than 1.

[0072] S4. Perform simulation evaluation processing on the above MSDL simulation text set to obtain the optimal evaluation value and the optimal MSDL text.

[0073] In an optional embodiment, the fine-tuning model constructed based on the preset first and second language models includes:

[0074] S11. Preset MSDL text training set; the MSDL text training set includes several of the MSDL texts mentioned above.

[0075] S12. Using the first language model mentioned above, the MSDL text training set is generated to obtain a scene description text training set; the scene description text training set includes the scene description text corresponding to each MSDL text in the MSDL text training set.

[0076] It should be noted that the above generation process utilizes the first major language model to convert all MSDL texts in the MSDL text training set into corresponding natural language scene description texts. Since the first and second major language models employ different models, the diversity of the generated scene description texts can be enhanced.

[0077] S13. Based on the MSDL text training set and the scene description text training set mentioned above, the second language model is fine-tuned to obtain the fine-tuned model.

[0078] Optionally, the above fine-tuning training uses the LoRA algorithm, where each MSDL text in the MSDL text training set and its corresponding scene description text constitute a training sample pair, and the objective function expression for training is:

[0079]

[0080] In the formula, Loss is the loss function value; NN is the number of sample pairs, which is the number of MSDL texts in the MSDL text training set; sim is the text similarity calculation function; ta i tb is the scene description text corresponding to the i-th MSDL text. i Let be the target text obtained after the i-th MSDL text has been transformed by the second language model. The transformation process refers to converting the MSDL text into a natural language description. Therefore, the loss function value described above measures the average similarity between the target text obtained by the second language model after transforming all MSDL texts and the corresponding scene description text.

[0081] In another alternative embodiment, the aforementioned MSDL text includes an entity layer, a timing layer, a trigger layer, and a target layer.

[0082] The aforementioned entity layer includes several entities; each entity includes an entity ID field, a main type field, a subtype field, an attribute sequence, and an initial state sequence; the aforementioned attribute sequence includes several attribute fields; the aforementioned initial state sequence includes several initial state fields.

[0083] The aforementioned timing layer includes several simulation events; the aforementioned simulation events include an event ID field, the aforementioned entity ID field, a start time field, an entity action, and / or a dependent event field; the aforementioned entity actions include an action type field, and / or several action attribute fields.

[0084] The aforementioned trigger layer includes several triggers; each trigger includes a trigger ID field, a trigger condition, and an action sequence; the trigger condition includes a condition type field and several trigger attribute fields; and the action sequence includes several of the aforementioned entity actions.

[0085] The aforementioned target layer includes several simulation targets; the aforementioned simulation targets include a target ID field, a target type field, a readable description field, a completion condition, a score type, and a target score; the aforementioned completion condition includes a condition type field, the aforementioned entity ID field, a detection attribute field, an operator field, and a target value field; the aforementioned score type has a value of 0 or 1.

[0086] It should be noted that the MSDL (Mission Scenario Description Language) text mentioned above is the simulation scenario file, and its design follows the following principles: (1) Layering and decoupling: The scenario description is divided into an entity layer, a timeline layer, an event / trigger layer, and a goal layer to achieve decoupling between static resources and dynamic behaviors. (2) Event-driven: The core logic is driven by events and triggers, which can describe linear logic that occurs sequentially in time, as well as complex nonlinear logic that "executes an action when [condition] is met". (3) Extensibility: It has open entity and action type definitions, which can easily introduce new equipment, sensors, or tactical actions without modifying the core language. (4) Human-machine readable: It adopts a format similar to JSON or YAML, which is easy for machines to parse and has good human readability, making it convenient for debugging and verification.

[0087] It should be noted that when the value of the above score type is 0, it means that the corresponding simulation goal is a positive goal. When the simulation goal is achieved, the total simulation score is increased by the corresponding goal score. When the value of the above score type is 1, it means that the corresponding simulation goal is a negative goal. When the simulation goal fails, the total simulation score is decreased by the corresponding goal score.

[0088] The following is a complete example of an MSDL text for an air defense suppression mission, which includes the complete entity layer, timing layer, trigger layer, and target layer:

[0089]

[0090]

[0091]

[0092]

[0093]

[0094] In another optional embodiment, the user scenario description text is processed using the fine-tuning model described above to obtain an MSDL simulation text set, including:

[0095] S31. Using the above fine-tuning model, the above user scenario description text is clarified to obtain the clarified scenario description text.

[0096] S32. Using the above fine-tuning model, perform initial transformation processing on the above clarification scenario description text to obtain the initial MSDL text.

[0097] Optionally, the fine-tuning model described above is used to perform initial transformation processing on the clarified scenario description text to obtain initial MSDL text. This involves setting the fine-tuning model as the initial transformation agent using a preset initial transformation prompt, and then using this initial transformation agent to process the clarified scenario description text to obtain the initial MSDL text. The initial transformation prompt can be in the following form, where "[Example Text]" is the MSDL text for the air defense suppression mission:

[0098] "You are now a converter. Please convert [clarified scene description text] into initial MSDL text, where a reference example of initial MSDL text is as follows:"

[0099] [Example Text]

[0100] S33. Using the above fine-tuning model, the above initial MSDL text is randomly replaced to obtain the above MSDL simulation text set.

[0101] Optionally, the above-mentioned fine-tuning model is used to randomly replace the initial MSDL text to obtain the MSDL simulation text set. This involves setting the fine-tuning model as a generation agent using preset generation prompts, and then using this agent to process the initial MSDL text to obtain M MSDL texts. The generation prompts can be in the following form:

[0102] "You are now a generator. Please randomly replace the values ​​of some fields in the [initial MSDL text] to obtain 5 MSDL texts. The field to be replaced is the start_time field in the timeline of the time series layer. The start_time field value that appears earlier in the text must always be less than or equal to the start_time field value that appears later in the text."

[0103] In another optional embodiment, the above-mentioned fine-tuning model is used to clarify the user scenario description text to obtain clarified scenario description text, including:

[0104] S311. Using the above fine-tuning model, perform fuzzy detection on the above user scenario description text to obtain a fuzzy text set; the above fuzzy text set includes several fuzzy texts.

[0105] Optionally, the above-mentioned fine-tuning model is used to perform fuzzy detection on the user scenario description text to obtain a fuzzy text set. This involves setting the fine-tuning model as a fuzzy detection agent using preset fuzzy detection prompts, and then using this fuzzy detection agent to process the user scenario description text to obtain the fuzzy text set. The aforementioned fuzzy detection prompts can be in the following form:

[0106] "You are now a fuzzy detector. Please detect and extract the ambiguous parts of the user's input text to obtain fuzzy text, and then combine all the fuzzy text into a fuzzy text set. The ambiguous parts include the following:"

[0107] a) The motion parameters are unclear (e.g., flying to point B without specifying the location of point B, the flight speed, altitude, or path);

[0108] b. The use of the entity is unclear (e.g., using a drone for reconnaissance without specifying the specific drone model);

[0109] c. The spatiotemporal constraints are unclear (e.g., if an attack is scheduled to occur in 10 minutes, it is unclear whether the 10 minutes refers to simulation time or physical time).

[0110] d. Conflict of actions (e.g., aircraft XX being detected by radar and electronically interfered with at time T, constituting a tactical conflict and violating operational regulations)

[0111] S312. Based on the above fuzzy text set, query the preset knowledge base to obtain a set of associated text sequences; the above associated text sequence set includes the associated text sequence corresponding to each of the above fuzzy texts in the above fuzzy text set; the above associated text sequence includes N associated texts; N is an integer greater than 1.

[0112] Preferably, N is 3.

[0113] It should be noted that the aforementioned knowledge base includes descriptive text for common entities, which describes the main type, subtypes, and attribute sequence of each entity, as well as the action that can be performed on each entity.

[0114] It should be noted that the above query, based on the aforementioned fuzzy text set, queries a pre-defined knowledge base to find the N most similar text segments for each fuzzy text, resulting in N corresponding related texts. For example, querying the fuzzy text "drone formation" yields a related text sequence including the following three related texts: "single-drone formation," "formation is a two-drone cooperative formation," and "four-drone diamond-shaped aircraft formation."

[0115] S313. Using the above fine-tuning model, perform multiple rounds of confirmation processing on the above fuzzy text set and the above associated text sequence set to obtain the user confirmation text set.

[0116] S314. Using the above fine-tuning model, based on the above user confirmation text set, the above user scenario description text is corrected to obtain the above clarification scenario description text.

[0117] It should be noted that the above correction process involves using preset correction prompts to set the fine-tuning model as a correction agent. This correction agent then processes the user confirmation text set and the user scenario description text to obtain a clarified scenario description text. The correction prompts can take the following form:

[0118] "Based on the [set of user confirmation texts], please correct the ambiguous parts of the [user scenario description text] and output the corrected text."

[0119] For example, if the user confirms the text set as {“dual-drone coordination”, “flying at an altitude of 2000 meters”, and “cruising in economy mode”}, and the user's scenario description text is “using a drone formation to reconnoiter target A 100km away, and scoring 100 points after completing the target,” the following clarified scenario description text is obtained: “using a dual-drone coordination drone formation to reconnoiter target A 100km away, flying at an altitude of 2000m, and cruising in economy mode, scoring 100 points after completing the target.”

[0120] In another optional embodiment, the above-described fine-tuning model is used to perform multiple rounds of confirmation processing on the above-described fuzzy text set and the above-described associated text sequence set to obtain a user confirmation text set, including:

[0121] S3131. Set the initial confirmation text set to an empty set.

[0122] S3132. Set the current fuzzy text to any of the aforementioned fuzzy texts in the aforementioned fuzzy text set; set the current associated text sequence to the associated text sequence corresponding to the current fuzzy text in the aforementioned associated text sequence set.

[0123] S3133. Using the above fine-tuning model, perform user confirmation processing on the above current fuzzy text and the above current associated text sequence to obtain user confirmation text; add the above user confirmation text to the above user confirmation text set.

[0124] It should be noted that the above user confirmation process involves using a preset user confirmation prompt, setting the fine-tuned model as a user confirmation agent, and then using this agent to process the current ambiguous text and the aforementioned currently associated text sequence to obtain the user's question. Finally, in response to the user's answer, the user confirmation text is generated. The aforementioned user confirmation prompt can take the following form:

[0125] "Given the [current fuzzy text] and [current associated text sequence], generate a question. The [current fuzzy text] serves as the main body of the question stem, and each part of the [current associated text sequence] serves as an option body for the question, requiring the user to select the corresponding option. Then, based on the user's input options, output the corresponding options as the user's confirmation text. If the user does not select any of the given options, output the user's answer as the user's confirmation text."

[0126] Taking the aforementioned fuzzy text as "drone formation" and the corresponding associated text sequence as ["single drone formation", "formation is a two-drone coordinated formation", "four-drone diamond formation"] as an example, the fine-tuning model outputs the following question: "How is a drone formation constructed? (1) A drone formation is a single drone; (2) A drone formation is a two-drone coordinated formation; (3) A drone formation is a four-drone diamond formation." If the user selects answer 1, 2, or 3, the user confirmation text is "A drone formation is a single drone", "A drone formation is a two-drone coordinated formation", or "A drone formation is a four-drone diamond formation", respectively; however, if the user inputs the answer "A drone formation is a triangular formation composed of 3 drones", then this answer text is directly used as the user confirmation text.

[0127] S3134. Delete the current fuzzy text from the fuzzy text set to obtain the fuzzy text set after deletion;

[0128] S3135. Repeat S3132 to S3134 until the above-mentioned fuzzy text set after deletion is an empty set;

[0129] S3136. The above-mentioned initial confirmation text set is determined as the above-mentioned user confirmation text set.

[0130] In another optional embodiment, the above-described simulation evaluation process on the MSDL simulation text set to obtain the optimal evaluation value and the optimal MSDL text includes:

[0131] S41. Using the preset simulation engine, simulate and process the M MSDL texts in the MSDL simulation text set to obtain a simulation information set.

[0132] The aforementioned simulation information set includes M simulation information items; the aforementioned simulation information includes simulation time and several target completion information items; the aforementioned target completion information includes a target completion flag and a completion time; the value of the aforementioned target completion flag is 0 or 1.

[0133] It should be noted that the above M simulation information items correspond to M MSDL texts respectively; the target completion information in the simulation information corresponds one-to-one with the simulation targets in the target layer of the MSDL text.

[0134] Optionally, the simulation engine mentioned above can be HAMERITT, SST (Structural Simulation Toolkit), etc., and this embodiment of the invention does not limit it.

[0135] It should be noted that after the simulation engine starts, it automatically loads and parses the corresponding MSDL text, and begins the simulation according to the configuration of each field in the MSDL. During the simulation, the engine monitors each simulation target in real time. When a simulation target is completed, the corresponding target completion flag is set to 1, and the corresponding completion time is output. Furthermore, if a simulation target is not completed by the end of the simulation, the corresponding target completion flag is set to 0.

[0136] S42. Using the simulation evaluation model, process the above simulation information set to obtain a simulation evaluation value set; the above simulation evaluation value set includes M simulation evaluation values.

[0137] S43. Set the above optimal evaluation value as the largest simulation evaluation value in the above set of simulation evaluation values.

[0138] S44. Set the optimal index p to the index of the above optimal evaluation value in the above simulation evaluation value set.

[0139] S45. Set the above-mentioned optimal MSDL text as the p-th MSDL text in the above-mentioned MSDL simulation text set.

[0140] In yet another optional embodiment, the expression for the above simulation evaluation model is:

[0141]

[0142] In the formula, G j Let K be the j-th simulation evaluation value mentioned above, where j is an integer from 1 to M; j f is the number of target completion information items in the j-th simulation information; j,k and t j,k These are the target completion flag and completion time for the k-th target completion information of the j-th simulation information, respectively; T j The simulation time for the j-th simulation information; s j,k and u j,k These are the score type and target score of the kth simulation target in the jth MSDL text, respectively.

[0143] As can be seen, the simulation evaluation model described above can be used to evaluate the simulation effect by combining the score type and target score of each simulation target in the target layer of the MSDL text, as well as the simulation results of the MSDL text. The earlier the positive target is completed, the greater its positive contribution to the simulation evaluation value.

[0144] As can be seen, the simulation scene generation method based on a large language model described in the embodiments of the present invention can perform deep reasoning on high-level natural language intent in combination with domain knowledge, and automatically generate standardized and executable optimal simulation scenes and corresponding evaluation values.

[0145] Example 2

[0146] Please see Figure 2 , Figure 2 This is a schematic diagram of a simulation scene generation device based on a large-scale language model, as disclosed in an embodiment of the present invention. Figure 2 The simulation scene generation device based on a large-scale language model described herein can be applied to the field of scenario simulation, such as the generation of simulation scenarios for military exercises, unmanned system swarm control, and urban traffic simulation. This invention does not limit the scope of such applications. Figure 2 As shown, the device may include a model construction module 201, a text acquisition module 202, a simulation text generation module 203, and a simulation evaluation module 204.

[0147] The aforementioned model construction module 201 is used to construct a fine-tuned model based on a preset first and second language model.

[0148] The aforementioned text acquisition module 202 is used to acquire user scenario description text;

[0149] The aforementioned simulation text generation module 203 is used to process the aforementioned user scenario description text using the aforementioned fine-tuning model to obtain an MSDL simulation text set.

[0150] The simulation evaluation module 204 described above is used to perform simulation evaluation processing on the above MSDL simulation text set to obtain the optimal evaluation value and the optimal MSDL text.

[0151] As can be seen, the simulation scene generation device based on a large language model described in the embodiments of the present invention can perform deep reasoning on high-level natural language intent in combination with domain knowledge, and automatically generate standardized and executable optimal simulation scenes and corresponding evaluation values.

[0152] Example 3

[0153] Please see Figure 3 , Figure 3This is a schematic diagram of another simulation scene generation device based on a large language model disclosed in an embodiment of the present invention. Figure 3 The simulation scene generation device based on a large-scale language model described herein can be applied to the field of scenario simulation, such as the generation of simulation scenarios for military exercises, unmanned system swarm control, and urban traffic simulation. This invention does not limit the scope of such applications. Figure 3 As shown, the simulation scene generation device based on a large language model may include the following parts:

[0154] Memory 301 storing executable program code;

[0155] Processor 302 coupled to memory 301;

[0156] The processor 302 calls the executable program code stored in the memory 301 to execute the steps in the simulation scene generation method based on a large language model described in Embodiment 1.

[0157] Example 4

[0158] This invention discloses a computer read storage medium that stores a computer program for electronic data interchange, wherein the computer program causes a computer to execute the steps in the simulation scene generation method based on a large language model described in Embodiment 1.

[0159] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. 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.

[0160] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method 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, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0161] Finally, it should be noted that the simulation scene generation method and apparatus based on a large language model disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. 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. Such 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 method for generating a simulation scenario based on a large language model, characterized in that, The method comprises the following steps: S1, constructing a fine-tuned model based on a preset first large language model and a second large language model; S2, obtaining a user scenario description text; S3, processing the user scenario description text by using the fine-tuned model to obtain a MSDL simulation text set; the MSDL simulation text set comprises M MSDL texts; M is an integer greater than 1; S4, performing simulation evaluation processing on the MSDL simulation text set to obtain an optimal evaluation value and an optimal MSDL text; S1 comprises: S11, presetting an MSDL text training set; the MSDL text training set comprises a plurality of MSDL texts; S12, performing generation processing on the MSDL text training set by using the first large language model to obtain a scenario description text training set; the scenario description text training set comprises a scenario description text corresponding to each MSDL text in the MSDL text training set; S13, performing fine-tuning training on the second large language model based on the MSDL text training set and the scenario description text training set to obtain the fine-tuned model.

2. The method of claim 1, wherein, The MSDL text comprises an entity layer, a timing layer, a trigger layer and a target layer; The entity layer comprises a plurality of entities; the entity comprises an entity ID field, a main type field, a sub-type field, an attribute sequence and an initial state sequence; the attribute sequence comprises a plurality of attribute fields; the initial state sequence comprises a plurality of initial state fields; The timing layer comprises a plurality of simulation events; the simulation event comprises an event ID field, the entity ID field, a start time field, an entity action and / or a dependent event field; The entity action comprises an action type field and / or a plurality of action attribute fields; The trigger layer comprises a plurality of triggers; the trigger comprises a trigger ID field, a trigger condition and an action sequence; the trigger condition comprises a condition type field and a plurality of trigger attribute fields; the action sequence comprises a plurality of entity actions; The target layer comprises a plurality of simulation targets; the simulation target comprises a target ID field, a target type field, a readable description field, a completion condition, a score type and a target score; The completion condition comprises a condition type field, an entity ID field, a detection attribute field, an operator field and a target value field; the value of the score type is 0 or 1. 3.The method of claim 1, wherein, The processing of the user scenario description text by using the fine-tuned model to obtain a MSDL simulation text set comprises: S31, performing clarification processing on the user scenario description text by using the fine-tuned model to obtain a clarified scenario description text; S32, performing initial conversion processing on the clarified scenario description text by using the fine-tuned model to obtain an initial MSDL text; S33, performing random replacement processing on the initial MSDL text by using the fine-tuned model to obtain the MSDL simulation text set.

4. The method of claim 3, wherein, The clarification processing on the user scenario description text by using the fine-tuned model to obtain a clarified scenario description text comprises: S311, utilize the fine-tuning model to perform fuzzy detection on the user scene description text to obtain a fuzzy text set; the fuzzy text set includes a plurality of fuzzy texts; S312, based on the fuzzy text set, query a preset knowledge base to obtain an associated text sequence set; the associated text sequence set includes an associated text sequence corresponding to each fuzzy text in the fuzzy text set; the associated text sequence includes N associated texts; N is an integer greater than 1; S313, utilize the fine-tuning model to perform multi-round confirmation processing on the fuzzy text set and the associated text sequence set to obtain a user confirmation text set; S314, utilize the fine-tuning model to perform correction processing on the user scene description text based on the user confirmation text set to obtain a clarified scene description text.

5. The method of claim 4, wherein, The utilization of the fine-tuning model to perform multi-round confirmation processing on the fuzzy text set and the associated text sequence set to obtain a user confirmation text set includes: S3131, set an initial confirmation text set to an empty set; S3132, set a current fuzzy text to any fuzzy text in the fuzzy text set; set a current associated text sequence to the associated text sequence corresponding to the current fuzzy text in the associated text sequence set; S3133, utilize the fine-tuning model to perform user confirmation processing on the current fuzzy text and the current associated text sequence to obtain a user confirmation text; add the user confirmation text to the user confirmation text set; S3134, delete the current fuzzy text from the fuzzy text set to obtain a deleted fuzzy text set; S3135, repeat S3132-S3134 until the deleted fuzzy text set is an empty set; S3136, determine the initial confirmation text set as the user confirmation text set.

6. The method of claim 2, wherein the method further comprises: The simulation evaluation processing on the MSDL simulation text set to obtain an optimal evaluation value and an optimal MSDL text includes: S41, utilize a preset simulation engine to perform simulation processing on M MSDL texts in the MSDL simulation text set to obtain a simulation information set; The simulation information set includes M simulation information; the simulation information includes simulation time and a plurality of target completion information; the target completion information includes a target completion flag and a completion time; the value of the target completion flag is 0 or 1; S42, utilize a simulation evaluation model to process the simulation information set to obtain a simulation evaluation value set; the simulation evaluation value set includes M simulation evaluation values; S43, set the optimal evaluation value to the largest simulation evaluation value in the simulation evaluation value set; S44, set an optimal serial number p to the serial number of the optimal evaluation value in the simulation evaluation value set; S45, set the optimal MSDL text to the pth MSDL text in the MSDL simulation text set. 7.A large language model based simulation scenario generation apparatus, characterized in that, The device comprises a model construction module, a text acquisition module, a simulation text generation module and a simulation evaluation module. The model construction module is configured to construct a fine-tuning model based on a preset first large language model and a second large language model. The text acquisition module is configured to acquire a user scenario description text. The simulation text generation module is configured to process the user scenario description text by using the fine-tuning model to obtain a MSDL simulation text set. The simulation evaluation module is configured to perform simulation evaluation processing on the MSDL simulation text set to obtain an optimal evaluation value and an optimal MSDL text. 8.A large language model based simulation scenario generation apparatus, characterized in that, The device comprises: a memory storing executable program codes; a processor coupled with the memory; the processor invokes the executable program codes stored in the memory to execute the simulation scenario generation method based on a large language model according to any one of claims 1-6.

9. A computer storable medium, characterized by The computer storage medium stores computer instructions, which are invoked to execute the simulation scenario generation method based on a large language model according to any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for quickly constructing simulation scenario based on large language model

    CN117909470A

  • Simulation system based on large language model

    CN120373070A