Question answering method and device for application entity extraction, equipment and medium
Through entity extraction technology and multi-dimensional feature similarity matching, the problem of low recall in financial and medical scenarios of traditional question-and-answer systems is solved, achieving more efficient user problem understanding and answer matching, and improving user satisfaction and system performance.
Patent Information
- Application Number
- CN202510585596.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-22
AI Technical Summary
When traditional Q&A systems face complex and diverse financial and medical problems, they are difficult to fully cover relevant content, resulting in low recall rates and poor user interaction experience, which increases operation and maintenance costs.
The entity extraction technology is used to replace the entities in the user's problem through specific reference symbols, and the answers are retrieved in the extended corpus using multi-dimensional feature similarity matching, including the corpus update module and query module, to achieve in-depth analysis and accurate matching of user problems.
It improves the recall rate of the Q&A system, can better cope with complex and changeable user needs, improves the user experience and the accuracy of the system's answers, and has good scalability and adaptability.
Smart Images

Figure CN120523904A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of question-answering technology in financial and medical scenarios, and in particular to question-answering methods, devices, equipment, and media for applying entity extraction. Background Art
[0002] Question-and-answer systems in the financial and healthcare sectors typically rely solely on semantic matching technology. This leads to numerous limitations for traditional question-and-answer systems, making it difficult to meet the growing complexity of human needs. When faced with specific standard questions involving an extremely broad range of relevant corpora, it is difficult for humans to exhaustively enumerate all possible scenarios, resulting in the system's inability to fully cover the relevant content. This not only directly reduces the dialogue system's recall rate during information retrieval and response, impacting the user interaction experience, but also significantly increases maintenance costs for financial and healthcare operations teams. As the operational needs of finance and healthcare become increasingly complex, financial and healthcare question-and-answer systems urgently need to be upgraded and iterated to meet this growing demand. Summary of the Invention
[0003] The present invention provides a question-answering method, apparatus, computer equipment, and medium using entity extraction to solve the problem of how to break through the limitations of traditional question-answering systems, comprehensively cover complex issues in the financial and medical fields, and thus improve the recall rate of dialogue systems.
[0004] In a first aspect, a question-answering method using entity extraction is provided, comprising:
[0005] Identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus;
[0006] The entity in the user question is replaced by a specific reference symbol, and the user question after entity replacement is subjected to question recall processing in the second corpus to obtain at least one second candidate question, and the user question is matched with all second candidate questions by multi-dimensional feature similarity to select the corresponding target question and return the associated answer.
[0007] In a second aspect, a question-answering device using entity extraction is provided, comprising:
[0008] A corpus updating module is used to identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus;
[0009] The second query module is used to replace the entities in the user question with specific reference symbols, and perform question recall processing on the user question after entity replacement in the second corpus to obtain at least one second candidate question, and perform multi-dimensional feature similarity matching processing on the user question and all second candidate questions to select the corresponding target question and return the associated answer.
[0010] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the question-answering method for applying entity extraction are implemented.
[0011] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the question-answering method for application entity extraction are implemented.
[0012] In the scheme implemented by the question-answering method, apparatus, computer equipment and storage medium using entity extraction mentioned above, all similar questions associated with each standard question in the first corpus can be confirmed in advance, and the entities in all similar questions can be replaced using specific reference symbols to obtain an updated second corpus; the entities in the user questions can be replaced using specific reference symbols, and the user questions after entity replacement can be recalled in the second corpus to obtain at least one second candidate question, and the user questions can be matched with all second candidate questions for multi-dimensional feature similarity to select the corresponding target question and return the associated answer. In the present invention, in the question-answering business for financial and medical scenarios, entity replacement technology is used to analyze the entity information in the user questions and compare it with more data in the corpus, thereby expanding its search scope to match relevant answers and effectively improving the recall rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0014] Figure 1 2 is a schematic diagram of an application environment of a question-answering method using entity extraction in one embodiment of the present invention.
[0015] Figure 2 1 is a flow chart of a question-answering method using entity extraction in one embodiment of the present invention.
[0016] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S201 is shown in FIG.
[0017] Figure 4 It is a flowchart of a specific implementation after step S201 and before step S202.
[0018] Figure 5 yes Figure 2 A flowchart of a specific implementation of step S202 is shown in FIG.
[0019] Figure 6 yes Figure 5 A flowchart of a specific implementation of step S503 is shown in FIG.
[0020] Figure 7 2 is a structural diagram of a question-answering device using entity extraction in one embodiment of the present invention.
[0021] Figure 8 It is a structural diagram of a computer device in one embodiment of the present invention.
[0022] Figure 9 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0024] The question-answering method for application entity extraction provided by the embodiment of the present invention can be applied in Figure 1In an application environment, the client communicates with the server through a network. The server provides an operation node for the operator to pre-confirm all similar questions associated with each standard question in the first corpus, and replaces the entities in all similar questions with specific reference symbols to obtain an updated second corpus. The server can receive user questions through the client, and then replace the entities in the user questions with specific reference symbols, and perform question recall processing on the user questions after entity replacement in the second corpus to obtain at least one second candidate question, and perform multi-dimensional feature similarity matching processing on the user questions and all second candidate questions to select the corresponding target question and return the associated answer. In the present invention, in the question-and-answer business for financial and medical scenarios, the entity replacement technology is used to analyze the entity information in the user question, and compare it with more data in the corpus, thereby expanding its search range to match relevant answers and effectively improving the recall rate. As a result, the question-and-answer system can better cope with complex and changing user needs, provide users with better quality and more efficient services, and take an important step in the field of intelligent interaction in financial and medical scenarios. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices. The server can be implemented as an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0025] See also Figure 2 As shown, Figure 2 A flowchart of a question-answering method using entity extraction provided in an embodiment of the present invention includes the following steps S201 and S202.
[0026] S201: Identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus;
[0027] In this step, all similar questions associated with each standard question in the first corpus are also replaced using entity replacement technology, thereby updating the second corpus;
[0028] For example, in the first corpus, there is a standard question [How to deal with the omission of ordered goods], and similar questions under this standard question are [Why are there only 3 boxes of medicine A and no medicine B], [I bought two bottles of medicine C, why was only one bottle delivered]; correspondingly, after entity replacement, the second corpus will have a standard question [How to deal with the omission of ordered goods], and similar questions under this standard question are [Why are there only 3 boxes <product>,No <product>】、【Bought two bottles <product>, why only send one bottle];
[0029] For example, in the first corpus, there is a standard question [Order has not been received for a long time], and under this question there is a similar question [Why hasn’t medicine D arrived yet]; correspondingly, after the entity is replaced, in the second corpus, there will be a standard question [How to deal with the missed delivery of ordered goods], and under this standard question there will be a similar question [Why <product>Not yet arrived].
[0030] S202: replacing entities in the user question with specific reference symbols, performing question recall processing on the user question after entity replacement in the second corpus to obtain at least one second candidate question, and performing multi-dimensional feature similarity matching processing on the user question and all second candidate questions to select a corresponding target question and return an associated answer;
[0031] The question-and-answer method provided in this step can be applied to intelligent question-and-answer engines, such as intelligent customer service or intelligent assistants, in various application scenarios. Intelligent question-and-answer engines are typically implemented through a server, which can receive user questions in real time through the client. For example, in the medical application field, users often ask questions by phone or online chat, and intelligent question-and-answer engines are often needed to answer customers' medical questions to improve medical promotion efficiency and user experience.
[0032] For example, the user question received by the client may be "I bought three bottles of vitamin E, why did you only send me one bottle?" After receiving the user question, the entity in the user question needs to be replaced with the corresponding specific reference symbol, so as to obtain the replaced user question "I bought two bottles <product>, why only one bottle was sent? ". The replaced user question is then used to perform question recall processing in the second corpus to obtain at least one second candidate question. The user question is then matched with all second candidate questions using multi-dimensional feature similarity to select the corresponding target question and return the associated answer.
[0033] In this embodiment, the techniques in steps S201-S202 enable a more in-depth analysis of difficult user questions in question-and-answer services in financial and medical scenarios. Where traditional question-and-answer systems fail, the system analyzes the entities in the user's question and compares them with a larger set of similar questions. This expands the scope of the system's search, enabling it to accurately match the most relevant similar questions and associated answers from within a vast amount of data, effectively improving recall rates.
[0034] For example, in a question-and-answer scenario in the financial field, a user asks, "Why has my fixed deposit at XX Bank matured three years ago, and the interest has not yet been paid?" In a traditional question-and-answer system, due to differences in question formulation or limitations of the system knowledge base, it may not be possible to directly match the corresponding answer. However, under the technical solution of this embodiment, the system first identifies the entities "XX Bank" and "interest" in the question, and then replaces them with specific reference symbols, such as " <bank>"and" <interest>”, and the replaced question is “Why did I <bank>The fixed deposit has matured, but the interest has not yet been received? "The system will then perform question recall in the second corpus to find standard questions or similar questions similar to the replaced question, such as " <bank>of <interest>The system then performs a multi-dimensional feature similarity matching process on these candidate questions and the original user question, selects the most matching target question, and returns its associated answer, effectively resolving the user's question.
[0035] It can be understood that the present invention can provide technical support for intelligent question-answering systems in different scenarios, especially when dealing with user questions with complex backgrounds and diverse expressions, which can significantly improve the system's answer accuracy and user satisfaction. By constructing and maintaining a corpus containing a wealth of standard questions and similar questions, and applying entity replacement technology and multi-dimensional feature similarity matching algorithms, the present invention can achieve accurate understanding and efficient answers to user questions. In addition, the present invention also has good scalability and adaptability. As the business develops and user needs change, the content in the corpus can be continuously updated and improved to adapt to new question-answering scenarios.
[0036] In one embodiment, after step S201 and before step S202, the method further includes:
[0037] The received user question is processed for question recall in the first corpus to obtain at least one first candidate question, and the user question is matched with all candidate questions for semantic similarity to select a corresponding target question and return an associated answer; if the target question is not selected, an information prompt indicating that the user question cannot be identified is returned; and step S202 is executed.
[0038] In this embodiment, after the user question is asked, it is not matched with the second corpus or entity replacement is performed on the user question. Instead, the user question is directly matched with the corpus in the first corpus or other non-replacement entity knowledge base.
[0039] If no content is matched, the user question is extracted into entities using the entity extraction model, and replaced with specific reference symbols based on the results of entity extraction. The replaced user question is then used to perform a search in the second corpus.
[0040] In one embodiment, if Figure 3 As shown, step S201 includes steps S301-S303.
[0041] S301, confirming similar questions associated with each standard question in the first corpus;
[0042] S302, using NER technology and regular matching to label entities in each similar question;
[0043] S303: All entities of the same type are uniformly replaced with corresponding specific reference symbols to update the expression forms of all similar questions and obtain an updated second corpus.
[0044] In this embodiment, by standardizing similar questions in the first corpus, the accuracy and efficiency of subsequent question-answer matching are improved. Specifically, the use of NER technology can accurately identify key entities in similar questions, while regular matching ensures the consistency and accuracy of entity annotations. In addition, uniformly replacing similar entities with corresponding specific reference symbols not only simplifies the expression of similar questions, but also helps reduce matching errors caused by entity differences, thereby improving the performance of the entire question-answering system.
[0045] It should be noted that the key entities in similar questions depend on the specific application scenario. For example, in a medical Q&A scenario, entities can include disease names, drug names, and symptom descriptions. For a financial Q&A scenario, entities can include stock names, fund names, financial product types, and financial indicators.
[0046] In one embodiment, if Figure 4 As shown, the received user question is processed for question recall in the first corpus to obtain at least one first candidate question, and the user question is matched with all candidate questions for semantic similarity to select the corresponding target question and return the associated answer, including steps S401-S404.
[0047] S401: Obtain word segments in the user question, and perform recall processing from the first corpus based on the word segments to obtain at least one first candidate question;
[0048] S402: Input the user question and all first candidate questions into a pre-trained semantic matching model to calculate semantic similarity, and output a semantic similarity score between the user question and each first candidate question;
[0049] S403: If the highest value among all semantic similarity scores is greater than or equal to a preset similarity threshold, the first candidate question corresponding to the highest value is used as the target question and the associated answer is returned;
[0050] S404: If the highest value among all semantic similarity scores is less than a preset similarity threshold, a message prompt indicating that the user question cannot be identified is returned.
[0051] In this embodiment, first, the system performs word segmentation on the question input by the user, splitting the sentence input by the user into independent words or phrases for subsequent processing and analysis. After the word segmentation is completed, the system will search for at least a first candidate question related to it (the number of first candidate questions can be set) in the first corpus (the first corpus has previously stored a large number of similar questions and corresponding related answers, which is the basis for the system to process and match) based on these word segmentation results. Then, the system inputs the question input by the user and all recalled first candidate questions into a pre-trained semantic matching model. The semantic matching model can capture the semantic connection between the question and each similar question. Even if they are expressed differently, as long as the meaning is similar, the model can also give a corresponding semantic similarity score. The purpose of this step is to find at least one first candidate question that is close to the user's question so that an accurate answer can be provided later. Then, the highest value of all semantic similarity scores is checked. If the highest value is greater than or equal to the preset similarity threshold, it is considered that a candidate question that is close enough to the user's question has been found and is used as the target question, and the answer associated with it is returned. However, if the highest value among all semantic similarity scores is less than the preset similarity threshold, a message indicating that the user's question cannot be identified is returned, informing the user that the system cannot provide a relevant answer. Finally, the process jumps to step S202.
[0052] For example, in a medical Q&A scenario, a user asks, "I have a headache and a slight fever. What medicine should I take?" The system first performs word segmentation on the question, obtaining words such as "I," "headache," "and," "a little," and "fever." The system then searches the first corpus for candidate questions related to these word segmentations, such as "What should I do if I have a headache and fever?" and "What medicine can quickly cure a headache and fever?" The system then inputs the user question and these candidate questions into a semantic matching model to calculate a semantic similarity score between them. Assuming that one of the candidate questions, "What medicine can I take to quickly cure a headache and fever?", has the highest semantic similarity score and is higher than the preset similarity threshold, the system will use this question as the target question and return the answer associated with it, such as "It is recommended that you measure your body temperature first. If the fever is severe, please seek medical attention in time. If it is only a mild fever, you can consider taking some antipyretic and analgesic drugs." However, if the semantic similarity scores of all candidate questions are lower than the preset similarity threshold, the system will return a message prompt that it cannot recognize the user's question, such as "I'm sorry, I can't understand your question. Please ask again or consult a professional doctor." Then, the system will jump to step S202 to replace the user question entity and then expand the search from the second corpus.
[0053] In one embodiment, if Figure 5 As shown, step S202 includes steps S501-S505.
[0054] S501: Use a specific reference symbol to replace the entity in the user question;
[0055] S502: Recall the second corpus based on the entity information in the user question to obtain at least one second candidate question;
[0056] S503: Input the user question after entity replacement processing and all second candidate questions into the pre-trained multimodal matching model to perform multi-dimensional feature similarity calculation, and output the comprehensive similarity score between the user question after entity replacement processing and each second candidate question;
[0057] S504: If the highest value among all comprehensive similarity scores is greater than or equal to the preset similarity threshold, the second candidate question corresponding to the highest value is used as the target question and the associated answer is returned;
[0058] S505: If the highest value among all the comprehensive similarity scores is less than the preset similarity threshold, the recall work in the second corpus is terminated and an unrecognizable information prompt is returned.
[0059] In this embodiment, the system first identifies and understands the entities in the user's question and replaces them with specific referents corresponding to those entities, reducing the complexity of the user's question and improving processing efficiency. The system then performs a recall operation in the first corpus based on this entity information, aiming to find at least one second candidate question that closely matches the user's question. The system then inputs the user's question, after entity replacement, and all recalled second candidate questions into a pre-trained multimodal matching model. This model utilizes a multi-dimensional feature similarity calculation method to perform an in-depth multi-dimensional analysis and outputs a comprehensive similarity score between each second candidate question and the user's question after entity replacement. If the highest score reaches or exceeds a preset similarity threshold, the system deems the second candidate question corresponding to the highest score the most closely matching the user's question, identifies it as the target question, and returns an answer associated with the target question. However, if the highest score of all combined similarity scores falls below the preset similarity threshold, the system deems that no question in the second corpus sufficiently matches the user's question. In this case, the system terminates the recall operation in the second corpus and returns an unrecognized message to the user.
[0060] For example, in a financial question-and-answer scenario, a user asks, "How much is the repayment bill for my credit card?" The system identifies the entities in the user's question as "credit card" and "bill amount." The system then replaces the "credit card" in the user's question with a specific reference symbol, such as "card," and replaces the "bill amount" in the user's question with "¥," resulting in a replaced user question like, "How much is the ¥ on my 'card'?" Next, the system searches the second corpus based on the entity information "credit card bill amount," potentially finding second candidate questions such as, "How do I check the repayment ¥ on my 'card'?" and "How much is the ¥ on my 'card'?" The system then inputs the replaced user question and these second candidate questions into a pre-trained multimodal matching model to calculate multi-dimensional feature similarity. Assume that the second candidate question "How do I check the repayment amount of "¥" for "card"?" has the highest comprehensive similarity score with the replaced user question, and this highest score is greater than or equal to the preset similarity threshold, then the system will consider this second candidate question to be the most compatible with the user question, identify it as the target question, and return the answer associated with the target question, such as "The repayment bill amount of your credit card is XX yuan." However, if the highest values of the comprehensive similarity scores of all second candidate questions with the replaced user question are lower than the preset similarity threshold, then the system will consider that no question that sufficiently matches the user question can be found in the second corpus, and will end the recall work and return the message prompt "Unrecognized question" to the user.
[0061] In one embodiment, if Figure 6 As shown, step S503 includes steps S601-S604.
[0062] S601, performing syntactic decomposition, semantic parsing, and entity location tagging on the user question after entity replacement processing to obtain the syntactic structure, semantic role, and entity location information of the user question;
[0063] In this step, syntactic analysis involves breaking down the subject, predicate, and object structures in the user's question. Semantic parsing involves analyzing the semantic roles of the action subject, object, and additional conditions in the user's question. Entity position labeling involves marking the sequential position of specific referential symbols in the user's question.
[0064] S602: Perform feature joint encoding on the syntactic structure, semantic role, and entity location information of the user question to obtain a multi-dimensional mixed vector;
[0065] In this step, the syntactic structure can be converted into a topological vector; the semantic role can be converted into a relationship matrix; the entity location information can be converted into a weight sequence; and then the three feature vectors can be concatenated to obtain a multidimensional mixed vector.
[0066] S603: Calculate syntactic similarity, semantic fit, and entity position relevance between the multidimensional mixed vector of the user question and the multidimensional mixed vector of each second candidate question to obtain a syntactic similarity score, a semantic fit score, and an entity position relevance score;
[0067] S604: Perform weighted fusion processing on the syntactic similarity score, the semantic fit score and the entity position relevance score to output a final comprehensive similarity score.
[0068] In steps S603-S604, deep learning algorithms or machine learning models can be used to calculate syntactic similarity, semantic fit and entity position relevance. These algorithms or models can capture subtle differences and deep connections between texts, thereby improving the accuracy of matching. Syntactic similarity calculation can evaluate the structural similarity of two sentences based on syntactic analysis trees or dependency syntactic relations. Semantic fit calculation can use technologies such as word embedding and semantic role labeling to measure the semantic proximity of two sentences. The entity position relevance calculation focuses on the position and relative relationship of the entities in the question in the sentence to further improve the accuracy of matching. By weighted fusion of these scores, a comprehensive similarity score can be obtained to evaluate the overall matching degree between the user question and the candidate question.
[0069] In this embodiment, based on the process of steps S601-S604, a refined matching analysis is achieved between the user's question and the second candidate question. This matching takes into account the similarity of syntactic structure, goes deeper into the semantic level, and even details the processing of entity locations, thus ensuring the comprehensiveness and accuracy of the matching. In this way, the system can more intelligently understand user intent and quickly locate the target question and related answers that best meet the user's needs, thereby improving user experience and satisfaction.
[0070] It can be seen that in the above solution, a more in-depth analysis is conducted on difficult user questions in the question-and-answer business in financial and medical scenarios; when the traditional question-and-answer system fails, the system will analyze the entities in the user questions and compare them with a larger volume of similar questions; in this way, the scope of system retrieval is expanded, and it can accurately match the most relevant similar questions and related answers from massive data, effectively improving the recall rate.
[0071] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0072] In one embodiment, a question-answering device 700 using entity extraction is provided. The question-answering device using entity extraction corresponds one-to-one to the question-answering method using entity extraction in the above embodiment. Figure 7 As shown, the question-answering device for entity extraction includes a corpus updating module 701 and a second query module 702. The functional modules are described in detail as follows:
[0073] The corpus updating module 701 is configured to identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus.
[0074] The second query module 702 is used to replace the entity in the user question with a specific reference symbol, and perform question recall processing on the user question after entity replacement in the second corpus to obtain at least one second candidate question, and perform multi-dimensional feature similarity matching processing on the user question and all second candidate questions to select the corresponding target question and return the associated answer.
[0075] In one embodiment, the question-answering method using entity extraction further includes:
[0076] The first query module is used to perform question recall processing on the received user question in the first corpus to obtain at least one first candidate question, and perform semantic similarity matching between the user question and all candidate questions to select the corresponding target question and return the associated answer; if the target question is not selected, jump to the second query module 702.
[0077] In one embodiment, the first query module is specifically configured to:
[0078] Obtaining word segments in the user question, and recalling from the first corpus based on the word segments to obtain at least one first candidate question;
[0079] Input the user question and all first candidate questions into a pre-trained semantic matching model to calculate semantic similarity, and output a semantic similarity score between the user question and each first candidate question;
[0080] If the highest value among all semantic similarity scores is greater than or equal to the preset similarity threshold, the first candidate question corresponding to the highest value is taken as the target question and the associated answer is returned;
[0081] If the highest value among all semantic similarity scores is less than the preset similarity threshold, a message prompt indicating that the user question cannot be identified is returned.
[0082] In one embodiment, the corpus updating module 701 is specifically configured to:
[0083] Identify similar questions associated with each standard question in the first corpus;
[0084] Use NER technology and regular matching to label entities in each similar question;
[0085] The entity type uniformly replaces all similar entities with corresponding specific reference symbols to update the expression of all similar questions and obtain an updated second corpus.
[0086] In one embodiment, the second query module 702 is specifically configured to:
[0087] Using specific reference symbols to replace the entities in the user's question;
[0088] Recalling the second corpus based on the entity information in the user question to obtain at least one second candidate question;
[0089] Input the user question after entity replacement processing and all second candidate questions into the pre-trained multimodal matching model to calculate the multi-dimensional feature similarity, and output the comprehensive similarity score between the user question after entity replacement processing and each second candidate question;
[0090] If the highest value among all comprehensive similarity scores is greater than or equal to the preset similarity threshold, the second candidate question corresponding to the highest value is taken as the target question and the associated answer is returned;
[0091] If the highest value among all the comprehensive similarity scores is less than the preset similarity threshold, the recall work in the second corpus is terminated and an unrecognizable information prompt is returned.
[0092] In one embodiment, the user question after entity replacement processing and all second candidate questions are input into a pre-trained multimodal matching model to perform multi-dimensional feature similarity calculation, and a comprehensive similarity score between the user question after entity replacement processing and each second candidate question is output, which is specifically used to:
[0093] Perform syntactic decomposition, semantic parsing, and entity location tagging on the user questions after entity replacement to obtain the syntactic structure, semantic role, and entity location information of the user questions.
[0094] Performing feature joint encoding on the syntactic structure, semantic role and entity location information of the user question to obtain a multi-dimensional mixed vector;
[0095] Calculating syntactic similarity, semantic fit, and entity position relevance between the multidimensional mixed vector of the user question and the multidimensional mixed vector of each second candidate question to obtain a syntactic similarity score, a semantic fit score, and an entity position relevance score;
[0096] The syntactic similarity score, semantic fit score and entity position relevance score are weighted and fused to output a final comprehensive similarity score.
[0097] The present invention provides a question-and-answer device that applies entity extraction, which conducts a more in-depth analysis of difficult user questions in question-and-answer services in financial and medical scenarios. When traditional question-and-answer systems fail, the system analyzes the entities in user questions and compares them with a larger number of similar questions. In this way, the scope of system retrieval is expanded, and the most relevant similar questions and related answers can be accurately matched from massive amounts of data, effectively improving the recall rate.
[0098] For the specific definition of the question-answering device for application entity extraction, please refer to the definition of the question-answering method for application entity extraction above, which will not be repeated here. The various modules in the above-mentioned question-answering device for application entity extraction can be implemented in whole or in part through software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0099] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a question-answering method for application entity extraction.
[0100] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 9 As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a question-answering method for application entity extraction
[0101] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:
[0102] Identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus;
[0103] The entity in the user question is replaced by a specific reference symbol, and the user question after entity replacement is subjected to question recall processing in the second corpus to obtain at least one second candidate question, and the user question is matched with all second candidate questions by multi-dimensional feature similarity to select the corresponding target question and return the associated answer.
[0104] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0105] Identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus;
[0106] The entity in the user question is replaced by a specific reference symbol, and the user question after entity replacement is subjected to question recall processing in the second corpus to obtain at least one second candidate question, and the user question is matched with all second candidate questions by multi-dimensional feature similarity to select the corresponding target question and return the associated answer.
[0107] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0108] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0109] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0110] The above embodiments are only used to illustrate the technical solutions of the present invention, not to limit them. Although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate from the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. The non-Company software tools or components that appear in the embodiments of this application are merely examples and do not represent actual use.< / interest> < / bank> < / bank> < / interest> < / bank> < / product> < / product> < / product> < / product> < / product>
Claims
1. A question-answering method using entity extraction, characterized in that: include: Identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus; The entity in the user question is replaced by a specific reference symbol, and the user question after entity replacement is subjected to question recall processing in the second corpus to obtain at least one second candidate question, and the user question is matched with all second candidate questions by multi-dimensional feature similarity to select the corresponding target question and return the associated answer.
2. The question-answering method using entity extraction according to claim 1, wherein: Before the step of replacing the entity in the user question with a specific reference symbol, performing question recall processing on the user question after entity replacement in the second corpus to obtain at least one second candidate question, and performing semantic similarity matching between the user question and all second candidate questions to select a corresponding target question and return an associated answer, the method further includes: Performing question recall processing on the received user question in the first corpus to obtain at least one first candidate question, and performing semantic similarity matching between the user question and all candidate questions to select a corresponding target question and return an associated answer; If the target question is not selected, an information prompt indicating that the user question cannot be identified is returned; and the following steps are executed: replacing the entity in the user question with a specific reference symbol, and recalling the user question after entity replacement in the second corpus to obtain at least one second candidate question, and performing multi-dimensional feature similarity matching on the user question and all second candidate questions to select the corresponding target question and return the associated answer.
3. The question-answering method using entity extraction according to claim 1, wherein: The step of identifying all similar questions associated with each standard question in the first corpus and replacing entities in all similar questions with specific reference symbols to obtain an updated second corpus includes: Identify similar questions associated with each standard question in the first corpus; Use NER technology and regular matching to label entities in each similar question; The entity type uniformly replaces all similar entities with corresponding specific reference symbols to update the expression of all similar questions and obtain an updated second corpus.
4. The question-answering method using entity extraction according to claim 2, wherein: The step of performing question recall processing on the received user question in the first corpus to obtain at least one first candidate question, and performing semantic similarity matching between the user question and all candidate questions to select a corresponding target question and return an associated answer includes: Obtaining word segments in the user question, and recalling from the first corpus based on the word segments to obtain at least one first candidate question; Input the user question and all first candidate questions into a pre-trained semantic matching model to calculate semantic similarity, and output a semantic similarity score between the user question and each first candidate question; If the highest value among all semantic similarity scores is greater than or equal to the preset similarity threshold, the first candidate question corresponding to the highest value is taken as the target question and the associated answer is returned; If the highest value among all semantic similarity scores is less than the preset similarity threshold, a message prompt indicating that the user question cannot be identified is returned.
5. The question-answering method using entity extraction according to claim 1, wherein: The method of replacing the entity in the user question with a specific reference symbol, performing question recall processing on the user question after entity replacement in the second corpus to obtain at least one second candidate question, and performing multi-dimensional feature similarity matching processing on the user question and all second candidate questions to select a corresponding target question and return an associated answer includes: Using specific reference symbols to replace the entities in the user's question; Recalling the second corpus based on the entity information in the user question to obtain at least one second candidate question; Input the user question after entity replacement processing and all second candidate questions into the pre-trained multimodal matching model to calculate the multi-dimensional feature similarity, and output the comprehensive similarity score between the user question after entity replacement processing and each second candidate question; If the highest value among all comprehensive similarity scores is greater than or equal to the preset similarity threshold, the second candidate question corresponding to the highest value is taken as the target question and the associated answer is returned; If the highest value among all the comprehensive similarity scores is less than the preset similarity threshold, the recall work in the second corpus is terminated and an unrecognizable information prompt is returned.
6. The question-answering method using entity extraction according to claim 5, wherein: The user question after entity replacement processing and all second candidate questions are input into the pre-trained multimodal matching model to perform multi-dimensional feature similarity calculation, and the comprehensive similarity score between the user question after entity replacement processing and each second candidate question is output, including: Perform syntactic decomposition, semantic parsing, and entity position tagging on the user questions after entity replacement to obtain the syntactic structure, semantic role, and entity position information of the user questions; Performing feature joint encoding on the syntactic structure, semantic role and entity location information of the user question to obtain a multi-dimensional mixed vector; Calculating syntactic similarity, semantic fit, and entity position relevance between the multidimensional mixed vector of the user question and the multidimensional mixed vector of each second candidate question to obtain a syntactic similarity score, a semantic fit score, and an entity position relevance score; The syntactic similarity score, semantic fit score and entity position relevance score are weighted and fused to output a final comprehensive similarity score.
7. A question-answering device using entity extraction, characterized in that: include: A corpus updating module is used to identify all similar questions associated with each standard question in the first corpus, and replace entities in all similar questions with specific reference symbols to obtain an updated second corpus; The second query module is used to replace the entities in the user question with specific reference symbols, and perform question recall processing on the user question after entity replacement in the second corpus to obtain at least one second candidate question, and perform multi-dimensional feature similarity matching processing on the user question and all second candidate questions to select the corresponding target question and return the associated answer.
8. The question-answering method using entity extraction according to claim 7, wherein: Also includes: The first query module is used to perform question recall processing on the received user question in the first corpus to obtain at least one first candidate question, and perform semantic similarity matching between the user question and all candidate questions to select the corresponding target question and return the associated answer; if the target question is not selected, jump to the second query module.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the question-answering method using entity extraction as described in any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the question-answering method using entity extraction as described in any one of claims 1 to 6 are implemented.