Question and answer optimization method and device, equipment and storage medium

By splitting and iteratively processing the original question into sub-questions and using the large language model to obtain conclusion information, the problem of low answer accuracy of the large language model under complex search terms is solved, and higher answer accuracy is achieved.

CN120804239APending Publication Date: 2025-10-17BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411835310.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing large language models have low answer accuracy when processing complex search terms and cannot effectively improve the accuracy of question answers.

Method used

By splitting the original question information into multiple sub-questions, selecting the target sub-question, and using the large language model to obtain the conclusion information, and when the conclusion information does not match the current question information, generating new current question information, repeating the iteration until a match is found.

Benefits of technology

The accuracy of question answers is improved. Through detailed sub-question analysis and iterative processing, the search scope is gradually narrowed to ensure that the answers are highly matched with user intentions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804239A_ABST
    Figure CN120804239A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of large language models, and discloses a question and answer optimization method and device, equipment and a storage medium, and the method comprises the steps: responding to input original question information, and taking the original question information as current question information; splitting the current question information into a plurality of sub-questions; selecting at least one target sub-question from the sub-questions, and obtaining conclusion information corresponding to the target sub-question through a large language model; under the condition that the conclusion information is not matched with the current question information, generating new current question information based on the conclusion information in combination with the current question information, and returning to the step of splitting the current question information into the plurality of sub-questions; and under the condition that the conclusion information is matched with the current question information, taking the conclusion information as an answer of the original question information. The question answering accuracy can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large language model, and particularly relates to a question and answer optimization method and device, equipment and a storage medium. BACKGROUND

[0002] With the rapid development of artificial intelligence and natural language processing technology, large language models (such as GPT series models) have gradually become an important tool in the field of information retrieval. These large models can analyze complex query words input by users, split them, and recall relevant search results from massive databases or literature. However, although large models have great advantages in understanding and generating language, when dealing with complex search words, simply splitting complex search words, recalling search results, and then directly giving answers based on search results often leads to low accuracy of answers.

[0003] Therefore, how to effectively improve the accuracy of problem answering is a problem that needs to be solved at present.

