Question and answer method, medium, apparatus, and computing device

By constructing a knowledge base using a vector database and utilizing multi-turn dialogue to identify user intent, the problem of low answer accuracy in existing technologies is solved, resulting in a more accurate knowledge base question-answering system.

CN117235218BActive Publication Date: 2026-07-24HANGZHOU NETEASE ZAIGU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU NETEASE ZAIGU TECH CO LTD
Filing Date
2023-09-14
Publication Date
2026-07-24

Smart Images

  • Figure CN117235218B_ABST
    Figure CN117235218B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a question and answer method, relating to the technical field of natural language processing. The question and answer method comprises: in response to receiving a question search operation on a search box in a multimedia page, obtaining a question to be answered; obtaining an intent recognition prompt information corresponding to the question to be answered by conducting at least one round of dialogue with a user according to the question to be answered; determining a target intent of the question to be answered according to the intent recognition prompt information; determining a target knowledge set corresponding to the target intent in a target knowledge base corresponding to the target intent; and generating and outputting a target answer matched with the question to be answered according to answer generation prompt information containing the target knowledge set. By conducting at least one round of dialogue with the user, the intent recognition prompt information for accurately identifying the user intent is obtained, thereby improving the accuracy of the answer returned to the user and bringing a better experience to the user. Furthermore, the present disclosure provides a medium, an apparatus and a computing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this disclosure relate to the field of natural language processing technology, and more specifically, to question-answering methods, media, apparatus, and computing devices. Background Technology

[0002] This section is intended to provide background or context for embodiments of this disclosure. The description herein is not intended to imply that it is prior art simply because it is included in this section.

[0003] A knowledge base is a database used to store the knowledge required by a question-answering system. A knowledge base-based question-answering system (or knowledge base question-answering system for short) can retrieve the most relevant knowledge from the knowledge base when a user asks a question, and generate the final answer to the question and return it to the user.

[0004] In related technologies, knowledge-based question-answering systems typically use an encoder in a pre-trained Seq2Seq model to encode the question, obtaining a fixed-length vector. This vector captures the semantics of the question, and a decoder in the Seq2Seq model generates a semantically equivalent structured representation to determine the user's intent. Based on this intent, a corresponding answer is then generated and returned to the user. However, if the user's question is semantically ambiguous, this method cannot accurately understand the user's intent, resulting in low accuracy of the returned answer.

[0005] Therefore, there is an urgent need for a solution that can improve the accuracy of the returned answers. Summary of the Invention

[0006] This disclosure provides a question-answering method, medium, apparatus, and computing device to improve the accuracy of answers returned to users.

[0007] In a first aspect of this disclosure, a question-answering method is provided, comprising: in response to receiving a question search operation directed to a search box on a multimedia page, obtaining a question to be answered; engaging in at least one round of dialogue with a user based on the question to be answered to obtain intent recognition prompt information corresponding to the question to be answered; determining the target intent of the question to be answered based on the intent recognition prompt information; determining a target knowledge set corresponding to the target intent in a target knowledge base corresponding to the target intent; generating prompt information based on an answer containing the target knowledge set; generating and outputting a target answer matching the question to be answered, wherein the target answer contains the target knowledge set.

[0008] In one embodiment of this disclosure, the intent recognition prompt information is obtained by: performing intent recognition on the question to be answered to obtain a first intent; determining whether the first intent meets the intent integrity requirement; responding that the first intent meets the intent integrity requirement, and obtaining the intent recognition prompt information according to the question to be answered.

[0009] In another embodiment of this disclosure, obtaining intent recognition prompt information based on the question to be answered includes: adding the question to be answered to a first prompt information template to obtain intent recognition prompt information.

[0010] In yet another embodiment of this disclosure, the method further includes: in response to the first intent not satisfying the intent completeness requirement, generating and outputting a supplementary question for the question to be answered, so as to obtain an answer to the supplementary question; integrating the answers to the question to be answered and the supplementary question to obtain a new question to be answered; and performing an intent recognition step on the new question to be answered to obtain a first intent, until the obtained first intent satisfies the intent completeness requirement.

[0011] In another embodiment of this disclosure, the target knowledge base is obtained as follows: in response to detecting a knowledge acquisition request, source knowledge and classification information are acquired; the source knowledge is classified according to the classification information to obtain N knowledge sets, each of which corresponds to one of the N categories included in the classification information, where N is a positive integer; for each of the N knowledge sets, vector transformation is performed on the knowledge included in the knowledge set to obtain a vector set corresponding to the knowledge set; N vector databases corresponding to the N categories are determined; the N vector sets are stored in the N vector databases to obtain N knowledge bases, which include the target knowledge base.

[0012] In another embodiment of this disclosure, the knowledge acquisition request is generated by triggering a scheduled task. The scheduled task includes at least one of the following configuration information: description information of the scheduled task, triggering period of the scheduled task, name of the application executing the scheduled task, server executing the scheduled task, running mode of the server when executing the scheduled task, task blocking handling strategy, and task failure handling strategy.

[0013] In another embodiment of this disclosure, obtaining source knowledge includes: determining the pagination information corresponding to the source knowledge in a third-party platform; and obtaining the knowledge corresponding to each page in the third-party platform according to the pagination information using the platform's interface to obtain the source knowledge.

[0014] In another embodiment of this disclosure, before determining the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent, the method further includes: adding the target intent to the second prompt information template to obtain knowledge base routing prompt information; and performing knowledge base routing on the target intent according to the knowledge base routing prompt information to determine the target knowledge base.

[0015] In another embodiment of this disclosure, determining the target knowledge set corresponding to the target intent in the target knowledge base includes: performing vector transformation on the target intent to obtain an intent vector; using a proximity algorithm to determine M knowledge vectors in the target knowledge base whose matching degree with the intent vector is greater than a preset value, where M is a positive integer; performing text transformation on the M knowledge vectors respectively to obtain M knowledge; and determining the target knowledge set including the M knowledge.

[0016] In another embodiment of this disclosure, the method further includes: assigning a corresponding weight to each knowledge in the target knowledge set according to the matching degree; and determining the order of each knowledge in the target knowledge set according to the weight corresponding to each knowledge in descending order.

[0017] In another embodiment of this disclosure, the method further includes: assigning a corresponding weight to each knowledge in the target knowledge set according to the matching degree; determining the target knowledge with the largest weight; determining that the target knowledge is the first in the target knowledge set, and that other knowledge besides the target knowledge is randomly ordered after the target knowledge.

[0018] In yet another embodiment of this disclosure, the method further includes: in response to the detection of dynamic knowledge intervention information, adding intervention knowledge to the target knowledge set.

[0019] In another embodiment of this disclosure, the method further includes: determining that in the target knowledge set, the target knowledge is first, the intervention knowledge is randomly ordered after the target knowledge, and the other knowledge besides the target knowledge and the intervention knowledge is randomly ordered after the intervention knowledge.

[0020] In another embodiment of this disclosure, the answer generation prompt information is obtained by adding the question to be answered and the target knowledge set to the third prompt information template to obtain the answer generation prompt information.

[0021] In a second aspect of the present disclosure, a medium is provided that stores computer execution instructions, which, when executed, are used to implement the question-and-answer method as described in the first aspect.

