Intelligent question and answer method and device, electronic equipment and storage medium

By identifying and classifying questions entered by users, determining the answer modality that users expect, and searching data in the corresponding index library to generate answers, the problem that traditional search engines are difficult to meet the multimodal information needs, and achieving more Intuitive and accurate user interaction experience.

CN119441426APending Publication Date: 2025-02-14HANGZHOU SHUMEI TECHNOLOGY CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411441124.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When traditional search engines face multimodal information needs, it is difficult for traditional search engines to provide the answers that users expect, resulting in poor user interaction experience.

Method used

By identifying and classifying questions entered by users, the user expects answer modality is determined, and the data is retrieved in the corresponding index library to generate answers. Supports multimodal retrieval, such as text, audio, video, image and map modality.

Benefits of technology

It realizes replying to user questions in multimodal form, providing more accurate and intuitive answers, and avoiding the inconvenience caused by further search by users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441426A_ABST
    Figure CN119441426A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent question and answer method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining a question text input by a user; performing intention recognition processing on the question text to recognize an intention corresponding to the question text; performing classification processing on the intention to determine a retrieval type corresponding to the intention; and according to the intention, retrieving data matched with the intention in a database corresponding to the retrieval type, and generating an answer corresponding to the question text based on the retrieved data. According to the technical scheme, questions of the user can be replied in a multi-mode mode, on one hand, the user is helped to obtain more accurate and visual answers, and on the other hand, inconvenience brought by further retrieval of the user is avoided under the condition that the user only obtains the answers in the character mode but needs other answer modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present disclosure relate to the field of data processing technology, and in particular, to an intelligent question-answering method, device, electronic device, and storage medium. Background Art

[0002] Search engine technology provides information retrieval services for users. Traditional search engines match relevant web pages with keywords entered by users, and sort them according to the relevance of keywords and web pages to return sorted results to users. This model relies on keyword indexing and page ranking algorithms. However, with the explosive growth of network information, search portals are overloaded with information. The retrieval and reasoning processes of this method are fixed. Even when facing simple questions, a large number of web pages need to be searched for analysis, which will result in slow web page response and waste of computing resources. Users also need to click and browse the sorted web pages to obtain information, which is inconvenient.

[0003] In some embodiments, although users can understand the input keywords and give corresponding answers by using a pre-trained large language model, this method is no longer just web page sorting and can better understand and meet user needs. However, this method does not support multimodality enough. In most cases, answers are given in text form, which cannot meet the modal form of answers that users expect to obtain, and the interactive experience it brings to users is average. Summary of the invention

[0004] The present disclosure provides an intelligent question-answering method, the method comprising:

[0005] Get the question text entered by the user;

[0006] Performing intention recognition processing on the question text to identify the intention corresponding to the question text;

[0007] Performing classification processing on the intent to determine a search type corresponding to the intent;

[0008] According to the intention, data matching the intention is retrieved in a database corresponding to the search type, and an answer corresponding to the question text is generated based on the retrieved data.

[0009] Optionally, the search type includes a text mode search type, an audio mode search type, a video mode search type, an image mode search type, and a map mode search type, and the method further includes:

[0010] If the generated answer corresponding to the question text is a text-modal retrieval type, analyzing the text semantics of the generated answer corresponding to the question text;

[0011] If the textual semantics of the generated answer corresponding to the question text points to the retrieval type of other modalities, data matching the textual semantics is retrieved in the index library corresponding to the retrieval type of other modalities, and the answer corresponding to the question text is generated based on the retrieved data.

[0012] Optionally, the method further includes:

[0013] According to the intention, the question text is divided into corresponding categories, including at least one of the following: dynamic service information query, timeliness information query, questions with clear answers and open questions;

[0014] The step of retrieving data matching the intention in a database corresponding to the search type according to the intention, and generating an answer corresponding to the question text based on the retrieved data includes:

[0015] If the question text is divided into dynamic service information queries according to the intent, a dynamic service information query interface is called to retrieve data matching the intent, and an answer corresponding to the question text is generated based on the retrieved data.

[0016] Optionally, searching for data matching the intent in a database corresponding to the search type according to the intent, and generating an answer corresponding to the question text based on the retrieved data, includes:

[0017] If the question text is divided into a timeliness information query according to the intention, data matching the intention is retrieved by time field in a pre-established timeliness information index library, and an answer corresponding to the question text is generated based on the retrieved data;

[0018] The information in the timeliness information index library is stored and rolled over according to the time field.

[0019] Optionally, searching for data matching the intent in a database corresponding to the search type according to the intent, and generating an answer corresponding to the question text based on the retrieved data, includes:

[0020] If the question text is divided into questions with clear answers based on the intent, data matching the intent is retrieved from a special index library for questions with clear answers according to a semantic similarity algorithm and / or a character index algorithm, and an answer corresponding to the question text is generated based on the retrieved data.

[0021] Optionally, searching for data matching the intent in a database corresponding to the search type according to the intent, and generating an answer corresponding to the question text based on the retrieved data, includes:

[0022] If the question text is classified as an open question according to the intention, a full-text search is performed on a text collection related to the user query to obtain a target document; or,

[0023] Convert the question text input by the user into a query vector, convert the text set related to the user query into a vector set, and retrieve the document most similar to the query vector based on semantic similarity;

[0024] The documents most similar to the query vector are screened and sorted, and after obtaining the target document, it is input into the large model together with the question text input by the user to obtain the answer generated by the large model and corresponding to the question text.

[0025] Optionally, obtaining the question text input by the user includes:

[0026] Get the question text entered by the user in the question input box of the interactive interface;

[0027] After obtaining the question text input by the user, the method further includes:

[0028] Answers to the question text input by the user and answers to other question texts related to the question text input by the user are displayed in sequence in a waterfall flow below the question input box.

[0029] The present disclosure also provides an intelligent question-answering device, the device comprising:

[0030] An acquisition unit, used to acquire the question text input by the user;

[0031] An identification unit, configured to perform intention identification processing on the question text to identify the intention corresponding to the question text;

[0032] A classification unit, used for performing classification processing on the intent to determine a search type corresponding to the intent;

[0033] A retrieval unit is used to retrieve data matching the intention in a database corresponding to the retrieval type according to the intention, and generate an answer corresponding to the question text based on the retrieved data.

[0034] The present disclosure also provides an electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus;

[0035] The memory stores machine-readable instructions, and the processor executes the above method by calling the machine-readable instructions.

[0036] The present disclosure also provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the above method is implemented.

[0037] The technical solution disclosed in the present invention identifies and classifies the intent of the question query statement input by the user, determines the answer modality that the user expects to obtain, such as pictures, videos, audio, etc., and then searches in the index library of the corresponding answer modality, thereby providing the user with an answer in the answer modality expected by the user.

[0038] Through the above method, the technical solution of the present invention can respond to users' questions in a multimodal form. On the one hand, it helps users obtain more accurate and intuitive answers. On the other hand, when users only obtain answers in text mode but need other answer modes, it avoids the inconvenience caused by further searches by users. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 is a schematic diagram of an intelligent question-answering method shown in an exemplary embodiment;

[0041] Figure 2 is a schematic diagram showing an answer in a waterfall flow format according to an exemplary embodiment;

[0042] Figure 3 is a schematic diagram of a question retrieval structure shown in an exemplary embodiment;

[0043] Figure 4 is a hardware structure diagram of an electronic device shown in an exemplary embodiment;

[0044] Figure 5 It is a block diagram of an intelligent question-answering device shown in an exemplary embodiment. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the technical solutions in the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present disclosure.

[0046] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this disclosure. In some other embodiments, the steps included in the method may be more or less than those described in this disclosure. In addition, a single step described in this disclosure may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this disclosure may also be combined into a single step for description in other embodiments.

[0047] Search engine technology provides information retrieval services for users. Traditional search engines match relevant web pages with keywords entered by users, and sort them according to the relevance of keywords and web pages to return sorted results to users. This model relies on keyword indexing and page ranking algorithms. However, with the explosive growth of network information, search portals are overloaded with information. The retrieval and reasoning processes of this method are fixed. Even when facing simple questions, a large number of web pages need to be searched for analysis, which will result in slow web page response and waste of computing resources. Users also need to click and browse the sorted web pages to obtain information, which is inconvenient.

[0048] In some embodiments, although users can understand the input keywords and give corresponding answers by using a pre-trained large language model, this method is no longer just web page sorting and can better understand and meet user needs. However, this method does not support multimodality enough. In most cases, answers are given in text form, which cannot meet the modal form of answers that users expect to obtain, and the interactive experience it brings to users is average.

[0049] In view of this, the present disclosure aims to propose a technical solution that can support answering user questions in multimodal form.

[0050] In some embodiments, first, a question text input by a user is obtained; then, intent recognition processing is performed on the question text to identify the intent corresponding to the question text; further, classification processing is performed on the intent to determine a retrieval type corresponding to the intent; finally, based on the intent, data matching the intent is retrieved in a database corresponding to the retrieval type, and an answer corresponding to the question text is generated based on the retrieved data.

