Military training method and device based on knowledge retrieval enhanced large model, equipment and medium

By building target databases with different priorities and performing priority searches, the problem of logical inexplicability of large language models in military training is solved, the accuracy and credibility of training schemes are improved, and the scientificity and controllability of military training are improved.

CN119884329APending Publication Date: 2025-04-25CHINA ELECTRONICS CORP 6TH RES INST +1

Patent Information

Application Number
CN202510369872.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, large language models are difficult to explain their internal logic in military training, resulting in unreliability of model output and affecting dependency, which may lead to inappropriate training arrangements and major human and financial losses.

Method used

By building target databases with different priorities (relational databases, vector databases and graph databases) and searching in these databases according to priority when acquiring target query statements, we can enhance the knowledge retrieval ability of the big model and improve the accuracy and credibility of the training scheme.

Benefits of technology

It improves the accuracy and credibility of the training plan, enhances trust in model output, reduces the occurrence of inappropriate training arrangements, and improves the scientificity and controllability of military training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884329A_ABST
    Figure CN119884329A_ABST
Patent Text Reader

Abstract

The invention provides a military training method and device based on a knowledge retrieval enhanced large model, equipment and a medium, and the method comprises the steps: constructing target databases with different priorities according to collected target military data; and when a target query statement is obtained, performing retrieval in the target database according to the priority of the target query statement to obtain a target reply statement of the target query statement. The target knowledge is recalled by utilizing the efficient storage and retrieval capability of the database, so that the training accuracy is remarkably improved, and the method has important significance in the aspects of efficiently and reasonably arranging training resources and improving the scientificity and controllability of military training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of question-answering technology, and more specifically, to a military training method, apparatus, equipment and medium based on a knowledge retrieval enhanced large model. Background Art

[0002] As the complexity and diversity of military data continue to increase, traditional training methods face many challenges, especially in dealing with rapidly changing battlefield environments and diverse tactical requirements. Existing technologies mostly use large language models to effectively integrate and analyze training data from different sources, including tactical exercise records, combat simulation data, and soldier physiological status monitoring data, thereby providing more accurate and personalized support for military training.

[0003] Large models learn features and rules from a large amount of tactical data through complex network structures and algorithms, which makes the internal logic of the model difficult to explain. It is impossible to clearly understand why the model draws a certain tactical suggestion or training plan. This unexplainability directly affects the trust in the model output, resulting in a decrease in reliance on the model. This leads to the acceptance of inappropriate training arrangements, resulting in significant human and financial losses. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a military training method, device, equipment and medium based on knowledge retrieval enhanced large model to overcome the problems in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a military training method based on a knowledge retrieval enhanced large model, the method comprising: Build a target database with different priorities based on the collected target military data; When the target query statement is obtained, a search is performed in the target database according to the priority level based on the target query statement to obtain a target reply statement for the target query statement.

[0006] In some technical solutions of the present application, the target databases of different priorities are constructed based on the collected target military data, including: Based on the collected target military data, a relational database of the first priority, a vector database of the second priority, and a graph database of the third priority are constructed.

[0007] In some technical solutions of the present application, the above-mentioned construction of a first-priority relational database, a second-priority vector database, and a third-priority graph database based on the collected target military data includes: Dividing the target military data into a plurality of data blocks according to the correlation between the target sentences contained in the target military data; By establishing a mapping relationship between keywords in each of the data blocks, the relational database of the first priority is obtained; By performing feature extraction and encoding on each of the data blocks, the vector database of the second priority is obtained; The graph database of the third priority level is obtained by performing knowledge extraction on each of the data blocks.

[0008] In some technical solutions of the present application, the target military data is divided into a plurality of data blocks according to the correlation between the target sentences contained in the target military data, including: Dividing the target military data into a plurality of divided objects; wherein each of the divided objects includes a first number of target sentences; dividing the divided object into a second number of basic sentences and other sentences except the basic sentences; By comparing the weight between the basic statement and the other statements with a preset weight threshold, the other statements are added to the basic statement to obtain the data block.

[0009] In some technical solutions of the present application, the target database includes a relational database, a vector database and a graph database; When the target query statement is obtained, searching the target database according to the priority level according to the target query statement to obtain a target answer statement of the target query statement includes: When the target query statement is obtained, determining a subquery statement of the target query statement; According to the sub-query statement, query the relational database to obtain a third number of first reply statements; If the relevance of the first reply statement is less than a preset first relevance threshold, querying from the vector database to obtain a second reply statement according to the sub-query statement; If the relevance of the second reply statement is less than a preset second relevance threshold, the target reply statement is queried from the graph database according to the sub-query statement.

