A Military Regulations Question Answering Method Based on Retrieval and Knowledge Graph

By combining retrieval and knowledge graph technologies, a military regulations question-and-answer system was constructed, which solved the problem of low efficiency in traditional manual retrieval and achieved fast and accurate legal answers and decision support functions, making it suitable for military regulations learning and testing.

CN115712711BActive Publication Date: 2025-12-02NAVAL UNIV OF ENG PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211463634.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-12-02
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

Existing military regulations question-and-answer systems are insufficient to meet the needs of rapid, accurate, and efficient battlefield decision-making under informationized conditions. Traditional manual review methods are inefficient, and information retrieval and knowledge graph technologies each have their own shortcomings, failing to provide direct answers or lacking source information and interpretability.

Method used

This paper adopts a retrieval and knowledge graph-based approach. Through legal text preprocessing, question processing, answer organization, and auxiliary answering modules, the TF-IDF algorithm and semantic relationship annotation are adjusted according to the characteristics of military regulations to generate a clause retrieval tree. By utilizing the triples and directory hierarchy of the knowledge graph, it can achieve rapid location and accurate answering.

Benefits of technology

It enables quick and accurate location of military regulations clauses, provides concise answers and completes the content, supports answers to true/false, single-choice, multiple-choice, and fill-in-the-blank questions, and improves the efficiency and accuracy of the military regulations question-and-answer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712711B_ABST
    Figure CN115712711B_ABST
Patent Text Reader

Abstract

The purpose of this invention is to provide a military regulation question-and-answer method based on retrieval and knowledge graph. By using the above two technologies to construct a military regulation question-and-answer system, the question is first located to the most relevant regulatory clause, and then a short answer is obtained by matching semantic relationships. The complete content and hierarchical structure of the clause are used as supplements to integrate the advantages of the two technologies, and the question-and-answer effect is verified through testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of military regulations question-and-answer technology, and in particular to a military regulations question-and-answer method based on retrieval and knowledge graph. Background Technology

[0002] As human society enters the information and intelligent age, the face of warfare and military operations is undergoing profound changes. In particular, the rise of cognitive warfare tactics such as information warfare, psychological warfare, and legal warfare has placed higher demands on the comprehensive information service capabilities of command information systems. Military regulations, as the legal basis for guiding battlefield operations, are of paramount importance, especially in the field of cognitive warfare, where their role has long since moved from behind the scenes to the forefront. Commanders need detailed legal support to make decisions, and every step should be verifiable. However, under informationized conditions, the traditional method of manually reviewing texts is clearly inadequate to keep pace with the pace of warfare and cannot meet the needs of battlefield decision-making. Therefore, constructing an accurate, efficient, flexible, and intelligent military regulation question-and-answer system has broad application prospects.

[0003] Currently, legal question answering methods can be categorized into seven types: judgment-based, multiple-choice, retrieval-based, big data-based, ontology-based, neural network-based, and other methods. Information retrieval (IR)-based legal question answering first locates paragraphs containing relevant information and then determines the specific answer; however, no open-source military legal graphs suitable for question answering are currently available.

[0004] Information retrieval technology can quickly find relevant laws and regulations based on keywords, but it cannot directly provide answers to questions, requiring manual reading of the clauses. The effectiveness of knowledge graph question answering depends on the scale and quality of the graph, involves a large workload, and the answers lack source information and interpretability. Therefore, question answering systems built solely using retrieval or knowledge graph technologies cannot meet the needs of military decision support. Summary of the Invention

[0005] The purpose of this invention is to provide a military regulations question-answering method based on retrieval and knowledge graphs, to address the questions raised in the background art.