[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide a question and answer optimization method, device, equipment and storage medium, which aims to solve the technical problem of how to effectively improve the accuracy of problem answering.

[0006] To achieve the above purpose, the present application provides a question and answer optimization method, which comprises:

[0007] In response to input original question information, the original question information is taken as current question information;

[0008] The current question information is split into multiple sub-questions;

[0009] At least one target sub-question is selected from the sub-questions, and conclusion information corresponding to the target sub-question is obtained through a large language model;

[0010] In the case that the conclusion information does not match the current question information, new current question information is generated based on the conclusion information combined with the current question information, and the step of splitting the current question information into multiple sub-questions is returned;

[0011] In the case that the conclusion information matches the current question information, the conclusion information is taken as the answer to the original question information.

[0012] In an embodiment, the current question information is split into multiple sub-questions, which comprises:

[0013] split the current question information into a plurality of word groups;

[0014] determine a plurality of target search words according to the plurality of word groups;

[0015] generate a plurality of sub-questions according to the plurality of target search words.

[0016] In an embodiment, the splitting of the current question information into a plurality of word groups comprises:

[0017] performing word segmentation on the current question information to obtain segmented current question information;

[0018] performing non-keyword extraction on the segmented current question information to obtain non-keywords;

[0019] eliminating the non-keywords from the segmented current question information to obtain target question information;

[0020] performing part-of-speech tagging and keyword splitting on the target question information to obtain a plurality of word groups.

[0021] In an embodiment, the determining of a plurality of target search words according to the plurality of word groups comprises:

[0022] performing syntax analysis and semantic analysis on each of the word groups to obtain syntax parameters and semantic parameters of each word group;

[0023] determining a complexity index of each word group according to the syntax parameters and the semantic parameters;

[0024] determining a plurality of target search words according to the complexity index of each word group.

[0025] In an embodiment, the generating of a plurality of sub-questions according to the plurality of target search words comprises:

[0026] performing question template matching according to each of the target search words to obtain a question template corresponding to each target search word;

[0027] integrating each of the target search words with the corresponding question template to obtain a plurality of initial question frameworks;

[0028] performing semantic expansion on the target search words in each of the initial question frameworks to generate a plurality of sub-questions.

[0029] In an embodiment, before the splitting of the current question information into a plurality of sub-questions, the method further comprises:

[0030] obtaining a text difficulty corresponding to the current question information;

[0031] comparing the text difficulty corresponding to the current question information with a preset difficulty threshold.

[0032] When the text difficulty corresponding to the current question information reaches a preset difficulty threshold, the step of splitting the current question information into a plurality of sub-questions is performed.

[0033] In an embodiment, the text difficulty corresponding to the current question information is obtained by:

[0034] performing sentence analysis on the current question information to obtain a splittable sub-question;

[0035] determining the text difficulty corresponding to the current question information according to the number of splittable sub-questions.

[0036] In an embodiment, the text difficulty corresponding to the current question information is determined according to the number of splittable sub-questions, comprising:

[0037] When the number of splittable sub-questions reaches a preset number, the network data resource amount and response time required for searching the conclusion information of the splittable sub-questions are obtained;

[0038] determining the text difficulty corresponding to the current question information according to the network data resource amount and the response time.

[0039] In an embodiment, after comparing the text difficulty corresponding to the current question information with the preset difficulty threshold, the method further comprises:

[0040] When the text difficulty corresponding to the current question information does not reach the preset difficulty threshold, the current question information is taken as a target question;

[0041] obtaining conclusion information corresponding to the target question through a large language model;

[0042] taking the conclusion information as an answer to the original question information.

[0043] In an embodiment, the at least one target sub-question is selected from the sub-questions, specifically comprising:

[0044] obtaining the part of speech of the target search term in each sub-question and the position information of the target search term in the current question information;

[0045] performing priority sorting on the sub-questions according to the part of speech and the position information to obtain a sorting result of the sub-questions;

[0046] taking the sub-question with the highest priority in the sorting result as the target sub-question.

[0047] In an embodiment, the new current question information is generated based on the conclusion information combined with the current question information, comprising:

[0048] input the conclusion information and the current question information into a large language model, and receive new current question information fed back by the large language model.

[0049] In an embodiment, after the at least one target sub-question is selected from the sub-questions and the conclusion information corresponding to the target sub-question is obtained through the large language model, the method further includes:

[0050] extracting a first core element in the conclusion information and a second core element in the current question information;

[0051] determining the relevance of the conclusion information and the current question information according to the first core element and the second core element;

[0052] determining whether the conclusion information matches the current question information according to the relevance.

[0053] In addition, to achieve the above-mentioned purposes, the present application further provides a question and answer optimization device, which includes:

[0054] a processing module configured to input original question information and take the original question information as current question information in response to the input of the original question information;

[0055] a splitting module configured to split the current question information into a plurality of sub-questions;

[0056] an obtaining module configured to select at least one target sub-question from the sub-questions and obtain conclusion information corresponding to the target sub-question through a large language model;

[0057] a generating module configured to generate new current question information based on the conclusion information combined with the current question information in the case where the conclusion information does not match the current question information, and return the step of splitting the current question information into a plurality of sub-questions;

[0058] The processing module is further configured to take the conclusion information as an answer to the original question information in the case where the conclusion information matches the current question information.

[0059] In an embodiment, the splitting module is further configured to split the current question information into a plurality of word groups.

[0060] determine a plurality of target search words according to the plurality of word groups;

[0061] generate a plurality of sub-questions according to the plurality of target search words.

[0062] In an embodiment, the splitting module is further configured to perform word segmentation on the current question information to obtain segmented current question information.

[0063] performing non-keyword extraction on the segmented current question information to obtain non-keywords;

[0064] eliminating the non-keywords from the segmented current question information to obtain target question information;

[0065] performing part-of-speech tagging and keyword splitting on the target question information to obtain a plurality of word groups.

[0066] In an embodiment, the splitting module is further configured to perform syntax analysis and semantic analysis on each of the word groups to obtain syntax parameters and semantic parameters of each word group.

[0067] determining a complexity index of each word group according to the syntax parameters and the semantic parameters;

[0068] determining a plurality of target search words according to the complexity indexes of the word groups.

[0069] In an embodiment, the splitting module is further configured to perform question template matching according to each of the target search words to obtain a question template corresponding to each target search word.

[0070] integrating each of the target search words with the corresponding question template to obtain a plurality of initial question frameworks.

[0071] performing semantic expansion on the target search words in each of the initial question frameworks to generate a plurality of sub-questions.

[0072] In an embodiment, the question and answer optimization apparatus further comprises a comparison module.

[0073] The comparison module is configured to obtain a text difficulty corresponding to the current question information.

[0074] comparing the text difficulty corresponding to the current question information with a preset difficulty threshold.

[0075] when the text difficulty corresponding to the current question information reaches the preset difficulty threshold, performing the step of splitting the current question information into a plurality of sub-questions.

[0076] In addition, to achieve the above object, the present application further proposes a question and answer optimization device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the question and answer optimization method as described above.

[0077] In addition, to achieve the above object, the present application further proposes a storage medium, which is a computer-readable storage medium, the storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the question and answer optimization method as described above.

[0078] In addition, to achieve the above-mentioned object, the present application also provides a computer program product, which comprises a computer program, and the computer program realizes the steps of the question and answer optimization method as described above when executed by a processor.

[0079] The present application provides a question and answer optimization method. The present application first responds to input original question information as current question information, splits the current question information into multiple sub-questions, selects at least one target sub-question from the sub-questions, obtains conclusion information corresponding to the target sub-question through a large language model, generates new current question information based on the conclusion information in combination with the current question information in the case that the conclusion information does not match the current question information, and returns the step of splitting the current question information into multiple sub-questions. In the case that the conclusion information matches the current question information, the conclusion information is taken as an answer to the original question information, which can effectively improve the accuracy of question answering.

[0080] In summary, the present application can make question analysis more detailed by splitting multiple sub-questions based on original question information, effectively improve the relevance of conclusion acquisition by selecting the most suitable sub-question as a target sub-question for conclusion acquisition, and then obtain new question information according to the conclusion information of the target sub-question. Through repeated iteration, the search range can be gradually narrowed until the answer result matching the original question information is obtained, overcoming the technical defect of low accuracy of answering complex search requests, and effectively improving the accuracy of question answering. BRIEF DESCRIPTION OF DRAWINGS

[0081] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application.

[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.

[0083] Figure 1 A flowchart is provided for the question and answer optimization method embodiment one of the present application;

[0084] Figure 2 A flowchart is provided for the question and answer optimization method embodiment two of the present application;

[0085] Figure 3 A flowchart is provided for the question and answer optimization method embodiment three of the present application;

[0086] Figure 4 A module structure diagram of a question and answer optimization device according to an embodiment of the present application is shown in FIG. 1.

[0087] Figure 5 A device structure diagram of a hardware running environment involved in a question and answer optimization method according to an embodiment of the present application is shown in FIG. 2.

[0088] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0089] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.

[0090] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings of the specification and specific embodiments.

[0091] The main solution of the embodiment of the present application is: in response to the input of original question information, taking the original question information as the current question information; splitting the current question information into multiple sub-questions; selecting at least one target sub-question from the sub-questions, obtaining conclusion information corresponding to the target sub-question through a large language model; in the case that the conclusion information does not match the current question information, generating new current question information based on the conclusion information combined with the current question information, and returning to the step of splitting the current question information into multiple sub-questions; in the case that the conclusion information matches the current question information, taking the conclusion information as the answer to the original question information.

[0092] With the rapid development of artificial intelligence and natural language processing technology, large language models (such as GPT series models) have gradually become an important tool in the field of information retrieval. These large models can analyze complex query words input by users, split and recall relevant search results from massive databases or literature. However, although large models have great advantages in understanding and generating language, when dealing with complex search words, simply splitting complex search words, recalling search results, and then directly giving answers based on search results often leads to low accuracy of answers. Therefore, how to effectively improve the accuracy of question answering is a problem that needs to be solved at present.

[0093] The application can make the problem analysis more detailed by splitting multiple sub-questions based on the original question information, select the most suitable sub-question as the target sub-question to obtain the conclusion, effectively improve the pertinence of the conclusion, and then obtain new question information according to the conclusion information of the target sub-question, gradually narrow the search range through repeated iteration, and obtain the answer result matched with the original question information, overcome the technical defects of low accuracy of complex search request, and effectively improve the accuracy of question answering.

[0094] It should be noted that the execution subject of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a question and answer optimization device, etc. capable of realizing the above functions. The following will take the question and answer optimization device as an example to describe the embodiment and the following embodiments.

[0095] Based on this, the embodiment of the application provides a question and answer optimization method, referring to Figure 1 , Figure 1 The flowchart of the first embodiment of the question and answer optimization method of the application is shown in the figure.

[0096] In the embodiment, the question and answer optimization method includes steps S10-S50:

[0097] Step S10, in response to the input of the original question information, taking the original question information as the current question information.

[0098] It should be noted that the original question information is a question raised by the user, which can be a query request in the form of text or text information converted from voice input. In the embodiment, the original question information is a text query request input by the user through the interface.

[0099] It can be understood that since the original question information of the user can be a complex query containing multiple concepts or conditions, the original question information is taken as the current question information to ensure that the user's query intention can be continuously tracked in the subsequent processing process, and the expression of the question can be dynamically adjusted according to the conclusion information obtained by the large language model. In this way, even for complex queries, the question can be gradually refined until the answer highly matched with the user's intention is found, so that the complex query containing multiple concepts or conditions can be effectively processed, and the understanding degree of the user's query and the accuracy of the answer can be improved.

[0100] Step S20, splitting the current question information into multiple sub-questions.

[0101] It should be noted that the current problem information can be composed of multiple nested sub-questions, at this time, in order to more accurately understand and process the user's query intention, the embodiment will split the original problem information into multiple sub-questions, for example, "In the past ten years, which are the top three variety shows that the staff of at least three award-winning TV series participated in together?", Since it contains multiple conditions, it can be split into "What are the award-winning TV series in the past ten years?", "What are the staff of the award-winning TV series?", "What are the top three variety shows?", and "What are the staff of the top three variety shows?" and other sub-questions. Through such splitting, each sub-question can be analyzed in more detail, thereby improving the accuracy and efficiency of problem solving.

[0102] It can be understood that the basis for splitting can be keywords, phrases or sentences in the question, or splitting according to the logical structure of the question, which is not specifically limited by the embodiment.

[0103] Step S30, selecting at least one target sub-question from the sub-questions, and obtaining conclusion information corresponding to the target sub-question through a large language model.

[0104] It should be noted that the target sub-question can be selected according to the priority, and there can be one or more target sub-questions. The priority can be determined based on the complexity of the sub-question, the urgency of the user query, and the importance of the sub-question in the overall question, etc., which is not specifically limited by the embodiment, for example, for "What are the staff of at least three award-winning TV series in the past ten years?", "What are the top three variety shows?", and "What are the staff of the top three variety shows?" and other sub-questions, the highest priority may be "What are the staff of at least three award-winning TV series in the past ten years?", Because this information can help narrow the search range and quickly locate the possible answer.

[0105] It can be understood that after the target sub-question is determined, the large language model will search according to the specific content of the sub-question to obtain the most relevant conclusion information, for example, for "What are the staff of at least three award-winning TV series in the past ten years?", The model may search related databases or literature to extract the list of staff who meet the conditions, in this way, each sub-question can be solved step by step, and finally the conclusion information of all sub-questions is integrated to form a complete answer to the original question.

[0106] It is worth noting that the large language model can be a deep learning-based natural language processing model trained on a large amount of text data, which can understand and process complex semantic and contextual relationships in natural language. In this embodiment, the large language model can use its powerful semantic analysis capabilities to deeply understand the target sub-problems and filter out the most relevant conclusion information from the vast amount of information. For example, for the target sub-problem "Which cast members have participated in at least three award-winning TV series in the past ten years?", the large language model will analyze the keywords "in the past ten years", "have participated in at least three award-winning TV series", and "cast members" in the question, and combine the knowledge learned during its training process to extract the matching cast member list. In this way, the large language model not only provides accurate answers, but also provides the sources and basis of the answers, enhancing the credibility and transparency of the answers.

[0107] In a feasible implementation, the step of "selecting at least one target sub-problem from the sub-problems" in step S30 specifically includes: obtaining the part-of-speech of the target search term in each sub-problem and the position information of the target search term in the current question information; prioritizing the sub-problems according to the part-of-speech and the position information to obtain a sorting result of the sub-problems; and selecting the sub-problem with the highest priority in the sorting result as the target sub-problem.

[0108] It should be noted that in this embodiment, one target sub-problem is selected as an example for illustration, i.e., the sub-problem with the highest priority in the sorting result is selected as the target sub-problem. The target search term refers to a keyword or phrase in a sub-problem with a complexity index reaching a certain threshold. In this embodiment, the complexity index can be calculated based on factors such as the length of the sub-problem, the number of keywords, the logical relationship between keywords, etc. For example, "have participated in at least three award-winning TV series" in the sub-problem "Which cast members have participated in at least three award-winning TV series in the past ten years?" can be a target search term with a higher complexity index, as it involves the consideration of multiple conditions, which requires a more complex search and analysis process. By setting a threshold for the complexity index, sub-problems that require special attention and processing can be effectively screened out, thereby improving the efficiency and accuracy of the entire question and answer optimization process.

[0109] It can be understood that the part of speech of the target search word refers to noun, verb, adjective, etc., which helps to determine the role and importance of the search word in the question, for example, in the sub-question "What are the actors and actresses who have participated in at least three award-winning TV series in the past ten years?", "have participated in at least three award-winning TV series" as a verb phrase indicates an important condition of the actors and actresses, so it will be given a higher weight in searching. The position information refers to the specific position of the target search word in the question, such as whether it is located at the beginning, middle or end of the question, which helps to understand the weight and role of the search word in the whole question, for example, for the question "In the past ten years, what are the top three variety shows that the actors and actresses who have participated in at least three award-winning TV series have participated in?", "in the past ten years" at the beginning of the question indicates the time range, and "actors and actresses who have participated in at least three award-winning TV series" indicates the main object to be obtained. Through such part of speech analysis and position information consideration, the sub-questions can be more accurately sorted to ensure that the sub-questions that are most critical to answering the original question are processed first. By considering the part of speech and position information, the sub-questions can be more accurately prioritized, so that the most suitable sub-question is selected as the target sub-question for conclusion acquisition, which not only improves the relevance of conclusion acquisition, but also makes the whole question and answer optimization process more efficient and accurate.

[0110] In a specific implementation, the current question information is decomposed into a sequence of words or phrases through a word segmentation technique, and then the syntax analysis technique is used to determine the grammatical role of each word or phrase in the sentence, such as subject, predicate, object, etc. Through these roles, the position of the target search word in the sentence can be further identified, such as whether it is at the beginning, middle or end of the sentence, and whether it is a main component of the sentence. In addition, the semantic role labeling technique can also be used to identify the semantic role of the target search word in the question, such as whether it is the subject, condition or limiting component of the question. By integrating these position and semantic information, the position of the target search word in the current question information can be more accurately determined.

[0111] It is worth noting that when multiple target sub-questions are selected, the top several sub-questions in the sorting result can be selected as the target sub-questions. For example, if the top three sub-questions in the sorting result have the highest priority, then these three sub-questions will be selected as the target sub-questions for acquiring conclusions simultaneously. In this way, multiple sub-questions can be processed in parallel, thereby speeding up the whole question and answer optimization process.

[0112] In a feasible implementation, after step S30, further comprising: extracting a first core element in the conclusion information and a second core element in the current question information; determining the relevance of the conclusion information and the current question information according to the first core element and the second core element; determining whether the conclusion information matches the current question information according to the relevance.

[0113] It should be noted that the first core element refers to the keywords or phrases in the conclusion information that best represent the conclusion information, and the second core element is the element in the current question information that is most critical to the answer to the question, for example, in the conclusion information "The performers who have participated in at least three award-winning TV series in the past ten years include XX, XX, and XX", "the past ten years", "at least three award-winning TV series", "performers" and the like can be regarded as the first core element, because it is directly related to the answer to the question. And in the current question information "In the past ten years, what are the top three variety shows that the performers who have participated in at least three award-winning TV series have jointly participated in?", "the past ten years", "at least three award-winning TV series", "performers", "jointly participate", and "top three variety shows" can be regarded as the second core element, because they define the scope and conditions of the question.

[0114] It can be understood that by comparing these core elements, the model can determine whether the conclusion information is closely related to the question, so as to decide whether to provide the conclusion information as the final answer to the user, for example, if the conclusion information only contains "the past ten years", "at least three award-winning TV series", and "performers", and the current question information contains "the past ten years", "at least three award-winning TV series", "performers", "jointly participate", and "top three variety shows", the conclusion information does not mention "jointly participate" and "top three variety shows", so the relevance of the conclusion information to the current question information is low, and it is considered that the conclusion information does not match the current question information, so the conclusion information will not be provided as the final answer. On the contrary, if the conclusion information contains all the second core elements, it can be considered that the conclusion information is highly relevant to the current question information, so it is determined that the conclusion information matches the current question information and is provided as the final answer to the user. This relevance analysis method not only improves the accuracy of the answer, but also ensures that the user can obtain comprehensive and query-intention-compliant information.

[0115] Step S40, in the case where the conclusion information does not match the current question information, generating new current question information based on the conclusion information combined with the current question information, and returning to the step of splitting the current question information into multiple sub-questions.

[0116] It should be noted that in the case where the conclusion information does not match the current question information, the purpose of generating new current question information is to further refine the search range and ensure that the answer more in line with the user's query intent can be found, for example, for the conclusion information "In the past ten years, the staff who have participated in at least three award-winning TV series include XX, XX and XX, the new current question information can be generated, for example, "XX, XX and XX participated in which variety show", through repeated iteration, the search range can be gradually narrowed down until the answer most in line with the user's demand is found.

[0117] In a feasible implementation, the step S40 of "generating new current question information based on the conclusion information combined with the current question information" specifically includes: inputting the conclusion information and the current question information into a large language model, and receiving the new current question information fed back by the large language model.

[0118] It should be noted that the new current question information can be generated by a large language model, which can understand and process natural language, thereby providing more accurate and relevant questions. In this way, the user's query habits can be continuously learned and adapted, and the efficiency and quality of question answering can be improved.

[0119] It can be understood that the large language model can better understand the context, so that when generating new questions, the coherence and logic of the questions can be considered to ensure that the generated questions are both relevant and exploratory.

[0120] In specific implementation, the conclusion information and the current question information are input into the large language model, the large language model analyzes the semantic content of the current question information and the conclusion information, and then generates a new question based on these contents. The generated question will retain the intention of the original question, while being more specific and targeted, facilitating more accurate positioning to the information the user really wants.

[0121] Step S50, in the case where the conclusion information matches the current question information, the conclusion information is taken as the answer to the original question information.

[0122] It should be noted that in the case where the conclusion information matches the current question information, it indicates that the user query has obtained a direct and accurate response, for example, if the user asks "Who has more Golden Ball Awards, A and B", and the conclusion information shows that "A has more Golden Ball Awards than B", then this conclusion information can be directly provided to the user as an answer. Such processing ensures that users can quickly obtain the answers they want, while reducing unnecessary iterative searches and improving the efficiency of question and answer.

[0123] The embodiment provides a question and answer optimization method. The embodiment first responds to input original question information, takes the original question information as current question information, splits the current question information into multiple sub-questions, selects at least one target sub-question from the sub-questions, obtains conclusion information corresponding to the target sub-question through a large language model, generates new current question information based on the conclusion information in combination with the current question information in the case that the conclusion information does not match the current question information, and returns the step of splitting the current question information into multiple sub-questions. In the case that the conclusion information matches the current question information, the conclusion information is taken as an answer to the original question information, and the accuracy of question answering can be effectively improved.

[0124] In conclusion, the embodiment can make question analysis more detailed by splitting multiple sub-questions based on original question information, effectively improve the pertinence of conclusion obtaining by selecting the most suitable sub-question as a target sub-question to obtain a conclusion, and then obtain new question information according to the conclusion information of the target sub-question. Through repeated iteration, the search range can be gradually narrowed until the answer result matching the original question information is obtained, the technical defect of low accuracy of answers to complex search requests is overcome, and the accuracy of question answering can be effectively improved.

[0125] Based on the first embodiment of the application, the same or similar contents as the above-mentioned first embodiment can be referred to the above introduction, and will not be described in detail. On this basis, please refer to Figure 2 , the step S20 further includes steps S201-S203:

[0126] Step S201 splits the current question information into multiple word groups.

[0127] It should be noted that splitting the current question information into multiple word groups can help improve the accuracy of question analysis, because it can more carefully analyze each component of the question. For example, splitting "In the past ten years, what are the top three variety shows in which at least three award-winning TV drama performers participate" into "variety shows in the past ten years", "at least three award-winning TV drama performers", and "variety shows in which at least three award-winning TV drama performers participate" can make each word group have a clear meaning, which is convenient for subsequent search and matching process.

[0128] It can be understood that the splitting of the current question information is not limited to the word group level, but can be further refined to the phrase or sentence level to adapt to different complexity questions, for example, for the question "In the latest football World Cup, which team's goalkeeper has the most saves?", it can be split into phrases such as "the latest football World Cup", "which team", "goalkeeper", and "the most saves". Such splitting helps to more accurately locate the search range, thereby quickly finding relevant data. Through this hierarchical splitting strategy, various complex questions can be more effectively processed, improving the accuracy of question analysis and the efficiency of conclusion acquisition.

[0129] It is worth noting that the splitting of the current question information can be achieved through various algorithms, such as word segmentation algorithms, syntactic analysis algorithms, etc. Through these algorithms, the question text can be broken down into smaller units, thereby more accurately understanding the intent and structure of the question. For example, using a word segmentation algorithm can split Chinese question text into individual words, while a syntactic analysis algorithm can identify the subject-predicate-object structure in a sentence and further extract key information from the question.

[0130] In a feasible implementation, step S201 specifically includes: performing word segmentation on the current question information to obtain segmented current question information; performing non-keyword extraction on the segmented current question information to obtain non-keywords; removing the non-keywords from the segmented current question information to obtain target question information; performing part-of-speech tagging and keyword splitting on the target question information to obtain a plurality of word groups.

[0131] It should be noted that the word segmentation of the current question information can be based on a pre-set word library or through machine learning methods to identify the lexical boundaries in the text, ensuring that each word is correctly segmented. Non-keyword extraction further filters out words that are not important to understanding the core meaning of the question, such as auxiliary words, prepositions, etc., making the target question information more focused.

[0132] It can be understood that part-of-speech tagging assigns each word a corresponding part-of-speech tag, such as noun, verb, etc., which helps to analyze the structure of the question. Keyword splitting further extracts key information from the question based on part-of-speech tags, for example, nouns and verbs often reveal the main content and actions of the question. Through such processing, the question text can be converted into a series of keyword groups.

[0133] Step S202 determines a plurality of target search words based on a plurality of word groups.

[0134] It should be noted that the target search word refers to a word group with a complexity index reaching a certain threshold, so by determining the complexity index of each word group, word groups that meet specific complexity requirements can be selected as target search words.

[0135] In an implementation, the step S202 specifically comprises: performing syntax analysis and semantic analysis on each of the phrases to obtain syntax parameters and semantic parameters of each phrase; determining a complexity index of each phrase according to the syntax parameters and the semantic parameters; and determining a plurality of target search words according to the complexity indexes of the phrases.

[0136] It should be noted that the syntax parameters refer to indexes for describing the position and role of a phrase in a syntax structure, such as parts of speech, tenses, voices, etc. The semantic parameters involve the meaning and implication of a phrase, such as synonyms, antonyms, hyponym-hypernym relationships, etc. By comprehensively considering these parameters, the complexity of a phrase can be more accurately evaluated. For example, a noun phrase containing multiple modifiers can have a high syntax complexity, while a verb phrase containing professional terms can have a high semantic complexity. After the complexity index is determined, the target search words can be screened according to a preset threshold.

[0137] In a specific implementation, through syntax analysis, the function of a phrase in a sentence can be identified, such as subject, predicate or object, which helps to understand the role of the phrase in the overall question. Semantic analysis further reveals the implication of the phrase, for example, by analyzing the contextual relationship of the phrase, its specific meaning in a particular field can be determined, for example, for the phrase “most saves”, semantic analysis can identify its meaning related to football game statistics. By integrating the results of syntax and semantic analysis, a comprehensive complexity index can be calculated for each phrase, which reflects the complexity of the phrase in terms of syntax and semantics. Finally, according to this complexity index, those phrases whose complexity index reaches or exceeds a preset threshold can be screened as target search words.

[0138] The step S203 comprises: generating a plurality of sub-questions according to the target search words.

[0139] It should be noted that the process of generating sub-questions involves combining the target search terms with the context of the question to form a series of more specific and refined questions that aim to delve into various aspects of the original question in order to more accurately obtain the information the user needs. For example, if the original question is about "which are the top three variety shows in the past ten years that have been participated in by at least three cast and crew members of award-winning TV series", the target search terms may include "variety shows in the past ten years", "cast and crew members of award-winning TV series", and "cast and crew members participating in the top three variety shows". Based on these target search terms, the following sub-questions can be generated: 1. "What are the variety shows in the past ten years?" 2. "Which cast and crew members have participated in at least three award-winning TV series?" 3. "What are the top three variety shows that these cast and crew members have participated in?" 4. "How do the rankings of these variety shows in the past ten years rank in terms of popularity?" 5. "Among these variety shows, which are the top three in terms of popularity?" 6. "Among these top three variety shows, which are the ones that cast and crew members have participated in?" 7. "Among these variety shows that cast and crew members have participated in, which are the ones that cast and crew members of award-winning TV series have participated in?" 8. "Among these variety shows, which cast and crew members have participated in the shows that have won awards?" 9. "What awards have these shows won?" 10. "Is the time range of these awards within the past ten years?", Through such sub-question generation, the original question can be gradually refined to more accurately locate the specific information the user wants to query, and each sub-question is based on the combination of target search terms and question context, ensuring the relevance and depth of the question.

[0140] In a feasible implementation, step S203 specifically includes: performing question template matching according to each target search term to obtain a question template corresponding to each target search term; integrating each target search term and the corresponding question template to obtain a plurality of initial question frames; and performing semantic expansion on the target search terms in each initial question frame to generate a plurality of sub-questions.

[0141] It should be noted that the question template matching refers to a process of matching the target search term with a pre-set question template, aiming to find the most matching question template for the target search term. The question template usually contains the structure and key elements of the question, such as the subject, action, object, etc. Through matching, the generated sub-questions can ensure that the structure of the original question is consistent, while the content is more specific and detailed, for example, if the target search term is "recent decade's variety shows", the matching question template may be "… which?", by filling in the target search term "recent decade's variety shows" into the template, a specific question framework can be generated, such as "recent decade's variety shows which?", such question framework provides a basis for subsequent semantic expansion, ensuring that the generation of sub-questions is both logical and targeted.

[0142] It can be understood that the process of semantic expansion includes finding synonyms, near-synonyms or related concepts related to the target search term to enrich the expression of the question and cover a wider range of information, for example, for the target search term "recent decade's variety shows", semantic expansion may include "recent decade's TV programs", "recent decade's entertainment programs" and other expressions, which not only cover other types of programs related to "variety shows", but also consider different ways of expressing used by users. Through such expansion, it can be ensured that the generation of sub-questions is not limited to the original expression, but can explore possible answers to the question from different angles and words, thereby improving the comprehensiveness of the question and the accuracy of the conclusion obtained.

[0143] In this embodiment, by splitting the current question information into multiple word groups, and then quickly and accurately locating the target search term in the current question information according to the complex index, multiple sub-questions are generated according to the target search term, effectively improving the comprehensiveness of the question and the accuracy of the conclusion obtained.

[0144] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the question and answer optimization method of the present application. More forms of simple transformation based on this technical concept are within the protection scope of the present application.

[0145] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as the above embodiment one can be referred to the above introduction, and will not be described in detail. On this basis, please refer to Figure 3 , before the step S20, further comprising steps S01-S03:

[0146] Step S01, obtaining the text difficulty corresponding to the current question information.

[0147] It should be noted that the text difficulty is a parameter for measuring the difficulty of understanding the content of the text, which is usually related to the complexity of vocabulary, the complexity of sentence structure and the density of information, etc.

[0148] It can be understood that the current problem information can be nested by multiple problems, and therefore, the level of text difficulty can be determined according to the number of nested problems, for example, the text difficulty level of the current problem information containing multiple nested problems is high, that is, the problem is a complex problem, because it requires deeper understanding and analysis.

[0149] In an implementable embodiment, step S01 specifically comprises: performing sentence analysis on the current problem information to obtain splittable sub-problems; and determining the text difficulty corresponding to the current problem information according to the number of the splittable sub-problems.

[0150] It should be noted that a syntax analyzer is used to identify the subject-predicate-object structure in a sentence, so as to identify the sub-problems in the current problem information that can be split, and then the text difficulty value is calculated according to the number and complexity of the sub-problems through a preset algorithm, for example, if the number of sub-problems is large or the sub-problems contain many complex words and long sentences, the calculated difficulty value will be high.

[0151] In an implementable embodiment, the determination of the text difficulty corresponding to the current problem information according to the number of the splittable sub-problems comprises: when the number of the splittable sub-problems reaches a preset number, obtaining the network data resource amount and response time length required for searching the conclusion information of the splittable sub-problems; and determining the text difficulty corresponding to the current problem information according to the network data resource amount and the response time length.

[0152] It should be noted that the preset number can be 3 or other values, and the present embodiment does not specifically limit this. When the number of splittable sub-problems is greater than or equal to 3, it can be considered that the complexity of the current problem information is high. However, the more the number of splittable sub-problems, the text difficulty corresponding to the current problem information is not necessarily always higher, and some problem information can contain many sub-problems, but can be relatively simple, and the final conclusion can be directly obtained.

[0153] It can be understood that in addition to the number of sub-problems, the complexity of the sub-problems also needs to be considered, the more complex the sub-problems, the more network data resources or the longer response time length required to obtain the corresponding conclusion information, and therefore, the text difficulty determined according to the search resource amount and the response time length can more accurately reflect the complexity of the problem, for example, a sub-problem containing complex professional terms or requiring a large amount of background knowledge to understand, even if the number is not large, can also lead to high text difficulty. Therefore, when determining the text difficulty, both the number and complexity of the sub-problems should be considered.

[0154] Step S02 compares the text difficulty corresponding to the current problem information with a preset difficulty threshold.

[0155] It should be noted that the preset difficulty threshold is a reference value for distinguishing the difficulty of the question, which can be preset by the user. For example, if the preset difficulty threshold is set to medium difficulty, when the text difficulty is lower than the threshold, the question is considered to be simple or medium difficulty, and when the text difficulty is higher than the threshold, the question is considered to be a high difficulty question. Through such comparison, complex questions that need special processing can be quickly screened out, thereby optimizing the efficiency and quality of question answering.

[0156] In a feasible implementation, after step S02, further comprising: when the text difficulty corresponding to the current question information does not reach the preset difficulty threshold, taking the current question information as a target question; obtaining conclusion information corresponding to the target question through a large language model; and taking the conclusion information as an answer to the original question information.

[0157] It should be noted that when the text difficulty corresponding to the current question information does not reach the preset difficulty threshold, it indicates that the question is a simple question, which can be directly obtained and answered through the existing large language model without complex splitting and analysis steps, thereby saving processing time and improving answering efficiency. The large language model can quickly retrieve relevant conclusion information according to the semantic content of the question and return it as an answer to the user. This method is suitable for questions with simple structure and easy understanding, and can ensure that the user gets a quick and accurate answer.

[0158] Step S03, when the text difficulty corresponding to the current question information reaches the preset difficulty threshold, performing the step of splitting the current question information into multiple sub-questions.

[0159] It should be noted that when the text difficulty corresponding to the current question information reaches the preset difficulty threshold, it indicates that the question needs to be split to better understand and answer, so as to improve the answering quality of complex conclusion acquisition.

[0160] In this embodiment, by quickly determining the answering strategy of the current question information according to the text difficulty corresponding to the current question information, and by splitting complex questions, the accuracy and efficiency of question answering can be effectively improved.

[0161] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the question and answer optimization method of the present application. More forms of simple transformation based on this technical concept are within the protection scope of the present application.

[0162] The present application also provides a question and answer optimization device, please refer to Figure 4 The question and answer optimization device comprises:

[0163] The processing module 10 is configured to, in response to input original question information, take the original question information as current question information.

[0164] The splitting module 20 is configured to split the current question information into a plurality of sub-questions.

[0165] The obtaining module 30 is configured to select at least one target sub-question from the sub-questions, and obtain conclusion information corresponding to the target sub-question through a large language model.

[0166] The generating module 40 is configured to, in a case where the conclusion information does not match the current question information, generate new current question information based on the conclusion information combined with the current question information, and return the step of splitting the current question information into a plurality of sub-questions.

[0167] The processing module 10 is further configured to, in a case where the conclusion information matches the current question information, take the conclusion information as an answer to the original question information.

[0168] The embodiment provides a question and answer optimization device, and the embodiment takes input original question information as current question information in response to the input original question information; splits the current question information into a plurality of sub-questions; selects at least one target sub-question from the sub-questions, and obtains conclusion information corresponding to the target sub-question through a large language model; in a case where the conclusion information does not match the current question information, generates new current question information based on the conclusion information combined with the current question information, and returns the step of splitting the current question information into a plurality of sub-questions; and in a case where the conclusion information matches the current question information, takes the conclusion information as an answer to the original question information, which can effectively improve the accuracy of question answering.

[0169] As can be seen from the above, the embodiment can make question analysis more detailed by splitting a plurality of sub-questions based on original question information, effectively improve the pertinence of conclusion obtaining by selecting the most suitable sub-question as a target sub-question to obtain a conclusion, and then obtain new question information according to the conclusion information of the target sub-question, so that the search range can be gradually narrowed through repeated iteration until a matching answer result is obtained, thereby overcoming the technical defect of low accuracy of answers to complex search requests, and effectively improving the accuracy of question answering.

[0170] Optionally, the splitting module 20 is further configured to split the current question information into a plurality of word groups; determine a plurality of target search words according to the plurality of word groups; and generate a plurality of sub-questions according to the plurality of target search words.

[0171] Optionally, the splitting module 20 is further configured to perform word segmentation on the current question information to obtain segmented current question information, perform non-keyword extraction on the segmented current question information to obtain non-keywords, remove the non-keywords from the segmented current question information to obtain target question information, and perform part-of-speech tagging and keyword splitting on the target question information to obtain a plurality of word groups.

[0172] Optionally, the splitting module 20 is further configured to perform syntax analysis and semantic analysis on each of the word groups to obtain syntax parameters and semantic parameters of each of the word groups, determine a complexity index of each of the word groups according to the syntax parameters and the semantic parameters, and determine a plurality of target search words according to the complexity indexes of the word groups.

[0173] Optionally, the splitting module 20 is further configured to perform question template matching on each of the target search words to obtain a question template corresponding to each of the target search words, integrate each of the target search words with the corresponding question template to obtain a plurality of initial question frameworks, and perform semantic expansion on the target search words in each of the initial question frameworks to generate a plurality of sub-questions.

[0174] Optionally, the question and answer optimization apparatus further includes a comparison module, which is configured to obtain a text difficulty corresponding to the current question information, compare the text difficulty corresponding to the current question information with a preset difficulty threshold, and perform the step of splitting the current question information into a plurality of sub-questions when the text difficulty corresponding to the current question information reaches the preset difficulty threshold.

[0175] Optionally, the comparison module is further configured to perform sentence analysis on the current question information to obtain splittable sub-questions, and determine the text difficulty corresponding to the current question information according to a number of the splittable sub-questions.

[0176] Optionally, the comparison module is further configured to obtain an amount of network data resources and a response time required for searching for conclusion information of the splittable sub-questions when the number of the splittable sub-questions reaches a preset number, and determine the text difficulty corresponding to the current question information according to the amount of network data resources and the response time.

[0177] Optionally, the comparison module is further configured to, when the text difficulty corresponding to the current question information does not reach the preset difficulty threshold, take the current question information as a target question, obtain conclusion information corresponding to the target question through a large language model, and take the conclusion information as an answer to the original question information.

[0178] Optionally, the acquisition module 30 is further configured to, when the text difficulty corresponding to the current question information does not reach a preset difficulty threshold, take the current question information as a target question; acquire, by a large language model, conclusion information corresponding to the target question; and take the conclusion information as an answer to the original question information.

[0179] Optionally, the generation module 40 is further configured to input the conclusion information and the current question information into a large language model, and receive new current question information fed back by the large language model.

[0180] Optionally, the question and answer optimization apparatus further includes a determination module, configured to extract a first core element in the conclusion information and a second core element in the current question information; determine the relevance of the conclusion information and the current question information according to the first core element and the second core element; and determine whether the conclusion information and the current question information match according to the relevance.

[0181] The question and answer optimization apparatus provided in the present application adopts the question and answer optimization method in the above embodiments, and can solve the technical problem of how to effectively improve the accuracy of question answering. Compared with the prior art, the question and answer optimization apparatus provided in the present application has the same beneficial effects as the question and answer optimization method provided in the above embodiments, and other technical features in the question and answer optimization apparatus are the same as the features disclosed in the above embodiments, which will not be repeated here.

[0182] The present application provides a question and answer optimization device, which includes at least one processor and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the question and answer optimization method in the above embodiment one.

[0183] Reference will be made to the following description of the embodiments of the present application. Figure 5 The question and answer optimization device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The question and answer optimization device shown is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0184] As shown in Figure 5 The question and answer optimization device can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. Various programs and data required for the operation of the question and answer optimization device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. In general, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the question and answer optimization device to communicate wirelessly or wired with other devices to exchange data. Although the question and answer optimization device with various systems is shown in the figure, it should be understood that all of the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.