[0010] In some technical solutions of the present application, the above method further includes: If there is a reply statement whose correlation is equal to or greater than the first correlation threshold among the third number of the first reply statements, the reply statement is used as the target reply statement; If there are candidate reply statements whose relevance is equal to or greater than a preset second relevance threshold in the second reply statement, a fourth number of reply statements are selected from the candidate reply statements as the target reply statements; If the relevance of the second reply statement is less than a preset second relevance threshold, querying the target reply statement from the graph database according to the sub-query statement includes: If the relevance of the second reply statement is less than a preset second relevance threshold, query the graph database to a preset depth according to the sub-query statement to obtain a fifth number of third reply statements; The first reply sentence, the second reply sentence and the third reply sentence are taken as the target reply sentences.

[0011] In some technical solutions of the present application, before searching the target database, the method further includes: In response to the scenario template configuration operation, the target database is searched according to the scenario template. In a second aspect, an embodiment of the present application provides a military training device based on a knowledge retrieval enhanced large model, the device comprising: A construction module is used to construct a target database with different priorities based on the collected target military data; The retrieval module is used to, when a target query statement is obtained, search the target database according to the priority level according to the target query statement to obtain a target reply statement for the target query statement.

[0012] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned military training method based on knowledge retrieval enhanced large model when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned military training method based on knowledge retrieval enhanced large model are executed.

[0014] The technical solution provided by the embodiments of the present application may have the following beneficial effects: The method of the present application includes constructing a target database of different priorities based on the collected target military data; when a target query statement is obtained, searching the target database according to the priority based on the target query statement to obtain a target reply statement of the target query statement.

[0015] This application utilizes the efficient storage and retrieval capabilities of the database to recall target knowledge, which significantly improves the accuracy of training. It is also of great significance in efficiently and reasonably arranging training resources and improving the scientific nature and controllability of military training.

[0016] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic diagram of a process of a military training method based on a knowledge retrieval enhanced large model provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of a system architecture provided by an embodiment of the present application is shown; Figure 3 A schematic diagram of a slicing and overlapping cutting strategy provided in an embodiment of the present application is shown; Figure 4 A schematic diagram of a hybrid search strategy provided by an embodiment of the present application is shown; Figure 5 A schematic diagram of a military training device based on a knowledge retrieval enhanced large model provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0020] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0021] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0022] As the complexity and diversity of military data continue to increase, traditional training methods face many challenges, especially in dealing with rapidly changing battlefield environments and diverse tactical requirements. Existing technologies mostly use large language models to effectively integrate and analyze training data from different sources, including tactical exercise records, combat simulation data, and soldier physiological status monitoring data, thereby providing more accurate and personalized support for military training.

[0023] Through big model analysis, data-based tactical suggestions can be obtained, training plans can be optimized, and training efficiency can be improved. The big model can tailor training plans based on individual characteristics (such as physical fitness, skill level, psychological state, etc.) to improve overall combat capabilities. Secondly, the big model can also simulate different combat scenarios and tactics, conduct actual combat exercises in a safe environment, and enhance its ability to deal with complex situations. In addition, the big model can help soldiers learn military training-related knowledge and answer soldiers' questions instantly through intelligent questions and answers. This interactive learning method not only improves soldiers' understanding ability, but also provides personalized learning content according to individual needs. Therefore, the big model can help combat units continuously adjust and optimize training content and promote the scientific and intelligent military training.

[0024] Military training is directly related to the operational safety and mission success of the troops. Any inaccurate tactical judgment or training advice may lead to serious consequences or even endanger life. Therefore, the military field has extremely high requirements for the accuracy and reliability of information, and all decisions must have a clear basis. The large model learns features and rules from a large amount of tactical data through complex network structures and algorithms, which makes the internal logic of the model difficult to explain. There is an inability to clearly understand why the model comes up with a certain tactical advice or training plan. This unexplainability directly affects the trust in the model output, resulting in a decrease in dependence on the model. Especially in the face of rapidly changing battlefield environments or new tactical challenges, if the solutions or suggestions given by the large model are difficult to explain, it may not be possible to discover its potential errors or deviations in time, resulting in inappropriate training arrangements and significant losses of manpower and financial resources.

