Question and answer processing method and device, electronic equipment, storage medium and product

Through the expansion of target domain words in the problem statement and database retrieval, the problem of illusion phenomenon easily generated in the generation of large language models is solved, the search accuracy and reply authenticity are improved, the user's diverse needs are met, and the user experience is improved.

CN119166759APending Publication Date: 2024-12-20HONG KONG UNIV OF SCI & TECH (GUANGZHOU) +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410869505.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Content generated by the Big Language Model (LLM) is prone to hallucination without prior knowledge verification, which reduces accuracy. The existing search enhancement generation method directly uses user query requests to recall and similarity comparison, which may be inaccurate. , resulting in the search results not meeting user needs.

Method used

By determining the first target domain word in the problem statement, expanding it, obtaining the second target domain word, searching from the database of the target domain, obtaining the target search results, and then providing the reply result of the problem statement, expanding the search space , improves the accuracy of searches and the authenticity of reply.

Benefits of technology

By expanding the target domain words in the problem statement, the search space is expanded, the search accuracy and authenticity of reply are improved, the illusion problem of the model is reduced, the multi-form and diverse needs of users are met, and the user's interactive experience is improved .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166759A_ABST
    Figure CN119166759A_ABST
Patent Text Reader

Abstract

The invention provides a question and answer processing method and device, electronic equipment, a storage medium and a product, and the method comprises the steps: obtaining a question statement, and determining a first target domain word in the question statement, the first target domain word representing a word in a target domain corresponding to the question statement; expanding the first target field word to obtain a second target field word; and according to the first target domain word and the second target domain word, performing retrieval from a database corresponding to the target domain to obtain a target retrieval result, and according to the target retrieval result, obtaining a first reply result of the question statement. Therefore, the retrieval space is expanded, the retrieval reliability is improved, and the reply accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a question-answering processing method, device, electronic device, storage medium, and product. Background Art

[0002] With the development of artificial intelligence, large language models (LLMs) can be applied to many tasks involving language, and user questions can be answered based on LLMs. However, the content source generated by LLMs is prone to hallucinations when it is not verified by prior knowledge, which reduces accuracy. Summary of the invention

[0003] The present disclosure provides a question-answering processing method, device, electronic device, storage medium, and product.

[0004] In a first aspect, the present disclosure provides a question-answering processing method, the question-answering processing method comprising:

[0005] Acquire a question sentence, and determine a first target domain word in the question sentence, wherein the first target domain word represents a word in the target domain corresponding to the question sentence;

[0006] Expanding the first target domain word to obtain a second target domain word;

[0007] According to the first target domain word and the second target domain word, a search is performed from a database corresponding to the target domain to obtain a target search result, and according to the target search result, a first reply result of the question statement is obtained.

[0008] In a second aspect, the present disclosure provides a question-answer processing device, the question-answer processing device comprising:

[0009] A determination module, configured to obtain a question statement and determine a first target domain word in the question statement, wherein the first target domain word represents a word in the target domain corresponding to the question statement;

[0010] An expansion module, used to expand the first target domain word to obtain a second target domain word;

[0011] A retrieval module, configured to search from a database corresponding to the target field according to the first target field word and the second target field word to obtain a target retrieval result;

[0012] A processing module is used to obtain a first reply result of the question statement according to the target search result.

[0013] In a third aspect, the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can perform the above-mentioned question and answer processing method.

[0014] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned question and answer processing method when executed by a processor.

[0015] In a fifth aspect, the present disclosure provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned question and answer processing method.

[0016] The question-answer processing method provided by the embodiment of the present disclosure obtains a question statement, determines a first target domain word in the question statement, expands the first target domain word to obtain a second target domain word, and then searches from a database corresponding to the target domain based on the first target domain word and the second target domain word to obtain a target search result, and obtains a first reply result of the question statement based on the target search result. In this way, by expanding the first target domain word and then searching, rather than searching directly based on the question statement, the search space is expanded, the search accuracy and reliability are improved, and the reply is made based on the target search result, which also improves the authenticity and accuracy of the reply.

