Training scenario aided design method and system
By fine-tuning training of pre-trained language models and knowledge-enhanced prompt word combinations, the problems of long cycle and high knowledge requirements of traditional training design methods are solved, and rapid and accurate training design design summary document generation is achieved.
Patent Information
- Application Number
- CN202411500738.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-14
AI Technical Summary
Traditional training design methods have a long cycle and high cost. In the existing technology, training simulation design methods have high requirements for designers' knowledge system, and large language model training resources are consumed and the training process is slow and prone to errors.
The training definite question and answer database is used as the instruction set to fine-tune the pre-trained language model, and combine the prompt word template and the local knowledge base to construct knowledge-enhanced prompt word combinations to generate the training definite summary document.
Through this method, we can quickly and accurately generate training design summary documents, reduce designer knowledge requirements, improve design efficiency, and avoid common sense errors.
Smart Images

Figure CN119441475A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of training scenarios, and in particular relates to a training scenario auxiliary design method and system. Background Art
[0002] The traditional way of designing training scenarios requires designers to be familiar with training concepts, equipment performance, force deployment and force actions, and to constantly consult relevant materials, conduct team discussions, verification and iterations to complete the final training scenario design. The training scenario design cycle is long, and the time and labor costs are high.
[0003] Prior art CN114444289A and prior art CN202110596988 disclose related scenario-assisted design methods. However, the training scenario simulation design methods involved in the above-mentioned prior art require designers to be very familiar with the simulation model system, force configuration and other contents, and have high requirements on the knowledge system of training scenario designers. In recent years, pre-trained language model technology represented by ChatGPT has developed rapidly, and its application potential in the training field is huge.
[0004] However, training a large language model with billions of parameters from scratch requires huge computing resources, and the entire training process is slow and error-prone. At the same time, fine-tuning the entire model also requires high GPU computing resources, because all parameters of the model are updated, which easily loses the general task capabilities of the pre-trained language model. Summary of the invention
[0005] In view of the above technical problems, the present invention proposes a training scenario auxiliary design method and system, wherein the training scenario auxiliary design method comprises the following steps:
[0006] S1 uses the training scenario question-answering database as an instruction set to fine-tune the pre-trained language model. After the fine-tuning training converges, a pre-trained language model for training scenario-assisted design is obtained;
[0007] S2 constructs a suitable knowledge-enhanced prompt word combination based on the prompt word template and the local knowledge base;
[0008] S3 generates and outputs a training scenario summary document based on the knowledge enhancement prompt word combination and the pre-trained language model for training scenario auxiliary design.
[0009] The training scenario assisted design system proposed in the present invention includes at least one processor and a memory, which stores instructions. When the instructions are executed by at least one processor, the training scenario assisted design method of the present invention is implemented.
[0010] The technical solution of the present invention can overcome the common sense errors made by the model to the greatest extent, so that the model can quickly complete the drafting of the training scenario design summary document while complying with common sense, and assist the training personnel to efficiently complete the training scenario design. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 :A flow chart of a training scenario auxiliary design method;
[0012] Figure 2 : A flowchart of a specific embodiment. DETAILED DESCRIPTION
[0013] First, the terms involved in the present invention are explained:
[0014] The term "training scenario" in this field is based on the input of the training task, providing the initial situation and the confrontation process of both sides for the implementation of the training. The training scenario determines the boundary conditions of the training, including information such as training deployment, training area, force grouping, rule constraints, details of confrontation actions, etc. In the specific implementation of the present invention, the term is more specifically defined as: according to the requirements of the training task, it refers to the hypothetical and preset documents of the initial deployment, confrontation attempt and development of the confrontation process of both sides of the training.
[0015] Cue word fine-tuning training: After freezing some parameters of the original model of the large model, a sparse fine-tunable training layer is added to quickly adjust the parameters of the pre-trained language model based on the cue word instruction set for constructing downstream tasks.
[0016] Chain of Thought (COT) is a reasoning process that refers to human problem-solving methods and decomposes problems into step-by-step natural language forms, thereby reducing the cognitive load of large language models and improving the speed and quality of solving complex reasoning problems. The technology related to Chain of Thought has been published in the literature: J. Wei, X. Wang, D. Schuurmans, et al, "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models," Advances inneural information processing systems, 35: 24824-24837, 2022.
[0017] Large language model hallucination: Errors or inaccuracies in large language models when generating text.
[0018] The following embodiments further illustrate the content of the present invention, but should not be construed as limiting the present invention. Without departing from the spirit and essence of the present invention, modifications or substitutions made to the methods, steps or conditions of the present invention all fall within the scope of the present invention.
[0019] Some training scenario auxiliary design methods involved in the scheme have the following processes: Figure 1 , including the following steps:
[0020] S1 uses the training scenario question-answering database as an instruction set to fine-tune the pre-trained language model. After the fine-tuning training converges, a pre-trained language model for training scenario-assisted design is obtained;
[0021] S2 constructs a suitable knowledge-enhanced prompt word combination based on the prompt word template and the local knowledge base;
[0022] S3 generates and outputs a training scenario summary document based on the knowledge enhancement prompt word combination and the pre-trained language model for training scenario auxiliary design.
[0023] Based on the above scheme, some preferred schemes, in step S1, fine-tune the pre-trained language model using a fine-tuning training algorithm including LORA, QLORA, P-Tuning, P-Tuning V2 and other methods; in a more preferred scheme, fine-tune the ChatGLM-6B and InternLM-7B pre-trained language models using a fine-tuning training algorithm including LORA, QLORA, P-Tuning, P-Tuning V2 and other methods.
[0024] As an open source text-generating dialogue model, Tsinghua University's ChatGLM-6B model has the advantages of low deployment threshold, support for long-distance dialogue, and support for human intention alignment training. The InternLM-7B of the Shanghai Artificial Intelligence Laboratory supports 8k language input window length and has the capabilities of general tool calling and flexible construction of intelligent agent processes.
[0025] In step S1 of some other optional solutions, fine-tune any common open source pre-trained language model such as LLMA-7B, Qwen-7B, Baichuan-7B, etc.
[0026] The S2 step of some schemes specifically includes: decomposing the training scenario design problem into multiple sub-problems, each sub-problem includes at least one prompt word; building a local knowledge base; constructing a knowledge-enhanced prompt word combination by combining prompt word template matching and local knowledge base search.
[0027] The prompt word combination includes a relatively complete plurality of training scenario design sub-problems enhanced by a local knowledge base.
[0028] In some more specific schemes, the construction of the local knowledge base in step S2 includes the following steps:
[0029] First, collect equipment-related data, clean the equipment-related data, and build an equipment knowledge question-and-answer set;
[0030] Second, use the keyword search of "training scenario" in academic search platforms such as CNKI to download relevant literature, and use the document subject word automatic extraction tool to extract the training scenario problem set;
[0031] Third, by asking the above questions one by one to a large-scale basic model, such as Qwen-20B, preliminary answers are obtained. Then, through formatting and content verification, the required questions and answer data are obtained to obtain the training scenario question and answer set;
[0032] Fourth, the equipment knowledge question and answer set and the training assumption question and answer set are converted into the JSON format data required for fine-tuning the large model, which is called the training assumption question and answer database.
[0033] In some more specific schemes, constructing a suitable knowledge-enhanced prompt word combination based on the prompt word template and the local knowledge base in step S2 includes the following steps:
[0034] First, through prompt word template matching, the training scenario design problem is matched into multiple sub-problems, each sub-problem includes at least one prompt word, and these sub-problems together constitute the original prompt word combination;
[0035] Second, use the keywords with strong themes of the training scenario to search and download relevant literature on academic search platforms such as CNKI;
[0036] Third, through the multimodal data processing modules of open source software packages such as LangChain and PaddlePaddle, these relevant documents are converted into a local knowledge base;
[0037] Fourth, after loading the local knowledge base, convert it into a local vector database through text embedding;
[0038] Fifth, the original prompt word combination is segmented and vectorized, and the context most similar to the word vector of the prompt word combination is matched in the local vector database to form a prompt word combination based on knowledge enhancement.
[0039] In step S3 of some solutions, questions are asked to the pre-trained language model used for training scenario-assisted design based on the knowledge-enhanced prompt word combination, and the answers to the questions are text-fused to generate a training scenario summary document.
[0040] In some more specific schemes, the S3 step includes the following steps:
[0041] First, read the knowledge-enhanced prompt word combination, and ask questions one by one in sequence to the pre-trained language model used for training scenario-assisted design, so as to obtain the response content of multiple rounds of training scenario sub-questions;
[0042] Second, the response contents of multiple rounds are fused to obtain a summary document of the training scenario, which is the auxiliary design result of the training scenario.
[0043] In one embodiment, the training scenario assisted design method based on the pre-trained language model includes the following steps: Figure 2 Steps shown:
[0044] First, we collected open source equipment databases and common training scenario-related literature from the Internet, and processed them into training question-answering data through steps such as data cleaning and entity extraction.
[0045] Second, to address the problem of lack of training scenario data, a semi-automated domain knowledge data extraction process can be used to quickly sort out more high-quality training scenario data;
[0046] Fourth, the data from the above two steps are combined to form a training question-answering database, which serves as an instruction set for fine-tuning the large model. The training question-answering database is used as fine-tuning data (instruction set) to efficiently fine-tune the pre-trained language model. After the fine-tuning converges, a pre-trained language model for training scenario-assisted design can be obtained.
[0047] Fifth, based on the thinking chain principle of the pre-trained language model and the principle of local knowledge base enhancement, a prompt word combination is constructed to guide the pre-trained language model to perform high-quality training scenario design.
[0048] Sixth, read the knowledge-enhanced prompt word combination, and ask questions to the pre-trained language model used for training scenario-assisted design one by one in sequence, obtain the response content of multiple rounds of training scenario sub-questions, and integrate the response content to obtain a summary document of the training scenario.
[0049] It should be noted that the common training scenario-related documents involved in the above implementation include but are not limited to downloading documents by searching keywords for the training in document aggregation platforms such as HowNet and Wanfang.
[0050] Based on the above solution, an embodiment of constructing a training question-answering database is as follows:
[0051] By crawling the China.com Weapon Database website, we collected structured data of about 5,600 pieces of equipment, including aircraft, ships, and 8 other types of equipment. We cleaned and sorted the relatively niche equipment data to build a streamlined equipment knowledge question and answer data set. After cleaning and classification, we built 3,980 pieces of equipment question and answer data.
[0052] In the HowNet academic search platform, we searched for "training scenario" as a keyword, and collected more than 150 professional journal articles and 3 professional books. Afterwards, we manually sorted out 50 articles with more scenario details to meet the requirements of the scenario format, and spent 5 man-days to build more than 100 training scenario question and answer data.
[0053] We used the document automatic extraction tool to extract questions from more than 100 other review articles, extracting more than 300 training scenario design questions and scenario basic knowledge questions. Then, we asked more than 300 questions through the basic large models Qwen, Wenxin Yiyan, Zhipu, etc., and obtained more than 1,200 scenario question and answer data. The equipment question and answer data plus the training scenario question and answer data together constitute the training scenario question and answer instruction set.
[0054] Based on the above scheme, an implementation example of fine-tuning the selected ChatGLM-6B large model base using P-Tuning V2 as the fine-tuning algorithm is provided. On a computing platform with a VIDIA Tesla V100 32GB graphics card, the fine-tuning training time using ChatGLM's own framework is about 15 hours.
[0055] Based on the above scheme, another embodiment uses QLORA as the fine-tuning algorithm to fine-tune the selected InternLM-7B large model base. On a computing platform with a graphics card of 409024G, the fine-tuning training time using the XTuner framework is about 3 hours.
[0056] Based on the above solution, an implementation example of prompt word combination based on template matching is as follows:
[0057] First, according to the training tasks, training topics related to the training scenarios are selected so that the domain model can quickly search for relevant knowledge, for example: "Please give a training scenario for maritime emergency rescue tasks."
[0058] Secondly, expand the prompt words in the previous step based on template matching, for example: "Please give a training scenario for maritime emergency rescue missions based on the scenario overview, training background, force deployment and force operation guidelines."
[0059] Finally, the prompt words are further expanded through template matching to form the remaining prompts: “Please give the deployment details of the maritime emergency rescue mission training scenario” and “Please give the operational details of the maritime emergency rescue mission training scenario”.
[0060] Based on the above scheme, if Figure 2 As shown, an embodiment of prompt word combination based on local knowledge base enhancement:
[0061] First, use "maritime emergency rescue mission" as a keyword to search and download relevant literature on academic search platforms such as CNKI;
[0062] Second, these relevant documents are converted into a local knowledge base and then into a local vector database through the multimodal data processing modules of open source software packages such as LangChain and PaddlePaddle;
[0063] Third, the phrase “Please give a training scenario for emergency rescue tasks at sea” is segmented and vectorized, and the context most similar to the word vector of the prompt word combination is matched in the local vector database: “At 22:00 on May 14, 20xx, the Maritime Search and Rescue Center of City A received an alarm: a ship carrying dangerous chemical benzene had a benzene leakage accident due to crew operating errors, which has caused marine environmental pollution. The maritime department organized relevant units to coordinate with the rescue base in accordance with the emergency mechanism to mobilize forces for coordinated rescue. The Maritime Search and Rescue Center quickly verified the longitude and latitude of the accident waters of the distressed ship, coordinated with the base rescue ship and ship-borne drones to form a rescue unit to go to the accident area, and another rescue unit was on standby. When carrying out the coordinated planning of the maritime emergency unit, the local maritime bureau and other units planned the detailed tasks of the emergency unit based on the information situation.
[0064] Fourth, form a combination of prompt words based on knowledge enhancement: "The Maritime Search and Rescue Center of City A received an alarm: A ship carrying dangerous chemicals benzene had a benzene leakage accident due to crew operating errors, which has caused marine environmental pollution. The maritime department organized relevant units to coordinate with the rescue base to mobilize forces for coordinated rescue according to the emergency mechanism. The Maritime Search and Rescue Center quickly verified the longitude and latitude of the accident waters of the distressed ship, coordinated with the base rescue ship and ship-borne drones to form a rescue unit to go to the accident area, and another rescue unit was ready to stand by. When carrying out the coordinated planning of maritime emergency units, local maritime bureaus and other units plan the detailed tasks of emergency units based on the information situation. Please give the training scenario of maritime emergency rescue tasks based on the scenario overview, training background, force deployment and force operation guidelines.", "Please give the deployment details of the maritime emergency rescue task training scenario" and "Please give the operational details of the maritime emergency rescue task training scenario".
[0065] Fifth, read the above-mentioned knowledge-enhanced prompt word combination, and ask questions to the pre-trained language model used for training scenario-assisted design one by one in sequence, obtain the response content of multiple rounds of training scenario sub-questions, and integrate the response content to obtain a summary document of the training scenario.
[0066] Some schemes propose a training scenario-assisted design system, including at least one processor; and a memory storing instructions, which, when executed by at least one processor, implement the steps in any of the above schemes.
[0067] The embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on one or more tangible non-temporary program carriers, for being executed by a data processing device or controlling the operation of the data processing device. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagation signal, such as a machine-generated electrical signal, optical signal, or electromagnetic signal, which is generated as coded information to be transmitted to a suitable receiver device executed by a data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of the above devices. "Data processing equipment" includes all kinds of equipment, devices, and machines for processing data, including, as examples, programmable processors, computers, or multiple processors or multiple computers. The equipment may include a dedicated logic circuit, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). In addition to hardware, the equipment may also include code to create an execution environment for a related computer program, such as a combination of processor firmware, a protocol stack, a database management system, an operating system, or one or more of them.
[0068] A computer program (which may also be referred to or described as a program, software, software application, module, software module, script or code) may be written in any form of programming language, including compiled or interpreted languages or declarative or procedural languages, and the computer program may be deployed in any form, including as a standalone program or as a module, component, subroutine or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program may be stored in a portion of a file that stores other programs or data, for example, one or more scripts stored in the following: in a markup language document; in a single file dedicated to a related program; or in multiple collaborative files, for example, files storing one or more modules, subroutines or code portions. A computer program may be deployed to execute on one or more computers, the computers being located in one place, or distributed to multiple locations and interconnected through a communication network. The processes and logic flows described in this specification may be performed by one or more programmable computers that execute one or more computer programs to run functions by computing input data and generating output.
[0069] Although this specification contains many specific implementation details, these should not be interpreted as limitations on the scope of any invention or the scope of what can be claimed, but rather as an illustration of features that can concretize a particular embodiment of a particular invention. The specific features described in this specification in the context of independent embodiments can also be implemented in combination with a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented independently in multiple embodiments, or in any suitable sub-combination. In addition, although the features can be described above as a combination effect and even initially required, one or more features from the required combination can be removed from the combination in some cases, and the required combination can be turned to a sub-combination or a variation of the sub-combination.
[0070] Specific implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the activities recited in the claims can be performed in a different order and still achieve the desired results. As an example, the processes described in the accompanying drawings do not necessarily require the specific order or sequential order shown in order to achieve the desired results. In certain implementations, multitasking and parallel processing may be advantageous.
[0071] Although the present invention has been described in detail above by general description, specific implementation methods and experiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A training scenario auxiliary design method, characterized in that: The following steps are involved: S1 uses the training scenario question and answer database as an instruction set to fine-tune the pre-trained language model, and after the fine-tuning training converges, a pre-trained language model for training scenario assisted design is obtained; S2 constructs a suitable knowledge-enhanced prompt word combination based on the prompt word template and the local knowledge base; S3 generates and outputs a training scenario summary document based on the knowledge-enhanced prompt word combination and the pre-trained language model for training scenario assisted design.
2. The method according to claim 1, characterized in that S1 uses fine-tuning training algorithms including LORA, QLORA, P-Tuning, P-Tuning V2 and other methods to fine-tune the pre-trained language model.
3. The method according to claim 2, characterized in that The specific steps of S2 are: decomposing the training scenario design problem into multiple sub-problems, each sub-problem includes at least one prompt word; building a local knowledge base; constructing a knowledge-enhanced prompt word combination by combining prompt word template matching and local knowledge base search.
4. The method according to claim 3, characterized in that: The prompt word combination includes a plurality of training scenario design sub-questions enhanced by a local knowledge base.
5. The method according to claim 1, characterized in that S3 specifically includes the following steps: first, reading the knowledge-enhanced prompt word combination, and sequentially asking questions to the pre-trained language model for training scenario-assisted design, to obtain the response content of multiple rounds of training scenario sub-questions; Second, the response contents of multiple rounds are fused to obtain a summary document of the training scenario, which is the auxiliary design result of the training scenario.
6. The method according to claim 3, characterized in that S2 specifically includes the following steps: first, matching the training scenario design problem into multiple sub-problems through prompt word template matching, each sub-problem includes at least one prompt word, and these sub-problems together constitute an original prompt word combination; Second, use the keywords with strong themes of the training scenario to search and download relevant literature on academic search platforms such as CNKI. Third, through the multimodal data processing modules of open source software packages such as LangChain and PaddlePaddle, these relevant documents are converted into a local knowledge base; Fourth, after loading the local knowledge base, convert it into a local vector database through text embedding; Fifth, the original prompt word combination is segmented and vectorized, and the context most similar to the word vector of the prompt word combination is matched in the local vector database to form a prompt word combination based on knowledge enhancement.
7. The method according to claim 1, characterized in that The pre-trained language models include but are not limited to LLMA-7B, Qwen-7B, ChatGLM-6B, Baichuan-7B, InternLM-7B and other medium-sized common open source pre-trained language models.
8. The method according to claim 1, characterized in that: The training question-answering database includes an equipment knowledge question-answering data set and a training scenario question-answering data set, and the training question-answering database is constructed by the following steps: First, collect equipment-related data, clean the equipment-related data, and build an equipment knowledge question-and-answer set; Second, use the keyword search "training scenario" in academic search platforms such as CNKI to download relevant documents, and use the document subject word automatic extraction tool to extract the training scenario question set; Third, ask the above questions one by one to a large-scale basic model, such as Qwen-20B, and get preliminary answers. Then, through formatting and content verification, the required questions and answer data are obtained to obtain the training scenario question and answer set; Fourth, the equipment knowledge question and answer set and the training assumption question and answer set are converted into the JSON format data required for fine-tuning the large model, which is called the training assumption question and answer database.
9. A training scenario auxiliary design system, characterized in that: The system includes at least one processor; and a memory storing instructions, which, when executed by at least one processor, implement the steps of the training scenario-assisted design method according to any one of claims 1-8.
Citation Information
Patent Citations
An intelligent command and control training simulation system oriented towards human-computer interaction
CN113177368B
Definible air combat simulation platform based on model and air combat simulation scene construction method
CN114444289A