[0051] For example, first, the query sentence "Where is West Lake in Hangzhou?" entered and submitted by the user in the search box of the search engine is obtained. Then, after receiving the query sentence, the backend service of the search engine analyzes the sentence through the intent recognition engine, identifies the keywords "West Lake" and "Hangzhou", and the question word "where?", and performs semantic analysis through natural language processing technology to determine that the user's query intention is to find a certain geographical location. Based on the determined query intention of the user, the user's query intention is classified, and it is determined that the most suitable answer modality is a map, because the user wants to know the geographical location information, so the retrieval type corresponding to this intention is a map. Next, the search engine retrieves the location information associated with "West Lake" and "Hangzhou" in the map index library, and then returns a map view to the user, marking the specific location of West Lake in Hangzhou.

[0052] It can be seen that in the technical solution of the present invention, the question query statement input by the user is subjected to intent recognition and classification, the answer modality that the user expects to obtain, such as pictures, videos, audio, etc., is determined, and then the index library corresponding to the answer modality is searched, thereby providing the user with intuitive and accurate answers.

[0053] Through the above method, the technical solution of the present invention can respond to users' questions in a multimodal form. On the one hand, it helps users obtain more accurate and intuitive answers. On the other hand, when users only obtain answers in text mode but need other answer modes, it avoids the inconvenience caused by further searches by users.

[0054] The present disclosure is described below through specific embodiments in combination with specific application scenarios.

[0055] See also Figure 1 , Figure 1 FIG. 1 is a flowchart of an intelligent question-answering method according to an exemplary embodiment. The method may perform the following steps:

[0056] Step 102: Obtain the question text input by the user.

[0057] For example, obtain the question query sentence "Where is the West Lake in Hangzhou?" that the user enters and submits in the search box of the search engine.

[0058] The question text generally exists in the form of a question query sentence, which refers to the query word or sentence entered by the user when searching to express their information needs. Usually, the search engine or application provides a user interface (also known as a UI interface), which includes a search box allowing the user to enter text.

[0059] Step 104: Perform intent recognition processing on the question text to identify the intent corresponding to the question text.

[0060] For example, after the search engine's backend service receives a query statement, it analyzes the statement through the intent recognition engine, identifies the keywords "West Lake" and "Hangzhou", and the question word "where?", and performs semantic analysis through natural language processing technology to determine that the user's query intention is to find a certain geographic location.

[0061] Among them, intent recognition is a branch of natural language processing, which is used to determine the goal or intent behind the user's input (such as query statements). Machine learning models are usually used to analyze user query statements and identify their intent, which may involve natural language processing technologies such as part-of-speech tagging, named entity recognition, and dependency parsing. Natural language processing is a branch of artificial intelligence and linguistics that aims to enable computers to understand and process human language. Natural language processing technologies include semantic analysis, grammatical analysis, machine learning, etc. In text processing, classification is the process of assigning input sentences to one or more categories, which can be implemented using classification algorithms (such as support vector machines and decision trees), where the model learns how to map sentences to specific intent categories based on training data sets.

[0062] Step 106: Classify the intent to determine the search type corresponding to the intent.

[0063] For example, based on the determined query intent of the user, the query intent of the user is classified, and it is determined that the most suitable answer modality is a map. Because the user wants to know the geographic location information, the search type corresponding to this intent is a map.

[0064] Among them, the index library is an organized database that allows fast retrieval and access to information. The index library built using search engine technology can store and index various types of content, such as text documents, pictures, videos, and geographic data. Retrieval is the process of finding and obtaining information in a database or index library. The specific method may be to find relevant information in the index library through keyword matching, full-text search or other relevance search techniques. Answer modality refers to the type or format of answer that the user expects to obtain, such as text, audio, video, image, map, etc. The present disclosure does not limit the specific category of answer modality.

[0065] Step 108: According to the intention, data matching the intention is retrieved in a database corresponding to the search type, and an answer corresponding to the question text is generated based on the retrieved data.

[0066] For example, the search engine retrieves location information associated with "West Lake" and "Hangzhou" in the map index library, and then returns a map view to the user, marking the specific location of West Lake in Hangzhou.

[0067] The map index library may contain geocoding data, the name of the place, the category, and other relevant information. The system processes the retrieved data and generates a map view to show the user the specific location of West Lake in Hangzhou. This can be achieved through geographic information system software or online map service APIs (such as Google Maps API, Baidu Maps API). Finally, the map view is sent to the user's device so that the user can see the geographical location of West Lake in Hangzhou.

[0068] In this embodiment, the search engine identifies the user's intention by analyzing the user's query statement, retrieves the answer from the corresponding answer modal index library, and finally provides the user with an intuitive and accurate answer in the form of a map.