[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:

[0019] Figure 1 An application scenario diagram of the question-answer processing method and device provided in an embodiment of the present disclosure;

[0020] Figure 2A flowchart of a question-and-answer processing method provided in an embodiment of the present disclosure;

[0021] Figure 3 It is a schematic diagram of the interface of the problem handling method in the embodiment of the present disclosure;

[0022] Figure 4 It is an overall logic block diagram of the problem handling method in the embodiment of the present disclosure;

[0023] Figure 5 A block diagram of a question-answer processing device provided in an embodiment of the present disclosure;

[0024] Figure 6 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0026] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0027] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0028] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0029] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0030] In the technical solution disclosed in this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution complies with relevant national laws and regulations (for example, the "Information Security Technology Personal Information Security Specification", etc.). For example: corresponding prescribed measures are taken for personal information access control; prescribed restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; when using personal information, clear identity orientation is eliminated to avoid precise positioning of specific individuals.

[0031] At present, based on models such as Large Language Model (LLM), user questions can be answered. However, the content source generated by LLM is prone to hallucination when it is not verified by prior knowledge, which reduces the accuracy. In the related art, a retrieval augmentation generation (RAG) method is also provided, which can first retrieve relevant content and provide an external knowledge source for LLM. However, in the related art, the retrieval augmentation generation method mainly directly performs recall and similarity comparison based on user query requests, and the query request input by the user may not be accurate, so that the retrieval result may not meet the user's needs, and may be incomplete or inaccurate, thereby reducing the accuracy of the LLM reply.

[0032] A question-answering processing method is provided in the disclosed embodiment, which determines a first target domain word in a question statement, expands the first target domain word to obtain a second target domain word, and searches from a database corresponding to the target domain based on the first target domain word and the second target domain word to obtain a target search result, and then obtains a first reply result to the question statement based on the target search result. In this way, by expanding the first target domain word in the target domain involved in the question statement, the search content can be expanded on the source domain, the search space is expanded, and the search accuracy is improved, so that the question statement can be answered based on the more accurate target search result obtained, and the accuracy and reliability of the reply can also be improved.

[0033] Figure 1 The application scenario diagram of the question and answer processing method and device provided by the embodiments of the present disclosure is schematically shown.

[0034] like Figure 1 As shown, the application scenario of the embodiment of the present disclosure may include a terminal device 101, a network 103 and a server 102. The network 103 is used to provide a medium for a communication link between the terminal device 101 and the server 102. The network 103 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0035] The user can use the terminal device 101 to interact with the server 102 through the network 103 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0036] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.

[0037] The server 102 may be a server that provides various services, such as a background management server that supports websites browsed by users using the terminal device 101 (for example only). The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device. For example, in the embodiment of the present disclosure, the user may use the terminal device 101 to input a question statement, and after receiving the question statement, the server 102 may obtain a reply result based on the question-answering processing method in the embodiment of the present disclosure, and return it to the terminal device 101, and then the terminal device 101 may display the reply result to the user.

[0038] It should be noted that the question-answer processing method and apparatus provided in the embodiments of the present disclosure may be executed by the server 102. Accordingly, the question-answer processing method and apparatus provided in the embodiments of the present disclosure may be arranged in the server 102. The question-answer processing method and apparatus provided in the embodiments of the present disclosure may also be executed by a server or server cluster that is different from the server 102 and that can communicate with the terminal device 101 and / or the server 102. Accordingly, the question-answer processing method and apparatus provided in the embodiments of the present disclosure may also be arranged in a server or server cluster that is different from the server 102 and that can communicate with the terminal device 101 and / or the server 102.

[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0040] Figure 2A flowchart of a question-answering processing method provided by an embodiment of the present disclosure. Figure 2 , the method comprising:

[0041] S201: Obtain a question sentence, and determine a first target domain word in the question sentence, wherein the first target domain word represents a word in the target domain corresponding to the question sentence.

[0042] In the embodiments of the present disclosure, the question and answer system can be applied to any field or scenario, such as the medical field, the transportation field, the intelligent customer service field, etc., without limitation. The user can input a question statement through the dialogue process in the terminal device, and then the terminal device can send the question statement to the server to request the server to answer. For example, the question statement can be used to query certain information.

[0043] Among them, with respect to determining the first target domain word in the question statement in this step S201, the present disclosure also provides several possible implementation methods: 1) In one possible implementation method, keywords are extracted from the question statement, domain identification is performed on the extracted keywords, the target domain corresponding to the question statement is determined, and keywords associated with the target domain are used as the first target domain word.