[0025] Based on this, the embodiments of the present application provide a military training method, apparatus, device and medium based on a knowledge retrieval enhanced large model, which is described below through an embodiment.

[0026] Figure 1 A schematic flow chart of a military training method based on a knowledge retrieval enhanced large model provided in an embodiment of the present application is shown, wherein the method comprises steps S101-S102; specifically: S101. Construct target databases of different priorities based on the collected target military data; S102: When a target query statement is obtained, a search is performed in the target database according to the priority level based on the target query statement to obtain a target answer statement for the target query statement.

[0027] This application utilizes the efficient storage and retrieval capabilities of the database to recall target knowledge, which significantly improves the accuracy of training. It is also of great significance in efficiently and reasonably arranging training resources and improving the scientific nature and controllability of military training.

[0028] Some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0029] like Figure 2 As shown, the military training program in this application is implemented based on the knowledge retrieval enhancement model. The overall architecture of the knowledge retrieval enhancement model includes a data layer, a dialogue link layer, and a model layer, and the retrieval and program generation of military knowledge are realized based on "data + model".

[0030] At the data layer, target military data needs to be collected. Specifically, the initial military data is collected first, and the target military data is obtained by preprocessing the initial military data. In the specific implementation, the initial military data here can be military text data, and the specific initial military data includes training data, personal information data, health data, etc. The preprocessing process here includes standardizing the text format, deleting duplicate information, processing missing values ​​and filling noise, and eliminating the ambiguity of entities and terms to maintain consistency.

[0031] After obtaining the target military data, the embodiment of the present application constructs target databases of different priorities based on the target military data. Then, questions and answers are conducted based on the target data of different priorities. Furthermore, the target databases of different priorities in the embodiment of the present application include a relational database of a first priority, a vector database of a second priority, and a graph database of a third priority. The priority relationship here is determined by the level of correlation, and the higher the correlation, the higher the priority of the generated database. Specifically, the relational database is obtained by establishing a mapping relationship between keywords in the target military data, the vector database is obtained by performing feature extraction and encoding on the target military data, and the graph database is obtained by performing knowledge extraction on the target military data.

[0032] In the specific implementation, based on the Elasticsearch database, create an index and define field mapping, map important fields to the "keyword" type, ensure that each document has a unique ID, and locate keywords based on "match" or "term" to obtain a relational database.

[0033] Based on the BGE-Large model, the text is feature extracted and encoded and stored in the ChromaDB database to achieve vector retrieval and similarity calculation, thereby obtaining a vector database.

[0034] The KnowLM model is used to extract, fuse and complete military data knowledge, generate entities, relationships and attributes, and solve the problems of time-consuming and labor-intensive manual labeling and data missing, in order to achieve flexible query and analysis of the knowledge graph and obtain a graph database.

[0035] In order to improve the accuracy of building a database, the embodiment of the present application first blocks the target military data and builds a target database based on the processed data. When the target military data is divided into blocks, the main basis of the embodiment of the present application is the text block cutting and overlapping cutting strategy of the self-attention mechanism. The text block cutting and overlapping cutting strategy based on the self-attention mechanism are adopted to explore the size to achieve the best balance and decompose the military documents into manageable data chunks.

[0036] The specific division process is as follows: the target military data is divided into a plurality of division objects; each of the division objects contains a first number of target sentences; the division objects are divided into a second number of basic sentences and other sentences other than the basic sentences; by comparing the weight between the basic sentences and the other sentences with a preset weight threshold, the other sentences are added to the basic sentences to obtain the data block. After the division object is processed, other adjacent division objects are processed until the processing is completed.

[0037] In specific implementation, the self-attention mechanism is a mechanism for capturing the relevance of input data. It uses the input data itself as the query, key, and value, calculates the similarity between features, and generates a weighted sum value, so that the model can focus on the relationship between different parts of the data. The input is linearly transformed to generate the query Q, key K, and value V. The calculation method is shown in formula (1).

[0038] (1) Among them, WQ, WK, and WV are linear transformation matrices respectively.

[0039] The similarity between the query and the key is calculated by dot product, and then scaled and Softmax processed. The calculation method is shown in formula (2).

[0040] (2) Here, d is the dimension of the key and is used for scaling to avoid dot product values ​​being too large.