[0185] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.

[0186] The question and answer optimization device provided by the present disclosure adopts the question and answer optimization method in the above-mentioned embodiments, and can solve the technical problem of how to effectively improve the accuracy of question answering. Compared with the prior art, the question and answer optimization device provided by the present disclosure has the same beneficial effects as the question and answer optimization method provided by the above-mentioned embodiments, and other technical features in the question and answer optimization device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0187] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0188] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0189] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer program) stored thereon, and the computer-readable program instructions are used to execute the question-answering optimization method in the above embodiment.

[0190] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0191] The above-mentioned computer-readable storage medium may be included in the question-answering optimization device; or it may exist independently without being assembled into the question-answering optimization device.

[0192] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the question and answer optimization device, cause the question and answer optimization device to: in response to input original question information, take the original question information as current question information; split the current question information into multiple sub-questions; select at least one target sub-question from the sub-questions, obtain conclusion information corresponding to the target sub-question through a large language model; in the case that the conclusion information does not match the current question information, generate new current question information based on the conclusion information combined with the current question information, and return to the step of splitting the current question information into multiple sub-questions; in the case that the conclusion information matches the current question information, take the conclusion information as the answer to the original question information.

[0193] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0194] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified functions. It should also be noted that, in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently or in the opposite order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware-based systems and computer instructions.