[0044] 2) In another possible implementation, based on the functional module or tool selected for use when the question statement is input, and the mapping relationship between the domain and the functional module or tool, the target domain of the question statement is determined, and the first target domain word associated with the target domain is extracted from the question statement.

[0045] For example, for different fields, there is a corresponding functional module or tool to be displayed to the user. If the user wants to ask questions in a certain field, he can choose to use the corresponding functional module or tool according to his needs. Then, the question statement input through the functional module or tool can be considered to belong to the target field corresponding to the functional module or tool.

[0046] 3) In another possible implementation, the question sentence may be semantically analyzed based on the domain recognition model to determine the target domain of the question sentence, and the first target domain word associated with the target domain may be extracted from the question sentence according to the target domain.

[0047] For example, if the target field is determined to be the medical field, medical terms can be extracted from the question sentence.

[0048] Of course, other methods may also be used to determine the target domain and the first target domain word of the question sentence, which is not limited in the embodiments of the present disclosure.

[0049] S202: Expand the first target domain word to obtain a second target domain word.

[0050] With respect to step S202, the present disclosure provides a possible embodiment, including:

[0051] 1) Based on the knowledge base of the target domain, the first target domain word is similarly matched in the knowledge base.

[0052] 2) Filter out target content in the knowledge base that meets similar conditions as the first target domain word.

[0053] For example, if the target field is the medical field, a medical knowledge graph can be obtained, and similarity matching can be performed on the first target field words, such as by performing vector encoding and cosine similarity calculation to screen out target contents with a similarity greater than a certain threshold or the top n similarities. The target content can be words, medical or pathological description texts, etc., and the target content can also be image content, etc., without limitation.

[0054] 3) According to the screened target content, a second target domain word expanded from the first target domain word is obtained.

[0055] The second domain word expanded from the first target domain word may be, for example, a synonym or near-synonym of the first target domain word.

[0056] In this way, in the embodiment of the present disclosure, the first target domain words are expanded based on the knowledge base of the target domain, which can expand the search scope, provide better domain knowledge understanding and retrieval effect, and enable the expanded second target domain words to still belong to the target domain, thereby improving the accuracy of subsequent recall and retrieval.

[0057] S203: Searching from a database corresponding to the target domain according to the first target domain word and the second target domain word to obtain a target search result, and obtaining a first reply result of the question statement according to the target search result.

[0058] In the disclosed embodiment, a question statement is obtained, and a first target domain word in the question statement is determined, the first target domain word is expanded to obtain a second target domain word, and a search is performed from a database corresponding to the target domain based on the first target domain word and the second target domain word to obtain a target search result, and then a first reply result of the question statement is obtained based on the target search result. In this way, a search can be performed in the corresponding target domain, and the obtained target search result can provide a more authentic and reliable basis and contextual additional information for answering the question statement, thereby improving the accuracy and reliability of the reply result. In addition, during the search, the first target domain word in the question statement is expanded to expand the search space and improve the comprehensiveness and accuracy of the search.

[0059] Based on the above embodiment, the above step S203 is described in detail below.

[0060] With respect to the above step S203, the present disclosure provides a possible implementation method, which can be described from the following two parts, including:

[0061] 1) The first part: Based on the first target domain word and the second target domain word, a search is performed from a database corresponding to the target domain to obtain a target search result.

[0062] Regarding this step, a possible implementation of the present disclosure includes:

[0063] S1. According to the first target domain word, recall is performed from the database corresponding to the target domain to obtain a first candidate search result, and according to the second target domain word, recall is performed from the database to obtain a second candidate search result.

[0064] Among them, there is no restriction on the format of the content stored in the database, for example, word format, PDF format, Hyper Text Markup Language (html) page format, character separated values ​​(CSV) format, etc. There is no restriction on the format of the stored image content, for example, including JPG, Joint Photographic Experts Group (JPGE) format, Portable Network Graphics (PNG) format, etc. During recall, the first target domain word and the second target domain word can be used to recall the text data or image data in different formats of content respectively, and the recalled first candidate retrieval result and the second candidate retrieval result can be one or more.