[0022] In a third aspect of this disclosure, a question-answering device is provided, comprising: a first acquisition module, configured to acquire a question to be answered in response to receiving a question search operation directed to a search box on a multimedia page; a second acquisition module, configured to engage in at least one round of dialogue with a user based on the question to be answered, to acquire intent recognition prompt information corresponding to the question to be answered; a first determination module, configured to determine the target intent of the question to be answered based on the intent recognition prompt information; a second determination module, configured to determine a target knowledge set corresponding to the target intent in a target knowledge base corresponding to the target intent; and an output module, configured to generate prompt information based on an answer containing the target knowledge set, generate and output a target answer matching the question to be answered, wherein the target answer contains the target knowledge set.

[0023] In a fourth aspect of the present disclosure, a computing device is provided, including: a processor and a memory connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the question-and-answer method as described in the first aspect.

[0024] According to the question-and-answer method, medium, apparatus, and computing device of this disclosure, at least one round of dialogue can be conducted with the user based on the question to be answered. Even if the user's intent regarding the question to be answered is ambiguous, intent recognition prompts corresponding to the question to be answered can be obtained through multiple rounds of dialogue. In this way, the user's intent can be more accurately identified through the intent recognition prompts. Based on the accurate user intent, an accurate target knowledge base can be matched. In this way, an accurate target knowledge set corresponding to the user's intent can be determined in the accurate target knowledge base. Therefore, based on the accurate target knowledge set, the accuracy of the generated target answer can be improved, bringing a better experience to the user. Attached Figure Description

[0025] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:

[0026] Figure 1 A schematic diagram illustrating an application scenario of the question-and-answer method provided in this embodiment of the disclosure;

[0027] Figure 2 A flowchart illustrating the question-and-answer method provided in this embodiment of the disclosure;

[0028] Figure 3 A schematic diagram of the interface for configuring timed tasks provided in this embodiment of the disclosure;

[0029] Figure 4 A schematic diagram of the structure of the storage medium provided in this embodiment of the disclosure;

[0030] Figure 5 A schematic diagram of the structure of the question-and-answer device provided in this embodiment of the disclosure;

[0031] Figure 6 A schematic diagram of the structure of a computing device provided in this embodiment of the disclosure.

[0032] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0033] The principles and spirit of this disclosure will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0034] Those skilled in the art will recognize that embodiments of this disclosure can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0035] According to embodiments of this disclosure, a question-and-answer method, medium, apparatus, and computing device are proposed.

[0036] In this article, it is important to understand that the terms used have the following meanings:

[0037] Natural Language Processing (NLP) refers to the technology of using natural language, the language humans use for communication, to interact and communicate with machines. Through human processing of natural language, computers can read and understand it.

[0038] Large Language Models (LLMs) are artificial intelligence models designed to understand and generate human language by training on large amounts of text data.

[0039] Input prompts are pre-defined suggestions that allow users to input information based on these suggestions, thereby guiding the LLM to generate responses that better meet the user's needs.

[0040] The Seq2Seq model is a deep learning model that uses a recurrent neural network (RNN) and is primarily used for sequence generation tasks, such as machine translation, dialogue generation, and image captioning. A Seq2Seq model typically consists of an encoder and a decoder. The encoder transforms the input sequence (such as all the words in a sentence) into a fixed vector representation called a context vector, which contains the semantic information of the input sequence. The decoder then generates the output sequence based on this context vector.

[0041] XXL-Job is an open-source distributed task scheduling framework that supports Cron expressions and application programming interfaces (APIs) for task scheduling. It provides a variety of task management functions and achieves high availability and scalability through distributed task execution modules and databases. It also provides a visual interface for task management and monitoring, as well as an alarm mechanism for task failure.

[0042] 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, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0043] Furthermore, the number of any elements in the accompanying drawings is for illustrative purposes only and not for limitation, and any naming is for distinction only and has no limiting meaning.

[0044] The principles and spirit of this disclosure will be explained in detail below with reference to several representative embodiments. Invention Overview

[0046] The inventors have discovered that a knowledge base question-answering system mainly consists of two parts: the construction of the knowledge base and the answering of questions.

[0047] Existing knowledge base question answering systems typically construct their knowledge base by first acquiring domain knowledge text, segmenting it into words, and building triples in the form of <subject, relation, object>. Then, an inverted index is created based on the subject keywords and stored in an Online Analytical Processing (OLAP) database to obtain the knowledge base. This is done to structure and store the knowledge so that when answering questions, the system can query and use the corresponding knowledge in the knowledge base based on the user's question to return the answer to the user. However, the inventors have found that the knowledge in this way is rather disorganized, resulting in lower accuracy of the answers.

[0048] Existing knowledge base question answering systems typically answer questions in the following two ways:

[0049] One approach is based on information retrieval, which uses keyword or phrase matching to understand and retrieve answers from a knowledge base. However, the inventors found that the accuracy of the answers obtained in this way is low.

[0050] Another approach is based on semantic parsing, which uses NLP techniques to transform questions into structured representations, such as semantic graphs or logical expressions, to better understand user intent and provide more accurate results. Specifically, combining neural network technology and the Seq2Seq model, trained with a large amount of labeled data, enables the Seq2Seq model to learn semantic information. After receiving the question, the encoder in the Seq2Seq model encodes the question into a fixed-length vector, capturing the question's semantics and intent. Then, the decoder in the Seq2Seq model generates a structured representation semantically equivalent to the question. However, the inventors have found that the Seq2Seq model requires a large amount of labeled data for training and updating. The more high-quality labeled data, the better the model's understanding ability. However, labeled data is actually very scarce, requiring a large number of personnel with specialized knowledge to annotate it, resulting in high costs. Furthermore, knowledge is time-sensitive, requiring continuous investment in knowledge maintenance. Moreover, as the knowledge domain expands, data also needs to be labeled synchronously, leading to high and ongoing human resource costs. Additionally, if the user's question is semantically ambiguous, this method may fail to accurately understand the user's intent, resulting in low accuracy of the returned answer.

[0051] Therefore, this disclosure provides a question-answering method. When constructing a knowledge base, the knowledge source is first determined, which can be achieved by automatically acquiring source knowledge using a scheduled task. Then, the acquired source knowledge is categorized according to preset classification information, resulting in multiple categories of knowledge. Finally, vector transformation is performed on the knowledge in each category to obtain the corresponding vector, and the resulting vector is added to the vector database corresponding to each category, thus obtaining multiple knowledge bases. Since different knowledge bases have different categories, the knowledge in the target knowledge base can be acquired more accurately, thereby improving the accuracy of the answers returned to the user.

[0052] When answering a user's unanswered question, at least one round of dialogue can be initiated. This allows for the creation of intent recognition prompts based on the dialogue information, enabling accurate identification of the target intent of the question. Once the precise target intent is determined, a matching knowledge base can be found across multiple knowledge bases. This precise knowledge base then identifies the accurate set of target knowledge corresponding to the intent. Answer generation prompts can then be set based on this precise set of target knowledge to generate a target answer that includes the target knowledge set and matches the question. Therefore, after a user submits a question, an accurate target answer can be returned, improving the accuracy of the returned answer and providing a better user experience.

