Machine reading understanding candidate answer extraction method based on question extension
The problem word extension library and correlation judgment model are constructed through large language models, which solves the problems of insufficient external knowledge utilization and improper long text processing in the extraction of prose candidate answers, significantly improves the accuracy and recall rate of candidate answers, and provides better essay reading comprehension performance.
Patent Information
- Application Number
- CN202410922908.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-22
AI Technical Summary
The existing prose candidate answer extraction methods have problems such as insufficient external knowledge utilization and improper processing of long texts, which leads to low accuracy of candidate answers and the inability to effectively understand abstract words and maintain the correlation between sentences.
Use a large language model to build a prose question word extension library, enrich the question stem information through question rewriting and word extension, and design a global context coding module and a historical information coding module, combine it with the MLP module to make correlation judgments, and enhance the accuracy of candidate answers.
By expanding the content of the question and enhancing the correlation between the sentences of the article, the accuracy and recall of candidate answers are significantly improved, and better prose reading comprehension performance is provided.
Smart Images

Figure CN119003682A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a method for extracting candidate answers for machine reading comprehension based on question expansion. Background Art
[0002] Machine reading comprehension is an important research direction in the field of natural language processing. Its goal is to enable machines to understand the semantics of texts and answer corresponding questions. In particular, for prose machine reading comprehension, prose candidate answer extraction requires extracting sentences related to the question stem from the prose as the basis for answering the question. However, the question stem in prose reading comprehension is concise and the words are abstract, and the reading material is long, which makes the candidate answers more dispersed in the reading material, resulting in a low accuracy rate in extracting candidate answers. Therefore, more advanced methods are needed to analyze the question stem and article materials.
[0003] Extracting candidate answers for prose is a multi-fragment extraction task, and its difficulties mainly lie in:
[0004] (1) The content of prose questions is concise and the words are abstract, which makes it difficult to directly obtain effective information from the stem. In addition, there is little correspondence between the stem and the content of the article. If the question is directly matched with the content of the article, it is difficult for the machine to understand the abstract words in the question, resulting in a low accuracy rate of the extracted candidate answers. For example, Hou Qiji et al. proposed the Top-MRV model, which improved the accuracy of the model in extracting candidate answers by introducing an extended set of question words to divide the clause weights. Zhan et al. adopted the idea of contrastive learning and proposed a dynamic hard negative sampling training strategy, which can focus on the top-ranked answer candidate sentences while maintaining good stability. However, none of the above methods considers the use of external knowledge to enrich and expand the prose stem.
[0005] (2) Prose texts are long and candidate answers are more dispersed. Previous studies generally used sliding windows and direct truncation methods to process long texts, but the direct truncation method is bound to lose some article information and affect the recall rate of the model. Although the sliding window inputs the text into the model in segments, the window segmentation may cause important contextual information in the text to be segmented, reducing the model's ability to understand the entire text. Guan et al. also proposed using the self-attention weights inside the Transformer model to derive unimportant contextual information in the article, and by removing this information, the effect of streamlining the content of the article is achieved. Ding et al. proposed the CogLTX model, which selectively truncates articles to achieve the effect of shortening long articles. However, the above methods all have the problem of improper processing of long texts and fail to take into account that the context of prose texts is more closely related. The articles processed by the above methods lose the correlation between sentences, which brings difficulties in semantic understanding to the reading comprehension task.
[0006] In summary, the existing methods for extracting candidate answers from essays have problems such as insufficient use of external knowledge and improper processing of long texts. Therefore, the present invention aims to build an extended library of essay question words for the essay genre using the powerful generation capability of a large language model to expand and enrich the stem information of questions; use the segmentation technology to segment the long essay, and then build a relevance judgment model to judge the association between questions and sentences in the article, so as to enhance the accuracy of extracting candidate answers. Summary of the invention
[0007] In view of the fact that traditional text extraction methods are difficult to fully utilize external knowledge to expand questions and effectively process long texts, the present invention uses a large language model to construct a prose question word extension library and a relevance judgment model, and provides a machine reading comprehension candidate answer extraction method based on question expansion, which mainly includes (1) extracting words related to the question stem in the article based on a large language model (LLM) and constructing a question word extension library; secondly, using the powerful generation ability of the large language model to rewrite the original question stem, and further, using the question word extension library to expand the rewritten question to solve the problem of concise question stem content and abstract word use. (2) Designing a global context encoding module to encode the question and article sentences respectively. (3) Designing a historical information encoding module to integrate the global context information and historical information of the sentence. (4) Designing an MLP module to score the correlation between the question and the article sentences, and selecting the candidate answer related to the question according to the score.
[0008] To achieve the above object, the present invention adopts the following technical solutions:
[0009] A method for extracting candidate answers for machine reading comprehension based on question expansion, characterized by comprising the following steps:
[0010] S1, obtain the text Context and the data of the original question q;
[0011] S2. Construct a prose question expansion and candidate answer extraction model, including a large-model-based question expansion module and a relevance judgment model construction module. The large-model-based question expansion module includes question rewriting and question word expansion, wherein question rewriting is based on the text generation capability of the large-model to obtain a rewritten question; question word expansion is based on the specific person or environment mentioned in the question stem, and relevant descriptive words are found in the prose article and expanded into the rewritten question to obtain an expanded question;
[0012] The relevance judgment model construction module includes block processing, relevance judgment model and obtaining candidate answers, wherein the block processing is to deal with the processing of long texts; the relevance judgment model includes a global context encoding module, a historical information encoding module and an MLP module, which are used to obtain the relevance score between the extended question and the article sentence; obtaining the candidate answer is to select the article sentence with a higher relevance score;
[0013] S3. Input the text context and the original question q into the question expansion and candidate answer extraction model to obtain the correlation score between the expanded question and the article sentences, and select the top k blocks with higher correlation scores as candidate answers.
[0014] Furthermore, the problem in S2 is rewritten as follows:
[0015] 1) Prompt information establishment: rewrite the original question based on the content of the article, and require rewriting multiple questions from the original question. These rewritten questions are required to contain the context information of the text;
[0016] 2) Rewrite the question based on the prompt information: Input the original question, prose text and prompt information into the open source Qianwen Big Language Model to generate a question with similar semantics to the original question. The specific process is as follows:
[0017] {Q rewrite}=LLMQ([q;Context;Prompt])
[0018] Among them, {Q rewrite} represents the set of rewritten questions, LLMQ is the open source 1,000-question large language model, q represents the original question, Context represents the prose text, and Prompt represents the prompt information;
[0019] 3) Screening the rewritten questions: Calculate the similarity between the rewritten question Q and the text sentence S and the original question q respectively, sum the similarities between the two, sort them and select the question with the highest similarity score as the rewritten question.
[0020] Furthermore, the similarity calculation uses a similarity calculation method based on TFIDF;
[0021] The similarity between the rewriting problem Q and the text sentence S is cos(Q,S), and the calculation formula is as follows:
[0022]
[0023] Among them, d w Indicates the dimension of the word vector, tfidf(Q,w i ) represents word w i The TFIDF value in the rewriting problem Q, tfidf(S,w i ) represents word wi TFIDF value in sentence S of the prose article;
[0024] Similarly, calculate the similarity cos(Q,q) between the rewritten problem Q and the original problem q;
[0025] The sum is the sum of the above two similarities to obtain the final score of each rewriting problem. The calculation formula is as follows:
[0026] grade(Q,S,q)=cos(Q,S)+cos(Q,q).
[0027] Furthermore, the problem word expansion in S2 is specifically:
[0028] 1) Extraction of vocabulary for describing characters and environments: Use a large language model to identify the name entities or environments that appear in the prose text, and extract the corresponding character image or environment description words for each name entity;
[0029] 2) Extension word selection: The first m words describing the character image or environment in the text are selected as extension words. If the number of description words is less than m, all of them will be selected as question extension words, and then a question word extension library will be constructed.
[0030] 3) Use the question word extension library to explain abstract words: For the rewritten question Q, match the explanation word F corresponding to the abstract word from the question word extension library s , F s Combined with Q, we get the expanded question.
[0031] Furthermore, the block processing in S2 is specifically as follows:
[0032] The extended question is put into the b0 block, recorded as the question block b0(q), and the text is divided into n sub-blocks, recorded as text blocks b1,...,b n , the length of each sub-block is l = length / n, where length is the length of the entire text; for each clause s k If the length exceeds l, the clause that exceeds l will be divided into the next text block b. i+1 In the meantime, the next clause s k+1 will be divided into text block b i+2 And so on, until the number of sub-blocks reaches n.
[0033] Furthermore, the relevance judgment model in S2 includes a global context encoding module, a historical information encoding module and an MLP module, specifically:
[0034] Global context encoding module: Let the initial text sequence be X = (b0(q), b1, b2, ..., b n), use the pre-trained language model MacBERT to map the information in the block to a high-dimensional vector space, and obtain the vector representation M containing the text information. On this basis, use BiLSTM to establish the semantic association between each block and obtain the context information representation of the sentence in each block, where (g1,....,g n ) is recorded as the global context information representation G, and the specific calculation formula is as follows:
[0035] M=MacBERT(X)
[0036] (g0,g1,...,g n )=BiLSTM(M)
[0037] Historical information encoding module: Let the number of extracted text blocks be a, and the extracted text blocks be recorded as E = (e1,...,e a ), then the text block to be extracted is V = (v a+1 ,...,v n ), perform multi-head self-attention between the text blocks to be extracted, so that each text block to be extracted captures the context information provided by other remaining blocks, denoted as V MHSA ; In V MHSA Perform multi-head attention between the extracted text block E and obtain the historical information representation V of each text block to be extracted MHCA ; Finally, connect the global context representation G of the text block to be extracted and the historical information representation V MHCA , get the aggregation vector H, the specific calculation formula is as follows:
[0038] V MHSA =MHSA(V,V)
[0039] V MHCA =MHCA(V MHSA ,E)
[0040] H=(h1,...,h n-a )=concate(G[g a+1 :g n ],V MHCA )
[0041] Among them, G[g a+1 :g n ] represents the global vector g a+1 to g n part of;
[0042] MLP module: aggregate vector h i Input into MLP, and then pass through the sigmoid function to get the correlation score p between the extended question and the text block i , the specific calculation is as follows:
[0043] p i =sigmoid(Wh i +b)
[0044] Among them, W is a trainable parameter, b is a bias, and p is i ∈[0,1].
[0045] Going further, it also includes optimizing the model so that the correlation score obtained by the model is as close as possible to the standard score.
[0046] Furthermore, the model optimization adopts the method of minimizing the cross entropy loss, and the loss function Lossestimate is calculated as follows:
[0047]
[0048] Among them, y i Represents a text block b t The true label of each word in .
[0049] Through ablation experiments on prose datasets, the present invention has the following advantages compared with the prior art:
[0050] 1. Expand the question stem using a large language model: Compared with other models, the method proposed in this invention achieves the best results on prose datasets. First, the large language model is used to extract words related to the question stem in the article, and an extended library of question words is constructed. Secondly, the powerful generation ability of the large language model is used to rewrite the stem of the original question, and further, the extended library of question words is used to expand it. Compared with the original question, the expanded question is more specific and detailed, explains the abstract words in the question, and introduces some relevant plots in the text, providing the model with more contextual information.
[0051] 2. Construct a relevance judgment model: Although the large language model is used to expand the question, the accuracy of extracting candidate answers is low due to the long prose text and scattered candidate answers. In order to solve this limitation, the method proposed in the present invention constructs a relevance judgment model, divides the longer article information into blocks first, and then combines the global context encoding module and the historical information encoding module to judge the relationship between the question and the article sentence. This method enables the model to make judgments on the article sentences from the perspective of global information and historical information. Through experiments on prose reading comprehension datasets, the present invention can effectively improve the performance of the model in candidate answer extraction. This provides technical support for generative question and answering of prose reading comprehension. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A framework diagram of the prose question expansion and candidate answer extraction model of the present invention;
[0053] Figure 2 This is a schematic diagram of the processing when the clause exceeds the fixed length l. DETAILED DESCRIPTION
[0054] In order to further illustrate the technical solution of the present invention, the present invention is further described below through embodiments.
[0055] A method for extracting candidate answers for machine reading comprehension based on question expansion in this embodiment includes the following steps:
[0056] S1. Get the prose text Context and the data of the original question q, as shown in representation 1:
[0057] Table 1 Excerpts from the essay "Spring Breeze"
[0058]
[0059]
[0060] Among them, the original question q = "What environmental descriptions are used in the article to show the spring breeze of the south of the Yangtze River?" From the original question q, we can see that the content of the question is concise, the words are abstract, and there is little literal echo with the content of the article. If the question is directly matched with the content of the article, it will make it difficult for the machine to understand the abstract words in the question, such as "environmental description", and the connection between the question and the content of the article is difficult, which affects the matching of the question and the content of the article and reduces the accuracy of the machine in extracting candidate answers.
[0061] S2. Construct a prose question expansion and candidate answer extraction model, including a question expansion module based on a large language model and a relevance judgment model construction module. The question expansion module based on a large language model includes question rewriting and question word expansion, wherein question rewriting is based on the text generation capability of the large language model to obtain a rewritten question; question word expansion is based on the specific person or environment mentioned in the question stem, and relevant descriptive words are found in the prose article and expanded into the rewritten question to obtain an expanded question;
[0062] The relevance judgment model construction module includes block processing, relevance judgment model and obtaining candidate answers, wherein the block processing is to deal with the processing of long texts; the relevance judgment model includes a global context encoding module, a historical information encoding module and an MLP module, which are used to obtain the relevance score between the extended question and the article sentence; obtaining the candidate answer is to select the article sentence with a higher relevance score;
[0063] Specific:
[0064] Question rewriting: Through the analysis of prose data, the stems of most prose reading comprehension questions are relatively concise. For example, "What environmental descriptions are used in the article to show the spring breeze in the south of the Yangtze River?" The key information in the question is "environmental description". Relying only on this word, the model cannot effectively learn the connection between the question stem and the content of the article, which affects the model's judgment of the candidate answers. Therefore, for questions with less effective information in the stem, we use the powerful text generation ability of the big model to propose a question rewriting method based on the big model to enhance and expand the contextual information in the stem. The process is as follows:
[0065] 1) Prompt information establishment: for the original question q, fill in the prompt template to obtain the prompt sequence prompt = "rewrite the original question according to the content of the article, and require to rewrite the original question into 3 questions, and these rewritten questions are required to contain the context information of the text";
[0066] 2) Rewrite the question based on the prompt information: Input the original question q, the prose text Context, and the prompt information Prompt into the open source large language model to generate a question with similar semantics to the original question. The specific process is as follows:
[0067] {Q rewrite}=LLMQ([q;Context;Prompt])
[0068] Among them, {Q rewrite} represents the set of rewritten questions, LLMQ is the open source 1,000-question large language model, q represents the original question, Context represents the prose text, and Prompt represents the prompt information;
[0069] 3) Screening the rewritten questions: Calculate the similarity between the rewritten question and the prose text sentence S and the original question q respectively, calculate the similarity between the two and sum them up, sort and select the question with the highest similarity score as the rewritten question, and the obtained rewritten question Q = "What are the characteristics of the spring breeze in the south of the Yangtze River in the text?".
[0070] This embodiment uses a similarity calculation method based on TFIDF, and the specific calculation is shown in the following formula:
[0071]
[0072] tfidf(S,w i )=tf(S,w i )·idf(w i )
[0073] Among them, c(S,w i ) is the word w i The number of times it appears in sentence S, |{S}| is the total number of sentences, |{S:w i ∈S}| is the word containing wi The number of sentences. i ) and idf(w i ) are word w i The term frequency and inverse document frequency of .
[0074] The similarity between the rewriting problem Q and the prose text sentence S is cos(Q,S), and the calculation formula is as follows:
[0075]
[0076] Among them, d w Indicates the dimension of the word vector, tfidf(Q,w i ) represents word w i The TFIDF value in the rewriting problem Q, tfidf(S,w i ) represents word w i TFIDF value in sentence S of the prose article;
[0077] Similarly, calculate the similarity cos(Q,q) between the rewritten problem Q and the original problem q;
[0078] The sum is the sum of the above two similarities to obtain the final score of each rewriting problem. The calculation formula is as follows:
[0079] grade(Q,S,q)=cos(Q,S)+cos(Q,q).
[0080] Question word expansion: By analyzing various types of questions in prose, it is found that some abstract words, such as "image" and "environmental description", often appear in prose character image and environment description questions. It is difficult for the model to understand such abstract words, which may affect the similarity matching between the question and the article content, resulting in a decrease in the quality of candidate answer extraction for the prose. In order to solve this problem, you can find relevant character image descriptions from the article based on the specific characters mentioned in the question stem, and expand these character description words into the question. Similarly, for environmental description questions, find relevant environmental description words from the article and expand them into the question to concretize the abstract words so that the machine can better understand abstract concepts. The specific process is:
[0081] 1) Extraction of vocabulary for describing characters and environments: Use the large model to identify the name entities or environments that appear in the prose text, and extract the corresponding character image or environment description words for each name entity;
[0082] 2) Selection of extended words: In prose articles, on the one hand, the descriptions of some characters are relatively brief, resulting in a small number of image words available for extraction, while the main characters are often given more descriptions, resulting in a large number of image words that can be extracted. Therefore, there are differences in the number of descriptive words for different characters in the article. In order to obtain extended words for the question, the present invention formulates the following strategy: select the first 4 words of the character image or environment description words in the prose text as extended words. If the number of descriptive words is less than 4, all of them will be selected as question extended words, and then a question word extension library will be constructed.
[0083] 3) Use the question word extension library to explain abstract words: For the rewritten question Q, match the explanation word F corresponding to the abstract word "image" from the question word extension library s , F s Combined with Q, we get the extended question "What characteristics does the spring breeze in the south of the Yangtze River in the text have? (In late spring in March, the grass in the south of the Yangtze River is long, warblers are flying around, and flowers are blooming)".
[0084] Block processing: put the extended question into block b0, denoted as question block b0(q), and divide the prose text into n sub-blocks, denoted as text blocks b1,...,b n , the length of each sub-block is l = length / n, where length is the length of the entire prose text; for each clause s k If the length exceeds l, the clause that exceeds l will be divided into the next text block b. i+1 In the meantime, the next clause s k+1 will be divided into text block b i+2 And so on, until the number of sub-blocks reaches n, such as Figure 2 shown.
[0085] In data processing, the block processing of text is critical. Considering the correlation between the question sentence and the prose text, it can provide important information for candidate answer extraction. Therefore, the candidate answers are annotated in the training data set to indicate the correlation between the text in the block and the question. The specific form is as follows:
[0086]
[0087] The first block b0 in Block represents the question block, and the following n sub-blocks represent the text blocks. n If b i If it is a candidate answer, it is marked as 1,1,…,1; otherwise it is marked as 0,0,…,0.
[0088] Global context encoding module: Let the initial text sequence be X = (b0(q), b1, b2, ..., b n), use the pre-trained language model MacBERT to map the information in the block to a high-dimensional vector space, and obtain the vector representation M containing the text information. On this basis, use BiLSTM to establish the semantic association between each block and obtain the context information representation of the sentence in each block, where (g1,....,g n ) is recorded as the global context information representation G, and the specific calculation formula is as follows:
[0089] M=MacBERT(X)
[0090] (g0,g1,...,g n )=BiLSTM(M)
[0091] Historical information encoding module: Let the number of extracted text blocks be a, and the extracted text blocks be recorded as E = (e1,...,e a ), then the text block to be extracted is V = (v a+1 ,...,v n ), perform multi-head self-attention between the text blocks to be extracted, so that each text block to be extracted captures the context information provided by other remaining blocks, denoted as V MHSA ; In V MHSA Perform multi-head attention between the extracted text block E and obtain the historical information representation V of each text block to be extracted MHCA ; Finally, connect the global context representation G of the text block to be extracted and the historical information representation V MHCA , we get the aggregation vector H, the specific calculation formula is as follows:
[0092] V MHSA =MHSA(V,V)
[0093] V MHCA =MHCA(V MHSA ,E)
[0094] H=(h1,...,h n-a )=concate(G[g a+1 :g n ],V MHCA )
[0095] Among them, G[g a+1 :g n ] means to take out g from the global vector a+1 to g n part of;
[0096] MLP module: aggregate vector h i Input into MLP, and then pass through the sigmoid function to get the correlation score p between the extended question and the text block i , the specific calculation is as follows:
[0097] p i =sigmoid(Wh i +b)
[0098] Among them, W is a trainable parameter, b is a bias, and p is i ∈[0,1].
[0099] S3, input the prose text Context and the original question q into the prose question expansion and candidate answer extraction model, obtain the correlation score between the expanded question and the article sentence, and select the top k article blocks with higher correlation scores as candidate answers;
[0100] S4, optimize the model so that the correlation score obtained by the model is infinitely close to the standard score. The model optimization of the present invention adopts the method of minimizing the cross entropy loss, and the loss function Lossestimate calculation formula is as follows:
[0101]
[0102] Among them, y i Represents a text block b t The true label of each word in .
[0103] The model is implemented based on the PyTorch framework, the operating environment is Ubuntu 22.04, and the computing device is NVIDIATITAN RTX. The detailed experimental configuration and hyperparameter settings of this experiment are shown in Table 2.
[0104] Table 2 Model parameter configuration table
[0105]
[0106] The present invention is compared with a series of current text extraction methods (ColBERT, DRhard, MonoQA, Block-Skim, CogLTX and Top-MRV). This embodiment uses precision (P), recall (R) and F1 value to measure the model extraction performance. The comparison results are shown in Table 3 below.
[0107] Table 3 Comparison of experimental results
[0108]
[0109] It can be seen from Table 3 that the extraction method of the present invention is superior to other models in precision (P), recall rate (R) and F1 value. Therefore, the prose candidate answer extraction method combined with a large language model proposed in the present invention has significant advantages in prose text extraction.
Claims
1. A method for extracting candidate answers for machine reading comprehension based on question expansion, characterized in that: The following steps are involved: S1, obtain the text Context and the data of the original question q; S2. Construct a question expansion and candidate answer extraction model, including a question expansion module based on a large language model and a relevance judgment model construction module. The question expansion module based on a large language model includes question rewriting and question word expansion, wherein question rewriting is based on the text generation capability of the large language model to obtain a rewritten question; question word expansion is based on the specific person or environment mentioned in the question stem, and relevant descriptive words are found in the article and expanded into the rewritten question to obtain an expanded question; The relevance judgment model construction module includes block processing, relevance judgment model and obtaining candidate answers, wherein the block processing is to deal with long texts; the relevance judgment model includes a global context encoding module, a historical information encoding module and an MLP module, which are used to obtain the relevance score between the extended question and the article sentence; Obtaining candidate answers is to select sentences from articles with higher relevance scores; S3. Input the text context and the original question q into the question expansion and candidate answer extraction model to obtain the correlation score between the expanded question and the article sentences, and select the top k blocks with higher correlation scores as candidate answers.
2. According to the method for extracting candidate answers for machine reading comprehension based on question expansion according to claim 1, it is characterized in that: The problem in S2 is rewritten as follows: 1) Prompt information establishment: rewrite the original question based on the content of the article, and require rewriting multiple questions from the original question. These rewritten questions are required to contain the context information of the text; 2) Rewrite the question based on the prompt information: Input the original question, text, and prompt information into the open source 1,000-question language model to generate a question with similar semantics to the original question. The specific process is as follows: {Q rewrite }=LLMQ([q;Context;Prompt]) Among them, {Q rewrite } represents the set of rewritten questions, LLMQ is the open source 1,000-question large language model, q represents the original question, Context represents the text, and Prompt represents the prompt information; 3) Screening the rewritten questions: Calculate the similarity between the rewritten question Q and the text sentence S and the original question q respectively, sum the similarities between the two, sort them and select the question with the highest similarity score as the rewritten question.
3. The method for extracting candidate answers for machine reading comprehension based on question expansion according to claim 2, characterized in that: The similarity calculation uses a similarity calculation method based on TFIDF; The similarity between the rewriting problem Q and the text sentence S is cos(Q,S), and the calculation formula is as follows: Among them, d w Indicates the dimension of the word vector, tfidf(Q,w i ) represents word w i The TFIDF value in the rewriting problem Q, tfidf(S,w i ) represents word w i TFIDF value in sentence S of the prose article; Similarly, calculate the similarity cos(Q,q) between the rewritten problem Q and the original problem q; The sum is the sum of the above two similarities to obtain the final score of each rewriting problem. The calculation formula is as follows: grade(Q,S,q)=cos(Q,S)+cos(Q,q).
4. The method for extracting candidate answers for machine reading comprehension based on question expansion according to claim 3, characterized in that: The problem word expansion in S2 is specifically: 1) Extraction of vocabulary for describing characters and environments: Use a large language model to identify the name entities or environments that appear in the text, and extract the corresponding character image or environment description words for each name entity; 2) Extension word selection: select the first m words of the character image or environment description words in the text as extension words. If the number of description words is less than m, all of them will be selected as question extension words, and then build a question word extension library; 3) Use the question word extension library to explain abstract words: For the rewritten question Q, match the explanation word F corresponding to the abstract word from the question word extension library s , F s Combined with Q, we get the extended problem.
5. The method for extracting candidate answers for machine reading comprehension based on question expansion according to claim 4, characterized in that: The block processing in S2 is specifically as follows: The extended question is put into the b0 block, recorded as the question block b0(q), and the text is divided into n sub-blocks, recorded as text blocks b1,...,b n , the length of each sub-block is l = length / n, where length is the length of the entire text; for each clause s k If the length exceeds l, the clause that exceeds l will be divided into the next text block b. i+1 In the meantime, the next clause s k+1 will be divided into text block b i+2 And so on, until the number of sub-blocks reaches n.
6. The method for extracting candidate answers for machine reading comprehension based on question expansion according to claim 5, characterized in that: The relevance judgment model in S2 includes a global context encoding module, a historical information encoding module and an MLP module, specifically: Global context encoding module: Let the initial text sequence be X = (b0(q), b1, b2, ..., b n ), use the pre-trained language model MacBERT to map the information in the block to a high-dimensional vector space, and obtain the vector representation M containing the text information. On this basis, use BiLSTM to establish the semantic association between each block and obtain the context information representation of the sentence in each block, where (g1,....,g n ) is recorded as the global context information representation G, and the specific calculation formula is as follows: M=MacBERT(X) (g0,g1,...,g n )=BiLSTM(M) Historical information encoding module: Let the number of extracted text blocks be a, and the extracted text blocks be recorded as E = (e1,...,e a ), then the text block to be extracted is V = (v a+1 ,...,v n ), perform multi-head self-attention between the text blocks to be extracted, so that each text block to be extracted captures the context information provided by other remaining blocks, denoted as V MHSA ; In V MHSA Perform multi-head attention between the extracted text block E and obtain the historical information representation V of each text block to be extracted MHCA ; Finally, connect the global context representation G of the text block to be extracted and the historical information representation V MHCA , we get the aggregation vector H, the specific calculation formula is as follows: V MHSA =MHSA(V,V) In MHCA =MHCA(V MHSA ,E) H=(h1,...,h n-a )=concate(G[g a+1 :g n ],V MHCA ) Among them, G[g a+1 :g n ] represents the global vector g a+1 to g n part of; MLP module: aggregate vector h i Input into MLP, and then pass through the sigmoid function to get the correlation score p between the extended question and the text block i , the specific calculation is as follows, p i =sigmoid(Wh i +b) Among them, W is a trainable parameter, b is a bias, and p is i ∈[0,1].
7. The method for extracting candidate answers for machine reading comprehension based on question expansion according to claim 6, characterized in that: It also includes optimizing the model so that the correlation score obtained by the model is as close as possible to the standard score.
8. The method for extracting candidate answers for machine reading comprehension based on question expansion according to claim 7, characterized in that: The model optimization adopts the method of minimizing the cross entropy loss, and the loss function Lossestimate calculation formula is as follows: Among them, y i Represents a text block b t The true label of each word in .
