Target answer acquisition method and related device, electronic device and storage medium
By constructing a text library and using semantic analysis and keyword similarity algorithms to filter candidate texts, and combining this with a reading comprehension model to determine the target answer, the problem of high computational cost and low accuracy in existing technologies is solved, achieving efficient and accurate answer retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IFLYTEK CO LTD
- Filing Date
- 2022-11-29
- Publication Date
- 2026-06-02
AI Technical Summary
Existing intelligent question answering methods are computationally intensive and have low accuracy when retrieving answers from multi-source knowledge bases, and cannot effectively utilize semantic and keyword information for efficient retrieval.
By constructing a text database, using semantic analysis models and keyword similarity algorithms, candidate texts with high relevance to the query text are selected, and the target answer is determined by combining reading comprehension models, thus reducing the computational load of direct retrieval.
It improves the accuracy of retrieving target answers, reduces computational costs, and increases retrieval efficiency.
Smart Images

Figure CN115794995B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language understanding technology, and in particular to a method for obtaining target answers and related devices, electronic devices and storage media. Background Technology
[0002] With the application of intelligent customer service across various industries, retrieving corresponding answers from multi-source knowledge bases based on questions asked during human-to-human conversations has become an efficient method for intelligent question answering. However, multi-source knowledge typically includes files in formats such as documents, web pages, and images. Accurately retrieving answers from a large number of files of different formats has become a key problem that intelligent question answering methods need to solve.
[0003] Current intelligent question answering methods typically rely solely on the semantic or keyword information of the question to retrieve answers from a large database. This approach results in a large computational load and low accuracy. Summary of the Invention
[0004] The main technical problem addressed by this application is to provide a method for obtaining target answers, as well as related devices, electronic devices, and storage media, which can improve the accuracy of target answer retrieval and reduce computational costs.
[0005] To address the aforementioned technical problems, this application provides a method for obtaining a target answer, comprising: obtaining a pre-constructed text library and a query text; wherein the text library includes multiple base texts; obtaining candidate texts from the base texts based on at least a portion of the texts corresponding to the base texts and the query text, and determining the retrieval scores corresponding to the candidate texts; obtaining candidate answers from the candidate texts based on the paragraphs corresponding to each candidate text and the query text, and determining the parsing scores corresponding to the candidate answers; and determining a target answer from among the candidate answers based on the retrieval scores and the parsing scores.
[0006] To address the aforementioned technical problems, another technical solution adopted in this application is: providing a target answer acquisition device, comprising: an acquisition module for acquiring a pre-built text library and query text; wherein the text library includes multiple basic texts; a retrieval module for obtaining candidate texts from the basic texts based on at least a portion of the texts corresponding to the query texts and determining a retrieval score corresponding to the candidate texts; a parsing module for obtaining candidate answers from the candidate texts based on paragraphs corresponding to each candidate text and the query texts and determining a parsing score corresponding to the candidate answers; and a processing module for determining a target answer from each candidate answer based on the retrieval score and the parsing score.
[0007] To solve the above-mentioned technical problems, another technical solution adopted in this application is: to provide an electronic device, including a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the target answer acquisition method in the above-mentioned technical solution.
[0008] To solve the above-mentioned technical problems, another technical solution adopted in this application is to provide a computer-readable storage medium storing program instructions that can be executed by a processor, wherein the program instructions are used to implement the target answer acquisition method in the above-mentioned technical solution.
[0009] The beneficial effects of this application are as follows: Unlike existing technologies, the target answer retrieval method proposed in this application determines the text similarity between the query text and the base text through semantic information, keywords, and word / phrase categories, thereby extracting at least some candidate texts with high relevance to the query text from the text database. The target answer corresponding to the query text is then determined from the candidate texts, avoiding direct retrieval of the target answer from the text database and saving computational costs. Furthermore, utilizing candidate texts with high relevance to the query text for target answer retrieval helps improve retrieval accuracy. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0011] Figure 1 This is a flowchart illustrating one implementation method of the method for obtaining the target answer in this application;
[0012] Figure 2 This is a schematic diagram of an embodiment preceding step S102;
[0013] Figure 3 This is a flowchart of another embodiment prior to step S102;
[0014] Figure 4 This is a flowchart illustrating step S102 corresponding to one embodiment.
[0015] Figure 5 This is a flowchart illustrating step S103 in another embodiment.
[0016] Figure 6 This is a flowchart illustrating step S401 corresponding to one embodiment.
[0017] Figure 7This is a flowchart illustrating step S402 corresponding to one embodiment.
[0018] Figure 8 This is a schematic diagram of step S104 corresponding to one embodiment;
[0019] Figure 9 This is a schematic diagram of one embodiment of the target answer acquisition device of this application;
[0020] Figure 10 This is a schematic diagram of the structure of one embodiment of the electronic device of this application;
[0021] Figure 11 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0023] Please see Figure 1 , Figure 1 This is a flowchart illustrating one implementation method of the method for obtaining the target answer in this application. The method includes:
[0024] S101: Obtain a pre-built text library and query text. The text library includes several base texts.
[0025] In one embodiment, step S101 includes: obtaining multiple initial files in different formats, converting at least some of the initial files into base text of a uniform format and storing them to obtain a text library composed of multiple base texts. In response to a user needing to retrieve an answer to a question from the constructed text library, the text input by the user is obtained and used as the query text; alternatively, speech recognition technology can be used to process the user's speech content to identify the user's question and convert it into query text.
[0026] In another implementation, the process of building the text library includes: obtaining initial files from multiple data sources, and extracting text information from the initial files based on a parsing method that matches the data sources.
[0027] Specifically, multiple initial files are obtained, including Word, PDF, image documents, or web page documents, and the corresponding parsing method is determined according to the file format of the initial files in order to extract the text information in the initial files.
[0028] For example, when the initial file is in Word or PDF format, appropriate document reading tools can be used to extract text, tables, images, and some metadata. The text information is then stored in paragraph order, following the context of the original file, while preserving important formatting information such as font size, font style, and bolding. Alternatively, the Word file can be converted to XML format, and the corresponding text information can be obtained from the XML file. Document reading tools such as PyMuPDF or XML parsing tools can be used.
[0029] Additionally, when the initial file is an image or an image-based PDF document, OCR (Optical Character Recognition) technology is used to scan the corresponding initial file to obtain each character and its corresponding coordinate information. Based on this coordinate information, the text is then concatenated into lines, and lines belonging to the same paragraph are sequentially concatenated into paragraphs. These paragraphs are then stored according to their context. When the initial file is a webpage document, it is converted to HTML format to extract the text information from the webpage.
[0030] Furthermore, the content of each extracted initial file is formatted according to a preset layout, and corresponding headings and paragraph information are marked, so that each initial file is converted into a unified structured base text. All structured base text is stored to form a text library. The LayoutLM model can be used to perform layout analysis on the content of the extracted initial files to mark the corresponding headings and paragraphs.
[0031] S102: Based on at least a portion of the base text and the text corresponding to the query text, obtain candidate text from the base text and determine the retrieval score corresponding to the candidate text.
[0032] In one embodiment, before step S102, the following steps are performed on each base text: the partial paragraphs at the starting position in the base text, as well as the headings and the partial paragraphs following the headings at each level in the base text, are taken as the paragraphs to be retrieved corresponding to the base text.
[0033] Specifically, for each base text, the first N paragraphs, along with the headings at each level and the paragraphs following those headings, are retrieved to obtain multiple searchable paragraphs corresponding to the base text. Since these multiple searchable paragraphs contain headings at each level, each heading is merged with the first paragraph under that heading. Specifically, the heading can be added as a statement at the beginning of the corresponding paragraph. It should be noted that N in the first N paragraphs can be any non-zero natural number, which can be set according to actual needs; furthermore, the paragraphs following the headings can be the first paragraph after the heading, or it can be two or three paragraphs after the heading, etc.
[0034] In one specific implementation, please refer to Figure 2 , Figure 2 This is a schematic diagram corresponding to an embodiment prior to step S102. Specifically, as shown... Figure 2 As shown, the basic text includes heading A and heading B, with paragraphs a, b, and c following heading A, and paragraphs d and e following heading B. Before step S102, the two paragraphs at the beginning of the basic text, as well as the headings at each level and the first paragraph following each heading, are taken as the paragraphs to be retrieved in the basic text. Heading A is then merged with its first paragraph (paragraph a), and the merged paragraphs a and b are taken as part of the paragraphs to be retrieved in the basic text; similarly, heading B is merged with its first paragraph (paragraph d), and the merged paragraph d is taken as one of the paragraphs to be retrieved in the basic text.
[0035] In this embodiment, the first N paragraphs of different base texts contain a summary of the entire text, and the headings at each level are summaries of the corresponding paragraph content. Therefore, by obtaining the first N paragraphs of the base text, as well as the headings at each level and some paragraphs after each heading, it is possible to represent the complete base text with less text content, thereby reducing the cost of subsequent calculations and improving the efficiency of target answer retrieval.
[0036] Optionally, in other embodiments, before step S102, only the first N paragraphs of the base text and the headings at each level may be used as the corresponding paragraphs to be retrieved. Specifically, in response to a partial heading being embedded in the first N paragraphs, the heading is merged with the first paragraph under that heading, and the merged first N paragraphs are used as the paragraphs to be retrieved; in response to a partial heading being located after the first N paragraphs, each heading after the first N paragraphs is used as a separate paragraph to be retrieved.
[0037] Further, please refer to Figure 3 , Figure 3 This is a flowchart illustrating another implementation method prior to step S102. Specifically, the process prior to step S102 includes:
[0038] S201: Based on the semantic information corresponding to the query text and the paragraph to be retrieved, determine the semantic similarity between the query text and the base text.
[0039] In one embodiment, the query text and the paragraph to be retrieved are input into a semantic analysis model to obtain a query vector that matches the semantic information of the query text, a paragraph vector that matches the semantic information of the paragraph to be retrieved, and a word / phrase vector that matches the semantic information of the words and phrases in the paragraph to be retrieved. The semantic analysis model includes a cascaded BERT module, a pooling layer, and a fully connected layer.
[0040] Specifically, for multiple retrieval paragraphs corresponding to the base text, the content of each retrieval paragraph is segmented using periods as units to obtain multiple words and phrases corresponding to each retrieval paragraph. The query text is input into the constructed BERT model to obtain the query vector corresponding to the query text; the retrieval paragraphs are input into the BERT model to obtain the paragraph vector corresponding to the retrieval paragraph; all words and phrases in the retrieval paragraphs are input into the BERT model to obtain the word and phrase vector corresponding to each word and phrase. The obtained query vectors, paragraph vectors, and word and phrase vectors are input into the pooling layer in the semantic analysis model for downsampling processing, so that the query vectors, paragraph vectors, and word and phrase vectors have the same dimension. The query vectors, paragraph vectors, and word and phrase vectors with the same dimension are input into the fully connected layer to increase the semantic abstraction capability, and so that the query vectors output by the fully connected layer contain more semantic information about the corresponding query text, the paragraph vectors contain more semantic information about the corresponding retrieval paragraphs, and the word and phrase vectors contain more semantic information about the corresponding words and phrases.
[0041] Furthermore, the vector similarity between the query vector and the paragraph vector and the word / sentence vector is determined, and the vector similarity with the largest value is taken as the semantic similarity between the query text and the base text.
[0042] Specifically, the first cosine distance between the query vector and the paragraph vector corresponding to each paragraph to be retrieved is obtained, and this first cosine distance is used as the vector similarity between the corresponding query vector and the corresponding paragraph vector. The second cosine distance between the query vector and the word / phrase vector of each word / phrase in each paragraph to be retrieved is also obtained, and this second cosine distance is used as the vector similarity between the corresponding query vector and the corresponding word / phrase vector. Then, for each base text, the maximum value between the vector similarity between the query vector and the paragraph vector of each paragraph to be retrieved, and the vector similarity between the query vector and the word / phrase vector of each word / phrase, is used as the semantic similarity between the corresponding base text and the query text. By calculating the semantic similarity between the base text and the query text, it is helpful to filter out some base texts with high relevance to the query text from the text library based on semantic similarity, thereby improving the accuracy of the retrieved target answer.
[0043] Alternatively, in this embodiment, the corresponding vector similarity can be determined by calculating the Euclidean distance or Manhattan distance between the query vector and the paragraph vector and the word / phrase vector, respectively.
[0044] In another implementation, for each base text, only the vector similarity between the query vector and the paragraph vector corresponding to each paragraph to be retrieved can be obtained, and the maximum value among the vector similarities corresponding to all paragraphs to be retrieved can be used as the semantic similarity between the corresponding base text and the query text; or, for all paragraphs to be retrieved in each base text, only the vector similarity between the word and sentence vectors corresponding to all words and sentences and the query vector can be obtained, and the maximum value among the vector similarities corresponding to all words and sentences can be used as the semantic similarity between the corresponding base text and the query text.
[0045] S202: Determine the keyword similarity between the query text and the base text based on the keywords corresponding to the query text and the paragraph to be retrieved.
[0046] In one embodiment, step S202 includes: extracting keywords from the query text and the paragraph to be searched, and calculating the word similarity between each keyword in the query text and all keywords in the paragraph to be searched.
[0047] Specifically, the first step is to perform word segmentation on the query text and the target paragraph in the base text to extract all words from both the query text and the target paragraph in the base text. All words in the query text are then used as keywords. Specifically, when the query text is in Chinese, word segmentation tools such as jieba and SnowNLP can be used to segment it into multiple individual words; when the query text is in English, word segmentation tools such as Keras and Spacy can be used to segment it into multiple individual words.
[0048] Furthermore, the paragraph to be retrieved is replaced with the corresponding base text. The BM25 retrieval algorithm is used to calculate the word similarity between each keyword in the query text and all keywords in the base text, and the sum of the word similarities corresponding to all keywords in the query text is calculated. The specific calculation formula is as follows:
[0049]
[0050] Among them, RSV d This represents the sum of similarities between all words corresponding to the query text; q represents the query text, t represents any keyword in the query text, N represents the total number of base texts in the text database, d represents any base text, and df represents the total number of base texts. t This indicates the number of underlying texts containing the keyword t. This indicates the similarity between keyword 't' and the base text. (tf) td L represents the frequency of keyword t in the base text d. d L represents the length of the underlying text d. ave This represents the average length of all base texts. The variable k1 is an adjustable positive parameter, and b is an adjustable parameter greater than 0 and less than 1. tf tq This indicates the frequency of keyword 't' in the query text, and k3 is an adjustable parameter. This indicates the weight of keyword t in the query text.
[0051] Furthermore, the sum of the word similarities corresponding to the query text is normalized to obtain the keyword similarity between the query text and the base text. The obtained RSV can be normalized using the softmax function. d The process involves processing to obtain the keyword similarity between the query text q and the base text d. This implementation describes the relevance between the query text and the base text by obtaining the keyword similarity, which helps to filter out base texts with high relevance to the query text from the text library, thereby improving the efficiency of target file retrieval.
[0052] In another embodiment, step S202 may also include: calculating the word similarity between each keyword in the query text and all keywords in the base text, and normalizing the sum of all word similarities corresponding to the query text to obtain the keyword similarity between the query text and the base text. That is, the keyword similarity is calculated using the complete base text and the query text, rather than using the corresponding search paragraph of the base text to replace the base text. By using the complete base text to calculate the keyword similarity, the accuracy of the obtained keyword similarity is higher.
[0053] S203: Determine the part-of-speech similarity between the query text and the base text based on the word and sentence categories corresponding to the words and sentences in the query text and the paragraph to be retrieved.
[0054] In one embodiment, step S203 includes: extracting words and phrases and their corresponding word and phrase categories from the query text and the base text respectively; classifying word and phrase categories included in both the query text and the base text as the first category; and classifying word and phrase categories included only in the query text as the second category. Each word and phrase category has a corresponding category weight.
[0055] Specifically, word segmentation tools are used to segment the query text and the base text to extract all words from the query text as query words, and all words from the base text as search terms. The word / phrase category corresponding to each query word and each search term is determined. If at least one query word in the query text and at least one search term in the base text belong to the same word / phrase category, the corresponding word / phrase category belongs to the first category. If, for a word / phrase category to which at least one query word in the query text belongs, there is no corresponding search term in the base text belonging to that word / phrase category, then that word / phrase category belongs to the second category.
[0056] The process of determining the word / phrase category corresponding to each query term and each term to be retrieved includes: pre-constructing a corpus containing multiple word / phrase categories, with each category containing multiple reference terms; determining the word / phrase category corresponding to each query term by comparing each query term in the query text with the reference terms in the constructed corpus; and determining the word / phrase category corresponding to each term to be retrieved by comparing each term to be retrieved in the base text with the reference terms in the constructed corpus.
[0057] For example, a corpus is constructed containing business term categories, operation term categories, attribute term categories, command term categories, and other term categories. Each term category has multiple different reference terms; for example, the business term category includes reference terms such as "phone bill recharge" and "deposit money." Each term category has a corresponding category weight; for example, the category weight for the business term category is 0.28, the operation term category is 0.2, the attribute term category is 0.15, the command term category is 0.06, and the other term categories are 0.04. If the query text contains query terms belonging to the business term category and the command term category, and the base text also contains query terms belonging to the business term category and the command term category, then both the business term category and the command term category belong to the first category. If the query text contains query terms belonging to the operation term category, but the base text does not contain query terms belonging to the operation term category, then the operation term category belongs to the second category.
[0058] Furthermore, a first reference value is obtained by summing the category weights corresponding to all word and phrase categories belonging to the first category, and a second reference value is obtained by summing the category weights corresponding to all word and phrase categories belonging to the second category. That is, the category weights corresponding to all word and phrase categories under the first category are summed to obtain the first reference value; and the category weights corresponding to all word and phrase categories under the second category are summed to obtain the second reference value.
[0059] Furthermore, based on the sum and difference between the first and second reference values, the part-of-speech similarity between the query text and the base text is obtained. The specific calculation formula is as follows:
[0060]
[0061] Here, `score` represents the part-of-speech similarity between the query text and the base text, `X` represents the first reference value, and `Y` represents the second reference value; `m` and `n` are adjustable positive parameters, and the sum of `m` and `n` is 1. In this embodiment, the value of `m` is 0.67, and the value of `n` is 0.33. Of course, in other embodiments, the specific values of `m` and `n` can be adjusted based on the experimental results of multiple experiments.
[0062] In another embodiment, step S203 may also use a word segmentation tool to extract only entity words from the query text and the paragraph to be retrieved, and determine the part-of-speech similarity between the query text and the corresponding base text based on the entity words and their corresponding word / phrase categories. Entity words include nouns and pronouns in the text.
[0063] Furthermore, after obtaining the semantic similarity, keyword similarity, and part-of-speech similarity between the query text and each basic text, the implementation process of step S102 includes: obtaining at least some basic texts from the text library, and sorting the basic texts in the text library in descending order of text similarity according to the obtained text similarity between the query text and the basic texts, and taking the top certain number of basic texts as candidate texts.
[0064] In one implementation, please refer to Figure 4 , Figure 4 This is a flowchart illustrating step S102 in one embodiment. Specifically, step S102 includes:
[0065] S301: The target candidate text set is obtained by combining the base texts in the text library that rank first in terms of semantic similarity, the base texts that rank second in terms of keyword similarity, and the base texts that rank third in terms of part-of-speech similarity.
[0066] Specifically, in response to determining the semantic similarity between the query text and each base text in step S201, the base texts in the text library are sorted in descending order of semantic similarity value, and the base texts with the highest first proportion are extracted to obtain multiple base texts with high semantic relevance to the query text. For example, if the text library contains 10 base texts and the first proportion is 30%, the semantic similarity values are arranged in descending order, and the base texts corresponding to the top three semantic similarities are extracted.
[0067] Similarly, in response to determining the keyword similarity between the query text and the base text in step S202, the base texts in the text library are sorted in descending order of keyword similarity value, and the base texts ranking in the second-highest proportion are extracted to obtain multiple base texts with high keyword similarity to the query text. And, in response to determining the part-of-speech similarity between the query text and the base text in step S203, the base texts in the text library are sorted in descending order of part-of-speech similarity value, and the base texts ranking in the third-highest proportion are extracted to obtain multiple base texts with high part-of-speech similarity to the query text, as described above.
[0068] After extracting multiple basic texts based on semantic similarity, keyword similarity, and part-of-speech similarity, the combined set of these basic texts is used as the target candidate text set. The basic texts in the target candidate text set have a high relevance to the query text; obtaining this target candidate text set helps improve the efficiency of target answer retrieval. Furthermore, in this embodiment, the first, second, and third proportions can be the same, such as 20% or 30%, and can be set according to actual needs; alternatively, the first, second, and third proportions can be different proportions.
[0069] Optionally, in other embodiments, step S301 includes: obtaining a target candidate text set based on the combination of the first number of base texts ranked first in semantic similarity, the second number of base texts ranked second in keyword similarity, and the third number of base texts ranked third in part-of-speech similarity in the text library. The first, second, and third numbers can be the same, such as 5 or 10; or the first, second, and third numbers can be different.
[0070] S302: Using the basic texts in the target candidate text set as candidate texts, obtain the retrieval score corresponding to the candidate texts based on semantic similarity, keyword similarity, and part-of-speech similarity. The retrieval score is positively correlated with semantic similarity, keyword similarity, and part-of-speech similarity.
[0071] In this embodiment, step S302 includes: taking all basic texts in the target candidate text set as candidate texts, and for each candidate text, using the average of the corresponding semantic similarity, keyword similarity, and part-of-speech similarity as the retrieval score of the corresponding candidate text. Alternatively, assigning corresponding weight values to semantic similarity, keyword similarity, and part-of-speech similarity respectively, multiplying each semantic similarity, keyword similarity, and part-of-speech similarity by its corresponding weight, and using the sum of the products as the retrieval score of the corresponding candidate text. Or, for each candidate text, using the maximum value among the corresponding semantic similarity, keyword similarity, and part-of-speech similarity as the retrieval score of the corresponding candidate text.
[0072] This implementation obtains multiple candidate texts to facilitate the retrieval of the target answer from among them, thereby avoiding direct retrieval from a large text database and saving computational costs. Furthermore, based on the text similarity between the candidate texts and the query text, a retrieval score is determined for each candidate text. This score is then used to filter the obtained answers, thereby improving the accuracy of obtaining the target answer.
[0073] Optionally, in another embodiment, before selecting the base texts in the target candidate text set as candidate texts in step S302, the method further includes: obtaining the remaining text set in the text library excluding the target candidate text set; using the maximum value among the semantic similarity, keyword similarity, and part-of-speech similarity of the base texts in the remaining text set as the screening similarity; and obtaining the candidate text set based on the base texts in the remaining text set whose similarity ranks in the fourth proportion. The fourth proportion can be 20% or 30%, etc.
[0074] Furthermore, the base text in the candidate text set is added to the target candidate text set, and the target candidate text set is updated.
[0075] Furthermore, after obtaining the updated target candidate text set, all the base texts in the updated target candidate text set are used as candidate texts.
[0076] S103: Based on the paragraphs corresponding to each candidate text and the query text, obtain candidate answers from the candidate text and determine the parsing score corresponding to the candidate answers.
[0077] In one embodiment, the implementation process of step S103 includes: inputting the query text and candidate text into the reading comprehension model, and the reading comprehension model analyzing each paragraph of the candidate text and the query text to obtain the candidate answer corresponding to the query text from each paragraph of the candidate text, as well as the parsing score corresponding to each candidate answer.
[0078] In another implementation, please refer to Figure 5 , Figure 5 This is a flowchart illustrating step S103 in another embodiment. Specifically, in this embodiment, step S103 includes:
[0079] S401: Based on the semantic information and keywords corresponding to the query text and candidate text, extract at least some paragraphs from the candidate text as candidate paragraphs.
[0080] Specifically, in response to the candidate text containing multiple headings, before step S401, the headings are merged with the first paragraph under that heading.
[0081] Further, please refer to Figure 6 , Figure 6 This is a flowchart illustrating step S401 in one embodiment. The implementation process of step S401 includes: determining a first score between each paragraph in the query text and the candidate text based on the similarity between the semantic information corresponding to the query text and the candidate text, and determining a second score between each paragraph in the query text and the candidate text based on the similarity between the keywords corresponding to the query text and the candidate text.
[0082] Specifically, the query text and each paragraph of the candidate text are first input into the semantic analysis model to obtain a query vector that matches the semantic information of the query text and a paragraph vector that matches the semantic information of each paragraph of the candidate text. The vector similarity between the query vector and the paragraph vector is used as the first score for the corresponding query text and the corresponding paragraph. The specific structure of the semantic analysis model and the method for calculating the vector similarity can be referred to step S201 in the above implementation method, and will not be elaborated here.
[0083] Then, keywords are extracted from each paragraph of the query text and candidate text using a word segmentation tool. The word similarity between each keyword in the query text and each keyword in each paragraph of the candidate text is calculated. The sum of all word similarities for the query text is normalized to obtain the second score between the query text and each paragraph of the candidate text. The specific process for obtaining the second score between the query text and the corresponding paragraph can be referred to the keyword similarity acquisition process in step S202, and will not be elaborated here.
[0084] It should be noted that in other implementations, the second score of the paragraphs in the query text and candidate text can be obtained first, and then the first score can be calculated.
[0085] Furthermore, based on the first and second scores, the third score corresponding to each paragraph in the candidate text is determined, and the paragraphs with the highest third scores in the candidate text are extracted as candidate paragraphs.
[0086] Specifically, such as Figure 6 As shown, for each candidate text, a first weight is assigned to the first score of each paragraph in the candidate text, and a second weight is assigned to the second score of each paragraph in the candidate text. The first score is multiplied by the first weight to obtain a first product, and the second score is multiplied by the second weight to obtain a second product. The sum of the first and second products is used as the third score of the corresponding paragraph. All paragraphs in the candidate text are sorted in descending order of their third scores, and the paragraphs in the top five are selected as candidate paragraphs. By combining semantic similarity and keyword similarity to obtain the third score of each paragraph in the candidate text, the third score can more comprehensively represent the similarity between the corresponding paragraph and the query text, which helps to improve the accuracy of obtaining the target answer.
[0087] In addition, in this embodiment, the fifth ratio can be 20% or 30%, etc., depending on actual needs; the sum of the first weight and the second weight is 1, and the specific values of the first weight and the second weight can be adjusted according to actual needs. It should be noted that when the first weight is large, the third score mainly relies on semantic similarity to represent the relevance between the query text and the corresponding paragraph; when the second weight is large, the third score mainly relies on keyword similarity to represent the relevance between the query text and the corresponding paragraph.
[0088] Optionally, in other embodiments, after obtaining the third score corresponding to each paragraph in each candidate text, the paragraphs in all candidate texts can be sorted in descending order of the third score value, and the paragraph with the highest preset value is selected as the candidate paragraph.
[0089] S402: Perform sentence parsing on the candidate paragraphs, obtain candidate answers from the candidate paragraphs, and determine the parsing score corresponding to the candidate answers.
[0090] In one implementation, please refer to Figure 7 , Figure 7 This is a flowchart illustrating step S402 corresponding to one embodiment. Figure 7 As shown, the query text and the candidate paragraphs obtained in step S401 are input into the reading comprehension model, so that the reading comprehension model outputs the corresponding candidate answer and the parsing score of the candidate answer based on the input query text and candidate paragraphs. The higher the parsing score, the higher the accuracy of the corresponding candidate answer is considered.
[0091] Furthermore, before parsing candidate paragraphs, a reading comprehension model can be pre-built and trained using multiple training datasets to obtain a trained reading comprehension model. The training process for this model can be implemented using various open-source algorithms, which will not be detailed here.
[0092] Optionally, in another embodiment, step S402 may further include: inputting candidate paragraphs into a reading comprehension model so that the reading comprehension model decomposes the candidate paragraphs according to delimiters to obtain multiple delimited statements, and determines the parsing score corresponding to the candidate paragraphs based on the semantic information corresponding to the query text and the semantic information corresponding to each delimited statement.
[0093] Specifically, the reading comprehension model segments candidate paragraphs into multiple delimited statements, using periods as units. For each candidate paragraph, the model obtains a query vector that matches the semantic information of the query text, and delimited statement vectors that match the semantic information of each delimited statement. The semantic similarity between the query vector and each delimited statement vector is determined. The maximum semantic similarity among all delimited statements in the candidate paragraph is taken as the parsing score for that candidate paragraph, and the delimited statement corresponding to the maximum semantic similarity is taken as the candidate answer for that candidate paragraph.
[0094] S104: Determine the target answer from among the candidate answers based on the retrieval score and the parsing score.
[0095] In one implementation, please refer to... Figure 7 For each candidate paragraph, a corresponding retrieval weight is assigned to the retrieval score of the candidate text containing the candidate paragraph, and a corresponding parsing weight is assigned to the parsing score of the candidate answer corresponding to the candidate paragraph. The retrieval score is multiplied by the retrieval weight to obtain a third reference value, and the parsing score is multiplied by the parsing weight to obtain a fourth reference value. The sum of the third and fourth reference values is used as the comprehensive score of the corresponding candidate answer.
[0096] Furthermore, the candidate answer with the highest comprehensive score is selected as the target answer for the query text. By setting retrieval weights and parsing weights, the retrieval score of the candidate text containing the candidate paragraph is combined with the parsing score of the corresponding candidate answer, so that the resulting comprehensive score can more accurately represent the accuracy of the corresponding candidate answer.
[0097] In this embodiment, the sum of the retrieval weight and the parsing weight is 1. Furthermore, in response to the high retrieval scores of the candidate text containing multiple candidate paragraphs, the comprehensive score is calculated primarily based on the retrieval scores of the candidate text containing the candidate paragraphs, thus ensuring that the retrieval weight is greater than the parsing weight; in response to the low retrieval scores of the candidate text containing multiple candidate paragraphs, the target score is calculated primarily based on the parsing scores of the candidate answers corresponding to the candidate paragraphs, thus ensuring that the parsing weight is greater than the retrieval weight.
[0098] In one implementation scenario, for all candidate paragraphs, the average retrieval score corresponding to each candidate paragraph is compared with the average parsing score of the corresponding candidate answer. If the average retrieval score is greater than the average parsing score, the retrieval weight is increased by the parsing weight; if the average retrieval score is less than the average parsing score, the retrieval weight is decreased by the parsing weight. By determining the corresponding retrieval weight and parsing weight based on the retrieval score and parsing score of the candidate paragraph, the overall score can better represent the accuracy of the corresponding candidate answer, and the flexibility of obtaining the target answer is greatly improved.
[0099] Optionally, in other implementation scenarios, the above-mentioned retrieval weight and parsing weight can both be 0.5; or, they can be obtained by relevant technical personnel through reverse engineering based on multiple experimental data.
[0100] In one specific implementation, please refer to Figure 8 , Figure 8 This is a schematic diagram of an embodiment corresponding to step S104. Specifically, as shown... Figure 8 As shown, in response to the query text "How long does it take for manual review and encoding?", the method proposed in the above implementation obtains two candidate paragraphs (Search 1 and Search 2), as well as the corresponding candidate answers and their corresponding parsing scores. Candidate answer 1 is the correct answer the user wants. However, the parsing score for candidate answer 1 is 0.55, lower than that for candidate answer 2. If only the candidate answer with the highest parsing score is used as the target answer, it will result in an incorrect target answer retrieval. If both the search score and the corresponding parsing score are weighted at 0.5, and the target scores for the corresponding candidate answers are obtained based on the search score, parsing score, and their corresponding weights, then the target score for candidate answer 1 is 0.722 × 0.5 + 0.55 × 0.5 = 0.636, and the target score for candidate answer 2 is 0.51 × 0.5 + 0.65 × 0.5 = 0.58. Therefore, the candidate answer corresponding to the highest target score is candidate answer 1, which is the correct answer.
[0101] The proposed method for obtaining the target answer determines the text similarity between the query text and the base text through semantic information, keywords, and word / phrase categories. This allows for the extraction of candidate texts from a text database that are at least partially relevant to the query text. The target answer corresponding to the query text is then determined from these candidate texts, avoiding direct retrieval from the text database and saving computational costs. Furthermore, utilizing candidate texts highly relevant to the query text for target answer retrieval helps improve the accuracy of the retrieved target answer.
[0102] Please see Figure 9 , Figure 9 This is a schematic diagram of one embodiment of the target answer acquisition device of this application. The target answer acquisition device includes an acquisition module 10, a retrieval module 20, a parsing module 30, and a processing module 40 that are coupled to each other.
[0103] Specifically, module 10 is used to obtain a pre-built text library and query text. The text library includes multiple base texts.
[0104] The retrieval module 20 is used to obtain candidate texts from the basic text and determine the retrieval scores corresponding to the candidate texts based on at least a portion of the basic texts and the texts corresponding to the query texts.
[0105] Before obtaining candidate texts from the base texts and determining the retrieval scores corresponding to the candidate texts, based on at least a portion of the base texts and the texts corresponding to the query texts, the process further includes performing the following steps for each base text: taking a portion of the paragraphs at the beginning of the base text, as well as the headings at each level of the base text and the paragraphs following the headings, as the paragraphs to be retrieved corresponding to the base texts; determining the semantic similarity between the query text and the base texts based on the semantic information corresponding to the query texts and the paragraphs to be retrieved; determining the keyword similarity between the query text and the base texts based on the keywords corresponding to the query texts and the paragraphs to be retrieved; and determining the part-of-speech similarity between the query text and the base texts based on the word and sentence categories corresponding to the words and sentences in the query texts and the paragraphs to be retrieved.
[0106] In one implementation scenario, the target answer acquisition device proposed in this application further includes a semantic similarity determination module 21, a keyword similarity determination module 22, and a part-of-speech similarity determination module 23 coupled to the retrieval module 20.
[0107] The semantic similarity determination module 21 is used to input the query text and the paragraph to be retrieved into the semantic analysis model to obtain a query vector that matches the semantic information of the query text, a paragraph vector that matches the semantic information of the paragraph to be retrieved, and a word / phrase vector that matches the semantic information of the words and sentences in the paragraph to be retrieved. The semantic analysis model includes a cascaded BERT module, a pooling layer, and a fully connected layer. The module determines the vector similarity between the query vector and the paragraph vector and the word / phrase vector, and takes the vector similarity with the largest value as the semantic similarity between the query text and the base text.
[0108] The keyword similarity determination module 22 is used to extract keywords from the query text and the paragraph to be searched, respectively, and calculate the word similarity between each keyword in the query text and all keywords in the paragraph to be searched; the sum of all word similarities corresponding to the query text is normalized to obtain the keyword similarity between the query text and the base text.
[0109] The part-of-speech similarity determination module 23 is used to extract words and phrases and their corresponding word and phrase categories from the query text and the base text respectively. The word and phrase categories included in both the query text and the base text are taken as the first category, and the word and phrase categories included only in the query text are taken as the second category. Each word and phrase category has a corresponding category weight. A first reference value is obtained based on the sum of the category weights corresponding to all word and phrase categories belonging to the first category, and a second reference value is obtained based on the sum of the category weights corresponding to all word and phrase categories belonging to the second category. The part-of-speech similarity between the query text and the base text is obtained based on the sum and difference between the first reference value and the second reference value.
[0110] Furthermore, the retrieval module 20 obtains a target candidate text set based on the combination of the first proportion of basic texts with the highest semantic similarity, the second proportion of basic texts with the highest keyword similarity, and the third proportion of basic texts with the highest part-of-speech similarity in the text library; the basic texts in the target candidate text set are used as candidate texts, and the retrieval score corresponding to the candidate text is obtained based on semantic similarity, keyword similarity, and part-of-speech similarity; wherein, the retrieval score is positively correlated with semantic similarity, keyword similarity, and part-of-speech similarity.
[0111] In one implementation scenario, before the retrieval module 20 uses the basic texts in the target candidate text set as candidate texts, it further includes: obtaining the remaining text set in the text library excluding the target candidate text set; using the maximum value among the semantic similarity, keyword similarity, and part-of-speech similarity of the basic texts in the remaining text set as the filtering similarity; obtaining the candidate text set based on the basic texts in the remaining text set with the fourth highest similarity ratio; adding the basic texts in the candidate text set to the target candidate text set; and updating the target candidate text set.
[0112] The parsing module 30 is used to obtain candidate answers from the candidate text and determine the parsing score corresponding to the candidate answers based on the paragraphs corresponding to each candidate text and the query text.
[0113] Specifically, the parsing module 30 extracts at least some paragraphs from the candidate text as candidate paragraphs based on the semantic information and keywords corresponding to the query text and candidate text; performs sentence parsing on the candidate paragraphs, obtains candidate answers from the candidate paragraphs, and determines the parsing score corresponding to the candidate answers.
[0114] The parsing module 30 extracts at least some candidate paragraphs from the candidate text based on the semantic information and keywords corresponding to the query text and candidate text. This includes: determining a first score between each paragraph in the query text and candidate text based on the similarity between the semantic information corresponding to the query text and candidate text; determining a second score between each paragraph in the query text and candidate text based on the similarity between the keywords corresponding to the query text and candidate text; determining a third score for each paragraph in the candidate text based on the first score and the second score; extracting the paragraphs with the top five proportions of the third score from the candidate text as candidate paragraphs; and using the third score of the candidate paragraphs as the retrieval score.
[0115] The parsing module 30 performs sentence parsing on the candidate paragraphs, obtains candidate answers from the candidate paragraphs, and determines the parsing score corresponding to the candidate answers. This includes: inputting the candidate paragraphs into the reading comprehension model so that the reading comprehension model can decompose the candidate paragraphs according to delimiters to obtain multiple delimited sentences, and determining the candidate answers corresponding to the candidate paragraphs and the parsing scores of the candidate answers based on the semantic information corresponding to the query text and the semantic information corresponding to each delimited sentence.
[0116] Processing module 40 is used to determine the target answer from among the candidate answers based on the retrieval score and the parsing score.
[0117] In one implementation scenario, the processing module 40 determines the target answer from among the candidate answers based on the retrieval score and the parsing score, including: setting a corresponding retrieval weight for the retrieval score and a corresponding parsing weight for the parsing score; multiplying the retrieval score by the corresponding retrieval weight to obtain a third reference value; multiplying the parsing score by the corresponding parsing weight to obtain a fourth reference value; using the sum of the third reference value and the fourth reference value as the comprehensive score of the candidate answer; and selecting the candidate answer with the largest comprehensive score as the target answer.
[0118] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device includes a memory 50 and a processor 60 coupled to each other. The memory 50 stores program instructions, and the processor 60 is used to execute the program instructions to implement the steps of the target answer acquisition method in the above embodiment. Specifically, the electronic device includes, but is not limited to, desktop computers, laptops, tablet computers, servers, etc., and is not limited here. In addition, the processor 60 can also be called a CPU (Center Processing Unit). The processor 60 may be an integrated circuit chip with signal processing capabilities. The processor 60 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. In addition, the processor 60 can be implemented by integrated circuit chips.
[0119] Please see Figure 11 , Figure 11 This is a schematic diagram of an embodiment of a computer-readable storage medium 70 proposed in this application. The computer-readable storage medium 70 stores program instructions 80 that can be executed by a processor. The program instructions 80 are used to implement the target answer acquisition method in any of the above embodiments.
[0120] It should be noted that the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0121] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0122] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0123] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for obtaining a target answer, characterized in that, include: Obtain a pre-built text library and query text; wherein the text library includes multiple base texts; Based on at least a portion of the base text and the text corresponding to the query text, candidate texts are obtained from the base text and a retrieval score is determined for each candidate text; wherein the retrieval score is determined based on the semantic similarity, keyword similarity, and part-of-speech similarity between the query text and the base text; Based on the paragraphs corresponding to each of the candidate texts and the query text, candidate answers are obtained from the candidate texts and the parsing scores corresponding to the candidate answers are determined. Based on the retrieval score and the parsing score, the target answer is determined from each of the candidate answers; The process of determining the part-of-speech similarity includes: extracting words and phrases and their corresponding word and phrase categories from the query text and the base text respectively; taking word and phrase categories included in both the query text and the base text as the first category, and taking word and phrase categories included only in the query text as the second category; wherein each word and phrase category has a corresponding category weight; obtaining a first reference value based on the sum of the category weights corresponding to all word and phrase categories belonging to the first category, obtaining a second reference value based on the sum of the category weights corresponding to all word and phrase categories belonging to the second category; and obtaining the part-of-speech similarity between the query text and the base text based on the sum and difference between the first reference value and the second reference value.
2. The method according to claim 1, characterized in that, Before obtaining candidate texts from the base texts based on at least a portion of the base texts and the texts corresponding to the query texts, and determining the retrieval scores corresponding to the candidate texts, the method further includes performing the following steps for each of the base texts: The paragraphs at the beginning of the base text, as well as the headings at each level of the base text and the paragraphs following the headings, are taken as the paragraphs to be retrieved corresponding to the base text. Based on the semantic information corresponding to the query text and the paragraph to be retrieved, the semantic similarity between the query text and the base text is determined; based on the keywords corresponding to the query text and the paragraph to be retrieved, the keyword similarity between the query text and the base text is determined; and based on the word and sentence categories corresponding to the words and sentences in the query text and the paragraph to be retrieved, the part-of-speech similarity between the query text and the base text is determined.
3. The method according to claim 2, characterized in that, The step of determining the semantic similarity between the query text and the base text based on the semantic information corresponding to the query text and the paragraph to be retrieved includes: The query text and the paragraph to be retrieved are input into the semantic analysis model to obtain a query vector that matches the semantic information of the query text, a paragraph vector that matches the semantic information of the paragraph to be retrieved, and a word vector that matches the semantic information of the words and sentences in the paragraph to be retrieved; wherein, the semantic analysis model includes a BERT module, a pooling layer and a fully connected layer cascaded in sequence. Determine the vector similarity between the query vector and the paragraph vector and the word / sentence vector respectively, and take the vector similarity with the largest value as the semantic similarity between the query text and the base text.
4. The method according to claim 2, characterized in that, The step of determining the keyword similarity between the query text and the base text based on the keywords corresponding to the query text and the paragraph to be retrieved includes: Keywords are extracted from the query text and the paragraph to be searched, and the word similarity between each keyword in the query text and all keywords in the paragraph to be searched is calculated. The sum of the word similarities corresponding to the query text is normalized to obtain the keyword similarity between the query text and the base text.
5. The method according to claim 2, characterized in that, The step of obtaining candidate texts from the base text and determining the retrieval scores corresponding to the candidate texts based on at least a portion of the base texts and the query texts includes: The target candidate text set is obtained by combining the base texts ranked in the first proportion based on the semantic similarity value, the base texts ranked in the second proportion based on the keyword similarity value, and the base texts ranked in the third proportion based on the part-of-speech similarity value in the text library. The base text in the target candidate text set is used as the candidate text, and the retrieval score corresponding to the candidate text is obtained based on the semantic similarity, the keyword similarity and the part-of-speech similarity; wherein the retrieval score is positively correlated with the semantic similarity, the keyword similarity and the part-of-speech similarity.
6. The method according to claim 5, characterized in that, Before using the base text in the target candidate text set as the candidate text, the method further includes: Obtain the remaining text set in the text library excluding the target candidate text set, and use the maximum value among the semantic similarity, keyword similarity and part-of-speech similarity of the basic text in the remaining text set as the screening similarity. Based on the basic text in the remaining text set that ranks in the top fourth proportion of the screening similarity, obtain the candidate text set. The base text in the candidate text set is added to the target candidate text set, and the target candidate text set is updated.
7. The method according to claim 1, characterized in that, The step of obtaining candidate answers from the candidate texts and determining the parsing scores corresponding to the candidate answers based on the paragraphs corresponding to each candidate text and the query text includes: Based on the semantic information and keywords corresponding to the query text and the candidate text, at least some paragraphs are extracted from the candidate text as candidate paragraphs; The candidate paragraphs are parsed to obtain candidate answers and determine the parsing scores corresponding to the candidate answers.
8. The method according to claim 7, characterized in that, The step of extracting at least a portion of paragraphs from the candidate text as candidate paragraphs based on the semantic information and keywords corresponding to the query text and the candidate text includes: Based on the similarity between the semantic information corresponding to the query text and the candidate text, a first score is determined between each paragraph of the query text and the candidate text; based on the similarity between the keywords corresponding to the query text and the candidate text, a second score is determined between each paragraph of the query text and the candidate text. Based on the first score and the second score, a third score is determined for each paragraph in the candidate text. The paragraphs with the highest third scores in the candidate text are then extracted as candidate paragraphs.
9. The method according to claim 7, characterized in that, The step of parsing the candidate paragraphs, obtaining candidate answers from the candidate paragraphs, and determining the parsing score corresponding to the candidate answers includes: The candidate paragraph is input into the reading comprehension model, which then decomposes the candidate paragraph according to delimiters to obtain multiple delimited statements. Based on the semantic information corresponding to the query text and the semantic information corresponding to each delimited statement, the model determines the candidate answer corresponding to the candidate paragraph and the parsing score of the candidate answer.
10. The method according to claim 1, characterized in that, The step of determining the target answer from the candidate answers based on the retrieval score and the parsing score includes: For the candidate answers, a corresponding retrieval weight is set for the retrieval score, and a corresponding parsing weight is set for the parsing score; The retrieval score is multiplied by the corresponding retrieval weight to obtain a third reference value; and the parsing score is multiplied by the corresponding parsing weight to obtain a fourth reference value. The sum of the third reference value and the fourth reference value is used as the comprehensive score of the candidate answer; The candidate answer corresponding to the highest comprehensive score is taken as the target answer.
11. A target answer acquisition device, characterized in that, include: The module is used to obtain a pre-built text library and query text; wherein, the text library includes multiple basic texts; A retrieval module is configured to obtain candidate texts from the base text and determine a retrieval score corresponding to the candidate texts, based on at least a portion of the base texts and the texts corresponding to the query texts; wherein the retrieval score is determined based on the semantic similarity, keyword similarity, and part-of-speech similarity between the query texts and the base texts; The parsing module is used to obtain candidate answers from the candidate texts and determine the parsing scores corresponding to the candidate answers based on the paragraphs corresponding to each candidate text and the query text. The processing module is used to determine the target answer from each of the candidate answers based on the retrieval score and the parsing score; The process of determining the part-of-speech similarity includes: extracting words and phrases and their corresponding word and phrase categories from the query text and the base text respectively; taking word and phrase categories included in both the query text and the base text as the first category, and taking word and phrase categories included only in the query text as the second category; wherein each word and phrase category has a corresponding category weight; obtaining a first reference value based on the sum of the category weights corresponding to all word and phrase categories belonging to the first category, obtaining a second reference value based on the sum of the category weights corresponding to all word and phrase categories belonging to the second category; and obtaining the part-of-speech similarity between the query text and the base text based on the sum and difference between the first reference value and the second reference value.
12. An electronic device, characterized in that, The method includes a memory and a processor coupled to each other, wherein the memory stores program instructions and the processor executes the program instructions to implement the target answer acquisition method according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the target answer acquisition method according to any one of claims 1-10.