[0069] In one embodiment shown, the method also includes: the retrieval type includes a retrieval type of text modality, a retrieval type of audio modality, a retrieval type of video modality, a retrieval type of image modality and a retrieval type of map modality, and the method also includes: if the generated answer corresponding to the question text is a retrieval type of text modality, then analyzing the textual semantics of the generated answer corresponding to the question text; if the textual semantics of the generated answer corresponding to the question text points to a retrieval type of other modalities, then retrieving data matching the textual semantics in an index library corresponding to the retrieval type of other modalities, and generating an answer corresponding to the question text based on the retrieved data.

[0070] For example, the question query sentence input by the user is "What is Xu Wei's best work?" For this question query sentence, it is determined that the answer mode that the user expects to obtain is the text mode, and a search is performed in the index library of the text mode to obtain the answer to the question query sentence "What is Xu Wei's best work?" input by the user, "His most famous work is a painting called "Peony, Banana and Rock"." Then, the text semantics of this answer are analyzed to determine that the text semantics of the answer "His most famous work is a painting called "Peony, Banana and Rock"" points to the image answer mode, so a supplementary search is performed in the index library of the image answer mode to obtain the painting "Peony, Banana and Rock" in the image mode as the question query sentence "What is Xu Wei's best work?" input by the user.

[0071] Among them, the question query statement refers to the question or query request raised by the user to the system, and the answer modality refers to the information representation form used to answer the user's question, which can be in multiple forms such as text, image, video, etc. For example, for a query about a work of art, the answer may be a text description or a picture of the work. When the answer is presented in text form, we call it a text modality. In this embodiment, "his most famous work is a painting called "Peony and Banana Stone"" is an answer in a text modality. Text semantic analysis is to deeply understand the text content through natural language processing technology, including but not limited to word meaning analysis, sentence structure analysis, etc. In this embodiment, it is mainly to identify whether the answer implies the need for information in other modalities, such as images in this example. An index library refers to a collection of data that has been preprocessed and organized to facilitate fast and efficient search for relevant information. Each modality has its own index library, such as a text index library, an image index library, etc. When the answer initially retrieved is not enough to fully meet the user's query needs, the system will continue to search for relevant information in the index library of other modalities based on the clues provided by the preliminary answer. For example, in the above case, the system first found the answer in the text modal index library, and then inferred from this answer that the user might also need to see the image of "Peony, Banana and Rock", so it conducted a further search in the image modal index library.

[0072] In one embodiment shown, the method also includes: according to the intent, dividing the question text into corresponding categories, including at least one of the following: dynamic service information query, timeliness information query, questions with clear answers and open questions; according to the intent, retrieving data matching the intent in a database corresponding to the retrieval type, and generating an answer corresponding to the question text based on the retrieved data, including: if the question text is divided into a dynamic service information query according to the intent, calling a dynamic service information query interface to retrieve data matching the intent, and generating an answer corresponding to the question text based on the retrieved data.

[0073] For example, if the question query sentence input by the user is "What will the weather be like in City A tomorrow?", it can be classified as a dynamic service information query; if the question query sentence input by the user is "What is the latest progress of the construction of District B?", it can be classified as a time-sensitive information query; if the question query sentence input by the user is "How many gold medals did Country C win in the 2024 Paris Olympics?", it can be classified as a question with a clear answer; if the question query sentence input by the user is "How to keep a good mood?", it can be classified as an open question. Under the above premise, if the question query sentence input by the user is "What will the weather be like in City A tomorrow?", the weather service information query interface is called to retrieve the weather information, and "Sunny to cloudy, 19℃~26℃" is obtained as the answer to the question query sentence.

[0074] Among them, the user expresses his needs through question query statements. For example, the user may want to know the weather, news, specific information, etc. In this embodiment, the question query statements input by the user are classified into the following four types: Dynamic service information query: may involve calling external services or APIs to obtain information, such as weather forecasts, stock quotes, etc. Timely information query: involves recent or real-time events, such as news reports, latest developments, etc. Questions with clear answers: The answers to the questions are specific and definite, such as historical facts, statistics, etc. Open questions: There is no unique answer to the question, and multiple opinions or suggestions may need to be provided. The dynamic service information query interface is an interface for interacting with external services or APIs to obtain specific types of information, such as the API of the weather forecast service. User intent recognition may require training a machine learning model that can classify questions into different categories based on their characteristics. Common methods include rule-based methods, deep learning models, etc.

[0075] Through the above technical solution, it is possible to effectively identify user intentions, classify question query statements, and call corresponding interfaces or resources to provide users with accurate and useful information.