[0053] After introducing the basic principles of this disclosure, various non-limiting embodiments of this disclosure will be described in detail below.

[0054] Application Scenarios Overview

[0055] First refer to Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of the question-and-answer method provided in this disclosure. The question-and-answer method provided in this disclosure can be applied to... Figure 1 The question-answering system shown may include a scheduled task triggering module, a source knowledge acquisition module, a knowledge source, a classification module, a vector conversion module, a knowledge base, and a knowledge base question-answering model. The knowledge base includes multiple vector databases, each containing a target knowledge base. The knowledge base question-answering model may include an intent recognition module, a knowledge base matching module, a target knowledge acquisition module, and an answer generation module.

[0056] In the above application scenario, the scheduled task triggering module sends a knowledge acquisition request to the source knowledge acquisition module by periodically triggering a scheduled task, so that the source knowledge acquisition module can obtain source knowledge from the knowledge source and send the obtained source knowledge to the classification module; the classification module classifies the source knowledge according to the classification information, obtains multiple knowledge sets, and sends multiple knowledge sets to the vector conversion module; the vector conversion module performs vector conversion on the knowledge in each knowledge set, obtains multiple vector sets corresponding to multiple knowledge sets, and writes the corresponding vector sets to each vector database in the knowledge base.

[0057] In the above application scenario, users can ask questions in the search box on a multimedia page. The intent recognition module can acquire the user's input question and engage in at least one round of dialogue with the user to obtain intent recognition prompts. Based on these prompts, the intent recognition module can determine the precise target intent of the question and send it to the knowledge base matching module. After acquiring the target intent, the knowledge base matching module can set knowledge base routing prompts and match the target knowledge base corresponding to the target intent within the knowledge base. It then sends the target intent and the identifier of the target knowledge base to the target knowledge acquisition module. The target knowledge acquisition module locates the target knowledge base within the knowledge base based on its identifier and acquires the target knowledge corresponding to the target intent, resulting in a target knowledge set. The answer generation module sets answer generation prompts containing the target knowledge set and generates and outputs a target answer matching the question, which includes the target knowledge set. This improves the accuracy of the target answer.

[0058] In the above application scenarios, the target knowledge acquisition module can also acquire intervention knowledge upon detecting dynamic knowledge intervention information, add the intervention knowledge to the target knowledge set, sort the target knowledge and intervention knowledge included in the target knowledge set, and send the sorted target knowledge set to the answer generation module. This allows the answer generation module to display the knowledge included in the target answer in order. This ensures that the target answer better matches the user's intent and guarantees the diversity and richness of the target answer.

[0059] Exemplary methods

[0060] The following is combined Figure 1 Application scenarios, refer to Figure 2 This document describes a question-and-answer method according to exemplary embodiments of the present disclosure. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in any way. Rather, the embodiments of the present disclosure can be applied to any applicable scenario.

[0061] Figure 2 This is a flowchart illustrating the question-and-answer method provided in this embodiment of the disclosure. Figure 2 In this question-and-answer method, the steps include:

[0062] S201: In response to receiving a question search operation in the search box of a multimedia page, retrieve the question to be answered.

[0063] In this step, users can enter the question to be answered in the search box on the multimedia page and perform a search to obtain the target answer corresponding to the question.

[0064] Alternatively, the multimedia page can be a page on the shopping platform where users can enter questions to be answered.

[0065] S202: Engage in at least one round of dialogue with the user based on the question to be answered, in order to obtain intent recognition prompts corresponding to the question to be answered.

[0066] In this step, when handling multi-turn dialogue scenarios, LLM (Limited Ledger Modeling) can be used to perform in-depth analysis of each user input to determine whether the current input is a supplement or extension of the previous input. This allows all user input to be collected after the dialogue ends, enabling the determination of the user's needs. Therefore, by analyzing all user input, intent recognition prompts can be determined, leading to a more accurate understanding of the user's requirements.

[0067] S203: Determine the target intent of the question to be answered based on the intent recognition prompt information.

[0068] In this step, since the intent recognition prompts are obtained through at least one round of dialogue with the user, determining the target intent of the question to be answered through the intent recognition prompts can make the obtained target intent more accurate and more in line with the user's actual needs.

[0069] S204: In the target knowledge base corresponding to the target intent, determine the target knowledge set corresponding to the target intent.

[0070] In this step, after determining the target intent, the target knowledge base corresponding to the target intent can be selected from multiple preset knowledge bases, ensuring the matching between the target knowledge base and the target intent. In this way, multiple target knowledge corresponding to the target intent can be selected from the target knowledge base, thereby obtaining an accurate set of target knowledge.

[0071] S205: Generate prompt information based on the answer containing the target knowledge set, generate and output the target answer that matches the question to be answered, and the target answer contains the target knowledge set.

[0072] In this step, after obtaining the target knowledge set, you can set up answer generation prompts that include the target knowledge set. Then, based on the prompts generated by the answer set, you can generate a target answer that matches the question to be answered. In this way, the target answer can match the user's needs, and the target answer can be output to the user, thus ensuring user satisfaction.

[0073] The question-answering method disclosed herein can engage in at least one round of dialogue with a user based on the question to be answered. Even if the user's intent regarding the question is ambiguous, multiple rounds of dialogue can yield intent recognition prompts corresponding to the question. These prompts allow for more accurate identification of the user's intent. Based on the accurate user intent, an accurate target knowledge base can be matched. Within this accurate knowledge base, a precise set of target knowledge corresponding to the user's intent can be determined. Consequently, based on this precise set of target knowledge, the accuracy of the generated target answer can be improved, resulting in a better user experience.

[0074] In one embodiment of this disclosure, the intent recognition prompt information is obtained by: performing intent recognition on the question to be answered to obtain a first intent; determining whether the first intent meets the intent integrity requirement; responding that the first intent meets the intent integrity requirement, and obtaining the intent recognition prompt information according to the question to be answered.

[0075] In this embodiment, the intent completeness requirement can be a preset requirement. At least one round of dialogue can be conducted with the user based on the question to be answered to obtain intent recognition prompts corresponding to the question.

[0076] Optionally, if the user's initial intent in inputting the question to be answered is clear, then only one round of dialogue with the user is needed to obtain intent recognition prompts. That is, when the user inputs the question to be answered, the LLM performs intent recognition to obtain the first intent. If the first intent meets the intent completeness requirement, then the question to be answered is considered to fully express the user's actual needs. Therefore, intent recognition prompts can be directly obtained based on the question to be answered. By determining the target intent of the question to be answered through intent recognition prompts, the obtained target intent can be more accurate and better aligned with the user's actual needs.

[0077] For example, the question to be answered is "I want to find a delicious treat for my three-month-old kitten, do you have any recommendations?". The LLM performs intent recognition on the question, obtaining the first intent as "Find a cat treat suitable for a kitten." The intent completeness requirement is: clearly identify the product the user needs, and whether the target audience for the product is clearly defined. Analyzing the first intent based on the intent completeness requirement, it is determined that the user needs a cat treat, and the target audience is a kitten; therefore, the first intent is considered to meet the intent completeness requirement.

[0078] In another embodiment of this disclosure, obtaining intent recognition prompt information based on the question to be answered includes: adding the question to be answered to a first prompt information template to obtain intent recognition prompt information.