[0195] The modules described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0196] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., a computer program) for executing the above-mentioned question and answer optimization method, and can solve the technical problem of how to effectively improve the accuracy of question answering. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the question and answer optimization method provided by the above-mentioned embodiments, which will not be repeated here.

[0197] The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the question and answer optimization method as described above.

[0198] The computer program product provided by the present application can solve the technical problem of how to effectively improve the accuracy of question answering. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the question and answer optimization method provided by the above-mentioned embodiments, which will not be repeated here.

[0199] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the contents of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

[0200] The present application discloses A1. A question and answer optimization method, the method comprising:

[0201] In response to input original question information, the original question information is taken as current question information;

[0202] The current question information is split into multiple sub-questions;

[0203] At least one target sub-question is selected from the sub-questions, and conclusion information corresponding to the target sub-question is obtained through a large language model;

[0204] In the case where the conclusion information does not match the current question information, new current question information is generated based on the conclusion information combined with the current question information, and the step of splitting the current question information into multiple sub-questions is returned;

[0205] In the case where the conclusion information matches the current question information, the conclusion information is taken as the answer to the original question information.

[0206] A2. The method of A1, wherein splitting the current question information into a plurality of sub-questions comprises:

[0207] splitting the current question information into a plurality of word groups;

[0208] determining a plurality of target search terms based on the plurality of word groups;