[0076] In one embodiment shown, according to the intent, data matching the intent is retrieved in a database corresponding to the retrieval type, and an answer corresponding to the question text is generated based on the retrieved data, including: if the question text is divided into timeliness information queries according to the intent, data matching the intent is retrieved by time field in a pre-established timeliness information index library, and an answer corresponding to the question text is generated based on the retrieved data; wherein the information in the timeliness information index library is stored and rolled over according to the time field.

[0077] For example, based on the identified user intent, the query statement "What is the latest progress of the construction of District B?" entered by the user is classified as a time-sensitive information query. Then, the pre-established time-sensitive information index library is searched for fields within the last six months according to the time field, and "The total development area of ​​District B has reached 120 square kilometers, and there are 4 universities and 2 central enterprises" is obtained as the answer to the query statement. A time window (for example, the last six months) is set for the pre-established time-sensitive information index library. As time goes by, information that exceeds the time window will be automatically deleted or archived to maintain the timeliness and capacity control of the pre-established time-sensitive information index library.

[0078] Among them, the timeliness information query involves recent or real-time events, such as news reports, project progress, etc. The timeliness information index library is a database specifically used to store and retrieve timeliness information, which usually contains a time field so that it can be retrieved and managed in chronological order. The time field is a field that records the time when the information is released or updated, and is used to sort and filter information. Rolling coverage means that as time goes by, new information is continuously added to the index library, and old information is gradually eliminated to maintain the timeliness and capacity control of the index library. In this embodiment, in order to collect and store data, crawler technology can be used to regularly crawl information from data sources such as news websites and official announcements, and then the crawled information is stored in the database, and each information entry contains a time field (such as release time or update time). Regarding the index library management, a time window (for example, the last six months) can be set, and information beyond the time window will be automatically deleted or archived, and a database management tool (such as MySQL) can be used for data management and index optimization. Regarding the retrieval algorithm, a full-text search engine can be used for efficient retrieval. When searching, the time field is used for filtering and sorting to ensure that the returned information is the latest. Regarding the specific technical methods for implementing the above method, the present disclosure does not limit this.

[0079] Through the above technical solution, it is possible to effectively identify user intentions, classify question query statements, and search by time field in the time-sensitive information index library to provide users with the latest and most accurate information.

[0080] In one embodiment shown, according to the intent, data matching the intent is retrieved in a database corresponding to the retrieval type, and an answer corresponding to the question text is generated based on the retrieved data, including: if the question text is divided into questions with clear answers according to the intent, then data matching the intent is retrieved according to a semantic similarity algorithm and / or a character index algorithm in a special index library for questions with clear answers, and an answer corresponding to the question text is generated based on the retrieved data.

[0081] For example, based on the identified user intent, the question query sentence input by the user, "How many gold medals did country C win in the 2024 Paris Olympics?" is classified into the category of questions with clear answers. A semantic similarity algorithm (such as cosine similarity, BERT, etc.), or a character index algorithm (such as a naive algorithm), or a combination of the semantic similarity algorithm and the character index algorithm is used to compare the question input by the user with the questions in a special index library with questions with clear answers, find the most similar question, and return the answer to the most similar question, "Country C won 35 gold medals in the 2024 Paris Olympics," to the user.

[0082] Among them, the special index library specifically stores information about specific data such as the number of Olympic medals. The semantic similarity algorithm is an algorithm used to calculate the semantic similarity between two text fragments. Common semantic similarity algorithms include cosine similarity and BERT based on deep learning. Taking the use of BERT for semantic similarity calculation as an example, firstly, the user's input questions and the questions in the index library are preprocessed by word segmentation, cleaning, etc., and then the pre-trained BERT model is used to encode the questions and generate semantic vectors; then the cosine similarity between the user's question vector and the question vector in the index library is calculated; finally, according to the similarity score, the most similar question is found, and the answer to the most similar question is returned to the user. The character index algorithm is a technology used to quickly find specific characters or patterns in text. It is widely used in text processing, search engines, database queries and other fields. Common character index algorithms include but are not limited to the naive algorithm and the key index counting method.

[0083] In one embodiment shown, according to the intent, data matching the intent is retrieved in a database corresponding to the retrieval type, and an answer corresponding to the question text is generated based on the retrieved data, including: if the question text is divided into an open question according to the intent, a full-text search is performed on a text collection related to the user query to obtain a target document; or, the question text input by the user is converted into a query vector, the text collection related to the user query is converted into a vector collection, and the document most similar to the query vector is retrieved based on semantic similarity; the documents most similar to the query vector are screened and sorted, and after obtaining the target document, they are input into a large model together with the question text input by the user to obtain an answer corresponding to the question text generated by the large model.