[0065] In addition, in the embodiments of the present disclosure, there is no limitation on the recall method. For example, the recall can be performed based on the first target domain word and the second target domain word, combined with the popularity information, attention level and other information of the content stored in the database, which can further improve the recall accuracy.

[0066] S2. Merge the first target domain word and the second target domain word to obtain merged content.

[0067] S3. Determine the similarity between the merged content and the first candidate search result and the second candidate search result, respectively, and obtain the target search result according to the determined similarity.

[0068] Specifically, with respect to steps S2 and S3, a possible embodiment of the present disclosure includes:

[0069] 1) Determine a first encoding vector of a first target domain word and a second encoding vector of a second target domain word, and determine a third encoding vector set of a first candidate retrieval result and a fourth encoding vector set of a second candidate retrieval result.

[0070] Among them, the coding vector can be obtained based on the coding model, and in the embodiment of the present disclosure, the coding model can be trained through a knowledge base of the target field or other training samples corresponding to the target field, so that the trained coding model is more suitable for the target field and improves the accuracy of vector coding in the target field.

[0071] In addition, in the embodiment of the present disclosure, there are usually multiple first candidate retrieval results and second candidate retrieval results obtained through recall, and each first candidate retrieval result and each second candidate retrieval result are vector encoded respectively to obtain their corresponding third encoding vector set and fourth encoding vector set.

[0072] 2) Merge the first coding vector and the second coding vector to obtain a merged coding vector.

[0073] For example, the first encoding vector and the second encoding vector may be concatenated to obtain a merged encoding vector. For another example, the first encoding vector and the second encoding vector may be weighted averaged according to the similarity between the first target domain word and the second target domain word to obtain a merged encoding vector.

[0074] 3) Determine a first similarity between the merged coding vector and the third set of coding vectors, and a second similarity between the merged coding vector and the fourth set of coding vectors.

[0075] For example, the first similarity and the second similarity may be determined by a cosine similarity calculation formula.

[0076] 4) According to the first similarity and the second similarity, the first candidate search result and the second candidate search result are sorted from large to small.

[0077] 5) Screening out a preset number of the first candidate search results and / or the second candidate search results that are ranked high to obtain a target search result.

[0078] That is to say, in the disclosed embodiment, the first target domain word and the second target domain word can be combined to sort the recalled first candidate retrieval results and the second candidate retrieval results as a whole, and the first preset number of the top ranked ones, i.e. the ones with the highest similarity, can be screened out as the final target retrieval results.

[0079] In addition, in the embodiments of the present disclosure, when performing calculations to obtain target retrieval results based on the merged content, the first candidate retrieval results, and the second candidate retrieval results, the Best Matching 25 (BM25) method can also be used, wherein the BM25 method is mainly used to determine the relevance between documents and user queries, and its basic principle is based on word frequency and inverse document frequency, and also introduces the length information of the document to calculate the relevance between the document and the query.

[0080] In this way, in the embodiment of the present disclosure, based on the first target domain words and the expanded second target domain words, the retrieved encoding vector can be expanded to a set of encoding vectors, which expands the retrieval domain and also reduces the dependence on the encoding method in semantic understanding and retrieval effect, thereby improving the accuracy of similarity calculations, improving sorting accuracy, and further improving the accuracy and reliability of retrieval results.

[0081] 2) The second part: Based on the target retrieval results, obtain the first response result of the question statement.

[0082] In a possible embodiment, obtaining a first reply result of the question statement according to the target search result includes:

[0083] S1. Based on the generative model, the intent of the question sentence is identified to determine the target intent of the question sentence, where the target intent represents the ability requirement for answering the question sentence.

[0084] S2. Determine the target functional module that matches the target intent based on the association between the intent category and the functional module, wherein different functional modules implement different capabilities.

[0085] For example, the intent categories may include any of the following: statistical intent, drawing intent, search intent, etc. The functional module associated with statistical intent is the statistical function module, which can analyze the digital content in the target retrieval results and output statistical indicators; the functional module associated with drawing intent is the drawing function module, which can visualize the target retrieval results according to drawing requirements; the functional module associated with search intent is the search function module, and the search intent can represent the timeliness requirement for retrieval. Through the search function module, real-time search results can be obtained on the retrieval website.