[0209] generating a plurality of sub-questions based on the plurality of target search terms.

[0210] A3. The method of A2, wherein splitting the current question information into a plurality of word groups comprises:

[0211] performing word segmentation on the current question information to obtain segmented current question information;

[0212] performing non-keyword extraction on the segmented current question information to obtain non-keywords;

[0213] removing the non-keywords from the segmented current question information to obtain target question information;

[0214] performing part-of-speech tagging and keyword splitting on the target question information to obtain a plurality of word groups.

[0215] A4. The method of A2, wherein determining a plurality of target search terms based on the plurality of word groups comprises:

[0216] performing syntax analysis and semantic analysis on each of the word groups to obtain syntax parameters and semantic parameters of each word group;

[0217] determining a complexity index of each word group based on the syntax parameters and the semantic parameters;

[0218] determining a plurality of target search terms based on the complexity index of each word group.

[0219] A5. The method of A2, wherein generating a plurality of sub-questions based on the plurality of target search terms comprises:

[0220] performing question template matching based on each of the target search terms to obtain a question template corresponding to each target search term;

[0221] integrating each of the target search terms with the corresponding question template to obtain a plurality of initial question frames;

[0222] performing semantic expansion on the target search terms in each of the initial question frames to generate a plurality of sub-questions.

[0223] A6. The method of A1, further comprising, prior to splitting the current question information into a plurality of sub-questions:

[0224] obtaining a text difficulty corresponding to the current question information;

[0225] comparing the text difficulty corresponding to the current question information with a preset difficulty threshold;

[0226] when the text difficulty corresponding to the current question information reaches the preset difficulty threshold, performing the step of splitting the current question information into a plurality of sub-questions.

[0227] A7. The method of A6, wherein the obtaining of the text difficulty corresponding to the current question information comprises:

[0228] performing sentence analysis on the current question information to obtain splittable sub-questions;

[0229] determining the text difficulty corresponding to the current question information according to a number of the splittable sub-questions.

[0230] A8. The method of A7, wherein the determining of the text difficulty corresponding to the current question information according to the number of the splittable sub-questions comprises:

[0231] when the number of the splittable sub-questions reaches a preset number, obtaining a network data resource amount and a response time length required for searching conclusion information of the splittable sub-questions;

[0232] determining the text difficulty corresponding to the current question information according to the network data resource amount and the response time length.

[0233] A9. The method of A6, wherein after the comparing of the text difficulty corresponding to the current question information with the preset difficulty threshold, the method further comprises:

[0234] when the text difficulty corresponding to the current question information does not reach the preset difficulty threshold, taking the current question information as a target question;

[0235] obtaining conclusion information corresponding to the target question through a large language model;