[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:

[0007] A military regulation question-answering method based on retrieval and knowledge graphs includes three steps: military regulation text preprocessing, military regulation question answering, and experimentation and analysis.

[0008] The preprocessing of the military regulations text includes the following steps:

[0009] Step 1: Identifying the Titles of Regulations: Military regulations have a rigorous structure and clear hierarchy. The titles at each level concisely and accurately summarize the content. Dividing the text of regulations into clauses is very important for information retrieval. The title structure of military regulations has a strong regularity. Usually, the first-level title is "Chapter X", the second-level title is "Section X", and the third-level title is "Article X".

[0010] Step 2: Generate Clause Retrieval Tree: Based on title recognition, in order to quickly locate the clauses most relevant to the question, the classic TF-IDF algorithm is adjusted according to the characteristics of military regulations;

[0011] Step 3: Semantic Relationship Annotation: To provide concise answers to simple questions, knowledge graph technology is used to annotate the semantic relationships of legal clauses, generating a large number of knowledge "triples". The scale and quality of the knowledge will directly affect the ability to understand the question and the quality of the answer. There are three main annotation methods: First, manual annotation, which is more detailed and accurate, but time-consuming and labor-intensive; second, automatic annotation, which can process clauses with fixed sentence structures in batches, but requires writing programs one by one; and third, extracting concise questions from the question bank and converting them, but this is limited by the size of the question bank.

[0012] Furthermore, the military regulations Q&A includes the following steps:

[0013] Step 1: Question Processing: The prerequisite for answering questions is to process the natural language question into data that can be understood by computers. The question processing includes three steps: question word replacement, specifying the search scope, and word segmentation.

[0014] a) Question word replacement: Question words in natural language are useless for retrieval and should be removed after accurately understanding the questioner's intent. This system understands intent by enumerating common question formats. Replacing some words with synonyms can reduce the number of enumerations. For example, "X contains which entries", "X contains what clauses", and "X includes which chapters" will be replaced with "X has what content". As long as the latter is recognized, a series of similar questions can be understood.

[0015] b. Specify the search scope: For questions such as "What does Regulation X stipulate for Y?" or "What are the supplementary provisions of Regulation X?", after searching within the scope specified by the questioner, the level represented by the scope qualifier will be used as the initial search node. If no scope is specified, the search will start from the root node that contains all regulations.

[0016] c. Question segmentation: After removing the scope-limiting words at the beginning and the interrogative words at the end, the remaining part of the question is segmented into words, and the question phrases are formed from content words. The vocabulary of "Military Terminology" and manually annotated military terms can enhance the segmentation effect of general word segmentation tools in the field of military regulations.

[0017] Step Two: Answer Organization: Question processing clarifies the search scope and question phrases. Based on this, a question-and-answer session is completed through three steps: retrieving relevant clauses, matching semantic relationships, and outputting the answer.

[0018] a. Retrieve relevant clauses: Using the question phrase and the initial search node representing the search scope as input, run the clause retrieval algorithm. The output answer list is the set of clauses with the highest relevance. If the answer list is empty, it means that no relevant clauses can be found.

[0019] b. Matching semantic relations: The semantic relation annotation in the preprocessing process adds several knowledge triples to each clause. If the question matches the triples contained in the answer clause, a short answer is given.

[0020] c. Outputting answers: Although short answers provide key information, the inquirer may want to know more detailed information. In addition, a lot of knowledge is difficult to express with triples, and many questions cannot be answered with short answers. Therefore, the source of the answer and the full text of the clause are needed as supplements to enhance persuasiveness and accuracy. Furthermore, in addition to the difficulty in solving the problem of not finding semantic relationships, knowledge graphs are not suitable for answering questions about chapter clauses. This system has established a complete directory hierarchy, which makes it easier to answer such questions.

[0021] Step 3: Assisted Answering: Utilizing clause retrieval and semantic matching capabilities, an answering module is implemented. This module can attempt to answer true / false, single-choice, multiple-choice, and fill-in-the-blank questions. This function can be used to assist in the learning and testing of military regulations, and can also be used to add semantic relationships from the question bank. Treating the question stem as a question, it retrieves the most relevant legal clauses. For single-choice, multiple-choice, and fill-in-the-blank questions, it attempts to derive the answer by matching semantic relationships. For true / false questions or cases where semantic relationships cannot be matched, string matching is used to determine the answer. For single-choice and multiple-choice questions where the answer still cannot be determined...

[0022] Furthermore, the experiment and analysis include two steps: question-and-answer testing and comparative analysis.

[0023] Furthermore, the generation of the terms search tree in step one includes the following steps:

[0024] Step 1: Construct a word segmentation counter: A word segmentation counter is a data structure used to store the term frequency (TF) of each word in a text. Each level of the question-and-answer system's directory hierarchy has a counter for the parent title. up Heading counter C now and text counter C textThe reason for counting the current level heading and the parent heading separately is that the current level heading has the strongest relevance to the content at that level and therefore carries higher weight. However, a higher frequency of word segmentation in the body text or parent heading does not necessarily indicate a stronger relevance to the clause. The TF value in this article no longer solely refers to word segmentation frequency. up and C text Only the presence or absence of word segmentation is counted (value is 0 or 1), C now The value in the table represents the proportion of each word segment to the total number of words. To calculate the TF value of word segment 'a' at a certain level, we calculate the weighted sum of the corresponding values ​​of the three word segmentation counters using the following formula:

[0025] TF[a]=C up [a]×W up +C now [a]×W now +C text [a]×W text (1)

[0026] In equation (1), W up W now and W text Indicates the weight of each word segmentation counter;

[0027] Step Two: Word Segmentation Counter Update: To ensure that the word segmentation counters at each level accurately reflect the strongest relevance between the segmented words and their respective content, after constructing the word segmentation counter for each clause, C... now and C text The update should proceed from bottom to top, level by level, up to the top level representing the entire regulation. The update method between adjacent levels is as follows: For all word segments contained in the current level's counter, take the maximum value between the current level's counter and the previous level's counter to update the previous level's counter, that is:

[0028]

[0029] In equation (2), C represents the current level. now Or C text C′ represents the superior C now Or C text ∑ represents the complete set of word segments recorded in C. The word segmentation counter setting differs from the classic TF-IDF model and was formed through repeated practice and optimization, making it more in line with the characteristics of military regulations.

[0030] Step 3: Calculate the IDF of each segment: The importance of a segment depends on the amount of information it provides for the positioning clause. This paper uses the end level (usually "clause" in military regulations) as the basic unit to calculate the inverse document frequency (IDF) value of each segment as a measure of its global importance. The formula is as follows:

[0031]

[0032] In equation (3), N represents the total number of clauses in all regulations within the system. a This represents the number of terms containing the word segment 'a'. To calculate the TF-IDF value of a phrase V with a certain level, we sum the TF-IDF values ​​of each word in V with that level. The formula is as follows:

[0033] TF·IDF[V]=∑ a∈V TF[a]×IDF[a] (4)

[0034] By constructing the terms search tree through the above steps, the abstract problem of relevance measurement is transformed into the problem of calculating word segments and TF-IDF values ​​at each level, which facilitates rapid computer solution.

[0035] The beneficial effects of this invention are as follows:

[0036] This invention presents a military regulation question-and-answer method based on retrieval and knowledge graph. By using the above two technologies to construct a military regulation question-and-answer system, the question is first located to the most relevant regulatory clause, and then a short answer is obtained by matching semantic relationships. The complete content and hierarchical structure of the clause are used as supplements to integrate the advantages of the two technologies. The question-and-answer effect is verified through testing. Attached Figure Description

[0037] Figure 1 This is a flowchart of a military regulations question-answering method based on retrieval and knowledge graph according to the present invention;

[0038] Figure 2 This is a schematic diagram illustrating the question word replacement method for military regulations based on retrieval and knowledge graphs according to the present invention.

[0039] Figure 3 This is a schematic diagram of a clause retrieval algorithm for a military regulation question-and-answer method based on retrieval and knowledge graph according to the present invention;

[0040] Figure 4 This is a schematic diagram illustrating a question-answering test of a military regulations question-answering method based on retrieval and knowledge graphs according to the present invention.

[0041] Figure 5 This is a schematic diagram illustrating a test of the military regulations question-answering method based on retrieval and knowledge graphs according to the present invention; Detailed Implementation

[0042] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. Identical components are indicated by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "up," and "down" used in the following description refer to directions in the accompanying drawings, while the terms "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0043] To make the content of this invention easier to understand, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Identical components are indicated by the same reference numerals.

[0044] A military regulation question-answering method based on retrieval and knowledge graphs includes three steps: military regulation text preprocessing, military regulation question answering, and experimentation and analysis.

[0045] Military regulation text preprocessing includes the following steps:

[0046] Step 1: Identifying the Titles of Regulations: Military regulations have a rigorous structure and clear hierarchy. The titles at each level concisely and accurately summarize the content. Dividing the text of regulations into clauses is very important for information retrieval. The title structure of military regulations has a strong regularity. Usually, the first-level title is "Chapter X", the second-level title is "Section X", and the third-level title is "Article X".

[0047] Step 2: Generate Clause Retrieval Tree: Based on title recognition, in order to quickly locate the clauses most relevant to the question, the classic TF-IDF algorithm is adjusted according to the characteristics of military regulations;

[0048] Step 3: Semantic Relationship Annotation: To provide concise answers to simple questions, knowledge graph technology is used to annotate the semantic relationships of legal clauses, generating a large number of knowledge "triples". The scale and quality of the knowledge will directly affect the ability to understand the question and the quality of the answer. There are three main annotation methods: First, manual annotation, which is more detailed and accurate, but time-consuming and labor-intensive; second, automatic annotation, which can process clauses with fixed sentence structures in batches, but requires writing programs one by one; and third, extracting concise questions from the question bank and converting them, but this is limited by the size of the question bank.