[0084] For example, when a user enters a question: "What kind of eating habits can help prevent heart disease?", the system will process it in the following steps: First, the system will analyze whether the question is an open question. This is because the question does not have a clear answer, but requires information from multiple angles and multiple sources to form a comprehensive answer. Next, the system will perform a full-text search in text collections such as literature, health guidelines, and scientific research related to heart disease prevention, looking for information about the relationship between eating habits and heart disease prevention. At the same time, the system will convert the user's question text "What kind of eating habits can help prevent heart disease?" into a query vector. In addition, all text collections related to heart disease prevention will also be converted into corresponding vector collections. By calculating the similarity between these vectors, the system can find the documents most relevant to the user's query. After obtaining the most relevant documents, the system will further filter and sort these documents to ensure that the most relevant and valuable information to the user's needs is at the forefront. Finally, the system inputs the filtered and sorted target documents into the large language model together with the user's original question. The model is trained to understand the context and needs of the question, generating an accurate and comprehensive response, such as: "To prevent heart disease, it is recommended to eat more whole grains, vegetables, fruits, nuts, and fish, and reduce the intake of red meat and processed foods."

[0085] Among them, open-ended questions usually have no fixed answers and require comprehensive answers based on a large amount of information. Full-text retrieval is the process of finding documents containing specific keywords in a large amount of text. Convert the text into a vector in numerical form to facilitate the calculation of the similarity between texts. Screening and sorting are to refine the retrieved documents and re-sort them to display the most relevant and authoritative content. Specifically, machine learning models can be used to sort according to features such as relevance and authority. The big model is a large language model that can generate fluent and coherent text, such as GPT-3. The top-ranked documents after sorting are input into GPT-3 together with the user's question to generate an answer that integrates the document information. With respect to the types of big models, the present disclosure does not limit this.

[0086] In this way, the system is able to provide comprehensive answers to open-ended questions, leveraging large models to generate more accurate and comprehensive responses.

[0087] In one embodiment shown, the method also includes: obtaining the question text input by the user, including: obtaining the question text input by the user in a question input box on an interactive interface; after obtaining the question text input by the user, the method also includes: displaying answers to the question text input by the user and answers to other question texts related to the question text input by the user in sequence in a waterfall flow below the question input box.

[0088] For example, see Figure 2 , Figure 2 The figure is a schematic diagram of an exemplary embodiment showing a waterfall flow display of answers. When the user enters the question text "the most famous painting of Van Gogh" in the question input box, the system will recognize that this is a question that the user expects to obtain an image modal answer. After searching, the system immediately displays a direct answer generated based on the existing knowledge base below the question input box, such as: "No.1 Starry Night" and the image result retrieved from the image modal index library, that is, an image with a unique vortex-shaped sky and a tranquil village scene.

[0089] Immediately thereafter, the system displays several other questions related to the user input question and their answers in the form of a waterfall, such as: "When was Van Gogh born and died?" - Answer summary: "Vincent van Gogh was a Dutch post-Impressionist painter who was born in 1853 and died in 1890. Although his artistic career lasted only ten years, he left behind a large number of outstanding works that had a profound impact on later generations.", and "What are Van Gogh's works?" - Answer summary: "In addition to "Starry Night", Van Gogh's other famous works include the "Sunflowers" series, "Crows in the Wheat Field" and "Self-Portrait". The answers to the above related questions can be displayed in a brief form. If the user expects to obtain the complete content, he can click the expansion icon (e.g., a plus sign) to view it.

[0090] In some implementations, even if the user has not entered any query text, the user can be shown several of the most popular questions of the day and their answers, so that the user can browse according to their needs.

[0091] Among them, you can use front-end technologies such as HTML, CSS, and JavaScript to build an interactive interface, which contains an input box for users to enter questions, and then you can use form submission or event monitoring to capture the user's input. After the user enters the question, the front-end sends the question text to the back-end server through a request. The back-end server receives the question text and performs subsequent processing. In the implementation of the waterfall flow, you can use CSS Flexbox or Grid layout to achieve the waterfall flow effect, where each answer block can be a card containing a title, brief content, and a picture, and then dynamically load it through JavaScript and AJAX. When the user scrolls the page, more answer blocks are gradually loaded.

[0092] In the embodiments of the present disclosure, a question input box can complete the entire process of asking and answering questions, which is more concise and smooth in form, avoiding multiple conversation boxes in the form of questions and answers displayed on the traditional search interface, which may cause visual confusion to the user. In addition, the waterfall flow can display multiple related questions and their answers at the same time, not only providing answers to the user's direct questions, but also expanding the user's knowledge and providing a wider range of information. The waterfall flow display method provides users with an efficient and pleasant way to obtain information through rich information display, good user experience and beautiful visual effects.