[0086] S3. Based on the target function module and the generative model, generate the first response result of the question statement according to the target retrieval result.

[0087] In this step, the present disclosure also provides possible embodiments for different target intentions.

[0088] In one case, when the target intent is statistical intent and the matched target functional module is a statistical functional module, the objects to be counted in the target retrieval results are extracted and classified based on the generative model, and the statistical functional module is called to input the extracted and classified objects to be counted into the statistical functional module to obtain statistical results.

[0089] For example, the object to be counted may be digital-related content, or other content, and the statistical results may include statistical indicators, statistical analysis results of the statistical indicators (such as changing trends), and the like.

[0090] In one case, when the target intent is a drawing intent and the target functional module is a drawing functional module, the graphic description information of the object to be drawn in the target retrieval result is extracted based on the generative model, and the target functional module is called to input the graphic description information of the object to be drawn into the target functional module to generate a graphic generation result corresponding to the graphic description information.

[0091] For example, you can draw a data visualization analysis diagram of the target search results, and you can also draw the required pictures, etc.

[0092] In one case, when the target intent is the search intent and the target functional module is the search functional module, based on the generative model, inductive processing is performed according to the target retrieval results and / or question statements to generate semantically identical search statements, and based on the search functional module, a search is performed on the retrieval URL for the search statement to obtain search results that match the search statement.

[0093] Furthermore, in order to improve accuracy, the search results obtained by the search function module can be input into the generative model, and based on the generative model, the search results can be summarized to obtain the final first reply result.

[0094] In this way, in the embodiment of the present disclosure, the target function module that needs to be called is determined through intent recognition, and then the generative model target function modules can work together to generate first response results for different needs, expand more functions, answer more questions with different needs, and improve the answering ability and accuracy.

[0095] In another possible embodiment, obtaining a first reply result of the question statement according to the target search result includes:

[0096] S1. Based on the generative model, the intent of the question sentence is identified to determine the target intent of the question sentence, where the target intent represents the ability requirement for answering the question sentence.

[0097] S2. Based on the generative model, generate the first response result of the question sentence corresponding to the target intent according to the target retrieval result.

[0098] For example, if the target intent is summary intent, the target retrieval results are summarized and generalized based on the generative model to generate summary text content, and then the first response result of the question statement is obtained.

[0099] For example, for statistical intent, drawing intent, search intent, etc., the generative model can also have these capabilities, and then statistical results, graphic generation results or search results, etc. can be obtained based on the generative model.

[0100] In the disclosed embodiment, the target retrieval result can be used as context, the target retrieval result and the question statement can be filled into the prompt statement, and input into the generative model, so that the first response result of the question statement can be generated based on the background knowledge of the target retrieval result. For example, the prompt statement is: Please answer the question statement based on the target retrieval result.

[0101] In addition, in the embodiment of the present disclosure, it is also possible to identify keywords in the question statement to trigger the corresponding target function module or generate the first reply result corresponding to different target intentions. For example, if it is recognized that the question statement includes the drawing keyword, the drawing function module is triggered.

[0102] In this way, in the embodiment of the present disclosure, multi-form and diverse response results can be output by recognizing the intent of the question sentence, that is, it can support multi-form enhanced functions, meet more needs, and improve performance.

[0103] Furthermore, in an embodiment of the present disclosure, after obtaining the target retrieval result and the first reply result, in order to satisfy the user's further understanding of the target retrieval result, further dialogue can be conducted with the user. Specifically, the present disclosure provides a possible implementation method, including: outputting the target retrieval result and the first reply result through a dialogue process; obtaining the next round of question statements input for the target retrieval result in the dialogue process, and determining the second reply result of the next round of question statements based on the target retrieval result.

[0104] For example, in the disclosed embodiments, a chatbot can be constructed to establish a dialogue process with the user. The user can input the question statements they want to ask in the dialogue process, and the chatbot can then answer the user's question statements based on the target retrieval results. In this way, the user's dialogue needs for the target retrieval results can be met, thereby improving the user experience.

[0105] The following uses the medical field as an example to briefly explain the problem solving method in the embodiment of the present disclosure using a specific embodiment. Figure 3 , which is a schematic diagram of an interface of a problem handling method in an embodiment of the present disclosure.