[0041] The text is cut into chunks of 11 (the first number) sentences each. To ensure that each chunk is not too small, the first 3 (the second number) sentences are used as the chunk basic sentences. Based on the weights, the next 8 sentences (other sentences) are judged whether to include them in the chunk. If the weights of the sentences included in the chunk and the adjacent sentences or the sentences with an interval of 1 are not less than the threshold, the corresponding sentences can be included in the chunk. Otherwise, the process ends.

[0042] Each sentence is converted into a feature vector, labeled as s1, s2, s3…sn, and the first 11 vectors, i.e., s1, s2, s3…s11, are selected. S1, s2, s3…s11 are sent to the self-attention mechanism layer. According to formula (2), the dot products of 10 sets of vector queries and keys are calculated respectively to capture the dependencies and important features between different parts of the input data. The square root of the key dimension is introduced for scaling. The attention scores are passed through the Softmax function to obtain 10 sets of probability scores, each of which includes 10 weights. The weight Aij represents the correlation between vectors si and sj.

[0043] As shown Figure 3 below, first, set the threshold to M, query the weight A35. If A35 < M, then query A34. If A35 ≥ M, then include s4 and s5, and query A57. If A34 < M, then query A24. If A34 ≥ M, then include s4, and query A46. If A57 < M, then query A56. If A57 ≥ M, then include s6 and s7, and query A79. If A24 < M, then s1, s2, and s3 are grouped into a block, and s4... s11 are not included in the block. If A24 ≥ M, then include s4, and query A46. If A46 < M, then query A45. If A46 ≥ M, then include s5 and s6, and query A68. If A56 < M, then query A46. If A56 ≥ M, then include s6, and query A68. If A79 < M, then query A78. If A79 ≥ M, then include s8 and s9, and query A9 / 11. And so on, calculate A67, A68, A8 / 10 (indicating 8 and 10, / serves as a separator for numbers), A9 / 10 (indicating 9 and 10, / serves as a separator for numbers), A9 / 11 (indicating 9 and 11, / serves as a separator for numbers)..., etc. If the relevance of adjacent sentences and sentences with an interval of 1 is less than the threshold, then end in advance. Otherwise, continue the calculation until the last vector s11 is judged.

[0044] Assume that the previous block is s1, s2, s3... si. Then the next chunk starts from si+1, continues to take 11 consecutive sentences as the research object, and sends si+2... si+11 into the self-attention mechanism. The rule for including in the block is the same as above. Among them, if s11 is included in the previous block, then the next block is cut in an overlapping manner, and the overlapping quantity is 2 sentences, that is, s10 and s11 are included in the next block. If s10 is included in the previous block and s11 is not included, then the next block is cut in an overlapping manner, and the overlapping quantity is 1 sentence, that is, s11 is included in the next block. In other cases, there is no overlapping cutting.

[0045] After constructing the above-mentioned target database, the embodiment of the present application combines the above-mentioned target database with the large model to perform a question-and-answer operation. That is, when the target query statement is obtained, the embodiment of the present application directly uses the large model to retrieve in the above-mentioned target database to obtain the target reply statement of the target query statement, avoiding the model from generating other reply statements that do not conform to the existing data through learning, and improving the accuracy of the reply.

[0046] Specifically, when searching from the above-mentioned target databases, according to the priority of each target database, the relational database of the first priority is searched first. If no suitable reply statement is found in the relational database, the vector database of the second priority is searched. If no suitable reply statement is found in the vector database, the graph database of the third priority is searched finally to obtain the target reply statement.

[0047] In an optional implementation, in order to further improve the accuracy of knowledge retrieval, before searching the target database, the embodiment of the present application needs to determine the sub-query statement of the target query statement when the target query statement is obtained. Then the target database is searched based on the sub-query statement. When the target query statement is a complex query statement, the sub-query statement here is obtained by splitting the complex query. When the target query statement is a simple query statement, the sub-query statement here is a synonymous query statement generated according to the target query statement. The complexity or simplicity of the query statement here can be determined by the number of words contained in the query statement. When the number of words in the target query statement exceeds the preset word count threshold, the target query statement is a complex query statement, otherwise it is a simple query statement. Then, by executing the sub-queries in parallel, the ambiguity, irregularity and semantic diversity of user questions are solved, and the user's search experience is optimized. A hybrid retrieval strategy using "routing controller + gating unit" is adopted. The routing controller generates decision instructions for selecting relational databases, vector databases, and graph databases based on the query input. The gating unit dynamically selects the best path for retrieval according to the content of the request and the screening rules through access control.