[0079] In this embodiment, the first prompt information template can be a preset template. When setting intent recognition prompt information, only relevant content needs to be added to the first prompt information template to quickly obtain the intent recognition prompt information. In this way, the target intent of the question to be answered can be determined through the intent recognition prompt information, making the target intent more accurate and more in line with the user's actual needs.

[0080] Optionally, the first prompt information template may include user dialogue context, task description, response format, semantic recognition examples, user input, etc. The user dialogue context can be the user's historical questions, the task description can be a task description specific to the user dialogue context, the response format can be an answer specific to the user dialogue context, the semantic recognition examples can be examples specific to that answer, and the user input can be supplementary text specific to that answer. Adding a question to be answered to the first prompt information template to obtain intent recognition prompt information can be achieved by adding the question to be answered to the user dialogue context.

[0081] In yet another embodiment of this disclosure, the method further includes: in response to the first intent not satisfying the intent completeness requirement, generating and outputting a supplementary question for the question to be answered, so as to obtain an answer to the supplementary question; integrating the answers to the question to be answered and the supplementary question to obtain a new question to be answered; and performing an intent recognition step on the new question to be answered to obtain a first intent, until the obtained first intent satisfies the intent completeness requirement.

[0082] In this embodiment, if the intent of the user's initial input of the question to be answered is unclear, multiple rounds of dialogue with the user are required to determine the user's actual needs. That is, when the user inputs the question to be answered, the LLM performs intent recognition on the question to obtain a first intent. If the first intent does not meet the intent completeness requirement, it is considered that the question to be answered cannot fully express the user's actual needs. Therefore, the LLM generates and outputs a supplementary question to the question to be answered. The user provides an answer to the supplementary question, and the LLM integrates the answers to the question to be answered and the supplementary question to obtain a new question to be answered. It then continues to recognize the first intent of the new question to be answered until the first intent meets the intent completeness requirement. Intent recognition prompts are then obtained based on the new question to be answered. Thus, by determining the target intent of the question to be answered through intent recognition prompts, the target intent obtained can be more accurate and more closely aligned with the user's actual needs.

[0083] For example, a user's initial question is, "I want to find a delicious treat for my cat, do you have any recommendations?" The LLM (Local Limiting Model) performs intent recognition on the question, resulting in the first intent: "Find a suitable cat treat for my cat." The intent completeness requirement is: clearly identify the product the user needs, and whether the target audience for that product is clearly defined. Analyzing the first intent based on the intent completeness requirement, it is determined that the user needs a cat treat, and the target audience is cats. However, cats are divided into kittens and adult cats, so the target audience is unclear. Therefore, the first intent is considered not to meet the intent completeness requirement. The LLM generates and outputs a supplementary question to the unanswered question: "How old is your cat?". The user answers "3 months old" to this supplementary question. The LLM integrates the answers to the unanswered question and the supplementary question to obtain a new unanswered question: "I want to find a delicious treat for my 3-month-old kitten. Do you have any recommendations?". The LLM identifies the new first intent of the new unanswered question as "finding a cat treat suitable for kittens". Based on the intent completeness requirement, the new first intent is analyzed to determine that the product the user needs is a cat treat, and the target audience is kittens. The target audience is clear. Therefore, the new first intent is considered to meet the intent completeness requirement.

[0084] Optionally, when obtaining intent recognition prompts based on new questions to be answered, the user's first input question to be answered can be added to the user dialogue context section of the first prompt template, a supplementary question can be added to the response format section, and the answer to the supplementary question can be added to the user input section to obtain intent recognition prompts.

[0085] In another embodiment of this disclosure, the target knowledge base is obtained as follows: in response to detecting a knowledge acquisition request, source knowledge and classification information are acquired; the source knowledge is classified according to the classification information to obtain N knowledge sets, each of which corresponds to one of the N categories included in the classification information, where N is a positive integer; for each of the N knowledge sets, vector transformation is performed on the knowledge included in the knowledge set to obtain a vector set corresponding to the knowledge set; N vector databases corresponding to the N categories are determined; the N vector sets are stored in the N vector databases to obtain N knowledge bases, which include the target knowledge base.

[0086] In this embodiment, upon detecting a knowledge acquisition request, the request can be sent to a knowledge source to retrieve source knowledge. Simultaneously, preset classification information can also be acquired. This classification information can be obtained together with source knowledge from the knowledge source, or it can be obtained separately from a classification information source.

[0087] In the above embodiments, after obtaining the source knowledge and classification information, the source knowledge can be classified according to the classification information so that different source knowledge can be classified into the corresponding knowledge base in the future. This enables more effective organization and management of knowledge content in different fields, and provides convenience for subsequent knowledge base matching and knowledge retrieval.

[0088] Specifically, after obtaining N knowledge sets, for each of the N knowledge sets, a vector transformation can be performed on each knowledge item included in that knowledge set to obtain the embedding vector corresponding to each knowledge item, thus obtaining the vector set corresponding to that knowledge set. Similarly, N vector sets can be obtained. Then, N vector databases are determined, each independently corresponding to one of the N categories. The N vector sets can be stored in the N vector databases, resulting in N knowledge bases, each of which is also a vector database. In this way, after determining the target intent, the knowledge base corresponding to the target intent can be selected from the N knowledge bases as the target knowledge base. Only the knowledge corresponding to the target intent needs to be determined in the target knowledge base, which greatly reduces the scope and computational load of knowledge retrieval, thereby improving the efficiency and accuracy of knowledge retrieval.

[0089] Optionally, the source knowledge is product information, including product name and reasons for recommendation, and the classification information includes the primary and secondary sales categories. After obtaining the product and classification information, the product names can be categorized according to the secondary sales categories. For example, if the product names are A (cat food), B (cat food), C (dog food), D (cat treats), E (cat litter), and F (dog treats), and the secondary sales categories are cat food, cat treats, dog food, dog treats, and cat litter, then A (cat food) and B (cat food) are categorized as cat food, C (dog food) as dog food, D (cat treats) as cat treats, E (cat litter) as cat litter, and F (dog treats) as dog treats. A (cat food), B (cat food), C (dog food), D (cat treats), E (cat litter), and F (dog treats) are all classified under the primary sales category "pets". The knowledge base includes a cat food knowledge base, a cat treat knowledge base, a dog food knowledge base, a dog treat knowledge base, and a cat litter knowledge base. The cat food knowledge base includes cat food A and the reasons for recommending cat food A, and cat food B and the reasons for recommending cat food B. The cat treat knowledge base includes cat treat D and the reasons for recommending cat treat D. The dog food knowledge base includes dog food C and the reasons for recommending dog food C. The dog treat knowledge base includes dog treat F and the reasons for recommending dog treat F. The cat litter knowledge base includes cat litter E and the reasons for recommending cat litter E.

[0090] In another embodiment of this disclosure, the knowledge acquisition request is generated by triggering a scheduled task. The scheduled task includes at least one of the following configuration information: description information of the scheduled task, triggering period of the scheduled task, name of the application executing the scheduled task, server executing the scheduled task, running mode of the server when executing the scheduled task, task blocking handling strategy, and task failure handling strategy.