[0106] like Figure 3As shown, the user can use the terminal device to trigger a conversation with the chatbot, and the chatbot can output in the interface: "What kind of information do you want to consult? Please roughly describe what you want to consult", and then the user can enter the question statement, such as "I want to query information about tumors."

[0107] The server can determine that the first target domain word in the question sentence is "tumor" based on the problem processing method in the embodiment of the present disclosure, and can expand the first target domain word to obtain a second target domain word, for example, multiple words with the same semantics as tumor, and search in a database corresponding to the medical field according to the first target domain word and the second target domain word, for example, the database is a pathology database of a certain hospital, obtain target search results, and obtain summary text content of the target search results, and display the target search results and summary text content to the user, for example, Figure 3 As shown, the target retrieval results are multiple pathological information about tumors. The target retrieval results can be displayed in a table form without restriction. The summary text content is: The above is the content about the preliminary recall results. The total number of samples in the final retrieval results is 100. These samples mainly involve various types of biopsy results of the stomach, esophagus, and duodenum.

[0108] Then, based on the target search results, if the user has further consultation needs, he can also enter the next round of question statements for the target search results, for example, Figure 3 As shown in FIG. 1 , the user inputs the next question statement: “Which samples are related to the duodenum? Please provide the details.” Then, the server can determine the duodenum samples and their details according to the target search results. For example, the specific sample number, pathology number, and pathology description information can be determined. Figure 3 As shown, the chatbot can output: "The sample number is x1, and the pathology number is y1, which is consistent with duodenal tumor polyp."

[0109] In the disclosed embodiment, the first target domain word in the question sentence can be diverged and expanded, so as to directly expand the search content in the source domain, expand the search space, improve the search accuracy and reliability, and enhance the search effect. Then, based on the obtained target search results, the reply result of the question sentence is obtained, the reply accuracy and authenticity are improved, and the hallucination problem of the model is reduced. In addition, in the disclosed embodiment, multi-structure and multi-format results such as tables, statistical analysis charts, and summary text content can be output in the dialogue interface to meet the different query needs of users and enhance the user interaction experience.

[0110] The overall logic of the problem handling method in the embodiment of the present disclosure is explained below, taking the target intention as an example of the summary intention, see Figure 4, which is an overall logic block diagram of the problem handling method in an embodiment of the present disclosure.

[0111] like Figure 4 As shown, the overall solution of the problem handling method in the embodiment of the present disclosure may include a diverger, a recaller, a retriever and a summarizer, and may also include a chat robot and a user.

[0112] Specifically, the user inputs a question sentence, and the diverger is used to determine a first target domain word in the question sentence, and based on a knowledge base of the target domain, expand the first target domain word to obtain a second target domain word.

[0113] The recaller is used to recall the first target domain words and the second target domain words from the database corresponding to the target domain respectively, to obtain the first candidate retrieval result and the second candidate retrieval result.

[0114] The retriever is used to calculate the similarity between the merged content of the first target domain word and the second target domain word and the first candidate search result and the second candidate search result, and then screen out the first preset number of first candidate search results and / or second candidate search results with the highest similarity to obtain the target search result.

[0115] The summarizer is used to summarize the target retrieval results based on the generative model to obtain the summary text content.

[0116] In the disclosed embodiment, a chatbot can be constructed, and through the chatbot's dialogue process, the target search results and summary text content can be returned to the user. The user can then continue to have a dialogue with the chatbot, thereby satisfying the user's needs for further understanding of the search results and dialogue needs, and improving the user's interactive experience.

[0117] In this way, in the disclosed embodiment, based on the knowledge base of the target field, the first target field words in the question sentence are expanded, so that the expanded second target field words are also more in line with the target field, and the search space is expanded, the search effect is improved, and in the disclosed embodiment, multiple forms of result output can also be provided to meet the different needs of users.

[0118] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0119] In addition, the present disclosure also provides a question and answer processing device, an electronic device, and a computer-readable storage medium, all of which can be used to implement any question and answer processing method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.

[0120] Figure 5 A block diagram of a question and answer processing device provided in an embodiment of the present disclosure.

[0121] Reference Figure 5 The present disclosure provides a question-answer processing device, the question-answer processing device comprising:

[0122] A determination module 51 is used to obtain a question sentence and determine a first target domain word in the question sentence, wherein the first target domain word represents a word in the target domain corresponding to the question sentence;

[0123] An expansion module 52, configured to expand the first target domain word to obtain a second target domain word;

[0124] A retrieval module 53, configured to search the database corresponding to the target domain according to the first target domain word and the second target domain word to obtain a target retrieval result;

[0125] The processing module 54 is used to obtain a first reply result of the question statement according to the target search result.

[0126] In a possible embodiment, when the first target domain word is expanded to obtain the second target domain word, the expansion module 52 is used to:

[0127] Based on the knowledge base of the target domain, similarity matching is performed on the first target domain words in the knowledge base;

[0128] Filtering out target content in the knowledge base that meets similar conditions to the first target domain word;

[0129] According to the screened target content, a second target domain word expanded from the first target domain word is obtained.

[0130] In a possible embodiment, when searching the database corresponding to the target domain based on the first target domain word and the second target domain word to obtain the target search result, the search module 53 is used to:

[0131] According to the first target domain word, recall from the database corresponding to the target domain to obtain a first candidate search result, and according to the second target domain word, recall from the database to obtain a second candidate search result;

[0132] Merging the first target domain word and the second target domain word to obtain merged content;

[0133] Determine the similarity between the combined content and the first candidate search result and the second candidate search result, respectively, and obtain a target search result based on the determined similarity.

[0134] In a possible embodiment, when the first target domain word and the second target domain word are merged to obtain a merged content, similarities between the merged search content and the first candidate search result and the second candidate search result are determined, and a target search result is obtained according to the determined similarities, the search module 53 is used to:

[0135] Determine a first encoding vector of the first target domain word and a second encoding vector of the second target domain word, and determine a third encoding vector set of the first candidate retrieval result and a fourth encoding vector set of the second candidate retrieval result;

[0136] Merging the first coding vector and the second coding vector to obtain a merged coding vector;

[0137] Determining a first similarity between the merged encoding vector and the third set of encoding vectors, and a second similarity between the merged encoding vector and the fourth set of encoding vectors;

[0138] According to the first similarity and the second similarity, sorting the first candidate search result and the second candidate search result from large to small;

[0139] A preset number of the first candidate search results and / or the second candidate search results that are ranked first are screened out to obtain a target search result.

[0140] In a possible embodiment, when obtaining the first reply result of the question statement according to the target search result, the processing module 54 is used to:

[0141] Based on the generative model, the intent of the question sentence is identified to determine the target intent of the question sentence, wherein the target intent represents the capability requirement for answering the question sentence;

[0142] Determine a target functional module matching the target intent according to the association relationship between the intent category and the functional module, wherein different functional modules implement different capabilities;

[0143] Based on the target function module and the generative model, a first response result of the question statement is generated according to the target retrieval result.

[0144] In a possible embodiment, when obtaining the first reply result of the question statement according to the target search result, the processing module 54 is used to:

[0145] Based on the generative model, the intent of the question sentence is identified to determine the target intent of the question sentence, wherein the target intent represents the capability requirement for answering the question sentence;

[0146] Based on the generative model, a first reply result of the question sentence corresponding to the target intent is generated according to the target retrieval result.

[0147] In a possible embodiment, the dialogue module 55 is further configured to:

[0148] Outputting the target search result and the first reply result through a dialogue process;

[0149] A next round of question statements input for the target search result in the dialogue process is obtained, and a second reply result of the next round of question statements is determined according to the target search result.

[0150] Each module in the above-mentioned question-answer processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0151] Figure 6 A block diagram of an electronic device provided in an embodiment of the present disclosure.

[0152] Reference Figure 6 An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 601; at least one memory 602, and one or more I / O interfaces 603, connected between the processor 601 and the memory 602; wherein the memory 602 stores one or more computer programs that can be executed by the at least one processor 601, and the one or more computer programs are executed by the at least one processor 601 so that the at least one processor 601 can execute the above-mentioned question and answer processing method.

[0153] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0154] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned question-answering processing method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0155] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned question and answer processing method.

