Question answer display method, question answer processing method and related devices
Through multiple rounds of responses and user interaction, answer segments are gradually displayed, solving the problem that users find it difficult to directly answer large models and enabling users to gradually understand the questions and expand their thinking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT DIGITAL TIANJIN
- Filing Date
- 2024-11-15
- Publication Date
- 2026-05-15
AI Technical Summary
Users often struggle to understand the complete answers provided by large models, especially regarding content they are unsure about, leading to difficulties in resolving their confusion.
It adopts a multi-round response method, gradually displaying response segments in the conversation interface, and supports user interaction. Users can provide feedback on their needs by inputting interactive content, and then gradually provide follow-up responses.
It helps users gradually understand questions and answers, form coherent and complete responses, expand users' thinking, and resolve users' confusion about questions.
Smart Images

Figure CN122045338A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method for displaying answers to a question, a method for processing answers, and related apparatus. Background Technology
[0002] A large model is an artificial intelligence model built on natural language processing technology. It has the ability to understand natural language and is usually used in question-answering scenarios.
[0003] In practical applications, large-scale models allow users to ask questions in natural language and then provide answers to address their confusion. Related technologies directly input user questions into the large-scale model, which then outputs answers and provides feedback to the user.
[0004] However, when using related technologies to output answers from large models, users may not understand why such answers exist, making it difficult to adequately address their confusion about the question. This is especially true when the questions asked by users are often about content they themselves do not understand or are unsure about; on this basis, it may be even more difficult for them to understand why such answers have been given. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a method for displaying answers to questions, an answer processing method, and related apparatus, which can provide answers step by step during user interaction, thereby guiding users to gradually understand the question and the given answer, and helping to better answer users' questions.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] On one hand, embodiments of this application provide a method for displaying answers to questions, the method comprising:
[0008] Display the target question entered through the target account in the chat interface;
[0009] During the process of answering the target question in multiple rounds, the answer fragment corresponding to the i-th round of answer is displayed in the conversation interface. The answer fragment corresponding to the i-th round of answer is a partial answer to the target question.
[0010] The first interactive content entered through the target account is displayed in the conversation interface;
[0011] If it is determined that the first interactive content indicates that the target question should be answered based on the first target answer fragment in the i-th round of answering, the answer fragment corresponding to the i+1-th round of answering is displayed in the conversation interface. The answer fragment corresponding to the i+1-th round of answering is a partial answer to the target question and is a continuation of the first target answer fragment in the i-th round of answering.
[0012] In another aspect, embodiments of this application provide a question answer display device, the device comprising a first display unit, a second display unit, a third display unit, and a fourth display unit:
[0013] The first display unit is used to display the target question entered by the target account in the session interface;
[0014] The second display unit is used to display a fragment of the answer corresponding to the i-th round of the response in the conversation interface during the process of answering the target question in multiple rounds. The fragment of the answer corresponding to the i-th round of the response is a partial answer to the target question.
[0015] The third display unit is used to display the first interactive content entered by the target account in the conversation interface;
[0016] The fourth display unit is used to display the answer segment corresponding to the (i+1)th round of answers in the conversation interface if it is determined that the first interactive content indicates that the answer should continue to answer the target question based on the first target answer segment in the i-th round of answers. The answer segment corresponding to the (i+1)th round of answers is a partial answer to the target question and is a continuation of the first target answer segment in the i-th round of answers.
[0017] Furthermore, embodiments of this application provide a method for answering questions, the method comprising:
[0018] Receive the target question sent by the target account;
[0019] During the process of answering the target question in multiple rounds, the answer fragment corresponding to the i-th round of answer is sent to the target account. The answer fragment corresponding to the i-th round of answer is used to display in the conversation interface, which displays the target question. The answer fragment corresponding to the i-th round of answer is a partial answer to the target question.
[0020] Receive the first interactive content sent by the target account;
[0021] The first interactive content is analyzed to obtain the first analysis result;
[0022] If the first analysis result indicates that the target question should be answered based on the first target answer fragment in the i-th round of answers, the answer fragment corresponding to the (i+1)-th round of answers is sent to the target account. The answer fragment corresponding to the (i+1)-th round of answers is used to display in the conversation interface. The answer fragment corresponding to the (i+1)-th round of answers is a partial answer to the target question and is a continuation of the first target answer fragment in the i-th round of answers.
[0023] In another aspect, embodiments of this application provide a question-answering processing apparatus, the apparatus comprising a receiving unit, a sending unit, and an analysis unit:
[0024] The receiving unit is used to receive the target question sent by the target account;
[0025] The sending unit is used to send a response fragment corresponding to the i-th round of answers to the target account during the process of answering the target question in multiple rounds. The response fragment corresponding to the i-th round of answers is used to be displayed in the conversation interface, which displays the target question. The response fragment corresponding to the i-th round of answers is a partial answer to the target question.
[0026] The receiving unit is also configured to receive the first interactive content sent by the target account;
[0027] The analysis unit is used to analyze the first interactive content and obtain a first analysis result;
[0028] The sending unit is further configured to send a response segment corresponding to the (i+1)th round of answers to the target account if the first analysis result indicates that the target question should be answered based on the first target response segment in the i-th round of answers. The response segment corresponding to the (i+1)th round of answers is used to be displayed in the conversation interface. The response segment corresponding to the (i+1)th round of answers is a partial answer to the target question and is a continuation of the first target response segment in the i-th round of answers.
[0029] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:
[0030] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0031] The processor is configured to execute the method described in any of the foregoing aspects according to instructions in the computer program.
[0032] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program, which, when run by a computer device, causes the computer device to perform the methods described in any of the foregoing aspects.
[0033] On the other hand, embodiments of this application provide a computer program product, including a computer program that, when run on a computer device, causes the computer device to perform the methods described in any of the foregoing aspects.
[0034] As can be seen from the above technical solution, a multi-round answering method is provided for the target question. Specifically, the answer fragment corresponding to the i-th round of answers is first displayed in the conversation interface. Then, if it is determined that the first interaction content indicates that the user should continue to answer the target question based on the first target answer fragment in the i-th round of answers, since the first interaction content was entered after the i-th round of answers and indicates that the user should continue to answer, it indicates that the user wants to continue to get answers based on the i-th round of answers. At this time, the answer fragment corresponding to the i+1-th round of answers can be displayed in the conversation interface. Among them, the answer fragments of the i-th round of answers and the answer fragments of the i+1-th round of answers are both partial answers to the target question. It can be seen that the process of answering questions is broken down into multiple rounds. Each round of answers displays a partial answer to the user to help the user understand and supports user interaction. The user can provide feedback on the needs based on the previous round of answers by inputting interaction content. If the need is to continue to answer, the next round of answers is conducted, and the first target answer fragment from the previous round of answers specified by the user in the interaction content is displayed in the next round of answers. Obviously, the next round of answers takes into account both the user's interaction and the given answer fragment is a continuation of the previous round of answers. Compared to related technologies that directly provide a complete answer to a question, this application provides an answer gradually during the interaction with the user, guiding the user to understand the question and the given answer step by step, which is conducive to better addressing the user's confusion about the question. Furthermore, the answer segments in each round are sequential, so the gradually presented multi-round answer segments can form a coherent complete answer. This gradual approach also demonstrates the thought process from question to complete answer to the user, which helps to broaden the user's thinking about answering questions. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1This is a schematic diagram illustrating an application scenario of a question answering and display method provided in an embodiment of this application.
[0037] Figure 2 A flowchart illustrating a method for displaying the answer to a question, as provided in an embodiment of this application;
[0038] Figure 3 A flowchart illustrating a question-answering processing method provided in this application embodiment;
[0039] Figure 4 This application provides a schematic diagram of a question-answering logic interaction.
[0040] Figure 5 A schematic diagram illustrating a multi-round response method that provides multiple response fragments in a single round, as provided in an embodiment of this application;
[0041] Figure 6 This is a schematic diagram illustrating how different users obtain answers to the same question, as provided in an embodiment of this application.
[0042] Figure 7 This application provides a schematic diagram of a question-answering method based on a fallback mechanism.
[0043] Figure 8 A schematic diagram illustrating a method for directly determining the first interaction content, provided as an embodiment of this application;
[0044] Figure 9 A schematic diagram illustrating the determination of first interactive content based on editing, provided as an embodiment of this application;
[0045] Figure 10 A schematic diagram illustrating user interaction as provided in an embodiment of this application;
[0046] Figure 11 An interactive diagram based on a problem switching command is provided for an embodiment of this application;
[0047] Figure 12 This application provides a schematic diagram of a multi-round response based on problem-solving direction guidance.
[0048] Figure 13 A schematic diagram illustrating the generation of a response fragment after a user triggers a rollback, provided as an embodiment of this application;
[0049] Figure 14 A structural diagram of a question answering display device provided in an embodiment of this application;
[0050] Figure 15 A structural diagram of a question answering processing device provided in an embodiment of this application;
[0051] Figure 16A structural diagram of a terminal provided in an embodiment of this application;
[0052] Figure 17 This is a structural diagram of a server provided in an embodiment of this application. Detailed Implementation
[0053] The embodiments of this application will now be described with reference to the accompanying drawings.
[0054] In common question-and-answer scenarios, users can ask questions in natural language, and the large model outputs answers and provides feedback to the user in order to resolve the user's confusion.
[0055] In related technologies, user-submitted questions are directly input into a large model, which then provides a complete answer to the question in one go. However, users may not understand why such a complete answer exists, especially since the questions they submit often contain content they do not understand or are unsure of the answers to, making it even more difficult for them to comprehend the complete answer provided directly by the large model.
[0056] To address this, embodiments of this application provide a method for displaying and processing answers to questions, as well as related apparatus. The process of answering a question is broken down into multiple rounds, with each round displaying a partial answer to the user to aid comprehension. Simultaneously, user interaction is supported; users can input interactive content to provide feedback based on the previous round's answers. If the request is for further answers, a next round of answers is initiated, displaying a segment of the answer that builds upon the previous round. In other words, the next round of answers considers both user interaction and ensures that the provided answer segment is a continuation of the previous round's response.
[0057] Compared to related technologies, this application provides answers progressively during user interaction, guiding users to gradually understand the question and the given answer, thus better addressing user confusion. Furthermore, the answer segments provided in each round are sequential, allowing the progressively presented multi-round answer segments to form a coherent and complete response. This progressive approach also demonstrates the thought process from question to complete answer, helping to broaden users' thinking about answering questions.
[0058] The question answer display method and question answer processing method provided in this application can both be implemented using a computer device, which can be a terminal or a server. In specific implementations, for example, the question answer display method can be implemented using a terminal, and the question answer processing method can be implemented using a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminals include, but are not limited to, smartphones, computers, smart voice interaction devices, smart home appliances, and in-vehicle terminals. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0059] The embodiments of this application can be applied to various question-and-answer scenarios, such as when a user asks a question to a large model and the large model outputs an answer to the user. For example, it can be applied to educational scenarios, where students can input questions they don't know, and the answering method provided in this application can provide multiple rounds of answers, gradually guiding students to understand and learn problem-solving strategies.
[0060] It should be noted that in the specific embodiments of this application, the process of displaying and processing the answers to questions may involve user information and other related data. When the above embodiments of this application are applied to specific products or technologies, separate consent or permission from the user is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0061] Figure 1 This illustration shows an application scenario of the question answering and display method provided in the embodiments of this application. Figure 1 In the scenario shown, terminal 100 is used as an example of the aforementioned computer device for illustration:
[0062] Here, terminal 100 can refer to the terminal corresponding to the target account, the target account can be the account of the user who wants to ask the question, and the answering account can be the account that answers the question entered by the target account. Furthermore, the conversation interface on terminal 100 can be the interface through which the target account and the answering account engage in dialogue.
[0063] In practical applications, when a user wants to ask a question, they can enter the target question in the conversation interface through the target account (e.g., based on...). Figure 1 In the example, the input control shows the target question. Correspondingly, terminal 100 can display the target question in the session interface. Then, multiple rounds of answers can be given to the target question. For ease of understanding, Figure 1The example, using i=1, illustrates the responses in the first and second rounds. Specifically:
[0064] First, during the multi-round response to the target question, terminal 100 can display the response segment corresponding to the first round of responses in the conversation interface, i.e. Figure 1 The example shows answer fragment A11. The answer fragment corresponding to the first round of responses is a partial answer to the target question; that is, in the first round of responses, partial answers are provided to the user to aid their understanding.
[0065] Next, after seeing the answer fragment A11 given in the first round of responses, users can participate in the interaction by inputting their first interactive content (such as based on...). Figure 1 The example inputs the first interactive content (using the input control) to provide feedback based on the partial responses given in the first round. Correspondingly, terminal 100 can display the first interactive content in the conversation interface.
[0066] If the first interaction content indicates that the user wants to continue answering the target question based on the first target answer fragment in the first round of responses, it means that the user wants to continue receiving answers beyond the first round. In this case, the terminal 100 can display the answer fragment corresponding to the second round of responses in the session interface. Figure 1 The example answer snippet is A21. It should be noted that... Figure 1 In this example, each round of responses provides one response segment; this is merely an example and does not imply any limitation. Figure 1 In the example, the first target answer segment in the first round of responses is answer segment A11. The answer segment corresponding to the second round of responses is also a partial answer to the target question and is a continuation of the first target answer segment in the first round of responses; that is, answer segment A21 is a continuation of answer segment A11.
[0067] Of course, a third round of responses, or even more, can be conducted afterward. Figure 1 The examples will not be elaborated further.
[0068] Depend on Figure 1 As the example shows, this application not only provides multiple rounds of responses, but also supports user participation and provides answers gradually during the interaction with users, thereby guiding users to gradually understand the question and the given answer, which helps to better address users' confusion about the question.
[0069] Furthermore, the next round of responses takes into account user interaction and provides answer segments that build upon the previous round. This ensures continuity between answer segments in each round, allowing the progressively presented answer segments to form a coherent and complete response. The step-by-step approach also demonstrates the thought process from question to complete answer, thus expanding the user's thinking on answering questions.
[0070] Figure 2 A flowchart illustrating a method for displaying a question's answer, provided in an embodiment of this application, is used to describe a terminal as an example of the aforementioned computer device. The method includes S201-S204:
[0071] S201: Display the target question entered by the target account in the conversation interface.
[0072] The conversation interface can refer to the interface through which the target account asks questions and receives answers, such as... Figure 1 The example shows a dialogue interface between the answering account and the user. During the dialogue, the user can enter questions using the target account, and the answering account can provide answers to those questions. In one example, the terminal could be running an application (such as a dialogue application, a question-and-answer mini-program, etc.) or a dialogue-based web application. Typically, the user can log into the application or web application using the target account, enter the dialogue interface with the answering account, and then ask questions and receive answers.
[0073] When a user enters a question through the target account, the terminal can display the target question entered through the target account in the conversation interface. The target question is the question that the user entered and wants to get an answer for, which is used to indicate what the user's current question is.
[0074] It should be noted that this application does not impose any limitations on the type of target question. For example, the target question can be text, audio, image, or other types of content, which can be determined according to the actual situation. For instance, when applying this application to primary and secondary school students, users can be supported in using the terminal's camera function to photograph homework questions and send the photographed essay questions to the conversation interface. Understandably, if the target question is audio, image, or other types of content, other technologies (such as speech-to-text recognition, image recognition, etc.) can be combined to clarify the user's current question.
[0075] S202: During the process of answering the target question in multiple rounds, display the answer fragment corresponding to the i-th round of answer in the conversation interface.
[0076] To address the problem, this application provides a multi-round response method. Taking the target question as an example, during the multi-round response process, the terminal can first display the response fragment corresponding to the i-th round in the conversation interface.
[0077] Here, the answer segment corresponding to the i-th round of responses is a partial answer to the target question, where i is a positive integer. It is evident that providing a partial answer within a single round of responses helps the user understand the question.
[0078] S203: Display the first interactive content entered through the target account in the conversation interface.
[0079] The multi-round response process provided in this application allows users to directly participate in the response process, i.e., it supports user interaction. Specifically, after providing a partial answer to the user in one round, the user can output interactive content that reflects their needs, and the next round of responses will then be based on the user's feedback.
[0080] After providing a partial answer to the i-th round of responses to the target question, the user can input initial interaction content to provide feedback on their needs based on the i-th round of responses. Correspondingly, the terminal can display this initial interaction content input through the target account in the session interface.
[0081] It should be noted that this application does not impose any limitations on the type of the first interactive content. For example, the interactive content input by the user (such as the first interactive content here, and other interactive content input subsequently) can also be text, voice, images (such as emoticons that can reflect user needs), etc., which is similar to the type of target problem mentioned above, and will not be elaborated here.
[0082] S204: If it is determined that the first interaction content indicates that the target question should be answered based on the first target answer fragment in the i-th round of answering, the answer fragment corresponding to the i+1-th round of answering is displayed in the conversation interface.
[0083] Since the first interaction was entered after the i-th round of responses and indicated a continuation of the response based on the first target response fragment in the i-th round, it suggests that the user wants to continue receiving responses beyond the i-th round. Therefore, a next round of responses can be initiated. Specifically, the terminal can display the response fragment corresponding to the (i+1)-th round of responses in the session interface.
[0084] The first interactive content can be used to reflect the user's needs after seeing the response fragment given in the i-th round of responses. Therefore, analyzing the first interactive content can clarify the user's needs, guiding the dialogue process to be more intelligent and accurate. It should be noted that this application does not limit how to determine the method of determining the first interactive content to continue the response based on the first interactive content in the i-th round of responses. For ease of understanding, the embodiments of this application provide the following examples:
[0085] In practical applications, the first interaction content is input by the user on the terminal. Therefore, the terminal can directly analyze the first interaction content to determine the user's needs. Thus, in one possible implementation, before S204, the terminal can analyze the first interaction content to obtain a first analysis result. This first analysis result can be used to indicate the user's needs reflected in the first interaction content, based on the user's responses in the i-th round. Afterward, the terminal can determine whether to execute S204 based on the specific details of the first analysis result. Based on this, the terminal can directly analyze the user's input interaction content, directly clarify the user's needs, and then execute subsequent processing.
[0086] It should also be noted that this application does not limit the method by which the terminal analyzes the first interaction content to obtain the first analysis result. For ease of understanding, the embodiments of this application provide the following examples:
[0087] Understandably, the way users input their first interactive content will vary, resulting in differences in the content itself (for example, it could be a fragment of a response from the i-th round of answers, or content entered by the user themselves). Consequently, the analysis methods used to analyze user needs, as well as the analysis results, may also differ.
[0088] To better understand, the embodiments of this application include N in the i-th round of answers. i N answer fragments i Taking an integer greater than 1 as an example, various cases are illustrated. That is, the aforementioned terminal analyzes the first interaction content to obtain the first analysis result. In specific implementation, it can include one of the following:
[0089] In one example, if the first interactive content hits N i The first target response fragment in the response fragments indicates that the first interaction content is N. i One of the answer segments, therefore the terminal can directly determine that the first analysis result indicates that the target question should be answered based on the first target answer segment in the i-th round of answers. For example, the user can use subsequent... Figure 8 The first interactive content is entered in the manner shown.
[0090] In another example, if the semantic indication of the first interactive content is in N i Building upon the first target answer fragment in the N answer fragments, the user continues to answer the target question, indicating that the user wants to... i Based on the first target answer segment in the i-th round of answers, the terminal continues to obtain answers, so the terminal can determine that the first analysis result indicates that the target question should be answered based on the first target answer segment in the i-th round of answers.
[0091] For example, with Figure 1 For example, the first interactive input from the user might be "I understand, please continue." Or, for instance, in the following... Figure 6 For example, the first interactive content entered by the user might be "I want to write about autumn scenery" or "I want to write about autumn food." Another example is "Please continue answering according to the second approach," etc.
[0092] In another example, if the first interaction content does not hit N i The first analysis result indicates that the user wants to continue answering the target question based on the first interaction content, and the semantic indication of the first interaction content is that the user wants to continue to obtain answers based on the first interaction content. Therefore, the terminal can determine that the first analysis result indicates that the user wants to continue to answer the target question based on the first interaction content.
[0093] For example, users can use input controls to enter content that expresses their needs as the first interactive element. Alternatively, users can use subsequent... Figure 9 The first interactive content is entered in the manner shown. For example, using... Figure 6 For example, if user C, after seeing the two answer snippets given in the first round of responses, has a flash of inspiration, clearly defines the topic they want to write about, and enters "I know, I want to write about people in autumn" (for user C, in...) Figure 6 (Not shown in the image).
[0094] Corresponding to this approach, subsequent responses tailored to the user's needs can be provided. In practice, if the initial analysis indicates that the user should continue answering the target question based on the initial interaction, the terminal can display the N corresponding to the (i+1)th round of responses in the session interface. i+1 One answer fragment, N i+1 Each answer segment follows from the first interactive content, N i+1 It is an integer greater than 1. Based on this, it is possible to provide subsequent answers that follow the first interactive content input by the user, which helps to make multiple rounds of responses move in the direction of providing answers that meet the user's expectations, thereby improving the accuracy of the answers.
[0095] In another example, if the semantics of the first interactive content are irrelevant to answering the target question, the user input can be considered invalid. Therefore, the terminal can determine that the first analysis result indicates that the first interactive content is irrelevant to answering the target question.
[0096] In a multi-round response, the response segment corresponding to the (i+1)th round is a partial answer to the target question and is a continuation of the first target response segment in the (i)th round. This continuity indicates that the response segment corresponding to the (i+1)th round, when linked with the first target response segment, forms coherent natural language (e.g., coherent content, logical expression, etc.). Based on this, the user is gradually guided to understand that connecting sequential response segments can also form a coherent and more complete answer.
[0097] To better understand the continuity between the response segments given in multiple rounds of responses, the embodiments of this application also provide the following examples:
[0098] If this application is applied to the aforementioned educational scenario, the target question can be a subject-specific question (such as a math problem, a writing problem, etc.). Accordingly, in order to better guide students in learning the thinking process for answering questions, the answer fragment corresponding to the i-th round of answers can be used to indicate the direction of the solution to the target question, and the direction of the solution can be used to describe the thinking process for answering the target question. The answer fragment of the (i+1)-th round of answers can be used to answer the target question, that is, it can be the answer to the target question.
[0099] In this example, the answer segment corresponding to the (i+1)th round of responses follows the first target answer segment in the i-th round of responses. Specifically, the answer segment corresponding to the (i+1)th round of responses is a partial answer obtained by solving the target question according to the problem-solving direction indicated by the first target answer segment in the i-th round of responses. For further details, please refer to subsequent embodiments (such as...). Figure 12 More detailed examples related to (etc.) are not provided here.
[0100] As can be seen, each round of responses only provides a partial answer to the question to aid user understanding. Because it supports user interaction, after seeing a snippet of the response in a particular round, users can input their needs based on that round's answers by providing feedback. If the need is for further answers, then a snippet of the next round's response is displayed. Furthermore, the snippet of the next round's response follows the first target response snippet specified by the user in the first interaction, which is the same as the first target response snippet in the previous round. Clearly, the next round of responses considers both user interaction and the continuity of the response snippet from the previous round, thus guiding user comprehension.
[0101] In other words, this application not only features multiple rounds of responses, but also a multi-round response method that supports user participation and provides answers gradually during user interaction. Based on this, it achieves the goal of allowing users to directly participate in the question-answering process and intervene in or influence the next round of responses. This user-interactive multi-round response method can guide users to gradually understand the question.
[0102] As can be seen from the above technical solution, a multi-round answering method is provided for the target question. Specifically, the answer fragment corresponding to the i-th round of answers is first displayed in the conversation interface. Then, if it is determined that the first interaction content indicates that the user should continue to answer the target question based on the first target answer fragment in the i-th round of answers, since the first interaction content was entered after the i-th round of answers and indicates that the user should continue to answer, it indicates that the user wants to continue to get answers based on the i-th round of answers. At this time, the answer fragment corresponding to the i+1-th round of answers can be displayed in the conversation interface. Among them, the answer fragments of the i-th round of answers and the answer fragments of the i+1-th round of answers are both partial answers to the target question. It can be seen that the process of answering questions is broken down into multiple rounds. Each round of answers displays a partial answer to the user to help the user understand and supports user interaction. The user can provide feedback on the needs based on the previous round of answers by inputting interaction content. If the need is to continue to answer, the next round of answers is conducted, and the first target answer fragment from the previous round of answers specified by the user in the interaction content is displayed in the next round of answers. Obviously, the next round of answers takes into account both the user's interaction and the given answer fragment is a continuation of the previous round of answers. Compared to related technologies that directly provide a complete answer to a question, this application provides an answer gradually during the interaction with the user, guiding the user to understand the question and the given answer step by step, which is conducive to better addressing the user's confusion about the question. Furthermore, the answer segments in each round are sequential, so the gradually presented multi-round answer segments can form a coherent complete answer. This gradual approach also demonstrates the thought process from question to complete answer to the user, which helps to broaden the user's thinking about answering questions.
[0103] In the above embodiments, taking the analysis of the first interaction content by the terminal as an example, an example is provided illustrating how to determine the method of continuing to answer based on the first interaction content in the i-th round of responses. To better understand this, the embodiments of this application also provide the following examples:
[0104] In practical applications, the interaction between the two parties in a dialogue scenario is based on the server. For example, the target account enters questions and interactive content in the conversation interface based on the terminal. The terminal establishes a connection with the server and can upload the user's input questions and interactive content to the server. The server processes this and provides corresponding answers, such as sending the answers to the terminal or displaying them in the conversation interface on the terminal.
[0105] Typically, servers possess greater computing power. Therefore, in one possible implementation, this application can be based on the interaction between the terminal and the server. Specifically, the server can provide multiple rounds of responses to user-inputted questions and analyze the initial user input to determine whether to instruct further responses. That is, this embodiment will use a server as an example of the aforementioned computer device; for details, please refer to... Figure 3 The flowchart shown represents a method for processing the answer to a question, the method comprising S301-S305:
[0106] S301: Receive target question sent by target account.
[0107] The server can receive target questions sent by the target account, specifically from the receiving terminal (the terminal corresponding to the aforementioned target account), to analyze the target questions and provide multiple rounds of answers. In practical applications, the aforementioned... Figure 1 The answering account in the example can be a virtual account. For example, in a scenario where a large model is used to communicate with a user, the answering account can be a virtual account corresponding to the large model. The server can use the large model to answer the user's input questions in multiple rounds by calling the large model.
[0108] S302: During the process of answering the target question in multiple rounds, send the answer fragment corresponding to the i-th round of answer to the target account.
[0109] During the multi-round response to the target question, the server can send a response fragment corresponding to the i-th round to the target account. This response fragment can be displayed in the session interface, along with the target question itself. This allows the server to provide feedback to the user regarding the response to the target question.
[0110] Here, the answer segment corresponding to the i-th round of responses is a partial answer to the target question, and i is a positive integer. It is evident that in one round of responses, the server provides a partial answer to aid the user's understanding.
[0111] S303: Receive the first interactive content sent by the target account.
[0112] S304: Analyze the first interactive content to obtain the first analysis result.
[0113] After providing the response fragment corresponding to the i-th round of responses, the user can input first interactive content through the target account to provide feedback on their needs based on the i-th round of responses. Correspondingly, the server can receive the first interactive content sent by the target account, which can be sent to the server by the terminal corresponding to the target account.
[0114] Next, the server can analyze the first interaction content to obtain the first analysis result. Based on this, it can clarify the user's needs based on the i-th round of responses, in order to better respond to subsequent interactions. Specifically, the first analysis result can be used to indicate the user's needs reflected in the first interaction content, based on the i-th round of responses.
[0115] S305: If the first analysis result indicates that the target question should be answered based on the first target answer fragment in the i-th round of answering, send the answer fragment corresponding to the i+1-th round of answering to the target account.
[0116] If the first analysis result indicates that the user should continue answering the target question based on the first target answer fragment in the i-th round of responses, it means that after seeing part of the answer in the i-th round, the user wants to continue receiving answers and specifies that they should continue answering based on the first target answer fragment in the i-th round. Therefore, the server can send the answer fragment corresponding to the (i+1)-th round of responses to the target account. This answer fragment can be displayed in the session interface to provide feedback to the user on the answer result of the next round.
[0117] In this system, the (i+1)th round of responses corresponds to a partial answer to the target question, which is a continuation of the first target answer fragment in the i-th round. Therefore, in each round, the server provides a partial answer to aid user comprehension. The server can then analyze the user's input to clarify their needs based on the previous round's responses. When the user requests further answers, the server provides a partial answer for the next round, clearly considering the user's interaction in this subsequent round. Furthermore, the answer fragment provided in the next round is a continuation of the first target answer fragment specified by the user in the first interaction, thus guiding the user towards a gradual understanding.
[0118] As can be seen from the above technical solution, the multi-round answering method provided in this application is a method of gradually providing answers during user interaction. Specifically, it first provides the answer fragment corresponding to the i-th round of answers to assist the user's understanding. Furthermore, the user can directly participate in the question-and-answer process, thereby intervening in or influencing the answer fragment provided in the next round. Specifically, after obtaining the i-th round of answers, the user can input the first interactive content. Correspondingly, the user's needs can be analyzed based on the first interactive content. If the needs are to continue answering based on the first target answer fragment in the i-th round of answers, then the answer fragment corresponding to the (i+1)-th round of answers is provided to assist the user's continued understanding. Based on this, guiding the user to gradually understand the question and the given answers is beneficial for better addressing the user's confusion regarding the question and expanding the user's thinking about answering questions.
[0119] The above embodiments have illustrated the computer devices described above using a terminal and a server, respectively. For better understanding, embodiments of this application also provide, for example... Figure 4 The diagram shown illustrates the interactive logic of answering a question. Figure 4 In this example, terminal 401 and server 402 can be connected via a network, which serves as an example to illustrate this application:
[0120] First, on terminal 401, the target question can be entered through the target account (see S401), specifically by entering the target question in the session interface displayed on terminal 401. Also, terminal 401 can send the target question to server 402 (see S402).
[0121] Next, multiple rounds of answers can be given to the target question. For ease of understanding, the answer in the i-th round and the answer in the (i+1)-th round are used as examples: During the process of giving multiple rounds of answers to the target question, the server 402 can send the answer fragment corresponding to the answer in the i-th round to the terminal 401 (see S403) so that the user can understand it.
[0122] Next, the target account can input the first interactive content (see S404), and the terminal 401 can send the first interactive content to the server 402 (see S405). The server 402 can analyze the first interactive content and obtain the first analysis result (see S406), thereby clarifying the user's needs based on the i-th round of answers. If it is clear that the user's needs are to continue answering the target question based on the first target answer fragment in the i-th round of answers, then the server 402 can send the answer fragment corresponding to the (i+1)-th round of answers to the terminal 401 (see S407) so that the user can continue to understand.
[0123] The above embodiments illustrate the multi-turn response method supporting user interaction provided in this application. It should also be noted that this application does not impose any limitations on the number of response segments for each round, the method of user interaction during the question-and-answer process, or the relationship between the response segments of each round and the target question. For ease of understanding, this application will be illustrated through the following embodiments:
[0124] (i) Regarding the number of response segments corresponding to each round of responses, the embodiments of this application provide the following examples:
[0125] In one possible implementation, the number of answer segments corresponding to each round of responses can be one, meaning there is only one answer segment corresponding to the i-th round. In this way, the user only needs to understand this single answer segment and indicate whether they want to continue answering based on it, resulting in a simpler interface and easier user interaction. Correspondingly, in this approach, the first target answer segment in the i-th round can be this single answer segment provided in the i-th round.
[0126] Typically, even the same question can have different answers. Furthermore, different users may expect or understand different answers. Therefore, in another possible implementation, the number of answer segments corresponding to each round of responses can be multiple. This allows for multiple answer segments to be provided in a single round, and more importantly, a single round can provide an answer segment that best suits the current questioner. Based on this, users can better understand and specify the answer segment that best meets their expectations as the aforementioned first target answer segment, triggering the next round of responses.
[0127] In practice, the terminal can display the N corresponding to the i-th round of responses in the session interface. i One answer fragment, N i `N` is an integer greater than 1, representing the number of response segments given in the `i`th round of responses. Correspondingly, if it is determined that the first interaction content indicates continuing to answer the target question based on the first target response segment in the `i`th round of responses, the terminal can display `N` corresponding to the `i+1`th round of responses in the session interface. i+1 One answer fragment, N i+1 It is an integer greater than 1, used to represent the number of answer fragments given in the (i+1)th round of responses.
[0128] Wherein, the first target answer fragment in the i-th round of responses can be N i One answer segment from each of the answer segments, and N corresponding to the (i+1)th round of answers. i+1 Each answer segment is derived from N. iThis is one of the answer segments in the series. Furthermore, within each round of responses, different answer segments can correspond to different content, or they can correspond to different versions of the same content. This application does not impose any limitations on this; the specific approach can be determined based on the actual situation. For example, in steps that emphasize expanding the user's thinking, multiple answer segments corresponding to different content can be provided to broaden the user's perspective. In steps that emphasize stating factual content, multiple answer segments corresponding to different versions of the same content can be provided, allowing the user to choose an answer that suits their self-expression habits.
[0129] As can be seen, each round of responses can provide multiple answer snippets to help users better understand the information and select one as their primary target answer snippet to obtain multiple answer snippets for the next round. Furthermore, the multiple answer snippets provided in the next round are all derived from the one selected by the user, ensuring that all answer snippets meet the user's needs while also exhibiting differences. This serves to broaden the user's thinking and provide them with choices.
[0130] Because each round of responses provides multiple answer fragments, even for the same question, if different users (or the same user) specify different first target answer fragments in the i-th round, the answer fragments provided in the (i+1)-th round may differ. Therefore, the method in this application, which supports user interaction and considers user interaction when providing the next round of responses, can achieve personalized answers and provide answers that suit the current questioner, thus improving the accuracy of the responses.
[0131] To better understand, embodiments of this application also provide, as follows: Figure 5 The diagram illustrates a multi-round response method where multiple response fragments are presented in a single round. Specifically:
[0132] In the first round, two answer fragments, A11 and A12, were provided for the target question. The user's initial input then instructed them to continue answering based on fragment A11; that is, the first target answer fragment for the first round was fragment A11. In the second round, two more answer fragments were provided: A21 and A22. Both fragments A21 and A22 are derived from the user-specified fragment A11.
[0133] Therefore, multiple answer segments can be provided in a single round of answering for the user to choose from, which is beneficial for expanding the user's thinking. Furthermore, the multiple answer segments provided in the next round are all based on the answer segment specified by the user. That is, the next round of answers is based on the user's expectations, so that the next round of answers provides multiple options for the user to choose from, and all of them are in line with the user's expectations, thus ensuring the accuracy of the answers.
[0134] In related technologies, providing a complete answer to a question, and only one version of that complete answer, may lead to inaccurate answers because the provided answer may not meet the questioner's expectations or be expressed in a way that the questioner cannot understand. Even if different users ask the same question, they may receive the same answer when using this approach, further increasing the likelihood of answers that do not meet the questioner's expectations.
[0135] In contrast, this application provides multiple answer segments for each round of responses. Therefore, when different users ask the same question, different first-target answer segments can be specified to obtain different answers, thus achieving personalized responses that suit the current questioner. Based on this, adopting this application can, to some extent, avoid such problems and improve the accuracy of answers.
[0136] To better understand this application, Figure 5 Based on this, provide such Figure 6 The illustration shows how different users obtain answers to the same question. For account A (corresponding to user A) and account B (corresponding to user B), the same target question, "I want to write an essay about autumn," is presented. After adopting this application:
[0137] In the first round of responses, the aforementioned response fragment A11 could be, "In autumn, there are yellow ginkgo leaves, red maple leaves, ... so you can introduce autumn by focusing on its scenery." Similarly, the aforementioned response fragment A12 could be, "After autumn arrives, people enjoy eating roasted sweet potatoes, sugar-roasted chestnuts, ... so you can introduce autumn by focusing on its foods." It should be noted that... Figure 6 The example is merely illustrative and does not constitute any limitation. In practical applications, different answer segments can be provided in the first round of responses to the same question posed by different users. Furthermore, in... Figure 6 In the example, the two answer fragments given in the first round correspond to different content.
[0138] If user A's first interaction is "I want to write about autumn scenery," it indicates that user A intends to continue the response based on answer fragment A11. In the corresponding second round of responses, the aforementioned answer fragment A21 could be "Autumn is like nature's most vibrant palette, and nothing is more captivating than the colorful autumn leaves." and the aforementioned answer fragment A22 could be "Walking along an autumn path, the ginkgo leaves falling in the breeze create a golden carpet." It is clear that both are answer fragments related to the user's specified "autumn scenery."
[0139] If User B's first interaction is "I want to write about autumn foods," it indicates that User B intends to continue answering based on response fragment A12. In the corresponding second round of responses, the aforementioned response fragment A21 could be, "After autumn arrives, people's taste buds also welcome the warmth of this season; sweet roasted sweet potatoes carry a strong autumn sentiment." and the aforementioned response fragment A22 could be, "In autumn, the harvest season, each food tells its own story about the harvest in its own unique way." It is clear that both are response fragments based on the user's specified topic of "autumn foods."
[0140] As can be seen, when addressing the same question raised by different users, the multi-round response method provided in this application, which supports user interaction, can gradually provide answers that meet the user's expectations, thus achieving personalized responses.
[0141] It should be noted that, Figure 5 and Figure 6 In the example, the dashed box, the line indicating the first target response fragment indicated by the first interaction, and the lines supporting sequential relationships are all examples. In practical applications, these elements may not be displayed in the conversation interface to maintain its cleanliness.
[0142] The above embodiments illustrate a method of providing multiple answer segments in a single round of responses. It should also be noted that this application does not limit the number of answer segments in each round. The embodiments of this application provide the following examples:
[0143] To better interact with users and provide multi-round responses that better meet their expectations, one possible implementation allows users to customize the number of response segments given in each round.
[0144] In practice, users can perform settings operations through the target account to customize the number of answer segments given in each round of responses. Correspondingly, the terminal can display an interface for setting the number of answer segments in a single round of responses to the question in response to the settings operation performed through the target account. Then, the user can input their desired number, and the terminal can, in response to the input operation performed on the answer number setting interface, determine that the number of answer segments included in each round of responses is the target number N indicated by the input operation. Accordingly, the aforementioned N... i and N i+1 All are user-defined target quantities N, where N is an integer greater than 1.
[0145] Based on this, it can support users to customize the number of answer segments given in each round of answering. This allows for personalized answers when providing Q&A services to different users, with each user receiving the customized number of answer segments for each round. For example, if user A wants to expand their thinking as much as possible during the Q&A process, they can set a larger N, thus receiving more answer segments in each round, which is beneficial for expanding their thinking.
[0146] Understandably, in multiple rounds of answering, the response gradually approaches a complete answer to the question, that is, it gets closer and closer to the end of the answer. During this process, the need to guide users to learn the thought process required to answer the question gradually diminishes. Therefore, in another possible implementation, the number of answer segments given in each round can be determined based on the number of rounds. For example, as i increases, N... i This can be reduced. In this way, in the early stages of multiple rounds of responses, more emphasis can be placed on guiding the user's thinking, while in the later stages, more emphasis can be placed on providing concise answers so that users can obtain the answers to their questions. Based on this, the number of answer segments provided in each round can be flexibly controlled according to the need to guide the user's thinking.
[0147] Because each round of responses can provide multiple answer segments, users can specify to continue answering based on one of these segments. Correspondingly, this application also provides a rollback mechanism, allowing users to revert to a different answer segment from a previous round at any time, based on their needs, after obtaining a subsequent answer segment. In this way, users can obtain different answers and quickly obtain new answers if they are not satisfied with subsequent responses.
[0148] In practical implementation, if the N corresponding to the answer in the (i+m)th round is displayed in the conversation interface... i+m Following the first response segment, the second interactive content entered through the target account is displayed in the conversation interface, N. i+mLet m be an integer greater than 1, where m is a positive integer. If the second interaction content indicates that the user wants to re-answer the target question based on the second target answer fragment in the i-th round of responses, it means that the user does not want to continue to obtain answers based on the i+m-th round of responses, but rather wants to obtain answers based on the second target answer fragment in the i-th round of responses. In this case, the terminal can display N corresponding to the i+m+1-th round of responses in the session interface. i+m+1 One answer fragment, N i+m+1 The first answer segment follows the second target answer segment, N i+m+1 It is an integer greater than 1.
[0149] As can be seen, users can specify a segment of an answer from a previous round of responses to re-answer. Based on this, users can quickly retrieve answers when they want to, without having to re-enter the target question or start from scratch, making it more efficient.
[0150] If the second target answer segment newly specified by the user differs from the first target answer segment in the i-th round of responses, then the answer segment obtained by the user before triggering the rollback is a continuation of one of the answer segments, and the answer segment obtained after triggering the rollback is a continuation of another answer segment. In this way, through the rollback mechanism, users can obtain answers that follow the first target answer segment and answers that follow the second target answer segment, i.e., obtain different answers, which is more conducive to expanding the user's thinking.
[0151] For example, if a user is dissatisfied with the response segments from round i+1 to round i+m, a rollback can be triggered to obtain a new N based on the second target response segment. i+m+1 A fragment of an answer.
[0152] For ease of understanding, the embodiments of this application provide, as follows: Figure 7 The diagram shown illustrates a question-and-answer approach based on a fallback mechanism. Figure 7 In the example, we will use the case where the number of response fragments given in each round is N=2 as an example for illustration. Specifically:
[0153] For the target question, taking i=3 as an example, in the third round of responses, answer fragments A31 and A32 are provided, followed by user-inputted interactive content indicating that the response should continue based on answer fragment A32. Correspondingly, in the fourth round of responses, answer fragments A41 and A42, which follow from answer fragment A32, are provided.
[0154] Several more rounds of responses followed. After providing response fragments A81 and A82 for the 8th round (i.e., m=5), the user's second interactive input indicated a desire to re-answer the target question based on response fragment A31 from the 3rd round. Therefore, in the 9th round, response fragments A91 and A92, which follow from response fragment A31, were provided.
[0155] For example, if a user is not satisfied with the content obtained from rounds 4 to 8, which follows answer segment A32, they can instruct the user to re-answer based on answer segment A31 by inputting a second interactive element. Based on this, when a user is dissatisfied with the obtained answer, they can quickly revert to the desired position and retain the content obtained in rounds they were already satisfied with, without needing to re-enter the target question or start the interaction from the beginning, making it more convenient and efficient.
[0156] (ii) This application does not impose any limitations on the way users interact during the question-and-answer process. For ease of understanding, the embodiments of this application provide the following examples:
[0157] 1. First, regarding the method by which users input the first interactive content during the question-and-answer process, this application provides the following example:
[0158] (1) An example of determining the content of the first interaction:
[0159] To simplify the interaction and better guide users to engage in effective interaction, one possible implementation is to allow users to directly interact with multiple answer segments provided in each round of responses, enabling them to choose one from multiple options. This allows for quick and accurate indication of which answer segment should be followed in the next round of responses.
[0160] In practical implementation, the terminal can respond to the interactive operation performed by the target account on the first target answer fragment in the i-th round of responses, and determine the first target answer fragment in the i-th round of responses as the first interactive content. Based on this, it supports direct interaction between users and answer fragments. Users can directly select a given answer fragment (such as selecting one from multiple answer fragments) to reflect their needs based on the previous round of responses, and can more quickly and conveniently determine the first interactive content that reflects their needs.
[0161] This application does not limit the type of interactive operation. For ease of understanding, the embodiments of this application provide the following examples:
[0162] In one example, the interaction could be a click action, as follows: Figure 8Example. In practice, users simply click on the desired answer segment, making it much simpler. For instance, in dialogue scenarios targeting primary and secondary school students, this simple approach makes it easier to guide students to interact effectively, engage in multiple rounds of responses towards answering the question, and is also easier to learn and use. Compared to related technologies, this simple approach also places lower demands on users.
[0163] In another example, the interaction can be a long press. In practice, users can long press the answer segment they want to specify. The operation is relatively simple and also helps to avoid accidental selections caused by accidental screen touches.
[0164] Furthermore, in practice, a long-press operation can be performed first, followed by displaying an action tab (which may include various actions such as send, edit, share, and favorite) in response to the long-press operation. Then, the send action can be selected. Afterward, this response fragment can be designated as the primary interaction content. Based on this, users can not only directly select multiple options as the primary interaction content, but also favorite, share, and edit as needed, thus meeting the diverse needs of different users.
[0165] For ease of understanding, the embodiments of this application provide, as follows: Figure 8 The diagram shown illustrates a method for directly determining the first interactive content. Specifically:
[0166] Users can perform interactive operations on answer segment A12 in the first round of responses (such as...). Figure 8 (Example click operation) After implementation, the answer fragment A12 is directly input into the conversation interface as the first interactive content. Then, in the second round of responses, answer fragments A21 and A22, which follow answer fragment A12, are obtained.
[0167] Similarly, users can perform interactive actions on answer segment A21 in the second round of responses (such as...). Figure 8 (Example click operation) After implementation, the answer fragment A21 is directly entered into the conversation interface as the new first interaction content. Subsequently, users can easily and conveniently specify the first target answer fragment to trigger the next round of responses.
[0168] (2) Another example of determining the content of the first interaction:
[0169] Typically, a conversational interface includes input controls for users to ask questions (i.e., input a problem), such as... Figure 1 The example shows an input control. Therefore, in one possible implementation, the user can use the input control to enter their desired content and send it to the session interface. In this example, the content sent by the user to the session interface can serve as the aforementioned first interactive content.
[0170] Based on this, users can flexibly input the content they want to express. For example, after seeing the answer fragment corresponding to the i-th round of answers, if a user has questions or wants to learn more, they can input content that expresses their questions and needs as the first interaction content, so as to obtain the answer fragment that meets their expectations in the next round of answers.
[0171] For ease of understanding, this embodiment is as follows: Figure 1 Building upon the example, after seeing answer fragment A11, if the user's first interaction via the input control is "I understand, please continue answering," it will instruct them to continue answering based on answer fragment A11, thus obtaining answer fragment A21 for the second round of answers. Furthermore, users can directly provide feedback when they have questions. For instance, if the user's first interaction via the input control is "What does xx mean?", then "xx" can be content from answer fragment A11, indicating the user's needs.
[0172] Of course, for example Figure 8 In the example, multiple response segments are provided in each round of responses, and users can also input their initial interaction through input controls to provide feedback. For instance, after the first round of responses, the user's initial interaction through the input controls is "Please continue based on the second version."
[0173] (3) Another example of determining the content of the first interaction:
[0174] To facilitate faster input of interactive content by users, another possible implementation provides an editing function. This allows users to interact with the given response fragment, edit the selected fragment, and then input their initial interactive content. Based on this, users can quickly adjust the given response fragment to express their needs.
[0175] In specific implementation, the terminal can respond to an interactive operation performed by the target account on the third target answer fragment in the i-th round of responses by displaying the third target answer fragment in the edit box of the session interface. When each round of responses includes multiple answer fragments, the third answer fragment can be any answer fragment in the i-th round of responses. Next, the terminal can respond to an edit operation performed in the edit box by displaying the edited third target answer fragment in the edit box. Furthermore, the terminal can respond to a send operation performed on the edited third target answer fragment, designating the edited third target answer fragment as the first interactive content.
[0176] Therefore, by easily modifying the provided answer snippets, users can more quickly determine the interactive content that reflects their needs. For example, if a user develops more ideas for answering the target question based on the provided answer snippet, but most of them are consistent with the given answer snippet, then editing the answer snippet helps the user quickly determine the primary interactive content. Similarly, if a user is slightly dissatisfied with the wording of the provided answer snippet, editing it allows them to more easily adjust the answer snippet to meet their needs.
[0177] For ease of understanding, in the aforementioned Figure 6 Based on the examples, embodiments of this application also provide, for example... Figure 9 The diagram shown illustrates a method for determining the first interactive content based on editing. Specifically:
[0178] For example, if user A interacts with the first round of responses, specifically the line "Walking along an autumn path, ginkgo leaves fall in the breeze, carpeting the ground with gold" (response fragment A12, also the third target response fragment in the first round), the content can be displayed in the edit box. Furthermore, a virtual keyboard can be invoked in the chat interface, allowing the user to perform editing operations (such as adding or deleting content) in the edit box.
[0179] After completing the editing operation, the edited content is displayed in the editing box: "Walking on an autumn path, looking up, golden ginkgo leaves sway on the branches. Falling with the breeze, they carpet a golden carpet." Users can then perform a sending operation on the edited content (e.g., clicking...). Figure 9 The "Send" control in the example displays the edited content in the chat interface, which is the first interactive content entered by the user.
[0180] Understandably, when a user is editing, they may expect subsequent answers to build upon their input. Accordingly, if the first interaction indicates a continuation of the response to the target question based on that first interaction, the terminal can display the answer segment corresponding to the (i+1)th round of responses in the session interface. In this case, the answer segment corresponding to the (i+1)th round of responses is a continuation of the first interaction.
[0181] It is evident that when users are allowed to edit the provided response snippets, if they expect the next response to be based on their input, the corresponding response snippet will be a continuation of the first interactive content entered by the user. This allows for subsequent responses that better align with the user's individual expectations.
[0182] Understandably, aside from supporting editing, if users can input their initial interaction content via input controls, they may expect subsequent responses to be based on their input. If it's determined that the user's request is based on the initial interaction content, then the response fragment provided in the i-th round will also be a continuation of that initial interaction content.
[0183] 2. Secondly, from the perspective of guiding user interaction, the embodiments of this application provide the following examples:
[0184] Since the initial interaction can be user-inputted, during multiple rounds of responses, there's a possibility that a user might input content unrelated to the question. The purpose of multiple rounds is to guide the user's understanding and expand their thinking; if a user inputs irrelevant content, it could hinder further responses. Therefore, in another possible implementation, prompts can be provided to guide effective user interaction, thus focusing their attention on the current question and the subsequent rounds of responses.
[0185] In practice, if it is determined that the first interaction content is irrelevant to answering the target question, it indicates that the user has entered invalid interaction content. At this time, the terminal can display the first prompt information in the session interface. The first prompt information can be used to prompt the user to enter interaction content related to answering the target question through the target account. Based on this, the user is guided to perform effective interaction.
[0186] If, after the first prompt, the user enters a third interactive element, the corresponding terminal can display this third interactive element, entered through the target account, in the session interface. Furthermore, if it is determined that the third interactive element instructs the user to continue answering the target question based on the fourth target answer fragment in the i-th round of responses, indicating that the user's need is to continue answering, and to continue answering based on the fourth target answer fragment in the i-th round of responses, then the terminal can display the answer fragment corresponding to the (i+1)-th round of responses in the session interface, where the answer fragment corresponding to the (i+1)-th round of responses is a continuation of the fourth target answer fragment.
[0187] As can be seen, during the multi-round response process, once it is determined that the user has entered invalid interactive content (i.e., interactive content unrelated to answering the question), a first prompt is displayed to remind the user and guide them to engage in effective interaction, allowing them to focus on the current question and the multiple rounds of responses to that question, rather than entering irrelevant content. If it is determined that the user has entered valid interactive content after the prompt (such as the aforementioned third interactive content), the next round of response can proceed.
[0188] For ease of understanding, embodiments of this application also provide, as follows: Figure 10The diagram shown illustrates a method for guiding user interaction. Specifically:
[0189] In the multi-round response process to the target question, after providing response fragments A11 and A12 from the first round, the user's first input is "Haha, I'm so happy, how about you?", which is unrelated to answering the current target question. At this point, the first prompt message can be displayed: "Do you want to change the question? If not, please enter content related to answering the target question." Based on this, the user's needs are clarified, and the user is reminded to focus on the current question.
[0190] If the user then inputs a third interactive element, such as... Figure 10 In the example, the user directly selected answer fragment A12 as the third interactive content. It can be determined that the user wants to continue to obtain answers based on answer fragment A12 in the first round of answers (i.e., the fourth target answer fragment in the aforementioned first round of answers). At this time, answer fragments A21 and A22 corresponding to the second round of answers can be displayed.
[0191] Based on this, a mechanism is provided to guide user interaction, avoid invalid interaction, and continue to the next round of answering when the user enters valid third interaction content again, thereby ensuring the continuity of multi-round answers to the question.
[0192] Understandably, if the third interactive content entered by the user after the first prompt indicates that the user's need is indeed to end the answer to the target question early, then the answer can be ended early; or, if the user's need is to ask a question, then the multi-round answering process for the next question can begin.
[0193] 3. Furthermore, shortcuts can be set, allowing users to interact based on them. The following examples illustrate this:
[0194] Shortcuts can be pre-set control commands, and different shortcuts typically perform different functions. In practical applications, users can directly select a shortcut using input controls and enter it into the session interface, where the computer will then respond. This allows for more convenient interaction when answering questions.
[0195] This application does not impose any limitations on the settings of shortcuts. In practical applications, different shortcuts can be set according to actual needs (such as different application scenarios). For ease of understanding, the embodiments of this application provide the following examples:
[0196] During the process of answering a question in multiple rounds, in order to make it easier for users to decide whether to end the answering of the current question according to their own needs, one possible implementation is to set a shortcut command for switching questions. The question switching command can be used to indicate the end of the multiple rounds of answering the current question.
[0197] In practice, during the process of answering multiple rounds of questions about a target question, if the user inputs a question-switching command, it indicates that the user wants to end the answering of the target question. At this time, the terminal can respond to the question-switching command input through the target account and display a second prompt message in the session interface. This second prompt message can be used to indicate the end of the answering of the target question.
[0198] Therefore, during the process of answering a question in multiple rounds, users can actively end the current question by inputting a question switching command. If the user then inputs a question again, multiple rounds of answers for the newly input question can begin, thus allowing the user to easily start asking the next question at any time.
[0199] For ease of understanding, embodiments of this application also provide, as follows: Figure 11 The diagram shown illustrates an interaction based on a question switching command. Specifically:
[0200] Regarding question 1, after receiving answer fragments A51 and A52 corresponding to 5 rounds of responses, the user believes they have understood the question and received the answer they expected. Furthermore, the user wants to ask the next question.
[0201] At this point, the user can enter a question switching command. Specifically, for example... Figure 11 For example, users can target extended controls in the session interface ( Figure 11 (As shown by the plus sign in the image) Perform interactive operations (such as click operations) to bring up the expanded area. The expanded area can display components with question switching instructions, or other components with shortcut instructions, etc. There are no restrictions here.
[0202] Next, users can interact with the question-to-answer component (e.g., click), and the specific content of the question-to-answer instruction will be automatically displayed in the input box, such as " / End current question". Afterwards, users can click the "Send" control to send " / End current question".
[0203] Accordingly, the user-inputted message " / End current question" can be displayed in the conversation interface. Following this, a second notification message, "Questioning of question 1 has ended," can be displayed. Based on this, the user's active interaction ends the multi-round response to question 1. Afterwards, the user can enter a new question as needed, such as question 2, to initiate a multi-round response to question 2.
[0204] (III) Regarding the relationship between the answer segments in each round of responses and the target question, the embodiments of this application provide the following examples for illustration:
[0205] It is understandable that the process of answering a question in multiple rounds is a process of gradually providing an answer. Therefore, the answer fragments in each round can be used to answer the target question. That is, the relationship between the two can be that of a question and an answer. However, in the gradual approach, each round of answers provides only a partial answer.
[0206] Furthermore, this application focuses on guiding users to gradually understand and expand their thinking by providing multiple rounds of answers to questions. Therefore, answer fragments can also be used to indicate how to think about answering the target question. In other words, the relationship between the two can be the relationship between the question and the thinking method for answering the question.
[0207] Of course, to better answer users' questions, during the multiple rounds of responses to a question, both answer segments instructing on how to think about the question and answer segments indicating the correct answer can be provided. Based on this, while expanding users' thinking, answers can also be provided; combining these two approaches can better guide users to understand the question and why such an answer was given. For example, when applying this application to primary and secondary school students, the aforementioned target questions are mostly subject-specific questions; therefore, it can better guide students in learning thinking methods and resolve their confusion.
[0208] To better understand, this application provides the following example, using a subject-specific question as an example:
[0209] If the target question belongs to a subject-specific category, the answer fragment corresponding to the i-th round of answers can be used to indicate the direction of the solution to the target question, and the direction of the solution can be used to describe the thought process for answering the target question. Accordingly, in the specific implementation of the aforementioned S204, if it is determined that the first interaction content indicates that the user should continue to answer the target question based on the direction of the first target answer fragment in the i-th round of answers, it means that the user expects to continue to obtain answers around the direction of the first target answer fragment. Therefore, at this time, the terminal can display the answer fragment corresponding to the (i+1)-th round of answers in the session interface. The answer fragment corresponding to the (i+1)-th round of answers can be used to answer the target question, and the answer fragment corresponding to the (i+1)-th round of answers conforms to the direction of the first target answer fragment in the i-th round of answers.
[0210] It is evident that, for subject-specific questions, the system can provide direction for solutions, guiding users to learn problem-solving strategies. It also provides sample answer segments to help users grasp the answers and resolve their confusion. Furthermore, subsequent answers revolve around the user-specified solution direction. Based on this, through multiple rounds of responses, it can better guide users (such as students) to understand the question, why subsequent answers are provided, and why such answers exist, thereby better addressing user confusion and expanding their thinking.
[0211] In practice, for example, the first round of responses could provide a sample answer indicating the direction of the solution, while subsequent rounds could provide sample answers to the questions. This guides users to learn the thought process first, and then obtain the answers.
[0212] In related technologies, providing a complete answer all at once, when applied to educational scenarios, simply tells students the answer all at once. Students may struggle to understand why the solution is presented in that way, and they won't learn the problem-solving process. In contrast, this application, when applied to educational scenarios, first provides a direction for the solution to guide students in thinking about the problem-solving process. Afterwards, if the student continues to input interactive content and indicates a desire for further answers, the answer is then provided for reference. This approach is more conducive to helping students learn.
[0213] For example, if the target question is a writing prompt, the solution direction can be used to indicate the writing theme of the target question, thereby guiding students to learn how to think about writing. As mentioned above. Figure 6 For example, the answer snippets given in the first round of responses can indicate the writing topic. After the user selects a writing topic, the answer snippets given in the second round of responses will all revolve around the user's selected writing topic and can serve as parts of the essay for that writing question.
[0214] exist Figure 6In the example, taking User A as an example, the first target answer fragment in the first round of responses is answer fragment A11. Correspondingly, the answer fragment in the (i+1)th round of responses follows from the first target answer fragment in the i-th round. Specifically, the two answer fragments given in the second round of responses are sentences derived from writing around A11. From the content of the sentences, they both follow the writing theme of "autumn scenery" and contain elements from A11 (such as "ginkgo leaves"). Based on this, users can combine A11 to better understand the given answers A21 and A22 for this writing topic.
[0215] Similarly, in Figure 6 In the example, taking User B as an example, the first target answer fragment in the first round of responses is answer fragment A12. Correspondingly, the answer fragment in the (i+1)th round is a continuation of the first target answer fragment in the i-th round. Specifically, the two answer fragments given in the second round are sentences written around A12. From the content of the sentences, they both follow the writing theme of "autumn food" and contain elements from A12 (such as the element "roasted sweet potato" in A21, the element "food" in A22, and the pronoun "they"). Based on this, users can better understand the given answers A21 and A22 for this writing topic by combining A12.
[0216] For example, if the target problem is a math problem, the solution direction can be used to indicate the problem-solving approach. Based on this, students can be guided to learn the problem-solving approach for math problems, as follows: Figure 12 For example, the answer snippets given in the first round of responses can be used to indicate the problem-solving approach.
[0217] For ease of understanding, this application embodiment uses the answer fragment corresponding to the first round of answers as an example to indicate the direction of the solution, and provides the following... Figure 12 The diagram shown illustrates a multi-round response method guided by the problem-solving direction. Specifically:
[0218] If the user inputs the target problem as "A circular flower bed has a circumference of 'a' meters. A red flag is placed every 'b' meters around it, and two blue flags are placed between every two red flags. How many blue flags are there around the flower bed in total?", then in the first round of responses, the following answer segments can be provided to guide the solution process: A11 "We can first calculate the total number of red flags around the circular flower bed. Since two blue flags are placed between every two red flags, we can then calculate the number of blue flags based on the number of red flags." and A12 "First, we can calculate the total number of red flags, then calculate how many gaps are formed by these red flags, and finally calculate the total number of blue flags." This will guide the user to understand and think about the solution process in the first round of responses.
[0219] Then, the next round of responses can be based on the user's interaction. For example, if the user's first interaction is response fragment A12, it indicates that the user wants to continue obtaining answers based on the second problem-solving approach. That is, the first target response fragment in the first round is response fragment A12. Accordingly, the response fragments for the second round can be given as follows: Response fragment A21: "Since the perimeter of the flower bed is a meters, and a red flag is placed every b meters, a / b red flags are placed in total." and Response fragment A22: "A red flag is placed every b meters. You can imagine dividing the perimeter of the flower bed into many segments, each segment being b meters long. The total number of red flags can be calculated by dividing the perimeter of the flower bed by the length of each segment, i.e., a / b red flags are placed in total." Both of these response fragments conform to the problem-solving approach indicated by A12, thus answering the target question.
[0220] Based on this, users can first understand the problem-solving approach. Guided by this approach, users can more quickly and effectively understand why the subsequent answer was given. Furthermore, this process can also guide users to learn problem-solving thought processes.
[0221] exist Figure 12 In the example, the answer segment corresponding to the second round of responses follows the first target answer segment in the first round of responses. Specifically, answer segments A21 and A22 are partial answers obtained by solving the math problem according to the problem-solving approach indicated by answer segment A12. Based on this continuity, users can better understand why the number of red flags needs to be calculated in A21 and A22 by combining the problem-solving approach indicated by A12, "first calculate the number of red flags, then...".
[0222] Subsequently, based on user interaction, the solution to each part of the math problem can be provided step by step to guide learning and understanding. Understandably, as long as the user does not change the specified problem-solving approach (that is, they continue to obtain answers and do not revert to answering according to A11), then the subsequent step-by-step answers (such as answer fragments A31, A32, etc.) can all continue under the problem-solving approach indicated by A12 mentioned above.
[0223] Of course, if subsequent users specify that they should continue answering based on A22, then either answer fragment A31 or answer fragment A32 given in the third round can form a coherent and more complete answer when connected to A22. For example, following the problem-solving approach indicated by A12, the number of red flags was calculated in the second round of answers. If further answers are obtained, then in the third round of answers, the calculation would be based on the "a / b red flags" calculated in the second round of answers, calculating how many gaps "a / b red flags" can form. This calculation process / method can be A31 and A32.
[0224] Through the above embodiments, this application has been described in detail regarding the number of answer segments given in a single round of responses, the relationship between answer segments and questions, and the methods of user interaction. It should also be noted that this application does not limit the method for determining the answer segments corresponding to each round of responses, nor the method for analyzing the first interaction content to obtain the first analysis result. For better understanding, this application will use a server as the aforementioned computer device, and will illustrate this through the following embodiments:
[0225] (i) Regarding the method for determining the corresponding answer segment for each round of responses, the embodiments of this application provide the following examples:
[0226] In one possible implementation, in response to a user's input question, the server can first generate a complete answer to the question, and then divide the entire session into answer segments based on the answer logic and semantic relationships within the complete answer. These answer segments are then presented to the user step-by-step to guide their understanding.
[0227] For example, in an implementation that only supports multiple selections by the user to determine the first interactive content, since the first interactive content input by the user is a certain answer fragment, this method of generating answer fragments can be used to directly select the answer fragment following the one specified by the user and provide it in the next round of responses. Based on this, the interaction is simpler, and subsequent responses only need to find the one following the one specified by the user, which is beneficial for providing the answer fragment for the next round of responses more quickly.
[0228] For example, in a dialogue scenario guiding users to write, corresponding essays can be written directly for different writing topics and divided into answer segments. Then, answer segments under the writing topic selected by the user can be presented step by step.
[0229] To improve the accuracy of answers, another possible implementation is to generate answer fragments for each round of answers in real time based on user-specified content. In practice, if i = 1, the server can generate the answer fragment corresponding to the first round of answers based on the target question. If i is greater than 1, the server can concatenate the target question and the first target answer fragments corresponding to the previous i-1 rounds of answers to obtain the concatenated data corresponding to the i-th round of answers, and can generate the answer fragment corresponding to the i-th round of answers based on the concatenated data. Here, the first target answer fragment corresponding to each round of answers can refer to the answer fragment specified by the user; that is, the answer fragment of the next round of answers must be a continuation of the first target answer fragment of this round.
[0230] As can be seen, in the first round of responses, the initial answer is based on the question itself. Each subsequent round progressively pieces together the user-specified first target answer segment, then generates the answer segment for the next round in real time. This ensures that each answer segment better connects to the first target answer segment specified by the user in the previous round, thus guaranteeing the accuracy of the responses.
[0231] For example, such as Figure 8 As shown, in the first round of responses, answer fragments A11 and A12 can be generated based on the target question. Then, the target question and answer fragment A12 are concatenated to obtain the concatenated data for the second round of responses, and answer fragments A21 and A22 are generated based on this. Next, answer fragment A21 is concatenated to obtain the concatenated data for the third round of responses, in order to generate the answer fragments for the third round of responses.
[0232] The above embodiments illustrate the content upon which the generated answer fragments are based. It should also be noted that this application does not limit the method used to generate the answer fragments. For ease of understanding, the embodiments of this application provide the following examples:
[0233] In practical applications, large models, such as Large Language Models (LLMs), are artificial intelligence models built on natural language processing techniques. They have the ability to understand natural language and are typically used in question-answering scenarios. Therefore, one possible implementation is to use large models to provide multiple rounds of answers to questions, specifically by using the large model to generate answer segments corresponding to each round of responses.
[0234] Typically, large models are deployed as model services during the application phase, usually using OpenAI's model service interface for invocation. However, different large models often have different input format requirements during application due to differences in model structure, training methods, and other factors. Therefore, model service interfaces typically include conversion interfaces to transform user input before feeding it into the large model, which then outputs the corresponding answer.
[0235] When applying this application, considering that it involves multiple rounds of answers to the same question, in order to ensure the continuity of the multiple rounds of answers to the same question, the conversion interface can be called to convert the question in the first round of answering. At the same time, since the question has been converted, the splicing interface in the model service interface can be called in the subsequent rounds of answering, and the content specified by the user can be spliced.
[0236] In practical implementation, if i = 1, the transformation interface of the large model can be called to transform the target question, resulting in the transformed target question. Then, based on the transformed target question, the large model can generate the answer fragment corresponding to the first round of answers. Conversely, if i is greater than 1, the splicing interface of the large model can be called to splice the transformed target question and the first target answer fragments corresponding to the previous i-1 rounds of answers, obtaining the spliced data corresponding to the i-th round of answers. Then, based on the spliced data corresponding to the i-th round of answers, the large model can generate the answer fragment corresponding to the i-th round of answers.
[0237] Therefore, in scenarios involving multiple rounds of responses to the same question, the initial call to the transformation interface ensures that the content actually fed into the large model meets its requirements, facilitating its understanding and processing. Subsequent rounds of responses only require calling the concatenation interface. By calling different interfaces, the large model is informed whether it's a new question or a continuation of an existing one, allowing for better understanding and processing by the large model.
[0238] In practical applications, question transformation typically involves adding template characters, conforming to the specifications of the larger model being called, before and after the question to mark system information from the larger model and relevant information about the user asking the question. Subsequent calls to the concatenation interface do not perform this transformation; instead, the concatenated text is directly fed into the larger model for calculation.
[0239] Commonly, taking the OpenAI format model service interface as an example, the conversion interface can be OpenAI v1 / chat / completions, and the concatenation interface can also be OpenAI v1 / completions. For instance, taking the target question "What's your name?" as an example, calling a large model named "Qwen" and then calling the v1 / chat / completions interface will convert the question into:
[0240] <|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n<|im_start|>user\\nWhat's your name? <|im_end|>\\n<|im_start|>assistant\\n
[0241] The characters before and after the question are the added template characters.
[0242] In this application, calling the v1 / chat / completions interface indicates that the call is for a single, independent question, and the large model will answer the input as a separate question. After calling the v1 / completions interface, no further transformation is performed, and it indicates that the call is a continuation of the previous question. The large model will continue to answer based on the newly concatenated content to ensure the continuity of multiple rounds of answers to the same question.
[0243] For example, assuming the user inputs a target question W, the first call to v1 / chat / completions transforms W, resulting in:
[0244] <|im_start|>system\\nYouare Qwen,created by Alibaba Cloud.Youareahelpfulassistant.<|im_end|>\\n<|im_start|>user\\n W<|im_end|>\\n<|im_start|>assistant\\n
[0245] Then, the transformed content is fed into the large model to obtain the answer fragments corresponding to the first round of responses. For ease of description, the transformed target question is denoted as CT1WCT2, where CT1 and CT2 represent the template characters concatenated before and after the target question W, respectively.
[0246] Next, in the second round of responses, if the user specifies to continue the response based on A11, then A11 is concatenated to CT1WCT2 to obtain CT1WCT2A11 (i.e., the concatenated data corresponding to the second round of responses), which is then sent to the larger model to obtain the response fragment corresponding to the second round of responses. The subsequent steps are similar and will not be elaborated here.
[0247] In practical applications, during the process of providing multiple rounds of answers to a target question, users can rewind at any time (see the foregoing embodiments for details). To better understand the rewind mechanism provided in this application, this embodiment will further illustrate the rewind mechanism from the perspective of how answer segments are generated after a user triggers a rewind:
[0248] If the i-th round of answers includes N i One answer fragment, N i The integer is greater than 1, and N is the value corresponding to the (i+m)th round of responses sent to the target account. i+m Following the first response fragment, the server receives the second interaction content sent by the target account, N. i+m Let m be an integer greater than 1. Where m is a positive integer.
[0249] Next, the server can analyze the second interaction content to obtain a second analysis result. If the second analysis result indicates that the user should re-answer the target question based on the second target answer fragment in the i-th round of responses, it means that after seeing the answer fragment in the (i+m)-th round of responses, the user triggered a rollback and specified that they should roll back to the i-th round of responses and re-answer based on the second target answer fragment in the i-th round of responses. At this time, the server can redetermine the second target answer fragment as the first target answer fragment corresponding to the i-th round of responses.
[0250] Since the user specified to roll back to the i-th round of responses, it indicates that the user did not select any response segment in the (i+m)-th round, meaning there was no first target response segment specified in the (i+m)-th round. Furthermore, the user wants to retrieve subsequent responses that follow the second target response segment. Since the first target response segment corresponding to the i-th round has already been replaced with the user-specified second target response segment, the server only needs to remove the first target response segments corresponding to the (i+1)-th to (i+m-1)-th rounds from the concatenated data corresponding to the (i+m)-th round to obtain the concatenated data corresponding to the (i+m+1)-th round.
[0251] Then, based on the concatenated data corresponding to the answers in the (i+m+1)th round, N corresponding to the answers in the (i+m+1)th round can be generated. i+m+1 One answer fragment, N i+m+1 The first answer segment follows the second target answer segment, N i+m+1 The integer is greater than 1, and N is sent to the target account. i+m+1 A fragment of an answer.
[0252] As can be seen, after a user triggers a rollback, it is only necessary to remove the first target answer segments corresponding to those unnecessary rounds. This facilitates a faster identification of the data to be concatenated for a new answer, enabling the creation of a new answer and providing answer segments that meet the user's rollback requirements. Based on this, the user-indicated rollback point is retained, while intermediate rounds are discarded, ensuring that the re-acquired answer segment follows the one the user indicated they were rolling back to.
[0253] Understandably, in practice, this could involve calling the aforementioned splicing interface to generate N using a large model. i+m+1 An example of an answer snippet. For instance, in the aforementioned... Figure 7 Based on the example, i=3, m=5, after providing a fragment of the 8th round of responses, the user triggers a rollback. Using this as an example, this application embodiment also provides... Figure 13 The diagram shown illustrates how to generate a response fragment after a user triggers a back button. Specifically:
[0254] exist Figure 13In the example, CT1WCT2 is the transformed target question, and the subsequent concatenations are the first target answer fragments corresponding to each round of answers. Before triggering the rollback, the first target answer fragment corresponding to the 3rd round of answers is answer fragment A32. After triggering the rollback, the aforementioned second target answer fragment is indicated as answer fragment A31 from the 3rd round of answers. Accordingly, answer fragment A31 can be redefined as the first target answer fragment corresponding to the 3rd round of answers, that is, A32 in the concatenation data "CT1WCT2A11A21A32A42A51A61A72" corresponding to the 8th round of answers is replaced with A31. Furthermore, the first target answer fragments corresponding to the 4th to 7th rounds of answers are removed.
[0255] Correspondingly, the concatenated data "CT1WCT2A11A21A31" corresponding to the 9th round of responses can be obtained. Then, "CT1WCT2A11A21A31" can be input into the large model, which will output response fragments A91 and A92 corresponding to the 9th round of responses. After being sent to the terminal, it can then be... Figure 7 The example conversation interface displays answer fragments A91 and A92 to aid user comprehension.
[0256] It is understood that the above embodiments are splicing examples when the user specifies a continuation of the response based on the first target response fragment. In some other embodiments, the user may want to continue the response based on the first interaction content. Accordingly, the first interaction content input by the user can be spliced in during the splicing process so that a response fragment based on the first interaction content can be given in the next round. For specific implementation methods, please refer to the foregoing examples, which will not be repeated here.
[0257] In the multi-round response process for a question, each round provides a partial answer. To better control the large model so that it only generates a partial answer before ending the generation process, another possible implementation is to pre-set a target symbol to instruct the large model to end the generation process.
[0258] In practice, if the target question is answered in multiple rounds using a large model, then during the i-th round of answering using the large model, if the last character in the generated answer content matches the target character for the first time, the i-th round of answering can be ended, and the answer content at the end can be determined as the answer fragment corresponding to the i-th round of answering.
[0259] The target character is one of several delimiters, which can be characters that the large model might generate when generating the answer (such as a period, carriage return, etc.). Therefore, by specifying the target character, it is possible to flexibly control where the large model should end the generated answer to obtain a partial answer.
[0260] In practical applications, target symbols can be flexibly set according to the application scenario. For example, for writing topics, to better guide students in learning writing thinking methods, the period "." can be set as the target symbol, thereby guiding students to learn writing thinking methods, writing skills, and sentence expression methods sentence by sentence. Similarly, for math problems, the carriage return "\n" can be set as the target symbol to guide students in understanding the problem-solving process paragraph by paragraph.
[0261] The above embodiments illustrate the method of generating answer fragments using a large model in this application. To better understand this, the embodiments of this application provide the following examples of calling a large model:
[0262]
[0263]
[0264] In the example call code above, the `stop` character is the aforementioned target character, such as "\n", which can be used to represent a newline character. In implementation, this can be controlled by setting the `stop` parameter in the large model's call parameter. Furthermore, the user-defined target number of response segments given per round of responses can be achieved by setting the `best_of` parameter in the large model's call parameter, such as N=2.
[0265] Subsequently, by calling the service interface of the large model, the system can provide two answer fragments corresponding to each round of responses. The example above uses the v1 / completions interface as an example. For details, please refer to the descriptions of the aforementioned embodiments, which will not be repeated here.
[0266] (ii) The following examples illustrate the method of analyzing the first interactive content to obtain the first analysis result:
[0267] The first interactive content can be used to reflect the user's needs after seeing the answer fragment given in the i-th round of responses. Analyzing the first interactive content can clarify what the user's needs are, so as to guide the dialogue process to be more intelligent and accurate.
[0268] Understandably, the way users input their first interactive content will vary, resulting in differences in the content itself (for example, it could be a fragment of a response from the i-th round of answers, or content entered by the user themselves). Consequently, the analysis methods used to analyze user needs, as well as the analysis results, may also differ.
[0269] To better understand, the embodiments of this application include N in the aforementioned i-th round of responses. iN answer fragments i Taking an integer greater than 1 as an example, various cases are illustrated. That is, in specific implementation, the aforementioned S304 can include one of the following:
[0270] In one example, if the first interactive content hits N i The first target response fragment in the response fragments indicates that the first interaction content is N. i One of the answer fragments, so the server can determine that the first analysis result indicates to continue answering the target question based on the first target answer fragment in the i-th round of answers. For example, the user can use the aforementioned Figure 8 The first interactive content is entered in the manner shown.
[0271] In another example, if the semantic indication of the first interactive content is in N i Building upon the first target answer fragment in the N answer fragments, the user continues to answer the target question, indicating that the user wants to... i Based on the first target answer fragment in the i-th round of answers, the server continues to obtain answers, so the server can determine that the first analysis result indicates that the target question should be answered based on the first target answer fragment in the i-th round of answers.
[0272] For example, with Figure 1 For example, the first interactive input from the user might be "I understand, please continue." Or, for instance, using... Figure 6 For example, the first interactive content entered by the user might be "I want to write about autumn scenery" or "I want to write about autumn food." Another example is "Please continue answering according to the second approach," etc.
[0273] In another example, if the first interaction content does not hit N i The first analysis result indicates that the user wants to continue answering the target question based on the first interaction content, and the semantic indication of the first interaction content is that the user wants to continue to get answers based on the first interaction content. Therefore, the server can determine that the first analysis result indicates that the user wants to continue to answer the target question based on the first interaction content.
[0274] For example, users can input content expressing their needs through input controls as the primary interactive element. Alternatively, users can use the aforementioned... Figure 9 The first interactive content is entered in the manner shown. For example, using... Figure 6 For example, if user C, after seeing the two answer snippets given in the first round of responses, has a flash of inspiration, clearly defines the topic they want to write about, and enters "I know, I want to write about people in autumn" (for user C, in...) Figure 6 (Not shown in the image).
[0275] Corresponding to this approach, subsequent responses tailored to user needs can be provided. In practice, if the first analysis result indicates that the response should continue to address the target question based on the first interaction content, the server can generate N corresponding to the (i+1)th round of responses based on the target question and the first interaction content. i+1 A number of answer fragments are sent to the target account, along with the N corresponding to the (i+1)th round of answers. i+1 A number of answer snippets. Among them, N i+1 Each answer segment follows from the first interactive content, N i+1 It is an integer greater than 1. Based on this, it is possible to provide subsequent answers that follow the first interactive content input by the user, which helps to make multiple rounds of responses move in the direction of providing answers that meet the user's expectations, thereby improving the accuracy of the answers.
[0276] In another example, if the semantics of the first interaction content are irrelevant to answering the target question, the user input can be considered invalid. Therefore, the server can determine that the first analysis result indicates that the first interaction content is irrelevant to answering the target question.
[0277] Corresponding to this approach, subsequent prompts can be provided to guide users to engage in effective interaction. In specific implementation, if the first analysis result indicates that the first interaction content is irrelevant to answering the target question, the server can send a first prompt to the target account. This first prompt can be used to prompt the target account to input interaction content related to answering the target question. For example, it could be as described above. Figure 10 The first prompt message provided.
[0278] It should be noted that the above embodiments are illustrated using the analysis of the first interactive content as an example. It is understood that the second and third interactive content, as mentioned above, are essentially content entered by the user after seeing a fragment of the response provided in a certain round of answers. Therefore, similar to the first interactive content, they are also used to reflect the user's needs. Thus, the analysis methods and results (such as the aforementioned second analysis result) can be found in the descriptions of the various embodiments above, and will not be repeated here.
[0279] The multi-round response method provided in this application has been described in detail through the above embodiments. It is understood that after multiple rounds of responses to a target question have concluded, the first target response segments specified by the user in each round, due to their sequential relationship, can form a coherent and complete answer. In practical applications, after determining that the multi-round responses have ended, a coherent and complete answer can be formed based on the sequential response segments and displayed in the conversation interface so that the user can understand the complete answer corresponding to the question as a whole.
[0280] It should be noted that, based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0281] based on Figure 2 Corresponding to the question answer display method provided in the embodiments, this application also provides a question answer display device 1400, which includes a first display unit 1401, a second display unit 1402, a third display unit 1403, and a fourth display unit 1404:
[0282] The first display unit 1401 is used to display the target question entered by the target account in the session interface;
[0283] The second display unit 1402 is used to display a response fragment corresponding to the i-th round of answers in the conversation interface during the process of answering the target question in multiple rounds. The response fragment corresponding to the i-th round of answers is a partial answer to the target question.
[0284] The third display unit 1403 is used to display the first interactive content entered by the target account in the conversation interface;
[0285] The fourth display unit 1404 is used to display the answer segment corresponding to the (i+1)th round of answers in the conversation interface if it is determined that the first interactive content indicates that the answer should continue to answer the target question based on the first target answer segment in the i-th round of answers. The answer segment corresponding to the (i+1)th round of answers is a partial answer to the target question and is a continuation of the first target answer segment in the i-th round of answers.
[0286] In one possible implementation, the second display unit is further used for:
[0287] The N corresponding to the i-th round of responses is displayed in the conversation interface. i One answer fragment, N i It is an integer greater than 1;
[0288] The fourth display unit is further configured to, if it is determined that the first interactive content indicates that the answer to the target question should continue based on the first target answer fragment in the i-th round of answering, display the N corresponding to the (i+1)-th round of answering in the conversation interface. i+1 One answer fragment, N i+1 The first target answer segment in the i-th round of responses is an integer greater than 1, where N is the integer greater than 1. i One answer segment from a series of answer segments;
[0289] In each round of responses, different response segments correspond to different content or different versions of the same content.
[0290] In one possible implementation, the third display unit is further configured to:
[0291] In response to an interactive operation performed by the target account on a first target answer fragment in the i-th round of responses, the first target answer fragment in the i-th round of responses is identified as the first interactive content.
[0292] In one possible implementation, the third display unit is further configured to:
[0293] If the N corresponding to the answer in the (i+m)th round is displayed in the conversation interface i+m Following the first response segment, a second interactive element entered through the target account is displayed in the conversation interface. i+m It is an integer greater than 1;
[0294] The fourth display unit is further configured to, if it is determined that the second interactive content indicates a re-answer of the target question based on the second target answer fragment in the i-th round of answering, display the N corresponding to the (i+m+1)-th round of answering in the conversation interface. i+m+1 A response fragment, the N i+m+1 The first answer segment follows from the second target answer segment, N i+m+1 It is an integer greater than 1.
[0295] In one possible implementation, the first display unit is further configured to:
[0296] In response to a settings operation performed through the target account, a screen is displayed to set the number of answers when answering a question in a single round.
[0297] In response to an input operation performed on the answer quantity setting interface, it is determined that the number of answer segments included in each round of answering is the target number N indicated by the input operation.
[0298] In one possible implementation, the third display unit is further configured to:
[0299] In response to an interactive operation performed by the target account on a third target response fragment in the i-th round of responses, the third target response fragment is displayed in an edit box in the conversation interface;
[0300] In response to an editing operation performed in the edit box, the edited third target answer fragment is displayed in the edit box;
[0301] In response to the sending operation performed on the edited third target response fragment, the edited third target response fragment is determined as the first interaction content;
[0302] If it is determined that the first interactive content indicates that the target question should be answered based on the first interactive content, the answer segment corresponding to the (i+1)th round of answer is displayed in the conversation interface, and the answer segment corresponding to the (i+1)th round of answer is a continuation of the first interactive content.
[0303] In one possible implementation, if the target question belongs to a subject-specific question, the answer fragment corresponding to the i-th round of answers is used to indicate the direction of the solution to the target question, and the fourth display unit is further used for:
[0304] If it is determined that the first interactive content indicates that the answer to the target question should continue based on the answer direction indicated by the first target answer fragment in the i-th round of answering, the answer fragment corresponding to the (i+1)-th round of answering is displayed in the conversation interface. The answer fragment corresponding to the (i+1)-th round of answering is used to answer the target question, and the answer fragment corresponding to the (i+1)-th round of answering conforms to the answer direction indicated by the first target answer fragment in the i-th round of answering.
[0305] In one possible implementation, the fourth display unit is further configured to:
[0306] If it is determined that the first interactive content is unrelated to answering the target question, a first prompt message is displayed in the conversation interface. The first prompt message is used to prompt the user to enter interactive content related to answering the target question through the target account.
[0307] The third display unit is further configured to display, in the conversation interface, third interactive content entered through the target account after the first prompt information;
[0308] The fourth display unit is further configured to, if it is determined that the third interactive content indicates that the target question should be answered based on the fourth target answer fragment in the i-th round of answering, display the answer fragment corresponding to the i+1-th round of answering in the conversation interface, wherein the answer fragment corresponding to the i+1-th round of answering is a continuation of the fourth target answer fragment.
[0309] In one possible implementation, the first display unit is further configured to:
[0310] In response to a question switching command entered through the target account, a second prompt message is displayed in the session interface, the second prompt message indicating the end of answering the target question.
[0311] As can be seen from the above technical solution, a multi-round answering method is provided for the target question. Specifically, the answer fragment corresponding to the i-th round of answers is first displayed in the conversation interface. Then, if it is determined that the first interaction content indicates that the user should continue to answer the target question based on the first target answer fragment in the i-th round of answers, since the first interaction content was entered after the i-th round of answers and indicates that the user should continue to answer, it indicates that the user wants to continue to get answers based on the i-th round of answers. At this time, the answer fragment corresponding to the i+1-th round of answers can be displayed in the conversation interface. Among them, the answer fragments of the i-th round of answers and the answer fragments of the i+1-th round of answers are both partial answers to the target question. It can be seen that the process of answering questions is broken down into multiple rounds. Each round of answers displays a partial answer to the user to help the user understand and supports user interaction. The user can provide feedback on the needs based on the previous round of answers by inputting interaction content. If the need is to continue to answer, the next round of answers is conducted, and the first target answer fragment from the previous round of answers specified by the user in the interaction content is displayed in the next round of answers. Obviously, the next round of answers takes into account both the user's interaction and the given answer fragment is a continuation of the previous round of answers. Compared to related technologies that directly provide a complete answer to a question, this application provides an answer gradually during the interaction with the user, guiding the user to understand the question and the given answer step by step, which is conducive to better addressing the user's confusion about the question. Furthermore, the answer segments in each round are sequential, so the gradually presented multi-round answer segments can form a coherent complete answer. This gradual approach also demonstrates the thought process from question to complete answer to the user, which helps to broaden the user's thinking about answering questions.
[0312] based on Figure 3 Corresponding to the question answering method provided in the embodiments, this application also provides a question answering processing device 1500, which includes a receiving unit 1501, a sending unit 1502, and an analysis unit 1503.
[0313] The receiving unit 1501 is used to receive the target question sent by the target account;
[0314] The sending unit 1502 is used to send a response fragment corresponding to the i-th round of answers to the target account during the process of answering the target question in multiple rounds. The response fragment corresponding to the i-th round of answers is used to be displayed in the conversation interface. The conversation interface displays the target question, and the response fragment corresponding to the i-th round of answers is a partial answer to the target question.
[0315] The receiving unit 1501 is also used to receive the first interactive content sent by the target account;
[0316] The analysis unit 1503 is used to analyze the first interactive content and obtain a first analysis result;
[0317] The sending unit 1502 is further configured to send a response segment corresponding to the (i+1)th round of answers to the target account if the first analysis result indicates that the target question should be answered based on the first target response segment in the i-th round of answers. The response segment corresponding to the (i+1)th round of answers is used to be displayed in the conversation interface. The response segment corresponding to the (i+1)th round of answers is a partial answer to the target question and is a continuation of the first target response segment in the i-th round of answers.
[0318] In one possible implementation, the apparatus further includes a generation unit, the generation unit being used for:
[0319] If i = 1, generate the answer fragment corresponding to the first round of answers based on the target question;
[0320] If i is greater than 1, the target question and the first target answer fragments corresponding to the answers in the previous i-1 rounds are spliced together to obtain the spliced data corresponding to the answer in the i-th round.
[0321] Based on the spliced data corresponding to the i-th round of responses, generate the response fragment corresponding to the i-th round of responses.
[0322] In one possible implementation, if the i-th round of responses includes N i One answer fragment, N i The receiving unit is further configured to: be an integer greater than 1.
[0323] If the N corresponding to the (i+m)th round of responses is sent to the target account i+m Following the first response fragment, a second interactive message was received from the target account, N. i+m It is an integer greater than 1;
[0324] The analysis unit is also used to analyze the second interactive content to obtain a second analysis result;
[0325] The generation unit is also used for:
[0326] If the second analysis result indicates that the target question should be reanswered based on the second target answer segment in the i-th round of answering, the second target answer segment is redefined as the first target answer segment corresponding to the i-th round of answering;
[0327] From the spliced data corresponding to the (i+m)th round of answers, remove the first target answer segments corresponding to the (i+1)th round of answers to the (i+m-1)th round of answers respectively, to obtain the spliced data corresponding to the (i+m+1)th round of answers;
[0328] Based on the concatenated data corresponding to the (i+m+1)th round of responses, generate N corresponding to the (i+m+1)th round of responses. i+m+1 A response fragment, the N i+m+1 The first answer segment follows from the second target answer segment, N i+m+1 It is an integer greater than 1;
[0329] The sending unit is also configured to send the N to the target account. i+m+1 A fragment of an answer;
[0330] In each round of responses, different response segments correspond to different content or different versions of the same content.
[0331] In one possible implementation, the generating unit is further configured to:
[0332] If i=1, call the transformation interface of the large model to transform the target problem and obtain the transformed target problem;
[0333] Based on the transformed target question, the large model generates the corresponding answer fragment for the first round of answers.
[0334] If i is greater than 1, the splicing interface of the large model is called to splice the transformed target question and the first target answer fragments corresponding to the first i-1 rounds of answers to obtain the spliced data corresponding to the i-th round of answers.
[0335] Based on the spliced data corresponding to the i-th round of responses, the large model generates the response fragment corresponding to the i-th round of responses.
[0336] In one possible implementation, if the target question is answered in multiple rounds using a large model, the generation unit is further configured to:
[0337] During the i-th round of answering using the large model, if the last character in the generated answer content matches the target character for the first time, the i-th round of answering ends, and the answer content corresponding to the end is determined as the answer fragment corresponding to the i-th round of answering. The target character is one of multiple separators.
[0338] In one possible implementation, if the i-th round of responses includes N i One answer fragment, N i For integers greater than 1, the analysis unit is further used for:
[0339] If the first interactive content hits the N iThe first target answer segment in the i-th round of answers is determined, and the first analysis result indicates that the target question should be answered based on the first target answer segment in the i-th round of answers.
[0340] If the semantic indication of the first interactive content is in N i Based on the first target answer segment in the i-th round of answers, continue to answer the target question, and determine that the first analysis result indicates that the target question should be answered based on the first target answer segment in the i-th round of answers;
[0341] If the first interactive content does not match the N i A response fragment, and the semantic indication of the first interaction content to continue answering the target question based on the first interaction content, determine that the first analysis result indicates to continue answering the target question based on the first interaction content;
[0342] If the semantics of the first interactive content are irrelevant to answering the target question, it is determined that the first analysis result indicates that the first interactive content is irrelevant to answering the target question;
[0343] The generation unit is further configured to, if the first analysis result indicates that the target question should be answered based on the first interaction content, generate N corresponding to the (i+1)th round of answering, based on the target question and the first interaction content. i+1 A response fragment is sent to the target account, along with N responses corresponding to the (i+1)th round of responses. i+1 A response fragment, the N i+1 Each answer segment follows from the first interactive content, N i+1 It is an integer greater than 1;
[0344] The sending unit is further configured to send a first prompt message to the target account if the first analysis result indicates that the first interactive content is unrelated to answering the target question; the first prompt message is used to prompt the target account to input interactive content related to answering the target question.
[0345] In each round of responses, different response segments correspond to different content or different versions of the same content.
[0346] As can be seen from the above technical solution, the multi-round answering method provided in this application is a method of gradually providing answers during user interaction. Specifically, it first provides the answer fragment corresponding to the i-th round of answers to assist the user's understanding. Furthermore, the user can directly participate in the question-and-answer process, thereby intervening in or influencing the answer fragment provided in the next round. Specifically, after obtaining the i-th round of answers, the user can input the first interactive content. Correspondingly, the user's needs can be analyzed based on the first interactive content. If the needs are to continue answering based on the first target answer fragment in the i-th round of answers, then the answer fragment corresponding to the (i+1)-th round of answers is provided to assist the user's continued understanding. Based on this, guiding the user to gradually understand the question and the given answers is beneficial for better addressing the user's confusion regarding the question and expanding the user's thinking about answering questions.
[0347] This application also provides a computer device, which can be a terminal, taking a smartphone as an example:
[0348] Figure 16 The diagram shown is a block diagram of a portion of the structure of a smartphone provided in an embodiment of this application. (Reference) Figure 16 The smartphone includes components such as a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a Wi-Fi module 1170, a processor 1180, and a power supply 1190. The input unit 1130 may include a touch panel 1131 and other input devices 1132, the display unit 1140 may include a display panel 1141, and the audio circuit 1160 may include a speaker 1161 and a microphone 1162. Those skilled in the art will understand that... Figure 16 The smartphone structure shown does not constitute a limitation on smartphones and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0349] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functions and data processing of the smartphone by running the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the smartphone (such as audio data, phonebook, etc.). In addition, the memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0350] The processor 1180 is the control center of the smartphone, connecting various parts of the smartphone via various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 1120 and calling data stored in the memory 1120. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1180.
[0351] In this embodiment, the processor 1180 in the smartphone can perform the following steps:
[0352] Display the target question entered through the target account in the chat interface;
[0353] During the process of answering the target question in multiple rounds, the answer fragment corresponding to the i-th round of answer is displayed in the conversation interface. The answer fragment corresponding to the i-th round of answer is a partial answer to the target question.
[0354] The first interactive content entered through the target account is displayed in the conversation interface;
[0355] If it is determined that the first interactive content indicates that the target question should be answered based on the first target answer fragment in the i-th round of answering, the answer fragment corresponding to the i+1-th round of answering is displayed in the conversation interface. The answer fragment corresponding to the i+1-th round of answering is a partial answer to the target question and is a continuation of the first target answer fragment in the i-th round of answering.
[0356] The computer device provided in this application embodiment can also be a server. Please refer to [link / reference]. Figure 17 As shown, Figure 17This is a structural diagram of a server 1200 provided in an embodiment of this application. The server 1200 can vary significantly due to different configurations or performance. It may include one or more processors, such as a Central Processing Unit (CPU) 1222, and a memory 1232, and one or more storage media 1230 (e.g., one or more mass storage devices) for storing application programs 1242 or data 1244. The memory 1232 and storage media 1230 can be temporary or persistent storage. The program stored in the storage media 1230 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1222 may be configured to communicate with the storage media 1230 and execute the series of instruction operations in the storage media 1230 on the server 1200.
[0357] Server 1200 may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input / output interfaces 1258, and / or one or more operating systems 1241, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0358] In this embodiment, the central processing unit 1222 in server 1200 can perform the following steps:
[0359] Receive the target question sent by the target account;
[0360] During the process of answering the target question in multiple rounds, the answer fragment corresponding to the i-th round of answer is sent to the target account. The answer fragment corresponding to the i-th round of answer is used to display in the conversation interface, which displays the target question. The answer fragment corresponding to the i-th round of answer is a partial answer to the target question.
[0361] Receive the first interactive content sent by the target account;
[0362] The first interactive content is analyzed to obtain the first analysis result;
[0363] If the first analysis result indicates that the target question should be answered based on the first target answer fragment in the i-th round of answers, the answer fragment corresponding to the (i+1)-th round of answers is sent to the target account. The answer fragment corresponding to the (i+1)-th round of answers is used to display in the conversation interface. The answer fragment corresponding to the (i+1)-th round of answers is a partial answer to the target question and is a continuation of the first target answer fragment in the i-th round of answers.
[0364] According to one aspect of this application, a computer-readable storage medium is provided for storing a computer program that, when executed by a computer device, causes the computer device to perform the question answer display method and the question answer processing method described in the foregoing embodiments.
[0365] According to one aspect of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the methods provided in various optional implementations of the above embodiments.
[0366] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.
[0367] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0368] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0369] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0370] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0371] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0372] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0373] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for displaying answers to a question, characterized in that, The method includes: Display the target question entered through the target account in the chat interface; During the process of answering the target question in multiple rounds, the answer fragment corresponding to the i-th round of answer is displayed in the conversation interface. The answer fragment corresponding to the i-th round of answer is a partial answer to the target question. The first interactive content entered through the target account is displayed in the conversation interface; If it is determined that the first interactive content indicates that the target question should be answered based on the first target answer fragment in the i-th round of answering, the answer fragment corresponding to the i+1-th round of answering is displayed in the conversation interface. The answer fragment corresponding to the i+1-th round of answering is a partial answer to the target question and is a continuation of the first target answer fragment in the i-th round of answering.
2. The method according to claim 1, characterized in that, The step of displaying the answer fragment corresponding to the i-th round of responses in the conversation interface includes: The N corresponding to the i-th round of responses is displayed in the conversation interface. i One answer fragment, N i It is an integer greater than 1; If it is determined that the first interaction content indicates that the answer to the target question should continue based on the first target answer fragment in the i-th round of answers, the answer fragment corresponding to the (i+1)-th round of answers is displayed in the conversation interface, including: If it is determined that the first interaction content indicates that the target question should be answered based on the first target answer fragment in the i-th round of response, then N corresponding to the (i+1)-th round of response is displayed in the conversation interface. i+1 One answer fragment, N i+1 The first target answer segment in the i-th round of responses is an integer greater than 1, where N is the integer greater than 1. i One answer segment from a series of answer segments; In each round of responses, different response segments correspond to different content or different versions of the same content.
3. The method according to claim 2, characterized in that, The method further includes: In response to an interactive operation performed by the target account on a first target answer fragment in the i-th round of responses, the first target answer fragment in the i-th round of responses is identified as the first interactive content.
4. The method according to claim 2, characterized in that, The method further includes: If the N corresponding to the answer in the (i+m)th round is displayed in the conversation interface i+m Following the first response segment, a second interactive element entered through the target account is displayed in the conversation interface. i+m It is an integer greater than 1; If it is determined that the second interaction content indicates a re-answer of the target question based on the second target answer fragment in the i-th round of response, then N corresponding to the i+m+1-th round of response is displayed in the conversation interface. i+m+1 A response fragment, the N i+m+1 The first answer segment follows from the second target answer segment, N i+m+1 It is an integer greater than 1.
5. The method according to claim 2, characterized in that, The method further includes: In response to a settings operation performed through the target account, a screen is displayed to set the number of answers when answering a question in a single round. In response to an input operation performed on the answer quantity setting interface, it is determined that the number of answer segments included in each round of answering is the target number N indicated by the input operation.
6. The method according to claim 1, characterized in that, The method further includes: In response to an interactive operation performed by the target account on a third target response fragment in the i-th round of responses, the third target response fragment is displayed in an edit box in the conversation interface; In response to an editing operation performed in the edit box, the edited third target answer fragment is displayed in the edit box; In response to the sending operation performed on the edited third target response fragment, the edited third target response fragment is determined as the first interaction content; If it is determined that the first interactive content indicates that the target question should be answered based on the first interactive content, the answer segment corresponding to the (i+1)th round of answer is displayed in the conversation interface, and the answer segment corresponding to the (i+1)th round of answer is a continuation of the first interactive content.
7. The method according to claim 1, characterized in that, If the target question belongs to a subject-specific question, the answer fragment corresponding to the i-th round of answers is used to indicate the direction of the solution to the target question. If it is determined that the first interaction content indicates to continue answering the target question based on the first target answer fragment in the i-th round of answers, the answer fragment corresponding to the (i+1)-th round of answers is displayed in the conversation interface, including: If it is determined that the first interactive content indicates that the answer to the target question should continue based on the answer direction indicated by the first target answer fragment in the i-th round of answering, the answer fragment corresponding to the (i+1)-th round of answering is displayed in the conversation interface. The answer fragment corresponding to the (i+1)-th round of answering is used to answer the target question, and the answer fragment corresponding to the (i+1)-th round of answering conforms to the answer direction indicated by the first target answer fragment in the i-th round of answering.
8. The method according to claim 1, characterized in that, The method further includes: If it is determined that the first interactive content is unrelated to answering the target question, a first prompt message is displayed in the conversation interface. The first prompt message is used to prompt the user to enter interactive content related to answering the target question through the target account. If, after the first prompt message, third interactive content entered through the target account is displayed in the conversation interface; If it is determined that the third interactive content indicates that the target question should be answered based on the fourth target answer fragment in the i-th round of answering, the answer fragment corresponding to the (i+1)-th round of answering is displayed in the conversation interface, and the answer fragment corresponding to the (i+1)-th round of answering is a continuation of the fourth target answer fragment.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: In response to a question switching command entered through the target account, a second prompt message is displayed in the session interface, the second prompt message indicating the end of answering the target question.
10. A method for processing the answer to a question, characterized in that, The method includes: Receive the target question sent by the target account; During the process of answering the target question in multiple rounds, the answer fragment corresponding to the i-th round of answer is sent to the target account. The answer fragment corresponding to the i-th round of answer is used to display in the conversation interface, which displays the target question. The answer fragment corresponding to the i-th round of answer is a partial answer to the target question. Receive the first interactive content sent by the target account; The first interactive content is analyzed to obtain the first analysis result; If the first analysis result indicates that the target question should be answered based on the first target answer fragment in the i-th round of answers, the answer fragment corresponding to the (i+1)-th round of answers is sent to the target account. The answer fragment corresponding to the (i+1)-th round of answers is used to display in the conversation interface. The answer fragment corresponding to the (i+1)-th round of answers is a partial answer to the target question and is a continuation of the first target answer fragment in the i-th round of answers.
11. The method according to claim 10, characterized in that, The method further includes: If i = 1, generate the answer fragment corresponding to the first round of answers based on the target question; If i is greater than 1, the target question and the first target answer fragments corresponding to the answers in the previous i-1 rounds are spliced together to obtain the spliced data corresponding to the answer in the i-th round. Based on the spliced data corresponding to the i-th round of responses, generate the response fragment corresponding to the i-th round of responses.
12. The method according to claim 11, characterized in that, If the i-th round of answers includes N i One answer fragment, N i The method further includes: (where the integer is greater than 1) If the N corresponding to the (i+m)th round of responses is sent to the target account i+m Following the first response fragment, a second interactive message was received from the target account, N. i+m It is an integer greater than 1; The second interaction content is analyzed to obtain the second analysis result; If the second analysis result indicates that the target question should be reanswered based on the second target answer segment in the i-th round of answering, the second target answer segment is redefined as the first target answer segment corresponding to the i-th round of answering; From the spliced data corresponding to the (i+m)th round of answers, remove the first target answer segments corresponding to the (i+1)th round of answers to the (i+m-1)th round of answers respectively, to obtain the spliced data corresponding to the (i+m+1)th round of answers; Based on the concatenated data corresponding to the (i+m+1)th round of responses, generate N corresponding to the (i+m+1)th round of responses. i+m+1 A response fragment, the N i+m+1 The first answer segment follows from the second target answer segment, N i+m+1 It is an integer greater than 1; Send the N to the target account i+m+1 A fragment of an answer; In each round of responses, different response segments correspond to different content or different versions of the same content.
13. The method according to claim 11, characterized in that, If i = 1, the answer fragment corresponding to the first round of answers is generated based on the target question, including: If i=1, call the transformation interface of the large model to transform the target problem and obtain the transformed target problem; Based on the transformed target question, the large model generates the corresponding answer fragment for the first round of answers. If i is greater than 1, the target question and the first target answer segments corresponding to the answers in the previous i-1 rounds are concatenated to obtain the concatenated data corresponding to the answer in the i-th round, including: If i is greater than 1, the splicing interface of the large model is called to splice the transformed target question and the first target answer fragments corresponding to the first i-1 rounds of answers to obtain the spliced data corresponding to the i-th round of answers. The step of generating the answer fragment corresponding to the i-th round of answers based on the spliced data corresponding to the i-th round of answers includes: Based on the spliced data corresponding to the i-th round of responses, the large model generates the response fragment corresponding to the i-th round of responses.
14. The method according to claim 10, characterized in that, If the target question is answered in multiple rounds using a large model, the method further includes: During the i-th round of answering using the large model, if the last character in the generated answer content matches the target character for the first time, the i-th round of answering ends, and the answer content corresponding to the end is determined as the answer fragment corresponding to the i-th round of answering. The target character is one of multiple separators.
15. The method according to claim 10, characterized in that, If the i-th round of answers includes N i One answer fragment, N i If the integer is greater than 1, the analysis of the first interaction content to obtain the first analysis result includes one of the following: If the first interactive content hits the N i The first target answer segment in the i-th round of answers is determined, and the first analysis result indicates that the target question should be answered based on the first target answer segment in the i-th round of answers. If the semantic indication of the first interactive content is in N i Based on the first target answer segment in the i-th round of answers, continue to answer the target question, and determine that the first analysis result indicates that the target question should be answered based on the first target answer segment in the i-th round of answers; If the first interactive content does not match the N i A response fragment, and the semantic indication of the first interaction content to continue answering the target question based on the first interaction content, determine that the first analysis result indicates to continue answering the target question based on the first interaction content; If the semantics of the first interactive content are irrelevant to answering the target question, it is determined that the first analysis result indicates that the first interactive content is irrelevant to answering the target question; The method further includes: If the first analysis result indicates that the target question should be answered based on the first interaction content, then N corresponding to the answer in the (i+1)th round is generated according to the target question and the first interaction content. i+1 A response fragment is sent to the target account, along with N responses corresponding to the (i+1)th round of responses. i+1 A response fragment, the N i+1 Each answer segment follows from the first interactive content, N i+1 It is an integer greater than 1; If the first analysis result indicates that the first interactive content is unrelated to answering the target question, a first prompt message is sent to the target account. The first prompt message is used to prompt the target account to input interactive content related to answering the target question. In each round of responses, different response segments correspond to different content or different versions of the same content.
16. A device for displaying the answer to a question, characterized in that, The device includes a first display unit, a second display unit, a third display unit, and a fourth display unit: The first display unit is used to display the target question entered by the target account in the session interface; The second display unit is used to display a fragment of the answer corresponding to the i-th round of the response in the conversation interface during the process of answering the target question in multiple rounds. The fragment of the answer corresponding to the i-th round of the response is a partial answer to the target question. The third display unit is used to display the first interactive content entered by the target account in the conversation interface; The fourth display unit is used to display the answer segment corresponding to the (i+1)th round of answers in the conversation interface if it is determined that the first interactive content indicates that the answer should continue to answer the target question based on the first target answer segment in the i-th round of answers. The answer segment corresponding to the (i+1)th round of answers is a partial answer to the target question and is a continuation of the first target answer segment in the i-th round of answers.
17. A question answering processing device, characterized in that, The device includes a receiving unit, a transmitting unit, and an analysis unit: The receiving unit is used to receive the target question sent by the target account; The sending unit is used to send a response fragment corresponding to the i-th round of answers to the target account during the process of answering the target question in multiple rounds. The response fragment corresponding to the i-th round of answers is used to be displayed in the conversation interface, which displays the target question. The response fragment corresponding to the i-th round of answers is a partial answer to the target question. The receiving unit is also configured to receive the first interactive content sent by the target account; The analysis unit is used to analyze the first interactive content and obtain a first analysis result; The sending unit is further configured to send a response segment corresponding to the (i+1)th round of answers to the target account if the first analysis result indicates that the target question should be answered based on the first target response segment in the i-th round of answers. The response segment corresponding to the (i+1)th round of answers is used to be displayed in the conversation interface. The response segment corresponding to the (i+1)th round of answers is a partial answer to the target question and is a continuation of the first target response segment in the i-th round of answers.
18. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs and to transfer the computer programs to the processor; The processor is configured to execute the method according to any one of claims 1-15 according to instructions in the computer program.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by a computer device, causes the computer device to perform the method according to any one of claims 1-15.
20. A computer program product, comprising a computer program, characterized in that, When it is run on a computer device, it causes the computer device to perform the method according to any one of claims 1-15.