[0091] In this embodiment, in order to achieve automated acquisition of source knowledge, a scheduled task can be configured to generate a knowledge acquisition request by triggering the scheduled task to obtain source knowledge, thereby improving the convenience of acquiring source knowledge.

[0092] In one alternative implementation, when configuring a scheduled task, one can, for example... Figure 3 Configure the settings on the interface shown. Figure 3 This diagram illustrates the interface for configuring scheduled tasks according to an embodiment of this disclosure. This interface can be the interface of the XXL-Job management backend. Users input configuration information such as the task description, trigger cycle, application name, server, server execution mode, task blocking handling strategy, and task failure handling strategy on this interface, and then complete the configuration (or registration) of the scheduled task by clicking the "OK" button. This allows for the generation of knowledge acquisition requests triggered by scheduled tasks, achieving automated acquisition of source knowledge.

[0093] In another embodiment of this disclosure, obtaining source knowledge includes: determining the pagination information corresponding to the source knowledge in a third-party platform; and obtaining the knowledge corresponding to each page in the third-party platform according to the pagination information using the platform's interface to obtain the source knowledge.

[0094] In this embodiment, the third-party platform can be a knowledge source, such as a product center. Due to the large amount of source knowledge, the source knowledge in the third-party platform can be stored and displayed in a paginated manner, with each page representing a subset of the source knowledge. Therefore, when acquiring source knowledge, the pagination information corresponding to the source knowledge in the third-party platform can be determined first, such as page number parameters. Then, according to the pagination information, the knowledge corresponding to each page is acquired using the interface of the third-party platform. After obtaining all the knowledge, the source knowledge acquisition is considered complete. Multiple knowledge bases can be set up using the acquired source knowledge. After determining the target intent of the question to be answered, the knowledge base corresponding to the target intent can be selected from multiple knowledge bases as the target knowledge base. Only the knowledge corresponding to the target intent needs to be identified in the target knowledge base, greatly reducing the scope and computational load of knowledge retrieval, thus improving the efficiency and accuracy of knowledge retrieval.

[0095] Optionally, after obtaining the source knowledge, it can be stored in a structured manner so that the knowledge base can be built at any time in the future.

[0096] In another embodiment of this disclosure, before determining the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent, the method further includes: adding the target intent to the second prompt information template to obtain knowledge base routing prompt information; and performing knowledge base routing on the target intent according to the knowledge base routing prompt information to determine the target knowledge base.

[0097] In this embodiment, after obtaining the target intent, the target intent can be added to the second prompt information template to quickly set the knowledge base routing prompt information. In this way, the target knowledge base corresponding to the target intent can be accurately routed among multiple knowledge bases through the knowledge base routing prompt information.

[0098] In one optional implementation, the second prompt template can be a preset template, which may include knowledge base routing rules, response formats, tags, and questions. For example, if the target intent is "finding a suitable cat treat for kittens," then during knowledge base routing, the routing rules include: how to match questions and tags; if the question does not belong to a category, it will be matched to the "irrelevant" tag; if the question belongs to a category, it will be matched to the most relevant category, with an explanation; before outputting the answer, the answer must meet the response format; the response format includes tags and reasons; tags include "brand," "cat food," "cat treats," "dog food," "dog treats," "cat litter," "pet supplies," and "irrelevant"; the question is the target intent in text format. Adding "finding a suitable cat treat for kittens" to the second prompt template will generate knowledge base routing prompts. Thus, by routing the target intent according to the knowledge base routing prompts, the target knowledge base can be determined to be the cat treat knowledge base.

[0099] In another embodiment of this disclosure, determining the target knowledge set corresponding to the target intent in the target knowledge base includes: performing vector transformation on the target intent to obtain an intent vector; using a proximity algorithm to determine M knowledge vectors in the target knowledge base whose matching degree with the intent vector is greater than a preset value, where M is a positive integer; performing text transformation on the M knowledge vectors respectively to obtain M knowledge; and determining the target knowledge set including the M knowledge.

[0100] In this embodiment, the process of determining the target knowledge set corresponding to the target intent within the target knowledge base is the knowledge retrieval process. After determining the target knowledge base, since it is a vector database, the target intent is first transformed into a vector to obtain an intent vector. Then, the K-Nearest Neighbor (KNN) algorithm is used to search the target knowledge base to identify knowledge related to the intent vector. Among this related knowledge, M knowledge vectors with a matching degree greater than a preset value are identified. Finally, these M knowledge vectors are converted back to text to obtain M pieces of knowledge, which are then combined to form the target knowledge set. This effectively improves the accuracy and efficiency of knowledge retrieval.

[0101] For example, if the target intent is "to find a suitable cat treat for kittens", and the target knowledge base is a cat treat knowledge base, then the knowledge recalled in the cat treat knowledge base can be A cat food cans, B kitten sticks, and C freeze-dried food.

[0102] Alternatively, the intent vector is an embedding vector.

[0103] In another embodiment of this disclosure, the method further includes: assigning a corresponding weight to each knowledge in the target knowledge set according to the matching degree; and determining the order of each knowledge in the target knowledge set according to the weight corresponding to each knowledge in descending order.

[0104] In this embodiment, after determining the target knowledge set, to ensure that knowledge more closely aligned with the user's intent is prioritized for display, a weight is assigned to each piece of knowledge in the target knowledge set based on the degree of matching between the intent vector and the knowledge vector. A higher matching degree results in a higher weight, and vice versa. Then, based on the weight of each piece of knowledge, the knowledge in the target knowledge set is sorted in descending order of weight. This ensures that each piece of knowledge is displayed in the sorted order in the generated target answer, making the target answer more closely match the user's actual needs.

[0105] For example, if the target intent is "to find a suitable cat treat for kittens," the products retrieved from the cat treat knowledge base could be: A. Canned cat food, B. Kitten treats, and C. Freeze-dried food. Kitten treats have the highest match to the target intent, so they are assigned the highest weight. Canned cat food has the second highest match, so it is assigned the second highest weight. Freeze-dried food has the lowest match, so it is assigned the lowest weight. The display order of each knowledge item in the target knowledge set is: B. Kitten treats, A. Canned cat food, C. Freeze-dried food. That is, the display order of the products in the target answer is: B. Kitten treats, A. Canned cat food, C. Freeze-dried food. This way, users will see kitten treats first, and since this product best meets their actual needs, user satisfaction can be improved.

[0106] In another embodiment of this disclosure, the method further includes: assigning a corresponding weight to each knowledge in the target knowledge set according to the matching degree; determining the target knowledge with the largest weight; determining that the target knowledge is the first in the target knowledge set, and that other knowledge besides the target knowledge is randomly ordered after the target knowledge.

[0107] In this embodiment, to avoid returning too many target answers to users, the target knowledge with the highest weight in the target knowledge set can be placed first, and other knowledge can be randomly scattered and sorted after the target knowledge. This can ensure the accuracy of the target answer, as well as the diversity and richness of the knowledge displayed in the target answer.