[0156] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0157] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0158] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0159] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0160] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0161] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0162] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0163] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0164] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0165] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A question-answering processing method, characterized in that: include: Acquire a question sentence, and determine a first target domain word in the question sentence, wherein the first target domain word represents a word in the target domain corresponding to the question sentence; Expanding the first target domain word to obtain a second target domain word; According to the first target domain word and the second target domain word, a search is performed from a database corresponding to the target domain to obtain a target search result, and according to the target search result, a first reply result of the question statement is obtained.

2. The question-answer processing method according to claim 1, characterized in that: The step of expanding the first target domain word to obtain the second target domain word includes: Based on the knowledge base of the target domain, similarity matching is performed on the first target domain words in the knowledge base; Filtering out target content in the knowledge base that meets similar conditions to the first target domain word; According to the screened target content, a second target domain word expanded from the first target domain word is obtained.

3. The question-answer processing method according to claim 1, characterized in that: The step of searching a database corresponding to the target domain based on the first target domain word and the second target domain word to obtain a target search result includes: According to the first target domain word, recall from the database corresponding to the target domain to obtain a first candidate search result, and according to the second target domain word, recall from the database to obtain a second candidate search result; Merging the first target domain word and the second target domain word to obtain merged content; Determine the similarity between the combined content and the first candidate search result and the second candidate search result, respectively, and obtain a target search result based on the determined similarity.

4. The question-answer processing method according to claim 3, characterized in that: The step of merging the first target domain word and the second target domain word to obtain a merged content, determining the similarity between the merged search content and the first candidate search result and the second candidate search result, and obtaining a target search result according to the determined similarity includes: Determine a first encoding vector of the first target domain word and a second encoding vector of the second target domain word, and determine a third encoding vector set of the first candidate retrieval result and a fourth encoding vector set of the second candidate retrieval result; Merging the first coding vector and the second coding vector to obtain a merged coding vector; Determining a first similarity between the merged encoding vector and the third set of encoding vectors, and a second similarity between the merged encoding vector and the fourth set of encoding vectors; According to the first similarity and the second similarity, sorting the first candidate search result and the second candidate search result from large to small; A preset number of the first candidate search results and / or the second candidate search results that are ranked first are screened out to obtain a target search result.

5. The question-answer processing method according to any one of claims 1 to 4, characterized in that: The step of obtaining a first reply result to the question statement according to the target search result includes: Based on the generative model, the intent of the question sentence is identified to determine the target intent of the question sentence, wherein the target intent represents the capability requirement for answering the question sentence; Determine a target functional module matching the target intent according to the association relationship between the intent category and the functional module, wherein different functional modules implement different capabilities; Based on the target function module and the generative model, a first response result of the question statement is generated according to the target retrieval result.

6. The question-answer processing method according to any one of claims 1 to 4, characterized in that: The step of obtaining a first reply result to the question statement according to the target search result includes: Based on the generative model, the intent of the question sentence is identified to determine the target intent of the question sentence, wherein the target intent represents the capability requirement for answering the question sentence; Based on the generative model, a first reply result of the question sentence corresponding to the target intent is generated according to the target retrieval result.

7. The question-answer processing method according to claim 1, characterized in that: The method further comprises: Outputting the target search result and the first reply result through a dialogue process; A next round of question statements input for the target search result in the dialogue process is obtained, and a second reply result of the next round of question statements is determined according to the target search result.

8. A question-answer processing device, characterized in that: include: A determination module, configured to obtain a question statement and determine a first target domain word in the question statement, wherein the first target domain word represents a word in the target domain corresponding to the question statement; An expansion module, used to expand the first target domain word to obtain a second target domain word; A retrieval module, configured to search from a database corresponding to the target field according to the first target field word and the second target field word to obtain a target retrieval result; A processing module is used to obtain a first reply result of the question statement according to the target search result.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the question and answer processing method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the question-answering processing method according to any one of claims 1 to 7.

11. A computer program product, characterized in that It includes a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the question-answering processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Question answering system and dealing method thereof

    CN103902672A

  • Intelligent retrieval method and system based on exploration and development knowledge graph and storage medium

    CN116401350A

  • Cross-domain problem processing method and device, electronic equipment and storage medium

    CN116842168A

  • Online intelligent question answering method and device based on instruction fine tuning and retrieval enhancement generation

    CN117688163A