[0049] Military regulations Q&A includes the following steps:

[0050] Step 1: Question Processing: The prerequisite for answering questions is to process the natural language question into data that can be understood by computers. Question processing includes three steps: question word replacement, specifying the search scope, and word segmentation.

[0051] a. Question word replacement: Question words in natural language are useless for retrieval and should be removed after accurately understanding the questioner's intent. This system understands intent by enumerating common question formats, and replacing some words with synonyms can reduce the number of enumerations.

[0052] b. Specify the search scope: For questions such as "What does Regulation X stipulate for Y?" or "What are the supplementary provisions of Regulation X?", after searching within the scope specified by the questioner, the level represented by the scope qualifier will be used as the initial search node. If no scope is specified, the search will start from the root node that contains all regulations.

[0053] c. Question segmentation: After removing the scope-limiting words at the beginning and the interrogative words at the end, the remaining part of the question is segmented into words, and the question phrases are formed from content words. The vocabulary of "Military Terminology" and manually annotated military terms can enhance the segmentation effect of general word segmentation tools in the field of military regulations.

[0054] Step Two: Answer Organization: Question processing clarifies the search scope and question phrases. Based on this, a question-and-answer session is completed through three steps: retrieving relevant clauses, matching semantic relationships, and outputting the answer.

[0055] a. Retrieve relevant clauses: Using the question phrase and the initial search node representing the search scope as input, run the clause retrieval algorithm. The output answer list is the set of clauses with the highest relevance. If the answer list is empty, it means that no relevant clauses can be found.

[0056] b. Matching semantic relations: The semantic relation annotation in the preprocessing process adds several knowledge triples to each clause. If the question matches the triples contained in the answer clause, a short answer is given.

[0057] c. Outputting answers: Although short answers provide key information, the inquirer may want to know more detailed information. In addition, a lot of knowledge is difficult to express with triples, and many questions cannot be answered with short answers. Therefore, the source of the answer and the full text of the clause are needed as supplements to enhance persuasiveness and accuracy. Furthermore, in addition to the difficulty in solving the problem of not finding semantic relationships, knowledge graphs are not suitable for answering questions about chapter clauses. This system has established a complete directory hierarchy, which makes it easier to answer such questions.

[0058] Step 3: Assisted Answering: Utilizing clause retrieval and semantic matching capabilities, an answering module is implemented. This module can attempt to answer true / false, single-choice, multiple-choice, and fill-in-the-blank questions. This function can be used to assist in the learning and testing of military regulations, and can also be used to add semantic relationships from the question bank. Treating the question stem as a question, it retrieves the most relevant legal clauses. For single-choice, multiple-choice, and fill-in-the-blank questions, it attempts to derive the answer by matching semantic relationships. For true / false questions or cases where semantic relationships cannot be matched, string matching is used to determine the answer. For single-choice and multiple-choice questions where the answer still cannot be determined...

[0059] The experiment and analysis consisted of two steps: question-and-answer testing and comparative analysis.

[0060] The generation of the terms search tree in step one includes the following steps:

[0061] Step 1: Constructing a word segmentation counter: A word segmentation counter is a data structure used to store the term frequency (TF) of each word segment in a text. Each level of the directory structure in this question-and-answer system has a parent-level title counter C. up Heading counter C now and text counter C text The reason for counting the current level heading and the parent level heading separately is that the current level heading has the strongest relevance to the content at that level and therefore carries higher weight. A higher frequency of word segmentation in the main text or parent level heading does not necessarily mean a stronger relevance to the clause. For example, in Article 20 of the Queue Regulations, "Grace Changes," the word "marching in step" appears 8 times, while in Article 18, "Marching (I) Marching in Step," it only appears 2 times. If counted using traditional word frequency, "marching in step" would be attributed to an undesirable clause. Therefore, the TF value in this article no longer refers solely to word segmentation frequency. up and C text Only the presence or absence of word segmentation is counted (value is 0 or 1), C now The value in the value represents the percentage of each word segment in the total number of words.

[0062] To calculate the TF value of word segment 'a' at a certain level, we can use the following formula to calculate the weighted sum of the corresponding values ​​of the three word segmentation counters:

[0063] TF[a]=C up [a]×W up +C now [a]×W now +C text [a]×W text (1)