[0108] For example, if the target intent is "to find a suitable cat treat for kittens," the products retrieved from the cat treat knowledge base could be: A - canned cat food, B - kitten treats, and C - freeze-dried food, with B - kitten treats having the highest weight. In the target knowledge set, B - kitten treats could be ranked first, and A - canned cat food and C - freeze-dried food could be randomly sorted after B - kitten treats. Therefore, the display order of each knowledge item in the target knowledge set could be: B - kitten treats, A - canned cat food, C - freeze-dried food, or B - kitten treats, C - freeze-dried food, A - canned cat food. Thus, the display order of products in the target answer that the user sees could be: B - kitten treats, A - canned cat food, C - freeze-dried food, or B - kitten treats, C - freeze-dried food, A - canned cat food.

[0109] In yet another embodiment of this disclosure, the method further includes: in response to the detection of dynamic knowledge intervention information, adding intervention knowledge to the target knowledge set.

[0110] In this embodiment, if the knowledge pertains to the product domain, then in addition to normal sales, various marketing or promotional activities initiated by merchants will occur. Therefore, in order to ensure that the products in these marketing or promotional activities have a certain level of exposure, it is necessary to add this intervention knowledge to the target knowledge set and reorder the already sorted order. This ensures both the accuracy of the target answer and the exposure of the products in the marketing or promotional activities.

[0111] For example, the target knowledge set already includes A (canned cat food), B (kitten treats), and C (freeze-dried food). When a marketing campaign initiated by a merchant is detected, the intervention knowledge obtained is D (meat granule packs). Therefore, D (meat granule packs) needs to be added to the target knowledge set.

[0112] In another embodiment of this disclosure, the method further includes: determining that in the target knowledge set, the target knowledge is first, the intervention knowledge is randomly ordered after the target knowledge, and the other knowledge besides the target knowledge and the intervention knowledge is randomly ordered after the intervention knowledge.

[0113] In this embodiment, to ensure the exposure of intervention knowledge without affecting the accuracy and diversity of recalled knowledge, the target knowledge in the target knowledge set can be ranked first, the intervention knowledge in the target knowledge set can be randomly shuffled and then ranked after the target knowledge, and the other knowledge in the target knowledge set can be randomly shuffled and then ranked after the intervention knowledge. That is, the display order of knowledge in the target answer is target knowledge, intervention knowledge, and other knowledge.

[0114] For example, the target knowledge set already includes A (canned cat food), B (kitten treats), and C (freeze-dried food), with B (kitten treats) having the highest weight. When a marketing campaign initiated by a merchant is detected, the intervention knowledge obtained is D (meat granules). After adding D (meat granules) to the target knowledge set, the display order of each knowledge item in the target knowledge set can be either: B (kitten treats), D (meat granules), A (canned cat food), C (freeze-dried food), or B (kitten treats), D (meat granules), C (freeze-dried food), A (canned cat food). Therefore, the display order of products in the target answer seen by the user can be either: B (kitten treats), D (meat granules), A (canned cat food), C (freeze-dried food), or B (kitten treats), D (meat granules), C (freeze-dried food), A (canned cat food).

[0115] In another embodiment of this disclosure, the answer generation prompt information is obtained by adding the question to be answered and the target knowledge set to the third prompt information template to obtain the answer generation prompt information.

[0116] In this embodiment, the third prompt information template can be a preset template. When setting the answer generation prompt information, users only need to add relevant content to the third prompt information template to quickly obtain the answer generation prompt information. This allows the target answer to the question to be answered to be generated through the answer generation prompt information. This not only ensures that the target answer is more accurate and better suited to the user's actual needs, but also guarantees the quality and consistency of the target answer. It also meets the user's personalized needs and real-world scenarios, thereby increasing user engagement.

[0117] Optionally, the third prompt information template may include answer generation rules, response formats, supporting knowledge, historical dialogues, and user input. The answer generation rules can be used to standardize the generated target answer; the response format can be used to determine the content of the target answer; the supporting knowledge can be a set of target knowledge; the historical dialogues are all dialogue information from at least one round of conversation with the user; and the user input may include the question the user initially entered. By adding the target knowledge set to the supporting knowledge content of the third prompt information template and adding the user's initial question to the user input content, answer generation prompt information can be quickly obtained.

[0118] For example, if the goal is "to find a suitable cat treat for kittens", the answer generation rules could include: the answer should be displayed in Chinese and follow the response format; the answer should not exceed 80 characters and should be in a friendly tone; if the history of conversations is not empty, it means that there has been previous communication with the user, so please check the history of conversations before answering, and remember not to repeat previous conversations, otherwise it will confuse the user; and ensure that the answer fully complies with the rules.

[0119] Optionally, if the knowledge pertains to the product domain, the third prompt template may also include information about the product platform, such as customer service details and a link to the platform's mini-program. The answer generation rules may further include: answering the question using a customer service representative's identity, rather than an AI-generated identity; and if the answer includes a mini-program link, no content other than the address should be added to the mini-program link.

[0120] The question-answering method disclosed herein utilizes well-designed prompts during knowledge base construction, intent recognition, knowledge base matching, and answer generation to quickly and efficiently complete the corresponding tasks, thereby improving the efficiency and accuracy of question answering. Furthermore, for knowledge in different domains, only the corresponding knowledge base needs to be built to complete question answering for specific business needs, thus broadening its applicability.

[0121] Exemplary media

[0122] After introducing the methods of exemplary embodiments of this disclosure, the following references are made. Figure 4 The storage medium of the exemplary embodiments of this disclosure will be described.

[0123] refer to Figure 4 As shown, the storage medium 40 stores a program product for implementing the above-described method according to embodiments of the present disclosure. This program product may be a portable compact disc read-only memory (CD-ROM) and includes computer-executable instructions, and can run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto.

[0124] The program product may employ any combination of one or more readable media. A readable media may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0125] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium.

[0126] Program code for performing the operations disclosed herein can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN).

[0127] Exemplary device

[0128] Having introduced the medium of exemplary embodiments of this disclosure, the following references are made to... Figure 5 The question-and-answer device of the exemplary embodiments of this disclosure is described to implement the method in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0129] Figure 5 This is a schematic diagram of the structure of the question-and-answer device according to an embodiment of the present disclosure. Figure 5 In this context, the question-and-answer device 500 includes:

[0130] The first acquisition module 501 is used to acquire the question to be answered in response to receiving a question search operation in the search box of the multimedia page;

[0131] The second acquisition module 502 is used to conduct at least one round of dialogue with the user based on the question to be answered, so as to obtain the intent recognition prompt information corresponding to the question to be answered.

[0132] The first determining module 503 is used to determine the target intent of the question to be answered based on the intent recognition prompt information;

[0133] The second determining module 504 is used to determine the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent;

[0134] The output module 505 is used to generate prompt information based on the answer containing the target knowledge set, generate and output the target answer that matches the question to be answered, and the target answer contains the target knowledge set.

[0135] Optionally, the second acquisition module 502 is used to obtain intent recognition prompt information in the following ways: performing intent recognition on the question to be answered to obtain a first intent; determining whether the first intent meets the intent integrity requirement; responding that the first intent meets the intent integrity requirement, and obtaining intent recognition prompt information according to the question to be answered.

[0136] Optionally, the second acquisition module 502 is used to obtain intent recognition prompt information based on the question to be answered by adding the question to be answered in the first prompt information template to obtain intent recognition prompt information.