[0048] In order to improve efficiency during the specific search process, the embodiment of the present application also needs to limit the number of results. Specifically: According to the sub-query statement, a third number of first reply statements are queried from the relational database; if the relevance of the first reply statement is less than the preset first relevance threshold, according to the sub-query statement, a second reply statement is queried from the vector database; if the relevance of the second reply statement is less than the preset second relevance threshold, according to the sub-query statement, the target reply statement is queried from the graph database. If there is a reply statement with a relevance equal to or greater than the first relevance threshold in the third number of the first reply statements, the reply statement is used as the target reply statement; if there is a candidate reply statement with a relevance equal to or greater than the preset second relevance threshold in the second reply statement, a fourth number of reply statements are taken from the candidate reply statements as the target reply statement; if the relevance of the second reply statement is less than the preset second relevance threshold, according to the sub-query statement, the target reply statement is queried from the graph database, including: if the relevance of the second reply statement is less than the preset second relevance threshold, according to the sub-query statement, the graph database is queried to a preset depth to obtain a fifth number of third reply statements; the first reply statement, the second reply statement and the third reply statement are used as the target reply statement.

[0049] In specific implementation, Figure 4 As shown, the routing controller generates decision instructions for multiple database selections based on the query input. The gating unit dynamically selects the best path for retrieval based on the request content and screening rules through access control. First, the gating unit performs keyword retrieval based on the Elasticsearch database, matches the user query with the important fields defined by the database, takes the first n1 retrieved results, maps them back to the original text chunk through keywords, calculates the correlation between the query and multiple text chunks based on the BGE-Reranker model, and sorts them by size. If there is a result with a correlation greater than r1, the gating unit stops accessing other databases and provides the n1 retrieval results to the large model.

[0050] If the relevance of all results is not greater than r1, the gating unit will start vector retrieval, convert the query into a vector based on the BGE-Large model, match the query vector in ChromaDB, map the retrieved vector back to the original text chunk, and use the Reciprocal Rank Fusion (RRF) algorithm to map the results of keyword and vector retrieval recall to the same value domain space by ranking. Combined with the query, the BGE-Reranker model is used to rank the Top-K documents. If there are results with a relevance greater than r2, the gating unit stops accessing other databases and takes the top n2 results according to the relevance to provide to the large model.

[0051] If the correlation of all results is not greater than r2, the gating unit will start the graph retrieval, match the relevant query based on the graph query language Cypher, start from the specified entity, and perform a priority search strategy with a depth of h, taking the first n3 results and the first n2 results of the keyword and vector retrieval "coarse sorting + fine sorting" and providing them to the large model. Through the dynamic hybrid retrieval mechanism of "routing controller + gating unit", the dynamic selection of routing paths of vector database, graph database and relational database is realized, in order to achieve faster and more accurate information acquisition, reduce unnecessary data interaction, and provide more comprehensive and efficient military training knowledge retrieval and query functions while ensuring search efficiency.

[0052] In an optional implementation, since the embodiment of the present application involves many parameters (including the first quantity, the second quantity, the weight threshold, etc.), and since military data is different in different application scenarios, in order to further improve accuracy and facilitate operation. The embodiment of the present application also sets a scenario template (prompt template) to associate with multiple parameters. Before asking questions, the user can first configure the scenario template for the target scenario, and then search the target database based on the scenario template. The scenarios here include different application scenarios such as knowledge question and answer, archive retrieval, solution generation, scenario generation, and personalized suggestions. By dynamically adjusting the block size, multi-library retrieval path, etc., the relevance, accuracy, and context adaptability of the results can be improved to avoid generalization or inaccuracy of the generated content. The following example is based on the knowledge question and answer scenario. Initial parameter settings (adjustable): M=0.3, n1=10, r1=0.8, n2=10, r2=0.8, n3=5, h=2. Instructions: You are a military assistant. Your task is to answer user questions based on the given known information. Make sure your response is completely based on the known information and don't make up answers. If the given known information is not enough to answer the user's question, please reply directly "I can't answer your question". Please answer user questions in Chinese.