[0064] In equation (1), W up W now and W text This indicates the weight of each word segmentation counter.

[0065] Step Two: Word Segmentation Counter Update: To ensure that the word segmentation counters at each level accurately reflect the strongest relevance between the segmented words and their respective content, after constructing the word segmentation counter for each clause, C... now and C text The update should proceed from bottom to top, level by level, up to the top level representing the entire regulation. The update method between adjacent levels is as follows: For all word segments contained in the current level's counter, take the maximum value between the current level's counter and the previous level's counter to update the previous level's counter, that is:

[0066]

[0067] In equation (2), C represents the current level. now Or C text C′ represents the superior C nowor C text , ∑ represents the set of all word segments recorded in C. For example, if the title of Article 14 of the Drill Regulations is "Stand at Ease", then the TF value of the word segment "Stand at Ease" in C of Article 14 is 1 (the maximum value). Therefore, the TF values of "Stand at Ease" in Chapter 4 where Article 14 is located and in the Drill Regulations now are both updated to 1, which is convenient for finding the most relevant articles (Drill Regulations - Chapter 4 - Article 14) related to "Stand at Ease" layer by layer from top to bottom. The setting of the word segment counter is different from the classical TF-IDF model and is formed through repeated practice and optimization, which is more in line with the characteristics of military regulations; now now

[0068] Step 3: Calculate the IDF of word segments: The importance of a word segment depends on the amount of information it provides for locating articles. In this paper, the inverse document frequency (IDF) value of each word segment is calculated with the terminal level (usually "article" for military regulations) as the basic unit as a measure of its global importance. The formula is as follows:

[0069]

[0070] In formula (3), N represents the total number of articles in all regulations within the system, and N a represents the number of articles containing the word segment a. To find the TF-IDF value of a phrase V at a certain level, the TF-IDF values of each word segment in V are accumulated at that level. The formula is as follows:

[0071] TF·IDF[V] = ∑ a∈V TF[a] × IDF[a] (4)

[0072] By constructing an article retrieval tree through the above steps, the abstract problem of relevance measurement is transformed into the calculation problem of the TF-IDF values of word segments and phrases at each level, which is convenient for the computer to quickly solve.

[0073] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.​​

Claims

1. A military regulations question-answering method based on retrieval and knowledge graph, characterized in that, It includes three steps: preprocessing of military regulations texts, military regulations Q&A, and experimentation and analysis. The preprocessing of the military regulations text includes the following steps: Step 1: Identifying the Titles of Regulations: Military regulations have a rigorous structure and clear hierarchy. The titles at each level concisely and accurately summarize the content. Dividing the text of regulations into clauses is very important for information retrieval. The title structure of military regulations has a strong regularity: the first-level title is "Chapter X", the second-level title is "Section X", and the third-level title is "Article X". Step 2: Generate Clause Retrieval Tree: Based on title recognition, in order to quickly locate the clauses most relevant to the question, the classic TF-IDF algorithm is adjusted according to the characteristics of military regulations; Step 3: Semantic Relationship Annotation: To provide concise answers to simple questions, knowledge graph technology is used to annotate the semantic relationships of legal clauses, generating a large number of knowledge "triples." The scale and quality of the knowledge directly affect the ability to understand the question and the quality of the answer. There are three annotation methods: First, manual annotation, which is more detailed and accurate, but time-consuming and labor-intensive; second, automatic annotation, which can process clauses with fixed sentence structures in batches, but requires writing programs one by one; and third, extracting concise questions from the question bank and converting them, but this is limited by the size of the question bank. The generation of the terms search tree in step two includes the following steps: Step 1: Constructing a Term Segmentation Counter: A term segmentation counter is a data structure used to store the term frequency (TF) of each term in a text. Each level of the question-and-answer system's directory structure has a counter for the parent title (Cup), a counter for the current title (Cnow), and a counter for the main text (Ctext). The current title and the parent title are counted separately because the current title has the strongest relevance to the content of that level and therefore carries higher weight. In the main text or the parent title, a higher frequency of a term does not necessarily mean a stronger relevance to that item. In this article, the TF value no longer refers solely to term frequency. Cup and Ctext only count whether a term appears or not, with values ​​of 0 or 1. The value in Cnow represents the proportion of each term to the total number of words. To calculate the TF value of term 'a' at a certain level, the weighted sum of the corresponding values ​​of the three term segmentation counters is calculated using the following formula: (1) In equation (1), Wup, Wnow, and Wtext represent the weights of each word segmentation counter; Step Two: Word Segmentation Counter Update: To ensure that the word segmentation counters at each level accurately reflect the strongest relevance between the word segment and its content, after constructing the word segmentation counter for each clause, Cnow and Ctext must update them from bottom to top, level by level, up to the top level representing the entire regulation. The update method between adjacent levels is as follows: For all words contained in the current level's counter, take the maximum value between the current level's counter and the previous level's counter to update the previous level's counter, that is: (2) In equation (2), This indicates Cnow or Ctext at this level. Indicates the parent element, either Cnow or Ctext. express The entire set of word segments recorded in the middle, and the setting of the word segmentation counter are different from the classic TF-IDF model. It was formed through repeated practice and optimization and is more in line with the characteristics of military regulations. Step 3: Calculate the IDF of the segmented words: The importance of a segment depends on the amount of information it provides for the positioning clause. This paper uses the end level, which is "clause" in military regulations, as the basic unit to calculate the inverse document frequency (IDF) value of each segmented word as a measure of its global importance. The formula is as follows: (3) In formula (3), N represents the total number of clauses in all regulations within the system, and Na represents the number of clauses containing the word segment 'a'. To calculate the TF-IDF value of the phrase V with a certain level, we need to sum the TF-IDF values ​​of each word segment in V with that level. The formula is as follows: (4) By constructing the terms search tree through the above steps, the abstract problem of relevance measurement is transformed into the problem of calculating word segments and TF-IDF values ​​at each level, which facilitates rapid computer solution.

