Question and answer method, system, and storage medium
Patent Information
- Application Number
- CN202610768733.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-30
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本发明实施例的目的在于提供一种问答方法、系统及存储介质,以解决现有技术中问答的回答准确性低下的问题
[0049]本发明实施例,通过对问题文本进行简写识别,能有效地判断问题文本是否存在信息冗余现象,实现了对问题文本的冗余性分析,通过简写方案对问题文本进行问题简写,提高了简写问题的准确性,通过对简写问题进行复杂性识别,能有效地判断简写问题是否存在过于复杂的现象,通过对简写问题进行问题拆解,提高了问答召回的准确性,进而提高了问答结果的准确性。
Smart Images

Figure CN122594435A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a question-answering method, system, and storage medium. Background Technology
[0002] Question answering is one of the core technologies in the fields of information retrieval and natural language processing. Its core goal is to build a technical system that can automatically respond to human natural language questions and output accurate answers. It is widely used in many fields such as intelligent customer service, government services, medical consultation, and educational assistance.
[0003] In existing question-and-answer processes, answers are typically retrieved directly from the question text, lacking analysis of question redundancy, resulting in low accuracy of the retrieved answers. Summary of the Invention
[0004] The purpose of this invention is to provide a question-and-answer method, system, and storage medium to solve the problem of low accuracy in question-and-answer responses in the prior art.
[0005] This invention is implemented as follows: a question-and-answer method, the method comprising:
[0006] Obtain the question text and perform abbreviation recognition on the question text;
[0007] Based on the abbreviation recognition results, an abbreviation scheme is determined, and the question text is abbreviated according to the abbreviation scheme to obtain the abbreviated question;
[0008] The abbreviated problem is subjected to complexity identification, and when the complexity identification is qualified, the abbreviated problem is decomposed to obtain the decomposed problem;
[0009] Based on the decomposed questions, a question-and-answer recall is performed to obtain the questions and answers, and a question-and-answer result is generated based on the questions and answers.
[0010] Preferably, the abbreviation recognition of the question text includes:
[0011] Obtain the local abbreviation mode, and when the local abbreviation mode is the first preset mode, perform a question retrieval based on the question text to obtain the retrieval document;
[0012] The redundancy level of the question text is determined based on the retrieved documents;
[0013] When the local abbreviation mode is the second preset mode, the redundancy of the question text is identified to obtain the redundancy level, and the abbreviation recognition result is generated based on the redundancy level.
[0014] Preferably, an abbreviation scheme is determined based on the abbreviation recognition result, and the question text is abbreviated according to the abbreviation scheme to obtain an abbreviated question, including:
[0015] If the redundancy level is less than or equal to the redundancy threshold, then the first preset scheme is determined as the abbreviated scheme;
[0016] If the redundancy level is greater than the redundancy threshold, then the second preset scheme is determined as the abbreviated scheme;
[0017] If the abbreviation scheme is the first preset scheme, then the question text is set as the abbreviation question;
[0018] If the abbreviation scheme is the second preset scheme, then semantic recognition is performed on the question text to obtain the semantic recognition result;
[0019] Based on the semantic recognition results, the core question, the question object, and the limiting conditions are determined, and the abbreviated question is generated based on the core question, the question object, and the limiting conditions.
[0020] Preferably, complexity identification of the abbreviation problem includes:
[0021] Semantic recognition is performed on the abbreviation problem to obtain abbreviation semantics, and semantic recall is performed based on the abbreviation semantics to obtain semantically recalled documents;
[0022] The complexity of the abbreviation problem and the semantically recalled documents is determined;
[0023] If the complexity determination is qualified, then the complexity identification is qualified.
[0024] Preferably, the complexity determination of the abbreviation problem and the semantically recalled document includes:
[0025] Determine whether there are at least two points of doubt and / or objectives in the abbreviated question;
[0026] If there are at least two points of doubt and / or a target of appeal in the abbreviated question, then the complexity assessment is deemed qualified;
[0027] Determine whether causal, conditional, or comparative logical relationships exist in the abbreviated problem;
[0028] If the abbreviated problem contains causal, conditional, or comparative logical relationships, then the complexity assessment is deemed satisfactory.
[0029] Determine whether there are constraint clauses and / or nested expressions in the abbreviated problem;
[0030] If the abbreviated problem contains constraint clauses and / or nested expressions, then the complexity determination is deemed satisfactory.
[0031] Obtain the semantic question-answer similarity between the semantically recalled document and the abbreviated semantics;
[0032] If the semantic question-answer similarity is less than the similarity threshold, then the complexity determination is deemed qualified.
[0033] Preferably, question-and-answer retrieval is performed based on the deconstruction question to obtain the question answers, including:
[0034] Semantic recognition is performed on the decomposition problem to obtain decomposition semantics, and vector transformation is performed on the decomposition semantics to obtain decomposition vectors;
[0035] The similarity between the decomposed vector and the question-and-answer vector in the question-and-answer database is calculated to obtain the vector similarity.
[0036] The question-and-answer vector corresponding to the maximum similarity of the vectors is determined as the target vector, and the answer information corresponding to the target vector is determined as the question answer.
[0037] Preferably, after obtaining the question text, it also includes:
[0038] Obtain historical dialogue information and perform referential resolution processing on the question text based on the historical dialogue information;
[0039] The problem text after the referential resolution process is subjected to omission restoration processing, and the problem text after omission restoration processing is subjected to intent completion processing.
[0040] Another objective of this invention is to provide a question-and-answer system, the system comprising:
[0041] The abbreviation recognition module is used to acquire the question text and perform abbreviation recognition on the question text;
[0042] The question abbreviation module is used to determine an abbreviation scheme based on the abbreviation recognition result, and to abbreviate the question text according to the abbreviation scheme to obtain the abbreviated question;
[0043] The problem decomposition module is used to identify the complexity of the abbreviated problem, and when the complexity identification is qualified, to decompose the abbreviated problem to obtain the decomposed problem;
[0044] The question-and-answer output module is used to retrieve questions and answers based on the decomposed questions, obtain the answers to the questions, and generate question-and-answer results based on the answers to the questions.
[0045] Preferably, the abbreviation recognition module is further used for:
[0046] Obtain the local abbreviation mode, and when the local abbreviation mode is the first preset mode, perform a question retrieval based on the question text to obtain the retrieval document;
[0047] The redundancy level of the question text is determined based on the retrieved documents;
[0048] When the local abbreviation mode is the second preset mode, the redundancy of the question text is identified to obtain the redundancy level, and the abbreviation recognition result is generated based on the redundancy level.
[0049] In this embodiment of the invention, by recognizing the abbreviation of the question text, it is possible to effectively determine whether there is information redundancy in the question text, thus realizing the redundancy analysis of the question text. By abbreviating the question text using a simplified scheme, the accuracy of the abbreviated question is improved. By recognizing the complexity of the abbreviated question, it is possible to effectively determine whether the abbreviated question is overly complex. By decomposing the abbreviated question, the accuracy of question-and-answer recall is improved, thereby improving the accuracy of the question-and-answer results. Attached Figure Description
[0050] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0051] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0052] Figure 1 This is a flowchart of the question-and-answer method provided in the first embodiment of the present invention;
[0053] Figure 2 This is a schematic diagram of the question-and-answer system provided in the second embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of a single-round question and answer provided in the second embodiment of the present invention;
[0055] Figure 4 This is a schematic diagram of a multi-round question-and-answer session provided in the second embodiment of the present invention;
[0056] Figure 5 This is a schematic diagram of the structure of the terminal device provided in the third embodiment of the present invention. Detailed Implementation
[0057] The following specific embodiments illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] The present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0059] Example 1
[0060] Please see Figure 1 This is a flowchart of a question-and-answer method provided in the first embodiment of the present invention. This question-and-answer method can be applied to any device or system and includes the following steps:
[0061] Step S10: Obtain the problem text and perform abbreviation recognition on the problem text;
[0062] In this process, the abbreviation recognition of the question text is used to determine whether there is information redundancy. Information redundancy includes situations such as long background descriptions and vague target expressions. In this step, if the question text is identified as needing to be abbreviated, the question is compressed to retain the core intent, reducing the interference of redundant content on answer recall and generation, and improving the accuracy of question and answer. Furthermore, the processing method can be distinguished according to the configuration strategy. If it is in "user-defined mode", the question abbreviation is triggered according to the user's choice. If it is in "intelligent judgment mode", the abbreviation judgment is automatically entered.
[0063] Optionally, the abbreviation recognition of the question text includes:
[0064] The system obtains a local abbreviation mode, and when the local abbreviation mode is a first preset mode, it performs a question retrieval based on the question text to obtain a retrieval document. The local abbreviation mode can be set according to requirements. The first preset mode is that the question text can be matched with historical questions in the question-and-answer database "based on the abbreviation mode". The retrieval document is determined based on the matching results. The retrieval document includes answers to questions similar to the question text.
[0065] The redundancy level of the question text is determined based on the retrieved document; wherein, the answer object, key limiting words and core answer words in the retrieved document are obtained, and the redundancy level is obtained by weighting the number of answer objects, key limiting words and core answer words. During the weighting process, the weighting coefficients of the number of answer objects, key limiting words and core answer words can be set according to the requirements.
[0066] When the local abbreviation mode is the second preset mode, the redundancy of the question text is identified to obtain the degree of redundancy, and the abbreviation identification result is generated based on the degree of redundancy. The second preset mode can be a "direct abbreviation mode". By identifying the redundancy of the question text, it is determined whether the question text has information density, descriptive redundancy, background redundancy, etc. If it is determined to be information redundancy, a high-focus question expression is output. If it is determined that no abbreviation is needed, the question text is retained, and the document is searched first according to the abbreviation mode before judgment and rewriting.
[0067] Step S20: Determine the abbreviation scheme based on the abbreviation recognition result, and abbreviate the question text according to the abbreviation scheme to obtain the abbreviated question;
[0068] In particular, the abbreviation scheme for the question text effectively improved the accuracy of the abbreviated questions.
[0069] Optionally, an abbreviation scheme is determined based on the abbreviation recognition result, and the question text is abbreviated according to the abbreviation scheme to obtain an abbreviated question, including:
[0070] If the redundancy level is less than or equal to the redundancy threshold, then the first preset scheme is determined as the abbreviated scheme; wherein, the redundancy threshold can be set according to requirements;
[0071] If the redundancy level is greater than the redundancy threshold, then the second preset scheme is determined as the abbreviated scheme;
[0072] If the abbreviation scheme is the first preset scheme, then the question text is set as the abbreviation question;
[0073] If the abbreviation scheme is the second preset scheme, then semantic recognition is performed on the question text to obtain the semantic recognition result. Based on the semantic recognition result, the core question, the question object, and the limiting conditions are determined, and the abbreviation question is generated based on the core question, the question object, and the limiting conditions. The core question, the question object, and the limiting conditions are combined accordingly to obtain the abbreviation question.
[0074] Step S30: Perform complexity identification on the abbreviated problem, and when the complexity identification is qualified, decompose the abbreviated problem to obtain the decomposed problem;
[0075] The system identifies the complexity of abbreviated questions to determine whether they are complex (e.g., multiple parallel sub-questions, instruction chains, or long sentences with logical structures). If abbreviated questions are complex, they are decomposed into sub-questions, improving the ability to handle complex tasks and reducing the risk of omissions and generation deviations. The decomposition logic supports pluggable implementation and can be dynamically adapted according to business type (e.g., parallel question processors, logical structure parsers, etc.), parsing the abbreviated question into n sub-questions (decomposition problems). Each sub-question is clearly expressed and has consistent granularity.
[0076] Optionally, complexity identification is performed on the abbreviation problem, including:
[0077] Semantic recognition is performed on the abbreviated questions to obtain abbreviated semantics, and semantic recall is performed based on the abbreviated semantics to obtain semantic recall documents; wherein, the abbreviated semantics are semantically matched with a semantic database, and answer recall is performed based on the semantic matching results to obtain semantic recall documents, and the semantic recall documents include answers corresponding to questions similar to the abbreviated semantics.
[0078] The complexity of the abbreviation problem and the semantic recall document is determined; wherein, by determining the complexity of the abbreviation problem and the semantic recall document, it is determined whether the abbreviation problem needs to be decomposed.
[0079] If the complexity determination is qualified, then the complexity identification is qualified.
[0080] Furthermore, the complexity of the abbreviation problem and the semantically recalled document is determined, including:
[0081] Determine whether there are at least two points of doubt and / or objectives in the abbreviated question;
[0082] If there are at least two points of doubt and / or a target of appeal in the abbreviated question, then the complexity assessment is deemed qualified;
[0083] Determine whether causal, conditional, or comparative logical relationships exist in the abbreviated problem;
[0084] If the abbreviated problem contains causal, conditional, or comparative logical relationships, then the complexity assessment is deemed satisfactory.
[0085] Determine whether there are constraint clauses and / or nested expressions in the abbreviated problem;
[0086] If the abbreviated problem contains constraint clauses and / or nested expressions, then the complexity determination is deemed satisfactory.
[0087] Obtain the semantic question-answer similarity between the semantically recalled document and the abbreviated semantic; wherein, in the semantic matching result, there are multiple similarities between the abbreviated semantic and the corresponding recalled semantic in the semantically recalled document, and the maximum similarity between the abbreviated semantic and the recalled semantic is determined as the semantic question-answer similarity;
[0088] If the semantic question-answer similarity is less than the similarity threshold, the complexity determination is deemed qualified. The similarity threshold can be set according to requirements. If the semantic question-answer similarity is less than the similarity threshold, the semantic recall document is deemed unable to effectively answer the question text. Therefore, the determination of abbreviated questions requires question decomposition.
[0089] Step S40: Based on the decomposed question, perform question and answer recall to obtain question answers, and generate question and answer results based on the question answers;
[0090] Specifically, by aggregating question and answer, a structured and complete question-and-answer result is generated, and the question text and the question-and-answer result are stored in the historical dialogue as text pairs for caching.
[0091] Optionally, question-and-answer retrieval based on the decomposed question to obtain a question answer includes: performing semantic recognition on the decomposed question to obtain decomposed semantics; performing vector transformation on the decomposed semantics to obtain a decomposed vector; calculating the similarity between the decomposed vector and question-and-answer vectors in the question-and-answer database to obtain a vector similarity; determining the question-and-answer vector corresponding to the largest vector similarity as the target vector; and determining the answer information corresponding to the target vector as the question answer.
[0092] In other embodiments, after obtaining the problem text, the process further includes:
[0093] Historical dialogue information is acquired, and the question text is processed to resolve referential ambiguity based on the historical dialogue information. Specifically, when a question text arrives in each round, semantic enhancement is performed on the current question text based on the historical dialogue information. By resolving referential ambiguity in the question text, pronouns (such as he, it, that, its, etc.), referential words, or abbreviations in the text can be effectively identified, and the specific preceding / following entities (such as nouns, phrases, concepts, etc.) they refer to can be clarified, thus eliminating the phenomenon of ambiguous referential ambiguity.
[0094] The question text after referential resolution is subjected to omission recovery processing, and the question text after omission recovery processing is subjected to intent completion processing. In particular, by performing omission recovery processing on the question text after referential resolution, the omitted subject and / or target in the question text can be effectively restored, improving the accuracy of the question text. By performing intent completion processing on the question text after omission recovery processing, the semantic integrity of the question text can be effectively guaranteed, solving the semantic breakage problem caused by omission, referentiality or context jump in multi-turn dialogue.
[0095] In this embodiment, a "redundancy detection + focused compression" mechanism is used to identify non-task-related content (background descriptions, generalized rhetoric, etc.) in the question text and perform high-confidence compression. Semantic focusing on the input before recall effectively improves document relevance and generation accuracy. The abbreviation module supports proactive judgment and on-demand invocation, compatible with both professional scenarios and general tasks. By parsing the parallel, conditional, causal, and step relationships in the question text, it is transformed into a standard sub-task sequence. Each decomposed question independently executes the retrieval-generation process, and the results are then aggregated to form a global answer. Before each round of question text generation, referential resolution and omission recovery are performed in conjunction with historical dialogues.
[0096] Intent completion enhances semantics, significantly improving contextual consistency and multi-turn semantic coherence, and solving the problem of incomplete coverage of problem points by a single search.
[0097] In this embodiment, by identifying the abbreviation of the question text, it is possible to effectively determine whether there is information redundancy in the question text, thus realizing the redundancy analysis of the question text. By abbreviating the question text using the abbreviation scheme, the accuracy of the abbreviated question is improved. By identifying the complexity of the abbreviated question, it is possible to effectively determine whether the abbreviated question is overly complex. By decomposing the abbreviated question, the accuracy of question-and-answer recall is improved, thereby improving the accuracy of the question-and-answer results.
[0098] Example 2
[0099] Please see Figure 2 This is a schematic diagram of the structure of the question-and-answer system 100 provided in the second embodiment of the present invention, including:
[0100] The abbreviation recognition module 10 is used to acquire the question text and perform abbreviation recognition on the question text.
[0101] Optionally, the abbreviation recognition module 10 is further configured to: obtain a local abbreviation pattern, and when the local abbreviation pattern is a first preset pattern, perform a question retrieval based on the question text to obtain a retrieval document;
[0102] The redundancy level of the question text is determined based on the retrieved documents;
[0103] When the local abbreviation mode is the second preset mode, the redundancy of the question text is identified to obtain the redundancy level, and the abbreviation recognition result is generated based on the redundancy level.
[0104] Furthermore, the abbreviation recognition module 10 is also used to: acquire historical dialogue information and perform referential resolution processing on the question text based on the historical dialogue information;
[0105] The problem text after the referential resolution process is subjected to omission restoration processing, and the problem text after omission restoration processing is subjected to intent completion processing.
[0106] The question abbreviation module 11 is used to determine an abbreviation scheme based on the abbreviation recognition result, and to abbreviate the question text according to the abbreviation scheme to obtain the abbreviated question.
[0107] Optionally, the problem abbreviation module 11 is further configured to: if the redundancy level is less than or equal to the redundancy threshold, then determine the first preset scheme as the abbreviation scheme;
[0108] If the redundancy level is greater than the redundancy threshold, then the second preset scheme is determined as the abbreviated scheme;
[0109] If the abbreviation scheme is the first preset scheme, then the question text is set as the abbreviation question;
[0110] If the abbreviation scheme is the second preset scheme, then semantic recognition is performed on the question text to obtain the semantic recognition result;
[0111] Based on the semantic recognition results, the core question, the question object, and the limiting conditions are determined, and the abbreviated question is generated based on the core question, the question object, and the limiting conditions.
[0112] Problem decomposition module 12 is used to identify the complexity of the abbreviated problem, and when the complexity identification is qualified, to decompose the abbreviated problem to obtain the decomposed problem.
[0113] Optionally, the problem decomposition module 12 is further configured to: perform semantic recognition on the abbreviated problem to obtain abbreviated semantics, and perform semantic retrieval based on the abbreviated semantics to obtain semantic retrieval documents;
[0114] The complexity of the abbreviation problem and the semantically recalled documents is determined;
[0115] If the complexity determination is qualified, then the complexity identification is qualified.
[0116] Furthermore, the problem decomposition module 12 is also used to: determine whether there are at least two points of doubt and / or target claims in the abbreviated problem;
[0117] If there are at least two points of doubt and / or a target of appeal in the abbreviated question, then the complexity assessment is deemed qualified;
[0118] Determine whether causal, conditional, or comparative logical relationships exist in the abbreviated problem;
[0119] If the abbreviated problem contains causal, conditional, or comparative logical relationships, then the complexity assessment is deemed satisfactory.
[0120] Determine whether there are constraint clauses and / or nested expressions in the abbreviated problem;
[0121] If the abbreviated problem contains constraint clauses and / or nested expressions, then the complexity determination is deemed satisfactory.
[0122] Obtain the semantic question-answer similarity between the semantically recalled document and the abbreviated semantics;
[0123] If the semantic question-answer similarity is less than the similarity threshold, then the complexity determination is deemed qualified.
[0124] The question-and-answer output module 13 is used to retrieve questions and answers based on the decomposed questions, obtain questions and answers, and generate questions and answers results based on the questions and answers.
[0125] Optionally, the question-and-answer output module 13 is further configured to: perform semantic recognition on the decomposition question to obtain decomposition semantics, and perform vector transformation on the decomposition semantics to obtain decomposition vectors;
[0126] The similarity between the decomposed vector and the question-and-answer vector in the question-and-answer database is calculated to obtain the vector similarity.
[0127] The question-and-answer vector corresponding to the maximum similarity of the vectors is determined as the target vector, and the answer information corresponding to the target vector is determined as the question answer.
[0128] Please see Figure 3 When conducting a single-turn question-and-answer dialogue, the system obtains the user-input question text (original query), determines whether to abbreviate it directly or based on a document based on the user's configuration, outputs the query, and obtains the abbreviated question. Based on the abbreviated question, a retrieval is performed to obtain a semantic recall document. The system then determines whether question decomposition is needed based on the semantic recall document (current information) and the results of the abbreviated question. If question decomposition is needed, the abbreviated question is decomposed into multiple sub-questions. Based on the sub-questions, a retrieval is performed to obtain the question answer (current answer), and a question-and-answer result (final answer) is generated based on the question answer. If decomposition is not needed, the question-and-answer result is directly generated based on the semantic recall document.
[0129] Please see Figure 4When conducting multi-round question-and-answer dialogues, before making user-configured selections, the question text is rewritten multiple times based on the dialogue history. Specifically, historical dialogue information is obtained, and the question text is processed by referential resolution based on the historical dialogue information. The question text after referential resolution is then processed by omission restoration, and the question text after omission restoration is then processed by intent completion. For the question text after intent completion, it is determined whether to abbreviate based on user-configured selections or by determining whether to abbreviate based on the document.
[0130] In this embodiment, by identifying the abbreviation of the question text, it is possible to effectively determine whether there is information redundancy in the question text, thus realizing the redundancy analysis of the question text. By abbreviating the question text using the abbreviation scheme, the accuracy of the abbreviated question is improved. By identifying the complexity of the abbreviated question, it is possible to effectively determine whether the abbreviated question is overly complex. By decomposing the abbreviated question, the accuracy of question-and-answer recall is improved, thereby improving the accuracy of the question-and-answer results.
[0131] Example 3
[0132] Figure 5 This is a structural block diagram of a terminal device 2 provided in the third embodiment of this application. For example... Figure 5 As shown, the terminal device 2 in this embodiment includes a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the processor 20, such as a question-and-answer method program. When the processor 20 executes the computer program 22, it implements the steps in the various embodiments of the question-and-answer methods described above.
[0133] For example, the computer program 22 may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 20 to complete this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 22 in the terminal device 2. The terminal device may include, but is not limited to, the processor 20 and the memory 21.
[0134] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0135] The memory 21 can be an internal storage unit of the terminal device 2, such as a hard drive or memory of the terminal device 2. The memory 21 can also be an external storage device of the terminal device 2, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal device 2. Furthermore, the memory 21 can include both internal and external storage units of the terminal device 2. The memory 21 is used to store the computer program and other programs and data required by the terminal device. The memory 21 can also be used to temporarily store data that has been output or will be output.
[0136] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0137] If an integrated module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. This computer-readable storage medium can be non-volatile or volatile. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the contents of a computer-readable storage medium may be appropriately added to or subtracted from the contents as required by the legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, a computer-readable storage medium may not include electrical carrier signals and telecommunication signals.
[0138] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A question-and-answer method, characterized in that, The method includes: Obtain the question text and perform abbreviation recognition on the question text; Based on the abbreviation recognition results, an abbreviation scheme is determined, and the question text is abbreviated according to the abbreviation scheme to obtain the abbreviated question; The abbreviated problem is subjected to complexity identification, and when the complexity identification is qualified, the abbreviated problem is decomposed to obtain the decomposed problem; Based on the decomposed questions, a question-and-answer recall is performed to obtain the questions and answers, and a question-and-answer result is generated based on the questions and answers.
2. The question-and-answer method as described in claim 1, characterized in that, The abbreviation recognition of the question text includes: Obtain the local abbreviation mode, and when the local abbreviation mode is the first preset mode, perform a question retrieval based on the question text to obtain the retrieval document; The redundancy level of the question text is determined based on the retrieved documents; When the local abbreviation mode is the second preset mode, the redundancy of the question text is identified to obtain the redundancy level, and the abbreviation recognition result is generated based on the redundancy level.
3. The question-and-answer method as described in claim 2, characterized in that, Based on the abbreviation recognition results, an abbreviation scheme is determined, and the question text is abbreviated according to the abbreviation scheme to obtain the abbreviated question, including: If the redundancy level is less than or equal to the redundancy threshold, then the first preset scheme is determined as the abbreviated scheme; If the redundancy level is greater than the redundancy threshold, then the second preset scheme is determined as the abbreviated scheme; If the abbreviation scheme is the first preset scheme, then the question text is set as the abbreviation question; If the abbreviation scheme is the second preset scheme, then semantic recognition is performed on the question text to obtain the semantic recognition result; Based on the semantic recognition results, the core question, the question object, and the limiting conditions are determined, and the abbreviated question is generated based on the core question, the question object, and the limiting conditions.
4. The question-and-answer method as described in claim 1, characterized in that, Complexity identification of the abbreviation problem includes: Semantic recognition is performed on the abbreviation problem to obtain abbreviation semantics, and semantic recall is performed based on the abbreviation semantics to obtain semantically recalled documents; The complexity of the abbreviation problem and the semantically recalled documents is determined; If the complexity determination is qualified, then the complexity identification is qualified.
5. The question-and-answer method as described in claim 4, characterized in that, The complexity of the abbreviation problem and the semantically recalled documents is determined, including: Determine whether there are at least two points of doubt and / or objectives in the abbreviated question; If there are at least two points of doubt and / or a target of appeal in the abbreviated question, then the complexity assessment is deemed qualified; Determine whether causal, conditional, or comparative logical relationships exist in the abbreviated problem; If the abbreviated problem contains causal, conditional, or comparative logical relationships, then the complexity assessment is deemed satisfactory. Determine whether there are constraint clauses and / or nested expressions in the abbreviated problem; If the abbreviated problem contains constraint clauses and / or nested expressions, then the complexity determination is deemed satisfactory. Obtain the semantic question-answer similarity between the semantically recalled document and the abbreviated semantics; If the semantic question-answer similarity is less than the similarity threshold, then the complexity determination is deemed qualified.
6. The question-and-answer method as described in claim 1, characterized in that, Based on the deconstruction of the problem, a question-and-answer recall process is performed to obtain the answers, including: Semantic recognition is performed on the decomposition problem to obtain decomposition semantics, and vector transformation is performed on the decomposition semantics to obtain decomposition vectors; The similarity between the decomposed vector and the question-and-answer vector in the question-and-answer database is calculated to obtain the vector similarity. The question-and-answer vector corresponding to the maximum similarity of the vectors is determined as the target vector, and the answer information corresponding to the target vector is determined as the question answer.
7. The question-and-answer method as described in claim 1, characterized in that, After obtaining the problem text, it also includes: Obtain historical dialogue information and perform referential resolution processing on the question text based on the historical dialogue information; The problem text after the referential resolution process is subjected to omission restoration processing, and the problem text after omission restoration processing is subjected to intent completion processing.
8. A question-and-answer system, characterized in that, The system includes: The abbreviation recognition module is used to acquire the question text and perform abbreviation recognition on the question text; The question abbreviation module is used to determine an abbreviation scheme based on the abbreviation recognition result, and to abbreviate the question text according to the abbreviation scheme to obtain the abbreviated question; The problem decomposition module is used to identify the complexity of the abbreviated problem, and when the complexity identification is qualified, to decompose the abbreviated problem to obtain the decomposed problem; The question-and-answer output module is used to retrieve questions and answers based on the decomposed questions, obtain the answers to the questions, and generate question-and-answer results based on the answers to the questions.
9. The question-and-answer system as described in claim 8, characterized in that, The abbreviation recognition module is also used for: Obtain the local abbreviation mode, and when the local abbreviation mode is the first preset mode, perform a question retrieval based on the question text to obtain the retrieval document; The redundancy level of the question text is determined based on the retrieved documents; When the local abbreviation mode is the second preset mode, the redundancy of the question text is identified to obtain the redundancy level, and the abbreviation recognition result is generated based on the redundancy level.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.