[0093] In order to facilitate the understanding of the present invention by those skilled in the art, Figure 3 For instructions, see Figure 3 , Figure 3 It is a schematic diagram of a question retrieval structure shown by an exemplary embodiment.

[0094] like Figure 3 As shown, the user interaction and rendering module receives the question query text input by the user, and then analyzes the question query text submitted by the user through the question intention recognition and classification module, performs intent recognition processing to obtain the user intention, and then classifies it according to the user intention. It may be divided into four categories, namely, third-party service information query, timeliness information query, questions with clear answers, and open questions. These four categories are searched in the corresponding modules respectively, and when the answer semantics of the text modality points to the answer of other modalities, the multimodal association retrieval module is used to implement supplementary retrieval. When it is an open question, it is necessary to call the large model through the large model adaptation module for question and answer processing.

[0095] Corresponding to the embodiment of the above-mentioned intelligent question and answer method, the present disclosure also provides an embodiment of an intelligent question and answer device.

[0096] See also Figure 4 , Figure 4 It is a hardware structure diagram of an electronic device shown in an exemplary embodiment. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408 and a non-volatile memory 410, and of course may also include other required hardware. One or more embodiments of the present disclosure can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of the present disclosure do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0097] See also Figure 5 , Figure 5FIG. 5 is a block diagram of an intelligent question-answering device according to an exemplary embodiment. The intelligent question-answering device 500 can be applied to Figure 4 In the electronic device shown, the technical solution of the present disclosure is implemented. The device includes:

[0098] An acquisition unit 502 is used to acquire a question text input by a user;

[0099] The recognition unit 504 is used to perform intention recognition processing on the question text to identify the intention corresponding to the question text;

[0100] A classification unit 506, configured to perform classification processing on the intent to determine a search type corresponding to the intent;

[0101] The retrieval unit 508 is used to retrieve data matching the intention in a database corresponding to the retrieval type according to the intention, and generate an answer corresponding to the question text based on the retrieved data.

[0102] In some embodiments, the search type includes a text mode search type, an audio mode search type, a video mode search type, an image mode search type, and a map mode search type, and the device further includes:

[0103] an analyzing unit, configured to analyze the textual semantics of the generated answer corresponding to the question text if the generated answer corresponding to the question text is a retrieval type of textual modality;

[0104] The second retrieval unit is used to retrieve data matching the textual semantics in an index library corresponding to the retrieval type of other modalities if the textual semantics of the generated answer corresponding to the question text points to a retrieval type of other modalities, and generate an answer corresponding to the question text based on the retrieved data.

[0105] In some embodiments, the apparatus further comprises:

[0106] A division unit, configured to divide the question text into corresponding categories according to the intention, including at least one of the following: dynamic service information query, timeliness information query, questions with clear answers and open questions;

[0107] The retrieval unit comprises:

[0108] The first retrieval subunit is used to call the dynamic service information query interface to retrieve data matching the intent if the question text is divided into dynamic service information queries according to the intent, and generate an answer corresponding to the question text based on the retrieved data.

[0109] In some embodiments, the retrieval unit comprises:

[0110] A second retrieval subunit is used for, if the question text is divided into a timeliness information query according to the intention, retrieving data matching the intention by time field in a pre-established timeliness information index library, and generating an answer corresponding to the question text based on the retrieved data;

[0111] The information in the timeliness information index library is stored and rolled over according to the time field.

[0112] In some embodiments, the retrieval unit comprises:

[0113] The third retrieval sub-unit is used to, if the question text is divided into questions with clear answers according to the intention, retrieve data matching the intention according to the semantic similarity algorithm and / or character index algorithm in a special index library for questions with clear answers, and generate an answer corresponding to the question text based on the retrieved data.

[0114] In some embodiments, the retrieval unit comprises:

[0115] A fourth retrieval subunit is used for, if the question text is classified as an open question according to the intention, performing a full-text search on a text collection related to the user query to obtain a target document; or,

[0116] Convert the question text input by the user into a query vector, convert the text set related to the user query into a vector set, and retrieve the document most similar to the query vector based on semantic similarity;

[0117] The documents most similar to the query vector are screened and sorted, and after obtaining the target document, it is input into the large model together with the question text input by the user to obtain the answer generated by the large model and corresponding to the question text.

[0118] In some embodiments, the acquisition unit includes:

[0119] The acquisition subunit is used to obtain the question text entered by the user in the question input box of the interactive interface;

[0120] After obtaining the question text input by the user, the device further includes:

[0121] The display unit is used to display the answers to the question text input by the user and the answers to other question texts related to the question text input by the user in a waterfall flow below the question input box.

[0122] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0123] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0124] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0125] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0126] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0127] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0128] 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 this disclosure 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 relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0129] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0130] The above describes specific embodiments of the present disclosure. 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.