[0236] taking the conclusion information as an answer to the original question information.

[0237] A10. The method of A1, wherein the selecting of at least one target sub-question from the sub-questions comprises:

[0238] obtaining a part of speech of a target search word in each sub-question and position information of the target search word in the current question information;

[0239] performing priority sorting on the sub-questions according to the part of speech and the position information to obtain a sorting result of the sub-questions;

[0240] Prioritize the sub-questions in the sorting result to obtain a target sub-question.

[0241] A11. The method of A1, wherein generating new current question information based on the conclusion information in combination with the current question information comprises:

[0242] inputting the conclusion information and the current question information into a large language model and receiving new current question information fed back by the large language model.

[0243] A12. The method of A1, wherein selecting at least one target sub-question from the sub-questions further comprises:

[0244] extracting a first core element in the conclusion information and a second core element in the current question information;

[0245] determining the relevance of the conclusion information and the current question information according to the first core element and the second core element;

[0246] determining whether the conclusion information matches the current question information according to the relevance.

[0247] The application further discloses B13. A question and answer optimization device, comprising:

[0248] a processing module configured to, in response to input of original question information, take the original question information as current question information;

[0249] a splitting module configured to split the current question information into a plurality of sub-questions;

[0250] an obtaining module configured to select at least one target sub-question from the sub-questions and obtain conclusion information corresponding to the target sub-question through a large language model;

