Information processing method, question-answering method, and question-answering system
Through the combination of detection components and similarity prediction models, it is determined whether the question information meets the retrieval conditions and candidate answers are obtained from multi-source heterogeneous search engines. This solves the problem of mismatch between answers and questions in the intelligent question and answer system and improves the accuracy of answers. degree and efficiency.
Patent Information
- Application Number
- CN202410874305.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-14
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-01
AI Technical Summary
When the existing intelligent question answering system generates answers, due to improper processing of the semantic features of the query results, the answers do not match the questions and the accuracy is low. An effective method is urgently needed to improve the matching and accuracy of the answers.
By obtaining question information, the detection component is used to determine whether the retrieval conditions are met. If so, a multi-source heterogeneous search engine is used to query candidate answers, a question and answer pair is constructed, and a similarity prediction model is used to predict similarity from multiple feature dimensions and select the best match. answer.
It improves the accuracy and matching degree of answers, reduces unnecessary query operations, improves the efficiency of question and answer and the structural diversity of candidate answers.
Smart Images

Figure CN118410152B_ABST
Abstract
Description
[0001] This disclosure claims the priority of the Chinese patent application filed with the China Patent Office on May 14, 2024, with application number 202410598792.0 and invention name “Information Processing Method, Question and Answer Method and Question and Answer System”, the entire contents of which are incorporated by reference in this disclosure. Technical Field
[0002] The embodiments of this specification relate to the field of computer technology, and in particular to an information processing method, a question-and-answer method, and a question-and-answer system. Background Art
[0003] With the development of computer technology, artificial intelligence has gradually penetrated into all walks of life. In the intelligent question-answering scenario, you can quickly get the answer to the question by inputting the question into the intelligent question-answering system. However, since the question-answering models used have different model architectures, the correlation between the obtained answers and the questions, as well as the accuracy of the answers, cannot be guaranteed.
[0004] In the prior art, a comprehensive and multi-dimensional information query is usually performed based on a search engine to obtain diversified query results. However, when generating answers to questions based on diversified query results, it is only achieved by a simple weighted summation method based on the degree of match between each query result and the question. Due to improper processing of the semantics and other features of each query result, it is easy to cause the generated answer to not match the question and the answer accuracy is low. Therefore, a more effective method is urgently needed to solve the above problem. Summary of the invention
[0005] In view of this, an embodiment of this specification provides an information processing method. One or more embodiments of this specification also relate to an information processing device, a question-and-answer method, a question-and-answer device, a question-and-answer system, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.
[0006] According to a first aspect of an embodiment of this specification, there is provided an information processing method, which is applied to a question-answering system, comprising:
[0007] Acquire question information, and determine at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition;
[0008] Constructing at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information;
[0009] Predicting the similarity information corresponding to the at least two question-answer pairs of information using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions by the similarity prediction model;
[0010] The detection component is used to select target answer information corresponding to the question information from the at least two candidate answer information based on the similarity information respectively corresponding to the at least two question-answer pair information.
[0011] According to a second aspect of an embodiment of this specification, there is provided an information processing device, applied to a question-answering system, comprising:
[0012] An acquisition module is configured to acquire question information and determine at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition;
[0013] A construction module, configured to construct at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information;
[0014] A prediction module is configured to predict similarity information corresponding to the at least two question-answer pairs of information using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by similarity prediction by the similarity prediction model from at least two feature matching dimensions;
[0015] The selection module is configured to use the detection component to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information respectively corresponding to the at least two question-answer pair information.
[0016] According to a third aspect of an embodiment of this specification, a question-answering method is provided, which is applied to a cloud-side device, including:
[0017] receiving question information submitted by a terminal device, and determining at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition;
[0018] Constructing at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information;
[0019] Predicting the similarity information corresponding to the at least two question-answer pairs of information using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions by the similarity prediction model;
[0020] The detection component is used to select target answer information corresponding to the question information from the at least two candidate answer information based on the similarity information corresponding to the at least two question-answer pair information, and the target answer information is fed back to the terminal device.
[0021] According to a fourth aspect of an embodiment of this specification, a question-answering device is provided, which is applied to a cloud-side device, including:
[0022] A receiving module, configured to receive question information submitted by a terminal device, and determine at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition;
[0023] A construction module, configured to construct at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information;
[0024] A prediction module is configured to predict similarity information corresponding to the at least two question-answer pairs of information using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by similarity prediction by the similarity prediction model from at least two feature matching dimensions;
[0025] The feedback module is configured to use the detection component to select target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information, and feed back the target answer information to the terminal side device.
[0026] According to a fifth aspect of an embodiment of this specification, a question-answering system is provided, including a cloud-side device and a terminal-side device;
[0027] The terminal-side device is used to generate question information based on the question-answering instruction submitted by the user, and send the question information to the cloud-side device;
[0028] The cloud-side device is used to determine at least two candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to meet the retrieval conditions; construct at least two question-answer pair information based on the question information and the at least two candidate answer information; use a similarity prediction model to predict similarity information corresponding to the at least two question-answer pair information, wherein the similarity information corresponding to each question-answer pair information is obtained by similarity prediction from at least two feature matching dimensions by the similarity prediction model; use the detection component to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information, and feed the target answer information back to the terminal-side device.
[0029] According to a sixth aspect of an embodiment of this specification, a computing device is provided, including:
[0030] Memory and processor;
[0031] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned information processing method are implemented.
[0032] According to a seventh aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned information processing method are implemented.
[0033] According to an eighth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program or instructions, which implement the steps of the above-mentioned information processing method when executed by a processor.
[0034] An information processing method provided in an embodiment of the present specification is applied to a question-and-answer system. Question information is obtained, and at least two candidate answer information corresponding to the question information are determined. The question information needs to be determined by the detection component to meet the retrieval conditions, and then at least two candidate answer information corresponding to the question information are determined, thereby improving the structural diversity of the candidate answer information obtained by retrieval based on the question information. Before querying based on the question information, the detection component is used to judge whether the question information meets the retrieval conditions, reducing unnecessary operations of querying using multi-source heterogeneous search engines, thereby improving the efficiency of question-and-answering. At least two question-and-answer pair information are constructed based on the question information and at least two candidate answer information, and a similarity prediction model is used to predict the similarity information corresponding to the at least two question-and-answer pair information. The similarity information corresponding to each question-and-answer pair information is obtained by similarity prediction from at least two feature matching dimensions by the similarity prediction model, thereby calculating the similarity between the question information and the candidate answer information in multiple feature dimensions, and integrating multiple feature dimensions in the calculation process. Then, the detection component is used to select target answer information corresponding to the question information from at least two candidate answer information according to the similarity information corresponding to at least two question-answer pairs of information, so as to select target answer information with a higher degree of match with the question information from at least two candidate answer information based on the similarity information, thereby improving the accuracy of the target answer information. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of a processing process of an information processing method provided by an embodiment of this specification;
[0036] Figure 2 is a flow chart of an information processing method provided by an embodiment of this specification;
[0037] Figure 3 It is a schematic diagram of a similarity prediction model structure of an information processing method provided by an embodiment of this specification;
[0038] Figure 4 is a processing flow chart of an information processing method provided by an embodiment of this specification;
[0039] Figure 5 It is a search and recall schematic diagram of an information processing method provided by an embodiment of this specification;
[0040] Figure 6 It is a question-answering system framework diagram of an information processing method provided by an embodiment of this specification;
[0041] Figure 7 is a question-answering system processing flow chart of an information processing method provided by an embodiment of this specification;
[0042] Figure 8 is a structural diagram of an information processing device provided by an embodiment of this specification;
[0043] Fig. 9 is a flow chart of a question-and-answer method provided by an embodiment of this specification;
[0044] Fig.10 is a structural schematic diagram of a question-and-answer device provided by an embodiment of this specification;
[0045] Fig.11 is a structural diagram of a question-answering system provided by an embodiment of this specification;
[0046] Fig.12 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0047] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0048] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0049] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0050] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0051] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.
[0052] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0053] First, the terms involved in one or more embodiments of this specification are explained.
[0054] RAG: It is a natural language processing method that combines information retrieval and generative models. In the generation process, relevant information is dynamically retrieved from a large knowledge source (usually a document database or a knowledge graph), and then this information is integrated into the generation model, making the generated content richer, more accurate and more informed.
[0055] Multi-source: Data comes from multiple different sources. These data sources may be Elastic Search, vector databases, relational databases, etc., providing the ability to observe and analyze problems from different angles or different contexts.
[0056] Heterogeneity: Data has differences in structure or format, such as plain text data, table data in HTML / MD format, formula data, etc.
[0057] Ranking model: An algorithm or model used to predict the order of entities. Its goal is to rank a set of items so that the position of each item in the list is as close as possible to its true relative importance or relevance order.
[0058] Chunks: content blocks, including text, pictures, tables, formulas, etc.
[0059] Generator: A generative model component used to generate text, in this case an LLM.
[0060] Critic: The referee model component used to evaluate the text, which is an LLM in this solution.
[0061] Prompt: It is a zero-shot or few-shot learning technique that enables language models to process and respond to various tasks and queries without large-scale dataset training. Prompt can be a simple question, an instruction, a partially completed sentence, or any text fragment that can provide context.
[0062] Self-learning: The process by which a system, model or individual improves its performance or knowledge through interaction with its environment, continuous practice and accumulation of experience.
[0063] Elastic Search: ES for short, is an open source, highly scalable distributed full-text search engine. It is developed in Java and provides a distributed multi-user full-text search engine with the characteristics of real-time search, stability, reliability, speed, and easy installation and use.
[0064] TF-IDF: Term Frequency-Inverse Document Frequency, a statistical method used to evaluate the importance of a word to a document set or one of the documents in a corpus. The value of TF-IDF consists of two parts: TF (term frequency) and IDF (inverse document frequency). Term frequency (TF) indicates the number of times a term appears in a document, while inverse document frequency (IDF) is an indicator to measure the rarity of a term. It is calculated based on the entire document collection and is used to reduce the weight of common terms and increase the weight of rare terms.
[0065] BM25: It is an improved algorithm based on TF-IDF and is also one of the core algorithms for information retrieval. It also takes into account the term frequency (TF) and inverse document frequency (IDF), but makes more refined adjustments. The main idea of BM25 is that for a specific query term, it should appear more frequently in relevant documents than in non-relevant documents. To this end, BM25 adjusts the relevance TF and introduces saturation and length normalization to prevent long documents from getting unfairly high scores due to containing more terms.
[0066] Figure 1 It is a schematic diagram of the processing process of an information processing method provided by an embodiment of the present specification; the information processing method is applied to a retrieval enhanced (RAG) question-answering system. In a question-answering system, for a user query (such as a question or inquiry), the system often needs to retrieve and recall the most relevant content from multiple information sources, and then let the large model summarize and answer the user's query. However, information from different sources may be quite different or even heterogeneous. For example, the queries related to the query recall are isomorphic, but the chunks related to the query recall are heterogeneous, that is, the two are not in the same semantic space, and the chunks may contain plain text paragraph content or table content (such as markdown, html format), etc.
[0067] like Figure 1As shown, after receiving the question information, the detection component is used to determine whether the question information meets the retrieval condition. When it is determined that the question information meets the retrieval condition, the determination of the target answer information corresponding to the question information needs to be obtained through retrieval. Therefore, the multi-source heterogeneous search engine can be used to query the question information in the knowledge base and the historical question and answer information base to obtain at least two heterogeneous candidate answer information. At least two question-answer pair information are constructed based on the question information and the at least two candidate answer information, and the similarity prediction model is used to predict the similarity information corresponding to the at least two question-answer pair information. The similarity information corresponding to each question-answer pair information is obtained by similarity prediction from at least two feature matching dimensions. The detection component is used to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information. As a unified deep sorting model that integrates knowledge retrieval multi-source heterogeneous query information, the similarity prediction model effectively solves the problem of unified sorting retrieval recall of query and multi-source chunks by integrating deep semantic features, multi-source text semantic interaction features, and multi-way recall semantic features.
[0068] A multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain at least two candidate answer information, thereby improving the structural diversity of the candidate answer information obtained by retrieval based on the question information. Before querying based on the question information, a detection component is used to judge whether the question information meets the retrieval conditions, reducing unnecessary operations of querying using a multi-source heterogeneous search engine, thereby improving the efficiency of question and answer. The similarity information corresponding to each question and answer pair information is obtained by similarity prediction from at least two feature matching dimensions by a similarity prediction model, thereby calculating the similarity between the question information and the candidate answer information in multiple feature dimensions, and integrating multiple feature dimensions in the calculation process. Then, the detection component is used to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question and answer pair information, so as to select the target answer information with a higher matching degree with the question information from the at least two candidate answer information based on the similarity information, thereby improving the accuracy of the target answer information.
[0069] In this specification, an information processing method is provided. This specification also involves an information processing device, a question-and-answer method, a question-and-answer device, a question-and-answer system, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0070] See also Figure 2 , Figure 2A flowchart of an information processing method provided according to an embodiment of the present specification is shown. The information processing method is applied to a question-answering system and specifically includes the following steps.
[0071] Step 202: Obtain question information, and determine at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the retrieval condition.
[0072] Specifically, question information refers to information to be queried or to be answered. Question information can be questions about a certain phenomenon or technology; question information can be questions in various industries and fields such as medical care, academia, finance, life, social services, common sense, etc.; the detection component is a discriminant component included in the question-answering system, which is used to guide and correct the query operation of at least one query node in the process of determining the target answer information corresponding to the question information in the question-answering scenario; the retrieval condition can indicate the degree of question-answering information to be queried. If the question information meets the retrieval condition, it means that the question information needs to be queried before it can be answered. On the contrary, if the question information does not meet the retrieval condition, it means that the question information can be answered without querying. Candidate answer information is the answer information to be confirmed obtained by querying the knowledge base and the historical question-answering information base based on the question information.
[0073] Based on this, the question information is obtained, and the detection component is used to detect whether the question information meets the search conditions. When the detection component detects that the question information meets the search conditions, it indicates that a query is needed for the question information, and a multi-related search engine is used to query to obtain at least two candidate answer information.
[0074] Furthermore, considering the different complexity of question information, for computational questions, the answer information corresponding to the question information can be directly determined by calculation, and there is no need to use a multi-source heterogeneous search engine for query; while for complex question-answering question information, it is necessary to use a multi-source heterogeneous search engine for query to obtain the candidate answer information corresponding to the question information, and the specific implementation is as follows:
[0075] A detection component is used to determine whether the question information meets the search condition; if so, a multi-source heterogeneous search engine is used to query the question information in a knowledge base and a historical question and answer information base to obtain the at least two candidate answer information.
[0076] Specifically, the multi-source heterogeneous search engine is used to search in multiple data sources, and the search target contains information in multiple formats, including but not limited to text format, html format, markdown format, table data type, formula data type, etc. A knowledge base refers to a database containing a large amount of data, which can be a vector database or a relational database; a historical question and answer information base refers to an information base containing historical question and answer information.
[0077] Based on this, the detection component is used to determine whether the question information meets the retrieval conditions. If the detection component detects that the question information meets the retrieval conditions, it means that it is necessary to use a multi-source heterogeneous search engine to query the question information, and then use the multi-source heterogeneous search engine to query the question information in the knowledge base and the historical question and answer information base to obtain at least two candidate answer information. If the detection component detects that the question information does not meet the retrieval conditions, it means that it is not necessary to use a multi-source heterogeneous search engine to query the question information, and the target answer information corresponding to the question information can be determined by calculation, logical reasoning, etc.
[0078] For example, when receiving the question information "How much is the price of car A" submitted by the user, the detection component is used to determine whether the question information needs to determine the candidate answer information by querying the knowledge base and the historical question and answer information base. Since the question information "How much is the price of car A" cannot obtain the candidate answer through simple calculation, it is necessary to use a multi-source heterogeneous search engine to search the multi-source knowledge base and the experience base for the question information to obtain at least two candidate answer information; when receiving the question information "15+3=?" submitted by the user, the detection component is used to determine whether the question information needs to determine the candidate answer information by querying the knowledge base and the historical question and answer information base. Since the question information "15+3=?" can obtain the answer information through simple calculation, there is no need to use a multi-source heterogeneous search engine to query the question information.
[0079] To summarize, when the detection component is used to determine that the question information meets the retrieval conditions, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information library to obtain at least two candidate answer information, thereby improving the structural diversity of the candidate answer information obtained by retrieval based on the question information.
[0080] Furthermore, considering that when a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base, the candidate answer information is determined based on the initial similarity between the queried answer information and the question information. Since the initial similarity information is relative and cannot be directly used for candidate answer generation, a detection component can be used to detect each initial candidate answer information, which is specifically implemented as follows:
[0081] The multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain multiple initial candidate answer information; initial similarity information between the multiple initial candidate answer information and the question information is determined; and the detection component is used to filter the multiple initial candidate answer information based on the initial similarity information corresponding to each initial candidate answer information to obtain the at least two candidate answer information.
[0082] Specifically, the initial candidate answer information refers to answer information that is similar to the question information; the initial similarity information is the basis for determining the initial candidate answer information when searching the knowledge base and the historical question and answer information base using a multi-source heterogeneous search engine. The candidate answer information is the answer information that has a high degree of similarity to the question information.
[0083] Based on this, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain multiple initial candidate answer information with similarity to the question information. The initial similarity information between the multiple initial candidate answer information and the question information is determined, and the multiple initial candidate answer information is filtered based on the initial similarity information corresponding to each initial candidate answer information using a detection component, and at least two candidate answer information with higher similarity are selected from the multiple initial candidate answer information. When filtering multiple initial candidate answer information, the number of candidate answer information can be set, and then based on the initial similarity information corresponding to each initial candidate answer information, each initial candidate answer information is sorted, and at least two candidate answer information that match the set number of candidate answer information are selected.
[0084] Using the above example, when receiving the question information submitted by the user, "What is the price of car A?", a multi-source heterogeneous search engine is used to search the multi-source knowledge base and experience base for the question information, and the initial candidate answer information "Car A is priced at XXX today" - similarity 0.8, "Used car A is priced at XXX today" - similarity 0.6, "Car A is expected to be priced at XXX tomorrow" - similarity 0.75, and "Car B is priced at XXX today" - similarity 0.4. When the number of candidate answer information is set to 3, "Car A is priced at XXX today", "Used car A is priced at XXX today", and "Car A is expected to be priced at XXX tomorrow" are selected as candidate answer information.
[0085] In summary, after querying multiple pieces of initial candidate answer information, the detection component is used to filter the multiple pieces of initial candidate answer information to obtain at least two pieces of candidate answer information, thereby improving the prediction effect when subsequently predicting the answer information corresponding to the question information.
[0086] Furthermore, considering the convenience of user input, there is semantic relevance between the initial question information input by the user during the question-answering cycle. Therefore, when the semantics of the initial question information is incomplete, the initial question information can be completed based on historical question information through question planning. The specific implementation is as follows:
[0087] Acquire initial question information; in a question-answering cycle corresponding to the initial question information, select historical question information associated with the initial question information; update the initial question information to target question information based on historical question semantic information corresponding to the historical question information, and use the target question information as the question information.
[0088] Specifically, the time range corresponding to the question and answer cycle can be set according to actual needs and the user's question-asking method; the question and answer cycle represents the time range for users to ask questions continuously; there is a semantic association relationship between at least two question information in the same question and answer cycle; historical question information is the question information that undergoes question and answer operations in the question and answer cycle corresponding to the initial question information; historical question semantic information is the semantics represented by historical question information; target question information refers to the question information obtained after supplementing the initial question information based on the historical question semantic information.
[0089] Based on this, the initial question information is obtained; the semantic completeness of the initial question information is judged, and when it is determined that the question semantics of the initial question information is incomplete, the historical question information associated with the initial question information is selected in the question-answering cycle corresponding to the initial question information. The historical question semantic information corresponding to the historical question information is determined, and the initial question information is updated to the target question information based on the historical question semantic information, and the target question information is used as the question information.
[0090] Using the above example, when the initial question information is determined to be "Where is car B?", it is determined that the semantic representation of the initial question information is incomplete. In this case, in the question-answering cycle where the initial question information is located, the historical question information "How much is car A priced at" adjacent to the initial question information is selected. It is determined that the semantics of the historical question information "How much is car A priced at" is to inquire about the price of car A. Based on the semantics of the historical question information "How much is car A priced at", the initial question information is updated to "Where is car B?", the question is completed, and the target question information "How much is car B priced at" is obtained, and the target question information "How much is car B priced at" is used as the question information.
[0091] To summarize, when the semantics of the initial question information is incomplete, historical question information associated with the initial question information is selected in the question-answering cycle, and the initial question information is updated based on the historical question semantic information corresponding to the historical question information, so as to complete the initial question information, thereby facilitating subsequent queries for target answer information based on the question information.
[0092] Step 204: Construct at least two question-answer pair information based on the question information and the at least two candidate answer information.
[0093] Specifically, after obtaining the question information as mentioned above and using the detection component to determine that the question information meets the retrieval conditions, a multi-source heterogeneous search engine is used to query the knowledge base and the historical question and answer information base for the question information. After obtaining at least two candidate answer information, at least two question and answer pair information can be constructed based on the question information and the at least two candidate answer information, wherein the question and answer pair information consists of the question information and any one of the at least two candidate answer information.
[0094] Based on this, after obtaining the question information as mentioned above and using the detection component to determine that the question information meets the retrieval conditions, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information library. After obtaining at least two candidate answer information, the number of candidate answer information is large. At least two question and answer pair information are constructed based on the question information and the at least two candidate answer information, which facilitates the subsequent determination of the similarity information between the question information and the candidate answer information in the question and answer pair information based on the question and answer information pair.
[0095] Step 206: Use a similarity prediction model to predict similarity information corresponding to the at least two question-answer pairs of information, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions using the similarity prediction model.
[0096] Specifically, after constructing at least two question-answer pair information based on the question information and at least two candidate answer information, the similarity prediction model can be used to predict the similarity information corresponding to the at least two question-answer pair information, wherein the similarity information corresponding to each question-answer pair information is obtained by similarity prediction from at least two feature matching dimensions by the similarity prediction model, wherein the similarity prediction model is used to predict the similarity information between the question information and the candidate answer information in the question-answer pair information; the similarity information indicates the degree of similarity between the question information and the candidate answer information in dimensions such as semantic dimension, text dimension, keyword dimension and character string dimension. Feature matching dimensions include but are not limited to semantic dimension, text dimension, keyword dimension and character string dimension.
[0097] Based on this, after constructing at least two question-answer pair information based on the question information and at least two candidate answer information, the similarity prediction model is used to predict the similarity information corresponding to the at least two question-answer pair information. The similarity prediction model predicts the similarity of the question-answer pair information from at least two feature matching dimensions, and the similarity information corresponding to each feature matching dimension is integrated to obtain the similarity information corresponding to the question-answer pair information.
[0098] Furthermore, considering that when a multi-source heterogeneous search engine is used to query question information in a knowledge base and a historical question-and-answer information base, at least two multi-source heterogeneous candidate answer information are obtained, and at least two candidate answer information correspond to multiple information types and information structures, the similarity prediction model also needs to have the ability to process multi-source heterogeneous candidate answer information, which is specifically implemented as follows:
[0099] The similarity prediction model predicts the similarity of question-answer pair information in at least two feature matching dimensions, including: a text matching dimension, a semantic matching dimension, a keyword matching dimension, and a string matching dimension; wherein the feature matching units corresponding to the at least two feature matching dimensions contained in the similarity prediction model include: a text matching unit corresponding to the text matching dimension, a semantic matching unit corresponding to the semantic matching dimension, a keyword matching unit corresponding to the keyword matching dimension, and a string matching unit corresponding to the string matching dimension.
[0100] In actual applications, the text matching dimension corresponds to information such as word granularity and word frequency; the semantic matching dimension corresponds to semantic information; the keyword matching dimension corresponds to keyword similarity; and the string matching dimension corresponds to literal similarity. Accordingly, the text matching unit corresponding to the text matching dimension is used to calculate the similarity of the question information and the candidate answer information in the text dimension; the semantic matching unit corresponding to the semantic matching dimension is used to calculate the similarity of the question information and the candidate answer information in the semantic dimension; the keyword matching unit corresponding to the keyword matching dimension is used to calculate the similarity of the question information and the candidate answer information in the keyword dimension; and the string matching unit corresponding to the string matching dimension is used to calculate the similarity of the question information and the candidate answer information in the string dimension.
[0101] Furthermore, considering that the similarity prediction model includes text matching unit, semantic matching unit, keyword matching unit, and string matching unit, after the question-answer pair information is input into the similarity prediction model, it is also necessary to use each matching unit for prediction, which is specifically implemented as follows:
[0102] The question-answer pair information is input into the similarity prediction model, wherein the similarity prediction model includes a text matching unit, a semantic matching unit, a keyword matching unit and a string matching unit; the text matching unit performs text similarity prediction on the question-answer pair information to obtain text similarity information; the semantic matching unit performs semantic similarity prediction on the question-answer pair information to obtain semantic similarity information; the keyword matching unit performs keyword similarity prediction on the question-answer pair information to obtain keyword similarity information; the string matching unit performs string similarity prediction on the question-answer pair information to obtain string similarity information; based on the text similarity information, the semantic similarity information, the keyword similarity information and the string similarity information, similarity information corresponding to the question-answer pair information is generated and output through the similarity prediction model.
[0103] Specifically, the text similarity information represents the similarity between the question information and the candidate answer information in the question and answer pair information in the text dimension, specifically representing the word frequency similarity between the question information and the candidate answer information; the semantic similarity information represents the similarity between the question information and the candidate answer information in the question and answer pair information in the semantic dimension; the keyword similarity information represents the similarity between the question information and the candidate answer information in the question and answer pair information in the keyword dimension; the string similarity information represents the similarity between the question information and the candidate answer information in the question and answer pair information in the string dimension.
[0104] Based on this, the similarity prediction model includes a text matching unit, a semantic matching unit, a keyword matching unit and a string matching unit. The question-answer pair information is input into the similarity prediction model, and the text similarity prediction of the question-answer pair information is performed through the text matching unit, the semantic matching unit, the keyword matching unit and the string matching unit, so as to obtain text similarity information, semantic similarity information, keyword similarity information and string similarity information. Text similarity information, semantic similarity prediction, keyword similarity information and string similarity information. The similarity between the question information and the candidate answer information in the question-answer pair information can be represented in the text, semantic, keyword and string dimensions respectively. Then the text similarity information, semantic similarity information, keyword similarity information and string similarity information are integrated to generate the similarity information corresponding to the question-answer pair information and output it through the similarity prediction model.
[0105] In summary, the text similarity prediction of question-answer pair information is performed through the text matching unit, semantic matching unit, keyword matching unit and string matching unit respectively, so as to improve the comprehensiveness of the similarity prediction and reduce the randomness of the obtained target answer information.
[0106] Furthermore, considering that text similarity information, semantic similarity information, keyword similarity information and string similarity information are similarity information of different dimensions, they need to be integrated to obtain the similarity information corresponding to the question-answer pair information. The specific implementation is as follows:
[0107] The text similarity information, the semantic similarity information, the keyword similarity information and the character string similarity information are integrated to obtain a similarity feature vector; the similarity feature vector is converted into an answer-related score using a fully connected layer included in the similarity prediction model, and the answer-related score is output as similarity information through the similarity prediction model.
[0108] Based on this, the text similarity information, semantic similarity information, keyword similarity information and string similarity information are integrated and spliced to obtain the similarity feature vector. The similarity feature vector is feature mapped using the fully connected layer included in the similarity prediction model, and the similarity feature vector is converted into the answer relevance score between the question information and the candidate answer information in the question-answer pair information, and the answer relevance score is output as the similarity information through the similarity prediction model.
[0109] In practical applications, such as Figure 3 As shown, after determining the question information and the candidate answer information containing the question, content block, table and other information, the question information and the candidate answer information are combined into input information, and text similarity matching, semantic similarity matching, keyword similarity matching and string similarity matching are performed respectively. When performing text similarity matching, 1-4 are executed synchronously, and the question information and the candidate answer information are input into the text matching unit to obtain text similarity features; the text similarity matching model can use TF-IDF, BM25, etc. to input the question information and the candidate answer information into the semantic matching unit, and use the dual tower Transformer to predict, and obtain the respective semantic feature vector representation, and then obtain the deep semantic features through the similarity measurement methods such as cosine distance and Euclidean distance; the question information and the candidate answer information are input into the keyword matching unit to obtain the keyword features, and the keyword features represent the degree of word segmentation overlap between the question information and the candidate answer information, and the question information and the candidate answer information are input into the string matching unit, and the string features are processed by the multi-layer perceptron to obtain the deep cross features of the string dimension. The string matching unit designs a unified mapping rule, such as whether the question information completes the 0-1 mark contained in the candidate answer information, the longest common substring, etc. This feature construction method can accept input of any length without truncation of excessive length.
[0110] Then, the fully connected layer is used to fully connect the text similarity features, deep semantic features, keyword features and deep cross features of the string dimension to obtain the answer-related score. Using the above example, when the question-answer pair information is "What is the price of car A-What is the price of car A today?", the question-answer pair information is input into the similarity prediction model, and the text similarity prediction of the question-answer pair information is performed through the text matching unit, semantic matching unit, keyword matching unit and string matching unit respectively, and the text similarity information 0.8, semantic similarity information 0.7, keyword similarity information 0.2 and string similarity information [0.124, 0.321, 0.56, ...] are obtained. The text similarity information 0.8, semantic similarity information 0.7, keyword similarity information 2 and string similarity information [0.124, 0.321, 0.56, ...] are integrated to obtain the similarity information corresponding to the question-answer pair information [0.8, 0.7, 2, 0.124, 0.321, 0.56, ...]. The similarity information is mapped using a fully connected layer to obtain the answer correlation score between the question information and the candidate answer information as the output of the similarity prediction model.
[0111] In summary, the similarity feature vector is mapped by using the fully connected layer included in the similarity prediction model and converted into answer-related scores, thereby improving the readability of the information output by the similarity prediction model.
[0112] Furthermore, the training of the similarity prediction model includes:
[0113] A sample question and answer information set including positive samples and negative samples is obtained; initial sample question and answer pair information consisting of initial sample question information and initial sample answer information corresponding to the initial sample question information is selected from the sample question and answer information set; the initial sample question and answer pair information is input into an initial similarity prediction model, wherein the initial similarity prediction model includes an initial text matching unit, an initial semantic matching unit, an initial keyword matching unit and an initial string matching unit; text similarity prediction is performed on the initial sample question and answer pair information by the initial text matching unit to obtain initial text similarity information; semantic similarity prediction is performed on the initial sample question and answer pair information by the initial semantic matching unit to obtain initial semantic similarity information; The keyword matching unit performs keyword similarity prediction on the initial sample question and answer pair information to obtain initial keyword similarity information; the initial string matching unit performs string similarity prediction on the initial sample question and answer pair information to obtain initial string similarity information; initial predicted similarity information corresponding to the sample answer information is generated based on the initial text similarity information, the initial semantic similarity information, the initial keyword similarity information and the initial string similarity information; an initial loss value is calculated based on the initial predicted similarity information and the reference similarity information corresponding to the initial sample question and answer pair information, and the initial similarity prediction model is adjusted based on the initial loss value until a similarity prediction model that meets the training stop condition is obtained.
[0114] Specifically, the samples in the sample question and answer information set include positive samples and negative samples, which are used to improve the accuracy of model prediction and the generalization ability of the model during the model training process; the initial similarity prediction model is the model to be trained; the initial prediction similarity information represents the degree of correlation between the initial sample question information and the initial sample answer information; the training stop condition can be that the training round reaches a preset round threshold, the prediction accuracy of the similarity prediction model obtained through training reaches the accuracy threshold, or the training time reaches a preset time. The initial loss value can be calculated using a preset loss function; the loss function can be a composite loss function. The composite loss function mainly consists of three parts, namely, a main loss function for comparison, an auxiliary loss function, and a rejection loss function. The loss function formula design is shown in the following formulas (1) to (4):
[0115]
[0116] in, represents the main loss function, represents the auxiliary loss function, represents the rejection loss function; The function is to limit the positive sample score The maximum negative sample score Above a certain threshold ; The function is to limit the score of all positive samples Compared with all negative sample scores Above a certain threshold ; The function is to control the score of all positive samples Above a certain threshold And all negative sample scores Below this threshold During training, a threshold is introduced to distinguish between positive and negative samples, and this threshold can be used for rejection during deployment.
[0117] Based on this, a sample question and answer information set containing positive samples and negative samples is obtained. Initial sample question and answer pair information consisting of initial sample question information and initial sample answer information corresponding to the initial sample question information is selected from the sample question and answer information set, and the initial sample question and answer pair information is input into the initial similarity prediction model for prediction. The initial sample question and answer pair information is predicted for text similarity by the initial text matching unit, initial semantic matching unit, initial keyword matching unit, and initial string matching unit of the initial similarity prediction model to obtain initial text similarity information, initial semantic similarity information, initial keyword similarity information, and initial string similarity information. Based on the initial text similarity information, the initial semantic similarity information, the initial keyword similarity information and the initial string similarity information, the initial predicted similarity information corresponding to the sample answer information is generated, and then the initial loss value is calculated according to the initial predicted similarity information and the reference similarity information corresponding to the initial sample question and answer pair information using a preset loss function, and the initial similarity prediction model is adjusted based on the initial loss value to obtain an intermediate similarity prediction model, and then sample question information and sample answer information are selected from the sample question and answer information set to form a sample question and answer information pair, and are input into the intermediate similarity prediction model for prediction, and so on, until a similarity prediction model that meets the training stop condition is obtained.
[0118] In summary, the initial similarity model is supervised and trained using positive and negative samples to improve the generalization ability of the model, ensuring that the similarity prediction model has good prediction ability in the question-answering scenario.
[0119] Step 208: Using the detection component, according to the similarity information corresponding to the at least two question-answer pair information, select the target answer information corresponding to the question information from the at least two candidate answer information.
[0120] Specifically, after using the similarity prediction model to predict the similarity information corresponding to at least two question-answer pairs, the detection component can be used to select target answer information corresponding to the question information from at least two candidate answer information based on the similarity information corresponding to the at least two question-answer pairs, wherein the target answer information is at least one of the candidate answer information. When selecting the target answer information from the candidate answer information, the selection can be made based on the size of the similarity corresponding to the similarity information, and the candidate answer information with greater similarity can be selected as the target answer information.
[0121] Based on this, after using the similarity prediction model to predict the similarity information corresponding to at least two question-answer pairs, the detection component can be used to determine the similarity scores of the similarity information corresponding to at least two question-answer pairs, sort the similarity scores, set the answer information selection threshold, and select the target answer information that matches the answer information selection threshold from at least two candidate answer information according to the similarity scores corresponding to each candidate answer information. The target answer information is used as the answer information corresponding to the question information.
[0122] Furthermore, considering that the target question information may have a more complex question execution logic and it is impossible to directly query the answer based on the target question information, the target question information can be split and each split question information can be processed separately. The specific implementation is as follows:
[0123] The target question information is split to obtain at least two split question information having an execution order; and the question information is composed of the at least two split question information.
[0124] Based on this, the target problem information is split according to the problem execution logic of the target problem information, and split at each execution node contained in the target problem information to obtain at least two split problem information with an execution order. The problem information is composed of at least two split problem information, wherein a multi-level associated problem refers to a problem set containing multiple associated sub-problems, that is, a problem set composed of multiple entities.
[0125] For example, when the target question information is "Xiao Ming is 8 years old this year, Xiao Hong is one year older than Xiao Ming and 3 years younger than Xiao Li, how old are Xiao Hong and Xiao Li respectively", according to the question execution logic of the target question information, the target question information can be split into split question information 1 "Xiao Ming is 8 years old this year, Xiao Hong is one year older than Xiao Ming, how old is Xiao Hong this year", and split question information 2 "Xiao Hong is 3 years younger than Xiao Li, how old is Xiao Li this year". Split question information 1 and split question information 2 form the question information.
[0126] In summary, when the target question information has a relatively complex question execution logic, the target question information is split to obtain at least two split question information with an execution order, and then the target question information is gradually answered to improve the answering efficiency.
[0127] Furthermore, considering that after the question information is split into at least two split question information, when predicting the target answer information corresponding to the question information, it is necessary to refer to the split answer information corresponding to the at least two split question information respectively, and the specific implementation is as follows:
[0128] The detection component is used to select the split answer information corresponding to the at least two split question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information; the at least two split answer information are integrated to obtain the target answer information corresponding to the question information.
[0129] Based on this, the split question information is used as question information for similarity information prediction, and then the detection component is used to select the split answer information corresponding to at least two split question information from at least two candidate answer information according to the similarity information corresponding to at least two question-answer pair information, to obtain the split answer information corresponding to each split question information, and integrate the at least two split answer information based on the question information to obtain the target answer information corresponding to the question information.
[0130] Continuing with the above example, after splitting the question information into split question information 1 "Xiaoming is 8 years old this year, Xiaohong is one year older than Xiaoming, how old is Xiaohong this year", split question information 2 "Xiaohong is 3 years younger than Xiaoli, how old is Xiaoli this year", the answer information corresponding to each split question information is determined respectively, that is, the answer information corresponding to split question information 1 "Xiaoming is 8 years old this year, Xiaohong is one year older than Xiaoming, how old is Xiaohong this year" is Xiaohong 9 years old, and the answer information corresponding to split question information 2 "Xiaohong is 3 years younger than Xiaoli, how old is Xiaoli this year" is Xiaoli 12 years old. The target answer information "Xiaohong is 9 years old this year, Xiaoli is 12 years old" is composed of the answer information corresponding to split question information 1 and the answer information corresponding to split question information 2.
[0131] To summarize, by determining the split answer information corresponding to at least two split question information respectively, and then integrating at least two split answer information, the target answer information corresponding to the question information is obtained, thereby achieving the split answering of the question information and improving the answering efficiency.
[0132] Furthermore, considering that in the process of determining the target answer information corresponding to the question information and providing feedback to the user, multiple types of information such as user feedback information and similarity information are generated, the above information can be integrated into the question and answer record information corresponding to the question information and stored in the historical question and answer information database as reference information for subsequent question and answer task processing. The specific implementation is as follows:
[0133] Calculate the information matching score between the question information and the target answer information; when the information matching score is greater than the information matching threshold, integrate the question information and the target answer information to obtain the answer information corresponding to the question information; feed back the answer information to the user corresponding to the question information, and receive user feedback information submitted by the user for the answer information; generate question and answer record information based on the user feedback information, the question information, the target answer information and the similarity information corresponding to the target answer information; store the question and answer record information in the historical question and answer information library; when the information matching score is less than or equal to the information matching threshold, execute the step of selecting the historical question information associated with the initial question information in the question and answer cycle corresponding to the initial question information until the query termination condition is met.
[0134] Specifically, the information matching score indicates the degree of matching between the question information and the target answer information, and is used to indicate whether the target answer information can support the question information as the accurate answer information corresponding to the question information; the information matching threshold can be set according to the set answer accuracy, and a higher information matching threshold indicates that it can support the determination of the target answer information with higher accuracy corresponding to the question information; user feedback information refers to the evaluation information of the target answer information after the user receives the target answer information, indicating the degree of recognition of the target answer information by the user; the question and answer record information may include intermediate information related to the question information generated in the question and answer process of determining the target answer information corresponding to the question information, sending the target answer information to the user, and receiving user feedback information. The intermediate information includes but is not limited to the detection information obtained by the detection component when detecting each question and answer node in the question and answer process, as well as the question information, target answer information, user feedback information, etc.
[0135] Based on this, the information matching score between the question information and the target answer information is calculated. When the information matching score is greater than the information matching threshold, it means that the information matching degree between the question information and the target answer information is high, and the target answer information can be used as the answer to the question information. The question information and the target answer information are integrated to obtain the answer information with high readability corresponding to the question information, and the answer information is fed back to the user corresponding to the question information, and the user feedback information submitted by the user for the answer information is received. The user feedback information indicates the user's recognition degree of the target answer information. The question and answer record information is generated based on the user feedback information, the question information, the target answer information and the similarity information corresponding to the target answer information. The question and answer record information is stored in the historical question and answer information library, and the user provides a question and answer reference in the process of performing subsequent question and answer tasks. When the information matching score is less than or equal to the information matching threshold, it means that the information matching degree between the question information and the target answer information is low, and the target answer information cannot be used as the answer to the question information. At this time, in the question and answer cycle corresponding to the initial question information, the historical question information associated with the initial question information can be selected, and then the target answer information corresponding to the question information can be determined again until the query termination condition is met, that is, the threshold of the number of repeated queries is reached.
[0136] For example, the question-answer record information can be: Question information: query: Who is taller? Dialogue history: ["Which class are Xiao Ming and Xiao Hong from?"], ["Xiao Ming's height", "Xiao Hong's height", "Who is taller, Xiao Ming or Xiao Hong?"] Retrieval chunk information: ["Student information table, | name | class | age | height | weight | \n...", ...]; Target answer information: Xiao Ming is 180cm tall, Xiao Hong is 175cm tall, so Xiao Ming is taller than Xiao Hong. User feedback information: Like; Critic: 5 points, the reason is that the output result provides a complete, highly detailed and informative answer to the query, which is completely satisfactory.
[0137] In summary, the information matching score between the question information and the target answer information determines the subsequent processing steps for determining the target answer information corresponding to the question information. Furthermore, when the question and answer record information is generated, the question and answer record information is stored in the historical question and answer information library, so as to facilitate the query and determination of the subsequent answer information.
[0138] Furthermore, considering that the historical question and answer information database contains rich historical question and answer information, the historical question and answer information database can be queried for question information first, and then the knowledge base can be queried if no query results are obtained. The specific implementation is as follows:
[0139] The multi-source heterogeneous search engine is used to query the historical question and answer information database for the question information; if no query result is obtained, the multi-source heterogeneous search engine is used to query the knowledge database for the question information to obtain at least two candidate answer information.
[0140] Based on this, the query result represents the historical question and answer information record that matches the question information. The multi-source heterogeneous search engine is used to query the question information in the historical question and answer information database. If no query result is obtained, it means that the historical question and answer information database does not contain question and answer record information with a high degree of matching with the question information. Then, the multi-source heterogeneous search engine is used to query the question information in the knowledge base to obtain at least two candidate answer information.
[0141] To summarize, we first use a multi-source heterogeneous search engine to query the question information in the historical question and answer information database. If no query results are obtained, we then use a multi-source heterogeneous search engine to query the question information in the knowledge base, thereby ensuring that the candidate answer information corresponding to the question information can be determined through the query.
[0142] Furthermore, considering that the historical question and answer information database contains rich historical question and answer information, there may be a situation where the target answer information corresponding to the question information can be determined by only searching in the historical question and answer information database. In this case, the target answer information can be determined based on the target question and answer record information extracted from the historical question and answer information database. The specific implementation is as follows:
[0143] When the query results are obtained, target question and answer record information is determined in the historical question and answer information library based on the query results; when it is determined that the target question and answer record information matches the question information based on the target user feedback information contained in the target question and answer record information, answer information is extracted from the target question and answer record information, and the answer information is used as the target answer information corresponding to the question information.
[0144] Specifically, the target question and answer record information is the question and answer record with a high degree of match with the question information determined in the historical question and answer information database based on the query results; the target user feedback information refers to the accuracy evaluation information given by the user to the answer information recorded in the target question and answer record information; the answer information is the target answer information corresponding to the target question information recorded in the target question and answer record information.
[0145] Based on this, when the query result is obtained, it means that the historical question and answer information database contains question and answer records with a high degree of match with the question information, and the target question and answer record information matching the question information is determined in the historical question and answer information database based on the query result. When it is determined that the target question and answer record information matches the question information based on the target user feedback information contained in the target question and answer record information, it means that the user in the target question and answer record information gives a positive evaluation to the target answer information corresponding to the target question information, then the answer information is extracted from the target question and answer record information, and the answer information is used as the target answer information corresponding to the question information.
[0146] In summary, when the multi-source heterogeneous search engine is used to query the question information in the historical question and answer information database and obtain the query result, the target question and answer record information matching the question information can be determined in the historical question and answer information database based on the query result. Then, the target answer information corresponding to the question information can be directly determined based on the target question and answer record information. This improves the efficiency of determining the target answer information.
[0147] An information processing method provided by an embodiment of the present specification is applied to a question-answering system. After obtaining question information, and when the detection component is used to determine that the question information meets the retrieval conditions, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question-answering information base to obtain at least two candidate answer information, thereby improving the structural diversity of the candidate answer information obtained by retrieval based on the question information. Before querying based on the question information, the detection component is used to judge whether the question information meets the retrieval conditions, reducing unnecessary operations of querying using a multi-source heterogeneous search engine, thereby improving the efficiency of question-answering. At least two question-answer pair information are constructed based on the question information and at least two candidate answer information, and a similarity prediction model is used to predict the similarity information corresponding to the at least two question-answer pair information. The similarity information corresponding to each question-answer pair information is obtained by similarity prediction from at least two feature matching dimensions by the similarity prediction model, thereby calculating the similarity between the question information and the candidate answer information in multiple feature dimensions, and integrating multiple feature dimensions in the calculation process. Then, the detection component is used to select target answer information corresponding to the question information from at least two candidate answer information according to the similarity information corresponding to at least two question-answer pairs of information, so as to select target answer information with a higher degree of match with the question information from at least two candidate answer information based on the similarity information, thereby improving the accuracy of the target answer information.
[0148] The following combination Figure 4 , taking the application of the information processing method provided in this specification in knowledge question answering as an example, the information processing method is further explained. Among them, Figure 4A processing flow chart of an information processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0149] Step 402: receiving initial question information submitted by a user, and obtaining historical question information associated with the initial question information.
[0150] In the knowledge question answering scenario, the knowledge question answering process of the question answering system is as follows: Figure 5 As shown. The historical question information is the historical conversation information of the user. After receiving the initial question information submitted by the user, the historical conversation information of the user is obtained.
[0151] Step 404: Perform problem planning on the initial problem information based on the historical problem information to obtain target problem information including split problem information and completed problem information.
[0152] The question planning module performs question planning on the initial question information based on the historical question information, and plans the question information to be searched next based on the initial question information. The initial question information can be completed based on the historical question information, and the initial question information can be split to obtain multiple split question information.
[0153] Step 406: When it is determined based on the detection component that the target question information meets the retrieval condition, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain at least two pieces of initial candidate answer information.
[0154] The detection component is the referee model - Critic. The detection component is used to determine whether it is necessary to search for the target question information. If no search is required, the target answer information corresponding to the target question information can be generated and fed back to the user. If search is required, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and experience pool. In the query process, queries are performed on the split question information 1-split question information n respectively to obtain the candidate answers 1-candidate answers m corresponding to each split question information. All the candidate answers obtained are used as the initial candidate answer information. The knowledge base stores chunk knowledge information collected offline, usually disassembled documents, tables, formulas, picture data fragments, etc.
[0155] Step 408: Use the detection component to filter at least two initial candidate answer information and select at least two candidate answer information related to the target question information. The detection component intervenes to determine whether each candidate answer is related to the split question, and then selects the candidate answers related to the split question information according to the judgment result to form the candidate answer information. The candidate answer information includes candidate answers 1 to candidate answers k corresponding to each split question information.
[0156] Step 410: Use a similarity prediction model to predict similarity information corresponding to at least two pieces of candidate answer information, wherein the similarity information corresponding to each question-answer pair is obtained by performing similarity prediction using the similarity prediction model from at least two feature matching dimensions.
[0157] The similarity prediction model is used to rearrange the candidate answers 1-candidate answers k corresponding to each split question information. Among them, the similarity prediction model includes at least two feature matching dimensions: text matching dimension, semantic matching dimension, keyword matching dimension and string matching dimension; correspondingly, the similarity prediction model includes feature matching units corresponding to at least two feature matching dimensions: text matching unit corresponding to the text matching dimension, semantic matching unit corresponding to the semantic matching dimension, keyword matching unit corresponding to the keyword matching dimension and string matching unit corresponding to the string matching dimension. By processing the split question information and the candidate answer information based on each matching unit of the similarity prediction model, the correlation between each candidate answer information and the split question information can be obtained.
[0158] Step 412: Selecting initial answer information corresponding to the question information from at least two pieces of candidate answer information based on the similarity information corresponding to the at least two pieces of candidate answer information.
[0159] By predicting the relevance score of each candidate answer relative to the split question information, N candidate answers with higher scores are selected from candidate answers 1-candidate answers k to form the initial answer information.
[0160] Step 414: Integrate the initial answer information to obtain target answer information. When the detection component is used to determine that the target answer information matches the initial question information, the target answer information is fed back to the user as an answer to the initial question information.
[0161] The Generator component is used to generate answer information corresponding to the split question information based on N candidate answers. Then, the candidate answers corresponding to each split question information are integrated to generate answer information corresponding to the initial question information, that is, the target answer information. When the detection component is used to score the usability of the target answer information, if the score is high, the target answer information is fed back to the user as the answer to the initial question information.
[0162] It should be noted that the detection component Critic acts as a "referee" in the entire question-answering chain, and will constantly interact with the intermediate results to make corrections during the process. Critic determines whether the current query needs to be retrieved, and outputs the tag [retrieval] or [no retrieval required]. [Retrieval] enters the retrieval module, and [no retrieval required] directly generates the final response; when the retrieval module recalls the candidate answers, the Critic scores the candidate answers in turn and outputs the tags [relevant] or [irrelevant], which is a further denoising filter for the retrieval module. For each [relevant] chunk, the Generator component will do an integration, and then the Critic will score whether the answer information obtained by the current integration can support the answer to the current question information, and output the tags [fully supported] or [partially supported] or [irrelevant / contradictory]. The tags and response results of "whether the chunk is relevant - current answer information - whether it is supported" are organized in turn, and the Generator component makes the final summary answer.
[0163] In addition, if the score is low, the process returns to step 404 until the number of returns reaches the return number threshold.
[0164] Step 416: Determine the score information of the target answer information using the detection component, and receive the user's evaluation information on the target answer information.
[0165] Step 418: Question and answer record information is formed based on the initial question information, target question information, evaluation information, target answer information, and scoring information of the target answer information, and is stored in a historical question and answer information library for the execution of subsequent question and answer tasks.
[0166] The historical question-and-answer information database serves as an experience pool and incorporates expert experience information. At the same time, after the question-and-answer session is over, the user's feedback on the question-and-answer results will be stored in the experience pool. This allows the question-and-answer experience to be accumulated, allowing the question-and-answer system to operate in a self-learning manner and improve the question-and-answer effect in real time. The high-confidence positive and high-confidence negative examples scored by the Critic in a question-and-answer session will also be aggregated into the experience pool, together with the expert experience and user feedback information, to provide support for the subsequent answer effect improvement and operation and maintenance of the question-and-answer system.
[0167] In specific implementation, the experience pool stores question and answer data from three sources: expert experience, user feedback, and referee scores. Expert experience refers to the business knowledge accumulated in actual business, which can be included in the experience pool in the form of a standard question and answer library. User feedback is during use, by setting up like and dislike buttons on the page, allowing users to interactively select the quality of their subjective judgment of the answer. Critic scoring will also be carried out simultaneously, the main purpose of which is to allow the LLM answer system to use its own built-in knowledge and data distribution to improve the consistency of answers and judgments, thereby improving the quality of responses. The information stored in this type of data includes: user query, context dialogue history summary, question and answer planning record, retrieval chunk information, answer response, user feedback mark (like and dislike), and critic scoring details.
[0168] In actual application, in the question-answering process, Figure 6 As shown in the figure, after obtaining the initial question information submitted by the user, the initial question information is planned to obtain the target question information. After recalling the target question information based on the experience pool and knowledge base to obtain the candidate answer information, the answer result can be obtained by rearranging the candidate answer information. The detection component performs detection on each execution node during the question-answering process, which can locate the anomalies in the question-answering process in a timely manner and handle the anomalies to ensure efficient and accurate execution of the question-answering process.
[0169] In addition, if Figure 7 As shown, you can also directly use multi-source heterogeneous search engines such as Elastic Search and Vector Engine to search for relevant knowledge from various databases such as text, tables, and formulas for the initial question information, implement multi-way recall, and obtain recall results of various structural types such as text and table. Then, combined with business knowledge, rearrange the texts such as Text 1 and Text 2 in the multi-way recall results, and the table data such as Table 1 and Table 2 to obtain the rearranged results Text 1 and Table 1, and then use the generation model to generate the answer results based on Text 1 and Table 1.
[0170] In summary, in one embodiment of the present specification, by introducing a detection component to detect each operation node in the question-and-answer process, anomalies can be discovered in time and handled, thereby achieving error correction. The historical question-and-answer information library is used as an experience pool, and the detection results of the detection component and the actual feedback of the user after the answer is completed can be continuously collected during the question-and-answer process. Combined with the expert experience input predefined by business experts, the question-and-answer system can continuously accumulate experience during online use and improve the answer effect in real time. At the same time, the question-and-answer system is equipped with self-learning capabilities to improve the accuracy of answers. In addition, when multi-source heterogeneous candidate answer information is obtained through retrieval through a multi-source heterogeneous search engine, the multi-source heterogeneous candidate answer information is rearranged in multiple dimensions such as text, semantics, keywords and strings, and then the answer information corresponding to the question information is generated, thereby improving the matching degree between the answer information and the question information, and improving the user's question-and-answer experience.
[0171] Corresponding to the above method embodiment, this specification also provides an information processing device embodiment, Figure 8 FIG. 1 shows a schematic diagram of the structure of an information processing device provided by an embodiment of the present specification. Figure 8 As shown, an information processing device is applied to a question-answering system, and the device includes:
[0172] The acquisition module 802 is configured to acquire question information and determine at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition;
[0173] A construction module 804 is configured to construct at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information;
[0174] The prediction module 806 is configured to predict the similarity information corresponding to the at least two question-answer pairs of information using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions by the similarity prediction model;
[0175] The selection module 808 is configured to use the detection component to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information respectively corresponding to the at least two question-answer pair information.
[0176] In an optional embodiment, the acquisition module 802 is further configured to:
[0177] Determine whether the problem information satisfies the search condition by using the detection component;
[0178] If so, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain the at least two candidate answer information.
[0179] In an optional embodiment, the acquisition module 802 is further configured to:
[0180] Using the multi-source heterogeneous search engine to query the question information in the knowledge base and the historical question and answer information base to obtain multiple pieces of initial candidate answer information;
[0181] Determining initial similarity information between the plurality of pieces of initial candidate answer information and the question information respectively;
[0182] The detection component is used to filter the multiple pieces of initial candidate answer information based on the initial similarity information corresponding to each piece of initial candidate answer information to obtain the at least two pieces of candidate answer information.
[0183] In an optional embodiment, the prediction module 806 is further configured to:
[0184] Text matching dimension, semantic matching dimension, keyword matching dimension, and string matching dimension;
[0185] The feature matching units corresponding to at least two feature matching dimensions included in the similarity prediction model include:
[0186] The text matching unit corresponds to the text matching dimension, the semantic matching unit corresponds to the semantic matching dimension, the keyword matching unit corresponds to the keyword matching dimension, and the string matching unit corresponds to the string matching dimension.
[0187] In an optional embodiment, the prediction module 806 is further configured to:
[0188] Inputting the question-answer pair information into the similarity prediction model, wherein the similarity prediction model comprises a text matching unit, a semantic matching unit, a keyword matching unit and a string matching unit;
[0189] Predicting text similarity of the question-answer pair information by the text matching unit to obtain text similarity information;
[0190] Predicting the semantic similarity of the question-answer pair information by the semantic matching unit to obtain semantic similarity information;
[0191] Predicting keyword similarity of the question-answer pair information by the keyword matching unit to obtain keyword similarity information;
[0192] Predicting the string similarity of the question-answer pair information by the string matching unit to obtain string similarity information;
[0193] Similarity information corresponding to the question-answer pair information is generated based on the text similarity information, the semantic similarity information, the keyword similarity information and the character string similarity information and outputted through the similarity prediction model.
[0194] In an optional embodiment, the prediction module 806 is further configured to:
[0195] Integrating the text similarity information, the semantic similarity information, the keyword similarity information and the character string similarity information to obtain a similarity feature vector;
[0196] The similarity feature vector is converted into an answer-related score by using a fully connected layer included in the similarity prediction model, and the answer-related score is output as similarity information through the similarity prediction model.
[0197] In an optional embodiment, the acquisition module 802 is further configured to:
[0198] Get initial question information;
[0199] In the question-answering cycle corresponding to the initial question information, selecting historical question information associated with the initial question information;
[0200] The initial question information is updated to target question information based on the historical question semantic information corresponding to the historical question information, and the target question information is used as the question information.
[0201] In an optional embodiment, the acquisition module 802 is further configured to:
[0202] Splitting the target problem information to obtain at least two pieces of split problem information having an execution order;
[0203] The question information is composed of the at least two split question information.
[0204] In an optional embodiment, the selection module 808 is further configured to:
[0205] Using the detection component, according to the similarity information respectively corresponding to the at least two question-answer pair information, select the split answer information respectively corresponding to the at least two split question information from the at least two candidate answer information;
[0206] Integrate at least two pieces of split answer information to obtain target answer information corresponding to the question information.
[0207] In an optional embodiment, the selection module 808 is further configured to:
[0208] Calculating an information matching score between the question information and the target answer information;
[0209] In the case where the information matching score is greater than the information matching threshold, the question information and the target answer information are integrated to obtain the answer information corresponding to the question information; the answer information is fed back to the user corresponding to the question information, and user feedback information submitted by the user for the answer information is received; question and answer record information is generated based on the user feedback information, the question information, the target answer information and the similarity information corresponding to the target answer information; the question and answer record information is stored in the historical question and answer information library;
[0210] When the information matching score is less than or equal to the information matching threshold, the step of selecting historical question information associated with the initial question information in the question-answering cycle corresponding to the initial question information is executed until the query termination condition is met.
[0211] In an optional embodiment, the prediction module 806 is further configured to:
[0212] Obtain a sample question-answer information set containing positive samples and negative samples;
[0213] Selecting initial sample question-answer pair information consisting of initial sample question information and initial sample answer information corresponding to the initial sample question information from the sample question-answer information set;
[0214] Inputting the initial sample question-answer pair information into an initial similarity prediction model, wherein the initial similarity prediction model comprises an initial text matching unit, an initial semantic matching unit, an initial keyword matching unit and an initial string matching unit;
[0215] Performing text similarity prediction on the initial sample question-answer pair information by the initial text matching unit to obtain initial text similarity information;
[0216] Predicting the semantic similarity of the initial sample question-answer pair information by the initial semantic matching unit to obtain initial semantic similarity information;
[0217] Predicting the keyword similarity of the initial sample question-answer pair information by the initial keyword matching unit to obtain initial keyword similarity information;
[0218] Predicting the string similarity of the initial sample question-answer pair information by the initial string matching unit to obtain initial string similarity information;
[0219] Generating initial prediction similarity information corresponding to the sample answer information based on the initial text similarity information, the initial semantic similarity information, the initial keyword similarity information and the initial character string similarity information;
[0220] An initial loss value is calculated according to the initial predicted similarity information and the reference similarity information corresponding to the initial sample question-answer pair information, and the initial similarity prediction model is adjusted based on the initial loss value until a similarity prediction model that meets the training stop condition is obtained.
[0221] In an optional embodiment, the selection module 808 is further configured to:
[0222] Using the multi-source heterogeneous search engine to query the historical question and answer information database for the question information;
[0223] In the case where no query result is obtained, the multi-source heterogeneous search engine is used to query the question information in the knowledge base to obtain at least two pieces of candidate answer information.
[0224] In an optional embodiment, the selection module 808 is further configured to:
[0225] In the case of obtaining the query result, determining the target question and answer record information in the historical question and answer information database based on the query result;
[0226] When it is determined that the target question and answer record information matches the question information based on the target user feedback information contained in the target question and answer record information, answer information is extracted from the target question and answer record information, and the answer information is used as the target answer information corresponding to the question information.
[0227] In summary, by obtaining the question information and determining at least two candidate answer information corresponding to the question information, the question information needs to be determined by the detection component to meet the retrieval conditions, and then the at least two candidate answer information corresponding to the question information is determined, thereby improving the structural diversity of the candidate answer information obtained by retrieval based on the question information. Before querying based on the question information, the detection component is used to judge whether the question information meets the retrieval conditions, reducing unnecessary operations of querying using multi-source heterogeneous search engines, thereby improving the efficiency of question answering. Based on the question information and at least two candidate answer information, at least two question-answer pair information are constructed, and the similarity prediction model is used to predict the similarity information corresponding to the at least two question-answer pair information. The similarity information corresponding to each question-answer pair information is obtained by the similarity prediction model through similarity prediction from at least two feature matching dimensions, thereby calculating the similarity between the question information and the candidate answer information in multiple feature dimensions, and integrating multiple feature dimensions in the calculation process. Then, the detection component is used to select target answer information corresponding to the question information from at least two candidate answer information according to the similarity information corresponding to at least two question-answer pairs of information, so as to select target answer information with a higher degree of match with the question information from at least two candidate answer information based on the similarity information, thereby improving the accuracy of the target answer information.
[0228] The above is a schematic scheme of an information processing device of this embodiment. It should be noted that the technical scheme of the information processing device and the technical scheme of the above information processing method belong to the same concept, and the details not described in detail in the technical scheme of the information processing device can be referred to the description of the technical scheme of the above information processing method.
[0229] See also Fig. 9 , Fig. 9 A flowchart of a question-and-answer method provided according to an embodiment of the present specification is shown. The question-and-answer method is applied to a cloud-side device and specifically includes the following steps.
[0230] Step 902: receiving question information submitted by the end-side device, and determining at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition;
[0231] Step 904: construct at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information;
[0232] Step 906: using a similarity prediction model to predict similarity information corresponding to the at least two question-answer pairs of information, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions by the similarity prediction model;
[0233] Step 908: Utilize the detection component to select target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information, and feed back the target answer information to the terminal device.
[0234] The question information submitted by the receiving end device is determined, and at least two candidate answer information corresponding to the question information is determined. After the question information is determined by the detection component to meet the search conditions, at least two candidate answer information corresponding to the question information is determined, thereby improving the structural diversity of the candidate answer information obtained by searching based on the question information. Before querying based on the question information, the detection component is used to judge whether the question information meets the search conditions, reducing unnecessary query operations using multi-source heterogeneous search engines, thereby improving the efficiency of question answering.
[0235] At least two question-answer pair information are constructed based on the question information and at least two candidate answer information, and the similarity prediction model is used to predict the similarity information corresponding to the at least two question-answer pair information. The similarity information corresponding to each question-answer pair information is obtained by similarity prediction from at least two feature matching dimensions by the similarity prediction model, thereby calculating the similarity between the question information and the candidate answer information in multiple feature dimensions, and integrating multiple feature dimensions in the calculation process. Then, the detection component is used to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information, so as to select the target answer information with a higher matching degree with the question information from the at least two candidate answer information based on the similarity information, thereby improving the accuracy of the target answer information.
[0236] Corresponding to the above method embodiment, this specification also provides a question-answering device embodiment, Fig.10 FIG. 1 shows a schematic diagram of the structure of a question-answering device provided by an embodiment of this specification. Fig.10 As shown, the question-answering device is applied to a cloud-side device, and the device includes:
[0237] The receiving module 1002 is configured to receive question information submitted by a terminal device and determine at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition;
[0238] A construction module 1004 is configured to construct at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information;
[0239] The prediction module 1006 is configured to predict the similarity information corresponding to the at least two question-answer pairs of information respectively using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions by the similarity prediction model;
[0240] The feedback module 1008 is configured to use the detection component to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information, and feed back the target answer information to the terminal side device.
[0241] In summary, the question information submitted by the receiving end device is received, and at least two candidate answer information corresponding to the question information is determined. After the question information needs to be determined by the detection component to meet the retrieval conditions, at least two candidate answer information corresponding to the question information is determined, thereby improving the structural diversity of the candidate answer information obtained by retrieval based on the question information. Before querying based on the question information, the detection component is used to judge whether the question information meets the retrieval conditions, reducing unnecessary operations of querying using multi-source heterogeneous search engines, thereby improving the efficiency of question answering. At least two question-answer pair information are constructed based on the question information and at least two candidate answer information, and the similarity prediction model is used to predict the similarity information corresponding to the at least two question-answer pair information. The similarity information corresponding to each question-answer pair information is obtained by the similarity prediction model through similarity prediction from at least two feature matching dimensions, thereby calculating the similarity between the question information and the candidate answer information in multiple feature dimensions, and integrating multiple feature dimensions in the calculation process. Then, the detection component is used to select target answer information corresponding to the question information from at least two candidate answer information according to the similarity information corresponding to at least two question-answer pairs of information, so as to select target answer information with a higher degree of match with the question information from at least two candidate answer information based on the similarity information, thereby improving the accuracy of the target answer information.
[0242] The above is a schematic scheme of a question-answering device of this embodiment. It should be noted that the technical scheme of the question-answering device and the technical scheme of the question-answering method described above are of the same concept, and the details not described in detail in the technical scheme of the question-answering device can be found in the description of the technical scheme of the question-answering method described above.
[0243] See also Fig.11 , Fig.11 A structural diagram of a question-answering system provided according to an embodiment of the present specification is shown. The question-answering system 1100 includes a cloud-side device 1120 and a terminal-side device 1140;
[0244] The terminal device 1140 is used to generate question information based on the question-answering instruction submitted by the user, and send the question information to the cloud device 1120;
[0245] The cloud-side device 1120 is used to determine at least two candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the retrieval condition; construct at least two question-answer pair information based on the question information and the at least two candidate answer information; use a similarity prediction model to predict similarity information corresponding to the at least two question-answer pair information, wherein the similarity information corresponding to each question-answer pair information is obtained by similarity prediction from at least two feature matching dimensions by the similarity prediction model; use the detection component to select the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information corresponding to the at least two question-answer pair information, and feed the target answer information back to the terminal-side device 1140.
[0246] In actual applications, the question-answering system may include multiple terminal devices 1140 and cloud devices 1120. Multiple terminal devices 1140 may establish communication connections through the cloud devices 1120. When the question-answering system performs question-answering tasks, the cloud devices 1120 are used to provide question-answering services between multiple terminal devices 1140. Multiple terminal devices 1140 may serve as senders or receivers, respectively, and realize communication through the cloud devices 1120.
[0247] The user can interact with the cloud side device 1120 through the terminal side device 1140 to receive data sent by other terminal side devices 1140, or send data to other terminal side devices 1140, etc. In the question-answering scenario, the user can send question information to the cloud side device 1120 through the terminal side device 1140. After the cloud side device 1120 determines the target answer information corresponding to the question information, it feeds back the target answer information to the terminal side device 1140.
[0248] The terminal device 1140 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The terminal device 1140 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the cloud device 1120, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The terminal device 1140 can be deployed in an electronic device, and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, mailbox clients, social platform software, etc.
[0249] The cloud-side device 1120 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that provide support for models used on the client, and servers that process data sent by the client. It should be noted that the cloud-side device 1120 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server for a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0250] The above is a schematic scheme of a question-answering system of this embodiment. It should be noted that the technical scheme of the question-answering system and the technical scheme of the question-answering method described above are of the same concept, and the details not described in detail in the technical scheme of the question-answering system can be found in the description of the technical scheme of the question-answering method described above.
[0251] Fig.12The block diagram of a computing device 1200 according to one embodiment of the present specification is shown. The components of the computing device 1200 include but are not limited to a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and the database 1250 is used to store data.
[0252] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0253] In one embodiment of the present specification, the above components of the computing device 1200 and Fig.12 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.12 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0254] The computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1200 may also be a mobile or stationary server.
[0255] The processor 1220 is used to execute the following computer executable instructions, which implement the steps of the above method when executed by the processor.
[0256] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above method.
[0257] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above method when executed by a processor.
[0258] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above method.
[0259] An embodiment of the present specification also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0260] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the above method belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be referred to the description of the technical solution of the above method.
[0261] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0262] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0263] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0264] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0265] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. An information processing method, applied to question answering system, include: Acquire question information, and determine at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition; Constructing at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information; Predicting the similarity information corresponding to the at least two question-answer pairs of information using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions by the similarity prediction model; Determining the similarity information corresponding to any one of the at least two question-answer pair information includes: Inputting the question-answer pair information into the text matching unit, semantic matching unit, keyword matching unit and string matching unit in the similarity prediction model, performing text similarity prediction, semantic similarity prediction, keyword similarity prediction and string similarity prediction on the question-answer pair information, integrating the predicted text similarity information, semantic similarity information, keyword similarity information and string similarity information to obtain a similarity feature vector; using the fully connected layer included in the similarity prediction model to convert the similarity feature vector to obtain an answer-related score as the similarity information; The detection component is used to select target answer information corresponding to the question information from the at least two candidate answer information based on the similarity information respectively corresponding to the at least two question-answer pair information.
2. The information processing method according to claim 1, wherein the determining of at least two pieces of candidate answer information corresponding to the question information comprises: include: Determine whether the problem information satisfies the search condition by using the detection component; If so, a multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain the at least two candidate answer information.
3. The information processing method according to claim 2, wherein the multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain at least two candidate answer information, include: Using the multi-source heterogeneous search engine to query the question information in the knowledge base and the historical question and answer information base to obtain multiple pieces of initial candidate answer information; Determining initial similarity information between the plurality of pieces of initial candidate answer information and the question information respectively; The detection component is used to filter the multiple pieces of initial candidate answer information based on the initial similarity information corresponding to each piece of initial candidate answer information to obtain the at least two pieces of candidate answer information.
4. The information processing method according to claim 1, wherein the similarity prediction model performs similarity prediction on at least two feature matching dimensions of question-answer pair information. include: Text matching dimension, semantic matching dimension, keyword matching dimension, and string matching dimension; The feature matching units corresponding to at least two feature matching dimensions included in the similarity prediction model include: The text matching unit corresponds to the text matching dimension, the semantic matching unit corresponds to the semantic matching dimension, the keyword matching unit corresponds to the keyword matching dimension, and the string matching unit corresponds to the string matching dimension.
5. The information processing method according to claim 1, wherein the obtaining of the problem information comprises: include: Get initial question information; In the question-answering cycle corresponding to the initial question information, selecting historical question information associated with the initial question information; The initial question information is updated to target question information based on the historical question semantic information corresponding to the historical question information, and the target question information is used as the question information.
6. The information processing method according to claim 5, in the case where the target question information corresponds to a multi-level associated question, after the initial question information is updated to the target question information based on the historical question semantic information corresponding to the historical question information, further include: Splitting the target problem information to obtain at least two pieces of split problem information having an execution order; The question information is composed of the at least two split question information.
7. The information processing method according to claim 6, wherein the detection component selects the target answer information corresponding to the question information from the at least two candidate answer information according to the similarity information respectively corresponding to the at least two question-answer pair information, include: Using the detection component, according to the similarity information respectively corresponding to the at least two question-answer pair information, select the split answer information respectively corresponding to the at least two split question information from the at least two candidate answer information; Integrate at least two pieces of split answer information to obtain target answer information corresponding to the question information.
8. The information processing method according to claim 7, wherein after selecting the target answer information corresponding to the question information from the at least two candidate answer information, the detection component further comprises: include: Calculating an information matching score between the question information and the target answer information; In the case where the information matching score is greater than the information matching threshold, integrating the question information and the target answer information to obtain answer information corresponding to the question information; Feedback the answer information to the user corresponding to the question information, and receive user feedback information submitted by the user for the answer information; generate question and answer record information based on the user feedback information, the question information, the target answer information and the similarity information corresponding to the target answer information; Storing the question and answer record information in the historical question and answer information database; When the information matching score is less than or equal to the information matching threshold, the step of selecting historical question information associated with the initial question information in the question-answering cycle corresponding to the initial question information is executed until the query termination condition is met.
9. The information processing method according to claim 4, wherein the training of the similarity prediction model is: include: Obtain a sample question-answer information set containing positive samples and negative samples; Selecting initial sample question-answer pair information consisting of initial sample question information and initial sample answer information corresponding to the initial sample question information from the sample question-answer information set; Inputting the initial sample question-answer pair information into an initial similarity prediction model, wherein the initial similarity prediction model comprises an initial text matching unit, an initial semantic matching unit, an initial keyword matching unit and an initial string matching unit; Performing text similarity prediction on the initial sample question-answer pair information by the initial text matching unit to obtain initial text similarity information; Predicting the semantic similarity of the initial sample question-answer pair information by the initial semantic matching unit to obtain initial semantic similarity information; Predicting the keyword similarity of the initial sample question-answer pair information by the initial keyword matching unit to obtain initial keyword similarity information; Predicting the string similarity of the initial sample question-answer pair information by the initial string matching unit to obtain initial string similarity information; Generating initial prediction similarity information corresponding to the sample answer information based on the initial text similarity information, the initial semantic similarity information, the initial keyword similarity information and the initial character string similarity information; An initial loss value is calculated according to the initial predicted similarity information and the reference similarity information corresponding to the initial sample question-answer pair information, and the initial similarity prediction model is adjusted based on the initial loss value until a similarity prediction model that meets the training stop condition is obtained.
10. The information processing method according to claim 2, wherein the multi-source heterogeneous search engine is used to query the question information in the knowledge base and the historical question and answer information base to obtain at least two candidate answer information, include: Using the multi-source heterogeneous search engine to query the historical question and answer information database for the question information; In the case where no query result is obtained, the multi-source heterogeneous search engine is used to query the question information in the knowledge base to obtain at least two pieces of candidate answer information.
11. The information processing method according to claim 10, after using the multi-source heterogeneous search engine to query the historical question and answer information database for the question information, further include: In the case of obtaining the query result, determining the target question and answer record information in the historical question and answer information database based on the query result; When it is determined that the target question and answer record information matches the question information based on the target user feedback information contained in the target question and answer record information, answer information is extracted from the target question and answer record information, and the answer information is used as the target answer information corresponding to the question information.
12. A question-answering method, applied to a cloud-side device, include: receiving question information submitted by a terminal device, and determining at least two pieces of candidate answer information corresponding to the question information, wherein the question information is determined by the detection component to satisfy the search condition; Constructing at least two pieces of question-answer pair information based on the question information and the at least two pieces of candidate answer information; Predicting the similarity information corresponding to the at least two question-answer pairs of information using a similarity prediction model, wherein the similarity information corresponding to each question-answer pair of information is obtained by performing similarity prediction from at least two feature matching dimensions by the similarity prediction model; Determining the similarity information corresponding to any one of the at least two question-answer pair information includes: Inputting the question-answer pair information into the text matching unit, semantic matching unit, keyword matching unit and string matching unit in the similarity prediction model, performing text similarity prediction, semantic similarity prediction, keyword similarity prediction and string similarity prediction on the question-answer pair information, integrating the predicted text similarity information, semantic similarity information, keyword similarity information and string similarity information to obtain a similarity feature vector; using the fully connected layer included in the similarity prediction model to convert the similarity feature vector to obtain an answer-related score as the similarity information; The detection component is used to select target answer information corresponding to the question information from the at least two candidate answer information based on the similarity information corresponding to the at least two question-answer pair information, and the target answer information is fed back to the terminal side device.
13. A question-answering system, comprising a cloud-side device and a terminal-side device; The terminal-side device is used to generate question information based on the question-answering instruction submitted by the user, and send the question information to the cloud-side device; The cloud-side device is used to determine at least two pieces of candidate answer information corresponding to the question information, wherein: The question information is determined by the detection component to satisfy the retrieval condition; at least two question-answer pair information are constructed based on the question information and the at least two candidate answer information; the similarity prediction model is used to predict the similarity information corresponding to the at least two question-answer pair information, wherein the similarity information corresponding to each question-answer pair information is obtained by similarity prediction from at least two feature matching dimensions by the similarity prediction model; the determination of the similarity information corresponding to any one of the at least two question-answer pair information includes: inputting the question-answer pair information into the text matching unit, the semantic matching unit, the keyword matching unit and the string matching unit in the similarity prediction model, Perform text similarity prediction, semantic similarity prediction, keyword similarity prediction and string similarity prediction on the information, integrate the predicted text similarity information, semantic similarity information, keyword similarity information and string similarity information to obtain a similarity feature vector; use the fully connected layer included in the similarity prediction model to transform the similarity feature vector to obtain an answer-related score as similarity information; use the detection component to select target answer information corresponding to the question information from the at least two candidate answer information based on the similarity information respectively corresponding to the at least two question-answer pair information, and feed the target answer information back to the end-side device.
14. A computing device, include: Memory and processor; The memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions. When the computer program or instructions are executed by the processor, the steps of the method described in any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium storing a computer program or instruction, wherein the computer program or instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.
16. A computer program product, comprising a computer program or instructions, which implement the steps of the method according to any one of claims 1 to 12 when executed by a processor.
Citation Information
Patent Citations
Information processing method, question answering method and question answering system
CN118296131A
Semantic retrieval method and device and electronic equipment
CN112035730A
Question and answer system construction method based on Pipeline processing and ES storage
CN113742469A
Information retrieval method based on question and answer library, question and answer system and computing equipment
CN115292459A
Passage type questioning and answering device, method, and program
JP2018124914A