[0137] Optionally, the second acquisition module 502 is further configured to respond to the first intent not meeting the intent completeness requirement by generating and outputting a supplementary question for the question to be answered, so as to obtain an answer to the supplementary question; integrate the answers to the question to be answered and the supplementary question to obtain a new question to be answered; and for the new question to be answered, perform the step of intent recognition for the question to be answered to obtain the first intent, until the obtained first intent meets the intent completeness requirement.

[0138] Optionally, the second determining module 504 is used to obtain the target knowledge base in the following manner: in response to detecting a knowledge acquisition request, acquiring source knowledge and classification information; classifying the source knowledge according to the classification information to obtain N knowledge sets, where each of the N knowledge sets corresponds to one of the N categories included in the classification information, and N is a positive integer; for each of the N knowledge sets, performing vector transformation on the knowledge included in the knowledge set to obtain a vector set corresponding to the knowledge set; determining N vector databases corresponding to the N categories; and storing the N vector sets in the N vector databases to obtain N knowledge bases, where the N knowledge bases include the target knowledge base.

[0139] Optionally, the knowledge acquisition request is generated by triggering a scheduled task. The scheduled task includes at least one of the following configuration information: description of the scheduled task, triggering period of the scheduled task, name of the application executing the scheduled task, server executing the scheduled task, running mode of the server when executing the scheduled task, task blocking handling strategy, and task failure handling strategy.

[0140] Optionally, the second determining module 504 is used to obtain source knowledge by: determining the pagination information corresponding to the source knowledge in the third-party platform; and obtaining the knowledge corresponding to each page in the third-party platform according to the pagination information and using the interface of the third-party platform to obtain the source knowledge.

[0141] Optionally, the second determining module 504 is further configured to add the target intent to the second prompt information template before determining the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent, thereby obtaining knowledge base routing prompt information; and to perform knowledge base routing on the target intent based on the knowledge base routing prompt information to determine the target knowledge base.

[0142] Optionally, the second determining module 504 is used to determine the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent in the following ways: performing vector transformation on the target intent to obtain an intent vector; using a proximity algorithm to determine M knowledge vectors in the target knowledge base whose matching degree with the intent vector is greater than a preset value, where M is a positive integer; performing text transformation on the M knowledge vectors respectively to obtain M knowledge; and determining the target knowledge set including the M knowledge.

[0143] Optionally, the second determining module 504 is further configured to assign a corresponding weight to each knowledge in the target knowledge set according to the matching degree; and to determine the order of each knowledge in the target knowledge set according to the weight corresponding to each knowledge in descending order.

[0144] Optionally, the second determining module 504 is further configured to assign a corresponding weight to each knowledge in the target knowledge set according to the matching degree; determine the target knowledge with the largest weight; and determine that the target knowledge is located first in the target knowledge set, and other knowledge besides the target knowledge is randomly ordered after the target knowledge.

[0145] Optionally, the second determining module 504 is also used to add intervention knowledge to the target knowledge set in response to the detection of dynamic knowledge intervention information.

[0146] Optionally, the second determining module 504 is further configured to determine that in the target knowledge set, the target knowledge is first, the intervention knowledge is randomly ordered after the target knowledge, and other knowledge besides the target knowledge and intervention knowledge is randomly ordered after the intervention knowledge.

[0147] Optionally, the output module 505 is used to obtain the answer generation prompt information by adding the question to be answered and the target knowledge set to the third prompt information template.

[0148] Exemplary computing device

[0149] Having described the methods, media, and apparatus of exemplary embodiments of this disclosure, the following references... Figure 6 A computing device according to an exemplary embodiment of the present disclosure will be described.

[0150] Figure 6 The computing device 60 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0151] like Figure 6As shown, the computing device 60 is presented in the form of a general-purpose computing device. The components of the computing device 60 may include, but are not limited to: at least one processing unit 601, at least one storage unit 602, and a bus 603 connecting different system components (including the processing unit 601 and the storage unit 602). The at least one storage unit 602 stores computer-executable instructions; the at least one processing unit 601 includes a processor that executes the computer-executable instructions to implement the methods described above.

[0152] Bus 603 includes a data bus, a control bus, and an address bus.

[0153] Storage unit 602 may include readable media in the form of volatile memory, such as random access memory (RAM) 6021 and / or cache memory 6022, and may further include readable media in the form of non-volatile memory, such as read-only memory (ROM) 6023.

[0154] Storage unit 602 may also include a program / utility 6025 having a set (at least one) of program modules 6024, such program modules 6024 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0155] The computing device 60 can also communicate with one or more external devices 604 (e.g., keyboard, pointing device, etc.). This communication can be performed via an input / output interface 605, which may also be referred to as I / O interface 605. Furthermore, the computing device 60 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via a network adapter 606. Figure 6 As shown, network adapter 606 communicates with other modules of computing device 60 via bus 603. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with computing device 60, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0156] It should be noted that although several units / modules or sub-units / modules of the question-and-answer device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0157] Furthermore, although the operations of the methods disclosed herein are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0158] While the spirit and principles of this disclosure have been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A question-and-answer method, comprising: In response to receiving a question search operation in the search box of a multimedia page, retrieve the question to be answered; The intent to be answered is identified to obtain the first intent; Determine whether the first intent satisfies the intent integrity requirement; In response to the first intent not meeting the intent completeness requirement, a supplementary question for the question to be answered is generated and output to obtain an answer to the supplementary question; By integrating the answers to the unanswered questions and the supplementary questions, a new unanswered question is obtained; For the new question to be answered, perform the step of performing intent recognition on the question to be answered to obtain a first intent, until the obtained first intent meets the intent completeness requirement; Based on the intent that meets the intent integrity requirement and the user's historical dialogue context, intent recognition prompt information is obtained; The target intent of the question to be answered is determined based on the intent recognition prompt information. In the target knowledge base corresponding to the target intent, determine the target knowledge set corresponding to the target intent; Based on the answer containing the target knowledge set, generate prompt information, generate and output the target answer that matches the question to be answered, and the target answer contains the target knowledge set.

2. The question-and-answer method according to claim 1 further includes: In response to the first intent satisfying the intent integrity requirement, the intent identification prompt information is obtained based on the question to be answered.

3. The question-and-answer method according to claim 2, wherein obtaining the intent recognition prompt information based on the question to be answered includes: The question to be answered is added to the first prompt information template to obtain the intent recognition prompt information.

4. The question-answering method according to any one of claims 1 to 3, wherein the target knowledge base is obtained through the following means: In response to the detection of a knowledge acquisition request, the source knowledge and classification information are obtained; Based on the classification information, the source knowledge is classified to obtain N knowledge sets, each of which corresponds to one of the N categories included in the classification information, where N is a positive integer. For each of the N knowledge sets, perform vector transformation on the knowledge included in the knowledge set to obtain the vector set corresponding to the knowledge set; Determine the N vector databases corresponding to the N categories; N vector sets are stored in the N vector databases to obtain N knowledge bases, and the N knowledge bases include the target knowledge base.

5. The question-and-answer method according to claim 4, wherein the knowledge acquisition request is generated by triggering a scheduled task, and the scheduled task includes at least one of the following configuration information: description information of the scheduled task, triggering period of the scheduled task, application name executing the scheduled task, server executing the scheduled task, running mode of the server when executing the scheduled task, task blocking handling strategy, and task failure handling strategy.