[0053] This application analyzes the semantic structure of the text through the self-attention mechanism, aggregates the content with the same or similar semantics, makes the semantics within each block more coherent, and the retrieval results can provide higher-quality context, improving the accuracy and consistency of the generated content. By judging the correlation between adjacent sentences between blocks, it is decided whether to overlap between blocks and the number of overlapping sentences, effectively reducing unnecessary overlap and redundant information. Therefore, the use of text segmentation and overlapping cutting strategies based on the self-attention mechanism can better ensure semantic integrity, reduce redundancy, and optimize computing resources, thereby improving retrieval and generation effects.

[0054] It can dynamically select single database, two databases in parallel or three databases in parallel to search according to the correlation between the query and the search results, which has the advantages of efficient use of resources, improved response time, optimized result quality, and flexible response to queries. By searching layer by layer and gradually increasing the search complexity, it can find a balance between simple queries and complex reasoning, ensuring that the query needs of users are met efficiently, accurately and comprehensively, avoiding complex queries of all databases at one time, and reducing invalid searches.

[0055] At the same time, by associating the prompt template with multiple parameters, the block size, multi-library search path, etc. can be adjusted according to the specific situation, thereby improving the relevance, accuracy and context adaptability of the results and avoiding generalization or inaccuracy of the generated content.

[0056] Figure 5 A schematic diagram of the structure of a military training device based on a knowledge retrieval enhanced large model provided in an embodiment of the present application is shown, and the device includes: A construction module is used to construct a target database with different priorities based on the collected target military data; The retrieval module is used to, when a target query statement is obtained, search the target database according to the priority level according to the target query statement to obtain a target reply statement for the target query statement.

[0057] The target databases with different priorities are constructed based on the collected target military data, including: Based on the collected target military data, a relational database of the first priority, a vector database of the second priority, and a graph database of the third priority are constructed.

[0058] The method of constructing a relational database of the first priority, a vector database of the second priority, and a graph database of the third priority according to the collected target military data includes: Dividing the target military data into a plurality of data blocks according to the correlation between the target sentences contained in the target military data; By establishing a mapping relationship between keywords in each of the data blocks, the relational database of the first priority is obtained; By performing feature extraction and encoding on each of the data blocks, the vector database of the second priority is obtained; The graph database of the third priority level is obtained by performing knowledge extraction on each of the data blocks.

[0059] The target military data is divided into a plurality of data blocks according to the correlation between the target sentences contained in the target military data, including: Dividing the target military data into a plurality of divided objects; wherein each of the divided objects includes a first number of target sentences; dividing the divided object into a second number of basic sentences and other sentences except the basic sentences; By comparing the weight between the basic statement and the other statements with a preset weight threshold, the other statements are added to the basic statement to obtain the data block.

[0060] The target database includes a relational database, a vector database and a graph database; When the target query statement is obtained, searching the target database according to the priority level according to the target query statement to obtain a target answer statement of the target query statement includes: When the target query statement is obtained, determining a subquery statement of the target query statement; According to the sub-query statement, query the relational database to obtain a third number of first reply statements; If the relevance of the first reply statement is less than a preset first relevance threshold, querying from the vector database to obtain a second reply statement according to the sub-query statement; If the relevance of the second reply statement is less than a preset second relevance threshold, the target reply statement is queried from the graph database according to the sub-query statement.

[0061] If there is a reply statement whose correlation is equal to or greater than the first correlation threshold among the third number of the first reply statements, the reply statement is used as the target reply statement; If there are candidate reply statements whose relevance is equal to or greater than a preset second relevance threshold in the second reply statement, a fourth number of reply statements are selected from the candidate reply statements as the target reply statements; If the relevance of the second reply statement is less than a preset second relevance threshold, querying the target reply statement from the graph database according to the sub-query statement includes: If the relevance of the second reply statement is less than a preset second relevance threshold, query the graph database to a preset depth according to the sub-query statement to obtain a fifth number of third reply statements; The first reply sentence, the second reply sentence and the third reply sentence are taken as the target reply sentences.

[0062] The response module is used to respond to the scenario template configuration operation and search the target database according to the scenario template. like Figure 6As shown, an embodiment of the present application provides an electronic device for executing the military training method based on knowledge retrieval enhanced large model in the present application, the device includes a memory, a processor, a bus and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the military training method based on knowledge retrieval enhanced large model when executing the computer program.

[0063] Specifically, the above-mentioned memory and processor can be general-purpose memory and processor, which are not specifically limited here. When the processor runs the computer program stored in the memory, it can execute the above-mentioned military training method based on knowledge retrieval enhanced large model.