2. The military regulations question-answering method based on retrieval and knowledge graph as described in claim 1, characterized in that, The military regulations Q&A includes the following steps: Step 1: Question Processing: The prerequisite for answering questions is to process the natural language question into data that can be understood by computers. The question processing includes three steps: question word replacement, specifying the search scope, and word segmentation. a. Question word replacement: Question words in natural language are useless for retrieval and should be removed after accurately understanding the questioner's intent. This system understands the intent by enumerating common questioning methods and can reduce the number of enumerations by replacing some words with synonyms. b. Specify search scope: For questions such as "What does Regulation X stipulate for Y?" or "What are the supplementary provisions of Regulation X?", after searching within the scope specified by the questioner, the level represented by the scope qualifier will be used as the initial search node. If no scope is specified, the search will start from the root node that contains all regulations. c. Question segmentation: After removing the scope-limiting words at the beginning and the interrogative words at the end, the remaining part of the question is segmented into words, and the question phrases are formed from content words. The vocabulary of "Military Terminology" and manually annotated military terms can enhance the segmentation effect of general word segmentation tools in the field of military regulations. Step Two: Answer Organization: Question processing clarifies the search scope and question phrases. Based on this, a question-and-answer session is completed through three steps: retrieving relevant clauses, matching semantic relationships, and outputting the answer. a. Retrieve relevant clauses: Using the question phrase and the initial search node representing the search scope as input, run the clause retrieval algorithm. The output answer list is the set of clauses with the highest relevance. If the answer list is empty, it means that no relevant clauses can be found. b. Matching semantic relations: The semantic relation annotation in the preprocessing process adds several knowledge triples to each clause. If the question matches the triples contained in the answer clause, a short answer is given. c. Outputting answers: Although short answers provide key information, the inquirer may want to know more detailed information. In addition, a lot of knowledge is difficult to express with triples, and many questions cannot be answered with short answers. Therefore, the source of the answer and the full text of the clause are needed as supplements to enhance persuasiveness and accuracy. Furthermore, in addition to the difficulty in solving the problem of not finding semantic relationships, knowledge graphs are not suitable for answering questions about chapter clauses. This system has established a complete directory hierarchy, which makes it easier to answer such questions. Step 3: Assisted Answering: Utilizing clause retrieval and semantic matching capabilities, an answering module is implemented. This module can attempt to answer true / false, single-choice, multiple-choice, and fill-in-the-blank questions. This function can be used to assist in the learning and testing of military regulations, and can also be used to add semantic relationships from the question bank. Treating the question stem as a question, it retrieves the most relevant legal clauses. For single-choice, multiple-choice, and fill-in-the-blank questions, it attempts to derive the answer by matching semantic relationships. For true / false questions or cases where semantic relationships cannot be matched, string matching is used to determine the answer. For single-choice and multiple-choice questions where the answer still cannot be determined...

3. The military regulations question-answering method based on retrieval and knowledge graph as described in claim 1, characterized in that, The experiment and analysis consisted of two steps: question-and-answer testing and comparative analysis.