6. The question-answering method according to claim 4, acquiring source knowledge, includes: Determine the pagination information corresponding to the source knowledge described in the third-party platform; Based on the pagination information, the knowledge corresponding to each page is obtained from the third-party platform using the platform's interface, thus obtaining the source knowledge.

7. The question-answering method according to any one of claims 1 to 3, further comprising, before determining the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent: Add the target intent to the second prompt message template to obtain the knowledge base routing prompt message; Based on the knowledge base routing prompts, knowledge base routing is performed on the target intent to determine the target knowledge base.

8. The question-answering method according to any one of claims 1 to 3, wherein determining the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent includes: The target intent is transformed into an intent vector. Using a proximity algorithm, M knowledge vectors in the target knowledge base with a matching degree greater than a preset value with the intent vector are determined, where M is a positive integer; Each of the M knowledge vectors is converted into text to obtain M knowledge items; Determine the target knowledge set, which includes the M knowledge items.

9. The question-and-answer method according to claim 8 further includes: Based on the matching degree, assign a corresponding weight to each piece of knowledge in the target knowledge set; Based on the weight corresponding to each piece of knowledge, the order of each piece of knowledge in the target knowledge set is determined in descending order.

10. The question-and-answer method according to claim 8, further comprising: Based on the matching degree, assign a corresponding weight to each piece of knowledge in the target knowledge set; Determine the target knowledge with the highest weight; It is determined that the target knowledge is located first in the target knowledge set, and the other knowledge besides the target knowledge is randomly ordered after the target knowledge.

11. The question-and-answer method according to claim 10, further comprising: Upon detecting dynamic knowledge intervention information, intervention knowledge is added to the target knowledge set.

12. The question-and-answer method according to claim 11 further includes: In the target knowledge set, the target knowledge is determined to be first, the intervention knowledge is randomly ordered after the target knowledge, and other knowledge besides the target knowledge and the intervention knowledge is randomly ordered after the intervention knowledge.

13. The question-and-answer method according to any one of claims 1 to 3, wherein the answer generation prompt information is obtained in the following manner: Add the question to be answered and the target knowledge set to the third prompt information template to obtain the answer generation prompt information.

14. A medium storing computer-executable instructions, which, when executed, are used to implement the question-and-answer method as described in any one of claims 1 to 13.

15. A question-and-answer device, comprising: The first acquisition module is used to acquire the question to be answered in response to receiving a question search operation in the search box of the multimedia page; The second acquisition module is used to perform intent recognition on the question to be answered to obtain a first intent; Determine whether the first intent satisfies the intent integrity requirement; In response to the first intent not meeting the intent completeness requirement, a supplementary question for the question to be answered is generated and output to obtain an answer to the supplementary question; By integrating the answers to the unanswered questions and the supplementary questions, a new unanswered question is obtained; For the new question to be answered, perform the step of performing intent recognition on the question to be answered to obtain a first intent, until the obtained first intent meets the intent completeness requirement; Based on the intent that meets the intent integrity requirement and the user's historical dialogue context, intent recognition prompt information is obtained; The first determining module is used to determine the target intent of the question to be answered based on the intent recognition prompt information. The second determining module is used to determine the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent; The output module is used to generate prompt information based on the answer containing the target knowledge set, generate and output the target answer that matches the question to be answered, wherein the target answer contains the target knowledge set.

16. The question-and-answer device according to claim 15, wherein the second acquisition module is configured to, in response to the first intent satisfying the intent integrity requirement, obtain the intent recognition prompt information according to the question to be answered.

17. The question-answering device according to claim 16, wherein the second acquisition module is configured to obtain the intent recognition prompt information based on the question to be answered in the following manner: The question to be answered is added to the first prompt information template to obtain the intent recognition prompt information.

18. The question-answering apparatus according to any one of claims 15 to 17, wherein the second determining module is configured to obtain the target knowledge base by: In response to the detection of a knowledge acquisition request, the source knowledge and classification information are obtained; Based on the classification information, the source knowledge is classified to obtain N knowledge sets, each of which corresponds to one of the N categories included in the classification information, where N is a positive integer. For each of the N knowledge sets, perform vector transformation on the knowledge included in the knowledge set to obtain the vector set corresponding to the knowledge set; Determine the N vector databases corresponding to the N categories; N vector sets are stored in the N vector databases to obtain N knowledge bases, and the N knowledge bases include the target knowledge base.

19. The question-answering device according to claim 18, wherein the knowledge acquisition request is generated by triggering a scheduled task, and the scheduled task includes at least one of the following configuration information: description information of the scheduled task, triggering period of the scheduled task, application name executing the scheduled task, server executing the scheduled task, running mode of the server when executing the scheduled task, task blocking handling strategy, and task failure handling strategy.

20. The question-answering device according to claim 18, wherein the second determining module is configured to acquire source knowledge in the following manner: Determine the pagination information corresponding to the source knowledge described in the third-party platform; Based on the pagination information, the knowledge corresponding to each page is obtained from the third-party platform using the platform's interface, thus obtaining the source knowledge.

21. The question-answering device according to any one of claims 15 to 17, wherein the second determining module is further configured to add the target intent to the second prompt information template before determining the target knowledge set corresponding to the target intent in the target knowledge base corresponding to the target intent, thereby obtaining knowledge base routing prompt information; and perform knowledge base routing on the target intent according to the knowledge base routing prompt information to determine the target knowledge base.

22. The question-answering device according to any one of claims 15 to 17, wherein the second determining module is configured to determine a set of target knowledge corresponding to the target intent in a target knowledge base corresponding to the target intent by means of: The target intent is transformed into an intent vector. Using a proximity algorithm, M knowledge vectors in the target knowledge base with a matching degree greater than a preset value with the intent vector are determined, where M is a positive integer; Each of the M knowledge vectors is converted into text to obtain M knowledge items; Determine the target knowledge set, which includes the M knowledge items.

23. The question-answering device according to claim 22, wherein the second determining module is further configured to assign a corresponding weight to each knowledge in the target knowledge set according to the matching degree; and to determine the order of each knowledge in the target knowledge set according to the weight corresponding to each knowledge in descending order.

24. The question-answering device according to claim 22, wherein the second determining module is further configured to assign a corresponding weight to each knowledge in the target knowledge set according to the matching degree; Determine the target knowledge with the highest weight; It is determined that the target knowledge is located first in the target knowledge set, and the other knowledge besides the target knowledge is randomly ordered after the target knowledge.

25. The question-answering device according to claim 24, wherein the second determining module is further configured to add intervention knowledge to the target knowledge set in response to the detection of dynamic knowledge intervention information.

26. The question-answering device according to claim 25, wherein the second determining module is further configured to determine that in the target knowledge set, the target knowledge is first, the intervention knowledge is randomly ordered after the target knowledge, and other knowledge besides the target knowledge and the intervention knowledge is randomly ordered after the intervention knowledge.

27. The question-and-answer device according to any one of claims 15 to 17, wherein the output module is configured to obtain answer generation prompt information by means of: Add the question to be answered and the target knowledge set to the third prompt information template to obtain the answer generation prompt information.

28. A computing device, comprising: A processor, and a memory connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the question-and-answer method as described in any one of claims 1 to 13.