[0064] Corresponding to the military training method based on knowledge retrieval enhanced large model in the present application, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned military training method based on knowledge retrieval enhanced large model are executed.

[0065] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned military training method based on knowledge retrieval enhanced large model.

[0066] In the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0067] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0068] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0069] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0070] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0071] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A military training method based on knowledge retrieval enhanced large model, characterized in that: The method comprises: Build a target database with different priorities based on the collected target military data; When the target query statement is obtained, a search is performed in the target database according to the priority level based on the target query statement to obtain a target reply statement for the target query statement.

2. The method according to claim 1, characterized in that The target databases with different priorities are constructed based on the collected target military data, including: Based on the collected target military data, a relational database of the first priority, a vector database of the second priority, and a graph database of the third priority are constructed.

3. The method according to claim 2, characterized in that The method of constructing a relational database of the first priority, a vector database of the second priority, and a graph database of the third priority according to the collected target military data includes: Dividing the target military data into a plurality of data blocks according to the correlation between the target sentences contained in the target military data; By establishing a mapping relationship between keywords in each of the data blocks, the relational database of the first priority is obtained; By performing feature extraction and encoding on each of the data blocks, the vector database of the second priority is obtained; The graph database of the third priority level is obtained by performing knowledge extraction on each of the data blocks.

4. The method according to claim 3, characterized in that The target military data is divided into a plurality of data blocks according to the correlation between the target sentences contained in the target military data, including: Dividing the target military data into a plurality of divided objects; wherein each of the divided objects includes a first number of target sentences; dividing the divided object into a second number of basic sentences and other sentences except the basic sentences; By comparing the weight between the basic statement and the other statements with a preset weight threshold, the other statements are added to the basic statement to obtain the data block.

5. The method according to claim 1, characterized in that The target database includes a relational database, a vector database and a graph database; When the target query statement is obtained, searching the target database according to the priority level according to the target query statement to obtain a target answer statement of the target query statement includes: When the target query statement is obtained, determining a subquery statement of the target query statement; According to the sub-query statement, query the relational database to obtain a third number of first reply statements; If the relevance of the first reply statement is less than a preset first relevance threshold, querying from the vector database to obtain a second reply statement according to the sub-query statement; If the relevance of the second reply statement is less than a preset second relevance threshold, the target reply statement is queried from the graph database according to the sub-query statement.

6. The method according to claim 5, characterized in that The method further comprises: If there is a reply statement whose correlation is equal to or greater than the first correlation threshold among the third number of the first reply statements, the reply statement is used as the target reply statement; If there are candidate reply statements whose relevance is equal to or greater than a preset second relevance threshold in the second reply statement, a fourth number of reply statements are selected from the candidate reply statements as the target reply statements; If the relevance of the second reply statement is less than a preset second relevance threshold, querying the target reply statement from the graph database according to the sub-query statement includes: If the relevance of the second reply statement is less than a preset second relevance threshold, query the graph database to a preset depth according to the sub-query statement to obtain a fifth number of third reply statements; The first reply sentence, the second reply sentence and the third reply sentence are taken as the target reply sentences.

7. The method according to claim 1, characterized in that Before searching the target database, the method further includes: In response to the scenario template configuration operation, the target database is searched according to the scenario template.

8. A military training device based on knowledge retrieval enhanced large model, characterized in that: The device comprises: A construction module is used to construct a target database with different priorities based on the collected target military data; The retrieval module is used to, when a target query statement is obtained, search the target database according to the priority level according to the target query statement to obtain a target reply statement for the target query statement.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the military training method based on knowledge retrieval enhanced large model as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the military training method based on knowledge retrieval enhanced large model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Large language model feedback information generation method and device, electronic equipment and medium

    CN118069815A

  • Method, system and equipment for generating SQL (Structured Query Language) statement based on large model

    CN119127913A

  • Product recommendation method and device, electronic equipment, storage medium and program product

    CN119313433A

  • Mixing retrieval method and device based on knowledge graph and vector, equipment and storage medium

    CN119357376A

  • Question answering method using graph database, and a computer program recorded on a recording medium for executing the same

    KR102733434B1

Cited By

  • Query statement optimization method and device, electronic equipment and computer readable medium

    CN121092577A

  • Query statement optimization method and device, electronic equipment and computer readable medium

    CN121092577B