[0251] a generating module configured to, in the case where the conclusion information does not match the current question information, generate new current question information based on the conclusion information in combination with the current question information, and return the step of splitting the current question information into a plurality of sub-questions;

[0252] the processing module is further configured to, in the case where the conclusion information matches the current question information, take the conclusion information as an answer to the original question information.

[0253] B14. The device of B13, wherein the splitting module is further configured to split the current question information into a plurality of word groups;

[0254] determine a plurality of target search words according to the plurality of word groups;

[0255] A plurality of sub-questions are generated according to the plurality of target search terms.

[0256] B15. The apparatus as described in B14, wherein the splitting module is further configured to segment the current question information to obtain the current question information after segmentation;

[0257] Performing non-keyword extraction on the current question information after word segmentation to obtain non-keywords;

[0258] Eliminating the non-keywords from the current question information after word segmentation to obtain target question information;

[0259] Part-of-speech tagging and keyword splitting are performed on the target question information to obtain multiple phrases.

[0260] B16. The apparatus as described in B14, wherein the splitting module is further configured to perform grammatical analysis and semantic analysis on each of the phrases to obtain grammatical parameters and semantic parameters of each phrase;

[0261] Determining the complexity index of each phrase according to the grammatical parameters and the semantic parameters;

[0262] A plurality of target search words are determined according to the complexity index of each of the phrases.

[0263] B17. The apparatus as described in B14, wherein the splitting module is further configured to perform question template matching based on each of the target search terms to obtain a question template corresponding to each target search term;

[0264] Integrating each of the target search terms with a corresponding question template to obtain multiple initial question frames;

[0265] Semantic expansion is performed on the target search terms in each of the initial question frames to generate multiple sub-questions.

[0266] B18. The apparatus according to B13, wherein the question-answering optimization apparatus further comprises a comparison module;

[0267] The comparison module is used to obtain the text difficulty corresponding to the current question information;

[0268] Comparing the text difficulty corresponding to the current question information with a preset difficulty threshold;

[0269] When the text difficulty corresponding to the current question information reaches a preset difficulty threshold, the step of splitting the current question information into multiple sub-questions is executed.

[0270] The application also discloses a question and answer optimization device, which comprises a memory, a processor and a question and answer optimization program stored on the memory and capable of running on the processor, and the question and answer optimization program is configured to implement the question and answer optimization method.

[0271] The application also discloses a storage medium, which stores a question and answer optimization program, and the question and answer optimization program is executed by a processor to implement the question and answer optimization method.

Claims

1. A question-answering optimization method, characterized in that: The method comprises: In response to the input original question information, using the original question information as current question information; Splitting the current question information into multiple sub-questions; Selecting at least one target sub-problem from the sub-problems, and obtaining conclusion information corresponding to the target sub-problem through a large language model; If the conclusion information does not match the current question information, generating new current question information based on the conclusion information and the current question information, and returning to the step of splitting the current question information into multiple sub-questions; In the case that the conclusion information matches the current question information, the conclusion information is used as an answer to the original question information.

2. The method according to claim 1, wherein The current question information is split into multiple sub-questions, including: Splitting the current question information into multiple phrases; determining a plurality of target search terms based on the plurality of the phrases; A plurality of sub-questions are generated according to the plurality of target search terms.

3. The method according to claim 2, wherein The current question information is split into multiple phrases, including: Segmenting the current question information to obtain segmented current question information; Performing non-keyword extraction on the current question information after word segmentation to obtain non-keywords; Eliminating the non-keywords from the current question information after word segmentation to obtain target question information; Part-of-speech tagging and keyword splitting are performed on the target question information to obtain multiple phrases.

4. The method according to claim 2, wherein The step of determining a plurality of target search terms based on the plurality of phrases includes: Performing grammatical analysis and semantic analysis on each of the phrases to obtain grammatical parameters and semantic parameters of each phrase; Determining the complexity index of each phrase according to the grammatical parameters and the semantic parameters; A plurality of target search words are determined according to the complexity index of each of the phrases.

5. The method according to claim 2, wherein The generating of multiple sub-questions according to the multiple target search terms includes: Perform question template matching according to each target search word to obtain a question template corresponding to each target search word; Integrating each of the target search terms with a corresponding question template to obtain multiple initial question frames; Semantic expansion is performed on the target search terms in each of the initial question frames to generate multiple sub-questions.

6. The method according to claim 1, wherein Before splitting the current question information into multiple sub-questions, the method further includes: Obtain the text difficulty corresponding to the current question information; Comparing the text difficulty corresponding to the current question information with a preset difficulty threshold; When the text difficulty corresponding to the current question information reaches a preset difficulty threshold, the step of splitting the current question information into multiple sub-questions is executed.

7. The method according to claim 6, wherein The obtaining of the text difficulty corresponding to the current question information includes: Perform sentence analysis on the current question information to obtain divisible sub-questions; The text difficulty corresponding to the current question information is determined according to the number of the divisible sub-questions.

8. A question-answering optimization device, characterized in that: The question-answering optimization device comprises: a processing module, configured to respond to the input original question information and use the original question information as current question information; A splitting module, used to split the current question information into multiple sub-questions; an acquisition module, configured to select at least one target subproblem from the subproblems, and obtain conclusion information corresponding to the target subproblem through a large language model; a generating module configured to generate new current question information based on the conclusion information and the current question information if the conclusion information does not match the current question information, and return to the step of splitting the current question information into multiple sub-questions; The processing module is further configured to use the conclusion information as an answer to the original question information if the conclusion information matches the current question information.

9. A question-answering optimization device, characterized in that: The question-answering optimization device includes: a memory, a processor, and a question-answering optimization program stored in the memory and executable on the processor, wherein the question-answering optimization program is configured to implement the question-answering optimization method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a question-and-answer optimization program, which, when executed by a processor, implements the question-and-answer optimization method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Classification retrieval-based automatic question and answer method and system

    CN107885844A

  • Question and answer method and device, electronic equipment and medium

    CN117521625A

  • Question and answer processing method and device, computer equipment, readable storage medium and program product

    CN119066172A