[0131] The terms used in one or more embodiments of the present disclosure are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present disclosure. The singular forms of "a", "said" and "the" used in one or more embodiments of the present disclosure 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 herein refers to and includes any or all possible combinations of one or more associated listed items.

[0132] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of the present disclosure, these 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 the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".

[0133] The above description is only a preferred embodiment of one or more embodiments of the present disclosure and is not intended to limit one or more embodiments of the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present disclosure shall be included in the scope of protection of one or more embodiments of the present disclosure.

Claims

1. An intelligent question-answering method, characterized in that: The method comprises: Get the question text entered by the user; Performing intention recognition processing on the question text to identify the intention corresponding to the question text; Performing classification processing on the intent to determine a search type corresponding to the intent; According to the intention, data matching the intention is retrieved in a database corresponding to the search type, and an answer corresponding to the question text is generated based on the retrieved data.

2. The method according to claim 1, characterized in that: The search type includes a text mode search type, an audio mode search type, a video mode search type, an image mode search type and a map mode search type, and the method further includes: If the generated answer corresponding to the question text is a text-modal retrieval type, analyzing the text semantics of the generated answer corresponding to the question text; If the textual semantics of the generated answer corresponding to the question text points to the retrieval type of other modalities, data matching the textual semantics is retrieved in the index library corresponding to the retrieval type of other modalities, and the answer corresponding to the question text is generated based on the retrieved data.

3. The method according to claim 1, characterized in that The method further comprises: According to the intention, the question text is divided into corresponding categories, including at least one of the following: dynamic service information query, timeliness information query, questions with clear answers and open questions; The step of retrieving data matching the intention in a database corresponding to the search type according to the intention, and generating an answer corresponding to the question text based on the retrieved data includes: If the question text is divided into dynamic service information queries according to the intent, a dynamic service information query interface is called to retrieve data matching the intent, and an answer corresponding to the question text is generated based on the retrieved data.

4. The method according to claim 3, characterized in that The step of retrieving data matching the intention in a database corresponding to the search type according to the intention, and generating an answer corresponding to the question text based on the retrieved data includes: If the question text is divided into a timeliness information query according to the intention, data matching the intention is retrieved by time field in a pre-established timeliness information index library, and an answer corresponding to the question text is generated based on the retrieved data; The information in the timeliness information index library is stored and rolled over according to the time field.

5. The method according to claim 3, characterized in that: The step of retrieving data matching the intention in a database corresponding to the search type according to the intention, and generating an answer corresponding to the question text based on the retrieved data includes: If the question text is divided into questions with clear answers based on the intent, data matching the intent is retrieved from a special index library for questions with clear answers according to a semantic similarity algorithm and / or a character index algorithm, and an answer corresponding to the question text is generated based on the retrieved data.

6. The method according to claim 3, characterized in that The step of retrieving data matching the intention in a database corresponding to the search type according to the intention, and generating an answer corresponding to the question text based on the retrieved data includes: If the question text is classified as an open question according to the intention, a full-text search is performed on a text collection related to the user query to obtain a target document; or, Convert the question text input by the user into a query vector, convert the text set related to the user query into a vector set, and retrieve the document most similar to the query vector based on semantic similarity; The documents most similar to the query vector are screened and sorted, and after obtaining the target document, it is input into the large model together with the question text input by the user to obtain the answer generated by the large model and corresponding to the question text.

7. The method according to claim 1, characterized in that The step of obtaining the question text input by the user includes: Get the question text entered by the user in the question input box of the interactive interface; After obtaining the question text input by the user, the method further includes: Answers to the question text input by the user and answers to other question texts related to the question text input by the user are displayed in sequence in a waterfall flow below the question input box.

8. An intelligent question-answering device, characterized in that: The device comprises: An acquisition unit, used to acquire the question text input by the user; An identification unit, configured to perform intention identification processing on the question text to identify the intention corresponding to the question text; A classification unit, used for performing classification processing on the intent to determine a search type corresponding to the intent; A retrieval unit is used to retrieve data matching the intention in a database corresponding to the retrieval type according to the intention, and generate an answer corresponding to the question text based on the retrieved data.

9. An electronic device, characterized in that: It includes a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 7 by calling the machine-readable instructions.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by the processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • User question and answer method and device, electronic equipment, storage medium and program product

    CN119938951A

  • User Q&A method, device, electronic device, storage medium and program product

    CN119938951B

  • Knowledge enhancement retrieval generation method, device and system for multivariate data fusion

    CN120144720A

  • RAG enhanced small-scale language model question and answer accuracy improving method and system

    CN120162415A