Interaction system, question and answer processing method and computer readable storage medium

By using multi-device collaborative processing and leveraging guided phrases and state libraries for large language model responses, the problem of improving response accuracy without compromising user privacy is solved, achieving efficient and accurate question-and-answer processing.

CN121765034APending Publication Date: 2026-03-31HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

How can we improve the accuracy of large language model responses without compromising user privacy, especially when handling issues on terminal devices?

Method used

Question-and-answer processing is performed through multi-device collaboration. The first device sends a question to the second device to generate an initial response outline. The second device performs reasoning based on the guiding phrase and state library. The first device generates a detailed response based on the content and response outline, ensuring that user privacy is not compromised.

Benefits of technology

It improved the accuracy and efficiency of responses, reduced the risk of user privacy leaks, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121765034A_ABST
    Figure CN121765034A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of terminals, and particularly relates to an interaction system, a question and answer processing method and a computer readable storage medium. Question and answer processing can be carried out in a multi-device cooperation mode. When question and answer processing is carried out through cooperation of multiple devices, the first device can only send the first question to be processed to the second device, and does not need to send the first content related to user privacy to the second device, and leakage of the user privacy content can be avoided. The first large language model in the second device can accurately infer the reply outline corresponding to the first question according to the first question, the duration of each processing of the second device can be reduced, and the throughput of the second device is improved. The first device can process the first question through the second large language model based on the first content and the first reply outline to obtain the first target reply corresponding to the first question, so that the first target reply is determined based on the first reply outline, and the accuracy of the first target reply can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of terminal technology, and in particular relates to an interactive system, a question-and-answer processing method, a first device, a second device, and a computer-readable storage medium. Background Technology

[0002] A large language model (LLM) is a natural language processing model with over a billion parameters, serving as the core of applications such as intelligent question answering or intelligent assistants. Users or the system can input questions, and the LLM can output corresponding responses. To improve the accuracy of the LLM's responses, users or the system can add a chain of thoughts (CoT) such as "step by step" after the question to guide the LLM to elaborate on the details, enabling it to output responses containing more detailed information.

[0003] While CoT bootstrapping can improve the accuracy of large language model responses, it requires access to relevant content on the terminal device, which typically includes information involving user privacy. Currently, large language models generally run on servers provided by the application provider. Uploading user privacy-related content to these servers for processing by the large language model could lead to the leakage of such content. Therefore, how to improve the accuracy of large language model responses without disclosing user privacy has become a pressing issue for those skilled in the art. Summary of the Invention

[0004] This application provides an interactive system, a question-and-answer processing method, and a computer-readable storage medium, which can improve the accuracy of responses without disclosing user privacy.

[0005] In a first aspect, embodiments of this application provide an interactive system, which includes a first device and a second device;

[0006] The first device is configured to acquire a first question and send the first question to the second device;

[0007] The second device is configured to receive the first question, process the first question using a first language model to obtain a first response outline corresponding to the first question, and send the first response outline to the first device.

[0008] The first device is further configured to acquire first content, and based on the first content and the first response outline, process the first question through a second language model to obtain a first target response corresponding to the first question.

[0009] In the aforementioned interactive system, question-and-answer processing can be performed through multi-device collaboration. When processing questions and answers collaboratively across multiple devices, the first device can send only the first question to be processed to the second device, without needing to send the first content generated on the first device. This avoids sending content involving user privacy, preventing the leakage of user privacy information. The first language model in the second device can accurately infer the corresponding response outline based solely on the first question, reducing the processing time for each iteration and increasing the throughput of the second device. Meanwhile, the first device can obtain the first content generated on its own device and, based on the first content and the first response outline, process the first question using the second language model to obtain the first target response. Accurately determining the first target response based on the first response outline improves the accuracy of the first target response and enhances the user experience. In other words, question processing through multi-device collaboration can improve the accuracy of responses without leaking user privacy information.

[0010] In one possible implementation, the second device stores a bootstrap phrase library and a state library, the bootstrap phrase library including a first bootstrap phrase and the state library including a first state;

[0011] The second device is further configured to determine a second guiding phrase from the guiding phrase library based on the first question, and to determine a second state from the state library based on the first question, wherein the second guiding phrase includes one or more of the first guiding phrases, and the second state includes one or more of the first states;

[0012] The second device is further configured to obtain a first input text based on the second guiding phrase, the second state, the first question, and the first thought chain guiding prompt, and input the first input text into the first large language model for processing to obtain the first response outline output by the first large language model. The first thought chain guiding prompt is used to guide the first large language model to reason about the response outline for the first question.

[0013] Wherein, the first response outline includes a third guiding phrase, or the first response outline includes the third guiding phrase and a third state, wherein the third guiding phrase includes one or more of the second guiding phrases, and the third state includes one or more of the second states.

[0014] In the system provided by this implementation, the first response outline may include guiding phrases, or guiding phrases and states, corresponding to each response step. The first thought chain guidance prompt can be used to guide the first language model in the second device to perform reasoning based on guiding phrases and states. This allows the first language model to perform reasoning based solely on guiding phrases, or guiding phrases and states, reducing the number of characters required for each reasoning iteration and shortening the reasoning time. This not only improves the reasoning speed of the first language model but also increases its throughput.

[0015] In addition, the second device can determine the guiding phrase (i.e., the second guiding phrase) that may be used in the response steps of the first question from a preset guiding phrase library, and can determine the state (i.e., the second state) that may be used in the response steps of the first question from a preset state library. This allows the first language model in the second device to process the first question based only on the second guiding phrase and the second state, and can quickly obtain the first response outline corresponding to the first question, thereby improving the reasoning speed and efficiency of the first response outline.

[0016] In another possible implementation, the second device stores a guide phrase library and a state library, the guide phrase library including a first guide phrase and a first identifier corresponding to the first guide phrase, and the state library including a first state and a second identifier corresponding to the first state;

[0017] The second device is further configured to determine a second guiding phrase from the guiding phrase library based on the first question, and determine a first identifier corresponding to the second guiding phrase; and to determine a second state from the state library based on the first question, and determine a second identifier corresponding to the second state.

[0018] The second device is further configured to obtain a second input text based on the second guiding phrase and the first identifier corresponding to the second guiding phrase, the second state and the second identifier corresponding to the second state, the first question, and the second thought chain guidance prompt, and input the second input text into the first large language model for processing to obtain the first reply outline output by the first large language model. The second thought chain guidance prompt is used to guide the first large language model to reason about the reply identifier of the first question.

[0019] Wherein, the first response outline includes a first identifier corresponding to the third guiding phrase, or the first response outline includes a first identifier corresponding to the third guiding phrase and a second identifier corresponding to the third state, wherein the third guiding phrase includes one or more of the second guiding phrases, and the third state includes one or more of the second states.

[0020] In the system provided by this implementation, the first response outline may include identifiers of guiding phrases corresponding to each response step (i.e., first identifiers, or step identifiers), or identifiers of guiding phrases and status (i.e., second identifiers, or status identifiers). The second thought chain guidance prompt can be used to guide the first language model in reasoning about the identifiers of guiding phrases and status, so that the first language model only needs to reason about the identifiers of guiding phrases, or the identifiers of guiding phrases and status. This reduces the number of characters in each reasoning iteration of the first language model and shortens the reasoning time for each iteration, thereby improving both the reasoning speed and throughput of the first language model.

[0021] In addition, the second device can determine the guiding phrase (i.e., the second guiding phrase) and identifier (i.e., the first identifier) ​​that may be used in the response steps corresponding to the first question from a preset guiding phrase library. It can also determine the state (i.e., the second state) and identifier (i.e., the second identifier) ​​that may be used in the response steps corresponding to the first question from a preset state library. This allows the first language model in the second device to process the first question based on the second guiding phrase and the identifier corresponding to the second guiding phrase, as well as the identifier of the second state. This enables the first response outline corresponding to the first question to be obtained quickly, thereby improving the reasoning speed and efficiency of the first response outline.

[0022] In one possible implementation, the first device is further configured to acquire the second guiding phrase and the second state, obtain a third input text based on the second guiding phrase, the second state, the first content, the first question, and the third thought chain guiding prompt, and process the third input text through the second large language model based on the first reply outline to obtain a first target reply corresponding to the first question, wherein the third thought chain guiding prompt is used to guide the second large language model to reason about a detailed reply to the first question.

[0023] In the system provided by this implementation, the first device can obtain the guiding phrase (i.e., the second guiding phrase) and state (i.e., the second state) used by the second device to determine the first response outline. The first device can process the first question based on the second guiding phrase, the second state, and the first response outline through the second language model in the first device to obtain a detailed first target response corresponding to the first question. The reasoning of the first target response can be performed based on the same guiding phrase and the same state used in the first response outline, which can improve the reasoning speed and accuracy of the first target response.

[0024] In another possible implementation, the first device is further configured to obtain a fourth input text based on the first content, the first question, and the third thought chain guidance prompt, and process the fourth input text through the second major language model based on the first reply outline to obtain a first target reply corresponding to the first question, wherein the third thought chain guidance prompt is used to guide the second major language model to reason about a detailed reply to the first question.

[0025] In the system provided by this implementation, the second language model in the first device can also perform reasoning for the first target response without using guiding phrases and states.

[0026] In another possible implementation, the first device stores a guide phrase library and a state library, the guide phrase library including a first guide phrase and the state library including a first state;

[0027] The first device is further configured to determine a fourth guiding phrase from the guiding phrase library based on the first question and / or the first content, and to determine a fourth state from the state library based on the first question and / or the first content, wherein the fourth guiding phrase includes one or more of the first guiding phrases, and the fourth state includes one or more of the first states;

[0028] The first device is further configured to obtain a fifth input text based on the fourth guiding phrase, the fourth state, the first content, the first question, and the third thought chain guiding prompt, and to process the fifth input text through the second major language model based on the first reply outline to obtain a first target reply corresponding to the first question. The third thought chain guiding prompt is used to guide the second major language model to reason about a detailed reply to the first question.

[0029] In the system provided by this implementation, the first device can store a preset guiding phrase library and a state library. The guiding phrase library in the first device is the same as the guiding phrase library in the second device, and the state library in the first device is the same as the state library in the second device. The first device can determine, from the preset guiding phrase library, the guiding phrase (i.e., the fourth guiding phrase) that may be used in the response step corresponding to the first question based on the first question and / or the first content, and determine, from the preset state library, the state (i.e., the fourth state) that may be used in the response step corresponding to the first question based on the first question and / or the first content. This allows the second language model in the first device to process the first question based on the fourth guiding phrase, the fourth state, and the first response outline, quickly obtaining the first target response corresponding to the first question and improving the inference speed and efficiency of the first target response.

[0030] In one possible implementation, the first response outline includes one or more third guide phrases or a first identifier corresponding to each of the third guide phrases;

[0031] The first device is further configured to, when processing the first question through the second language model, obtain a fifth guiding phrase corresponding to the first response step derived by the second language model; wherein the first response step is a response step in the first target response;

[0032] The first device is further configured to, for the first response step, determine a sixth guiding phrase corresponding to the first response step based on the first response outline, wherein the sixth guiding phrase is one of the third guiding phrases;

[0033] The first device is further configured to, when it is determined that the fifth guiding phrase corresponding to the first response step and the sixth guiding phrase do not meet the first preset condition, adjust the fifth guiding phrase corresponding to the first response step according to the sixth guiding phrase, and adjust the first response step according to the adjusted fifth guiding phrase through the second large language model.

[0034] It should be understood that the first presupposition condition can be that the fifth guiding phrase and the sixth guiding phrase are the same. Specifically, the consistency between the fifth and sixth guiding phrases can mean that the fifth and sixth guiding phrases are identical; or, it can mean that the keywords contained in the fifth guiding phrase and the keywords contained in the sixth guiding phrase are the same.

[0035] In the system provided by this implementation, during the reasoning process of the second language model in the first device for the first target response, the first device can acquire the content of each response step inferred by the second language model in real time, such as acquiring the guiding phrase corresponding to each response step. For each response step, the first device can determine whether the guiding phrase inferred by the second language model for that response step is accurate based on the guiding phrase corresponding to the first response outline, that is, whether the guiding phrase inferred by the second language model for that response step is consistent with the guiding phrase corresponding to the first response outline. When it is determined that the guiding phrase inferred by the second language model for that response step is inaccurate, that is, when it is determined that the guiding phrase inferred by the second language model for that response step is inconsistent with the guiding phrase corresponding to the first response outline, the first device can adjust the guiding phrase inferred by the second language model for that response step based on the guiding phrase corresponding to the first response outline to ensure the accuracy of the guiding phrase inferred by the second language model. This allows the second language model to continue reasoning based on the adjusted and accurate guiding phrase, thereby improving the accuracy of each response step and the accuracy of the first target response.

[0036] In another possible implementation, the first device is further configured to output the adjusted fifth guiding phrase after adjusting the fifth guiding phrase corresponding to the first response step according to the sixth guiding phrase through the second large language model.

[0037] In the system provided by this implementation, when performing question-and-answer processing based on user interaction, for each response step of the second language model inference, when it is necessary to adjust the response step based on the first response outline, the first device can output the corresponding guiding phrase for that response step after determining that the guiding phrase is adjusted, i.e., after confirming that the guiding phrase is accurate, to improve the interactive experience. Specifically, when outputting the guiding phrase for that response step, the characters in the guiding phrase can be output at certain intervals, achieving a smooth response interval effect and improving the user experience.

[0038] In another possible implementation, the first response outline includes one or more third states or a second identifier corresponding to each of the third states;

[0039] The first device is further configured to, when processing the first question through the second language model, obtain a fifth state corresponding to the first response step derived by the second language model; wherein the first response step is a response step in the first target response;

[0040] The first device is further configured to, for the first response step, determine a sixth state corresponding to the first response step based on the first response outline, wherein the sixth state is one of the third states;

[0041] The first device is further configured to adjust the current state of the first device according to the sixth state when it is determined that the fifth state corresponding to the first response step and the sixth state do not meet the second preset condition; and when it is determined that the current state of the first device is adjusted to the sixth state, adjust the first response step according to the sixth state through the second large language model.

[0042] It should be understood that the second presupposition condition can be that the fifth state and the sixth state are consistent. Here, "the fifth state and the sixth state are consistent" can mean that the fifth state and the sixth state are identical; or it can mean that the keywords contained in the fifth state and the keywords contained in the sixth state are the same.

[0043] In the system provided by this implementation, during the reasoning process of the second language model in the first device for the first target response, the first device can acquire the content of each response step inferred by the second language model in real time. For response steps with existing states, the first device can determine whether the state inferred by the second language model for that response step is accurate based on the state corresponding to the first response outline, that is, whether the state inferred by the second language model for that response step is consistent with the state corresponding to the first response outline. When it is determined that the state inferred by the second language model for that response step is inaccurate, that is, when it is determined that the state inferred by the second language model for that response step is inconsistent with the state corresponding to the first response outline, the first device can adjust the state inferred by the second language model for that response step based on the state corresponding to the first response outline, thereby improving the accuracy of the state inferred by the second language model, improving the accuracy of each response step, and thus improving the accuracy of the first target response.

[0044] In other words, for each response step, when the second language model infers the response step, the first device can determine whether the guiding phrase inferred by the second language model is accurate based on the first response outline. If the guiding phrase inferred by the second language model is determined to be inaccurate, the first device can adjust the guiding phrase inferred by the second language model based on the guiding phrase corresponding to the first response outline. For response steps with an existing state, after adjusting the guiding phrase or if the guiding phrase inferred by the second language model is determined to be accurate, the first device can continue to determine whether the state inferred by the second language model is accurate. If the state inferred by the second language model is determined to be inaccurate, the first device can adjust the state inferred by the second language model based on the state corresponding to the first response outline, so that the second language model can infer accurate response steps, thereby improving the accuracy of the first target response output by the second language model and enhancing the user experience.

[0045] In one possible implementation, the first device is further configured to determine whether the first question contains sensitive content after obtaining the first question; when it is determined that the first question contains sensitive content, the sensitive content is desensitized, and the desensitized first question is sent to the second device.

[0046] In the system provided by this implementation, after the first device obtains the first question, if it determines that the first question involves sensitive content, the first device can perform desensitization processing on the first question, so that the first question sent by the first device to the second device is a question that does not involve sensitive content such as user privacy, thereby avoiding leakage of user privacy.

[0047] In one possible implementation, the first response outline includes a first identifier corresponding to the third guiding phrase, or includes the first identifier corresponding to the third guiding phrase and a second identifier corresponding to the third state;

[0048] The second device is further configured to determine the first outline identifier corresponding to the first response outline, associate and save the first question with the first outline identifier, and associate the first outline identifier with the first identifier corresponding to the third guiding phrase, or associate the first outline identifier with the first identifier corresponding to the third guiding phrase and the second identifier corresponding to the third state.

[0049] In one example, the first device is also used to obtain a second question and send the second question to the second device;

[0050] The second device is further configured to determine a second outline identifier corresponding to the second question based on the second question and the first question associated with the first outline identifier, use the second outline identifier as the second response outline corresponding to the second question, and send the second response outline to the first device, wherein the second outline identifier is one of the first outline identifiers;

[0051] The first device is further configured to acquire second content, and based on the second content and the second response outline, process the second question through a second language model to obtain the second target response corresponding to the second question.

[0052] In the system provided by this implementation, after the second device infers the response outline (e.g., the first response outline) corresponding to a certain question (e.g., the first question), the second device can save the association between the first response outline and the first question; or, the second device can determine the outline identifier corresponding to the first response outline and save the association between the outline identifier and the first question, so that when a certain device (e.g., the first device) and the second device work together to process the question and answer of the first question, the second device can quickly determine the first response outline corresponding to the first question, thereby improving the speed of determining the response outline.

[0053] It should be understood that when the first response outline includes a guiding phrase and a status, after the second device infers the first response outline corresponding to the first question, the second device can save the association between the first response outline and the first question; or, the second device determines the outline identifier corresponding to the first response outline and can save the association between the outline identifier corresponding to the first response outline and the first question. When the first response outline includes an identifier for the guiding phrase and an identifier for the status, after the second device infers the first response outline corresponding to the first question, the second device can save the association between the first response outline and the first question; or, the second device determines the outline identifier corresponding to the first response outline, can save the association between the outline identifier corresponding to the first response outline and the first question, and can also save the association between the outline identifier and the identifiers of each response step and the status identifier corresponding to the first response outline.

[0054] In one example, the second device is further configured to, after determining the second outline identifier corresponding to the second question, determine whether the second outline identifier and the first identifier associated with the second outline identifier have been sent to the first device, or determine whether the second outline identifier, the first identifier associated with the second outline identifier and the second identifier associated with the second outline identifier have been sent to the first device.

[0055] The second device is further configured to send the second outline identifier and the first identifier associated with the second outline identifier to the first device when it is determined that the second outline identifier and the first identifier associated with the second outline identifier have not been sent to the first device; or,

[0056] The second device is further configured to send the second outline identifier, the first identifier and the second identifier associated with the second outline identifier to the first device when it is determined that the second outline identifier and the first identifier and the second identifier associated with the second outline identifier have not been sent to the first device.

[0057] In the system provided by this implementation, when the response outline sent by the second device to the first device is an outline identifier, in order for the first device to determine the identifiers and status identifiers of each response step corresponding to the response outline based on the outline identifier after obtaining it, the second device also needs to determine whether it has sent the identifiers and status identifiers of each response step associated with the outline identifier to the first device. If it is determined that the identifiers and status identifiers of each response step associated with the outline identifier have not been sent to the first device, the second device can send the identifiers and status identifiers of each response step associated with the outline identifier to the first device when sending the outline identifier. This allows the first device to determine the identifiers and status identifiers of each response step based on the outline identifier, and thus determine the guiding phrases and statuses corresponding to each response step based on the identifiers and statuses of each response step. Based on the guiding phrases and statuses corresponding to each response step, the first device can then adjust the response steps of the second language model inference in the first device.

[0058] In some embodiments, the first device is further configured to determine a third guiding phrase corresponding to the second response outline based on the second outline identifier;

[0059] The first device is further configured to, when processing the second question through the second large language model, obtain the seventh guiding phrase corresponding to the second response step derived by the second large language model, and adjust the seventh guiding phrase corresponding to the second response step according to the third guiding phrase corresponding to the second response outline; wherein, the second response step is a response step in the second target response; or...

[0060] The first device is further configured to determine the third guiding phrase and the third state corresponding to the second response outline based on the second outline identifier;

[0061] The first device is further configured to, when processing the second question through the second large language model, obtain the seventh guiding phrase corresponding to the second response step derived by the second large language model, and adjust the guiding phrase corresponding to the second response step according to the third guiding phrase corresponding to the second response outline;

[0062] The first device is further configured to, when processing the second question through the second large language model, obtain the seventh state corresponding to the second response step derived by the second large language model, and adjust the seventh state corresponding to the second response step according to the third state corresponding to the second response outline.

[0063] Secondly, embodiments of this application provide a question-and-answer processing method applied to a first device, the method comprising:

[0064] Obtain the first question and send the first question to the second device;

[0065] Obtain the first response outline sent by the second device, wherein the first response outline is obtained by the second device processing the first question through the first language model;

[0066] Get the first content;

[0067] Based on the first content and the first response outline, the first question is processed using the second major language model to obtain the first target response corresponding to the first question.

[0068] In the question-and-answer processing method described above, the first device can collaborate with the second device to perform question-and-answer processing. Specifically, when the first and second devices collaborate, the first device can send only the first question to be processed to the second device, without needing to send the first content generated on the first device. This avoids sending content involving user privacy, preventing the leakage of user privacy information. The first language model in the second device can accurately infer the corresponding response outline based solely on the first question, reducing the processing time of each step and increasing the throughput of the second device. Meanwhile, the first device can obtain the first content generated on the first device and, based on the first content and the first response outline, process the first question using the second language model to obtain the first target response. Accurately determining the first target response based on the first response outline improves the accuracy of the first target response and enhances the user experience. In other words, question processing through multi-device collaboration can improve the accuracy of responses without leaking user privacy information.

[0069] In some embodiments, the step of processing the first question using a second language model based on the first content and the first response outline to obtain the first target response corresponding to the first question includes:

[0070] Determine a second guiding phrase and a second state, wherein the second guiding phrase is a guiding phrase determined by the second device from the guiding phrase library of the second device based on the first question, and the second state is a state determined by the second device from the state library of the second device based on the first question;

[0071] Based on the second guiding phrase, the second state, the first content, the first question, and the third thought chain guiding prompt, a third input text is obtained. The third thought chain guiding prompt is used to guide the second large language model to reason in a detailed response to the first question.

[0072] Based on the first response outline, the third input text is processed using the second major language model to obtain the first target response corresponding to the first question.

[0073] In other embodiments, the step of processing the first question using a second language model based on the first content and the first response outline to obtain the first target response corresponding to the first question includes:

[0074] Based on the first content, the first question, and the third thought chain guidance prompt, the fourth input text is obtained. The third thought chain guidance prompt is used to guide the second language model to reason in a detailed response to the first question.

[0075] Based on the first response outline, the fourth input text is processed using the second major language model to obtain the first target response corresponding to the first question.

[0076] In some embodiments, the first device stores a guide phrase library and a state library, the guide phrase library including a first guide phrase and the state library including a first state;

[0077] The step of processing the first question based on the first content and the first response outline using a second language model to obtain the first target response corresponding to the first question includes:

[0078] A fourth guiding phrase is determined from the guiding phrase library based on the first question and / or the first content, and a fourth state is determined from the state library based on the first question and / or the first content, wherein the fourth guiding phrase includes one or more of the first guiding phrases, and the fourth state includes one or more of the first states;

[0079] Based on the fourth guiding phrase, the fourth state, the first content, the first question, and the third thought chain guiding prompt, the fifth input text is obtained. The third thought chain guiding prompt is used to guide the second large language model to reason in a detailed response to the first question.

[0080] Based on the first response outline, the fifth input text is processed using the second major language model to obtain the first target response corresponding to the first question.

[0081] In other embodiments, the first response outline includes one or more third guide phrases or a first identifier corresponding to each of the third guide phrases;

[0082] The step of processing the first question based on the first content and the first response outline using a second language model to obtain the first target response corresponding to the first question includes:

[0083] When processing the first question using the second language model, the fifth guiding phrase corresponding to the first response step derived by the second language model is obtained; wherein, the first response step is a response step in the first target response;

[0084] Based on the first response outline, a sixth guiding phrase corresponding to the first response step is determined, and the sixth guiding phrase is one of the third guiding phrases;

[0085] When it is determined that the fifth guiding phrase corresponding to the first response step and the sixth guiding phrase do not meet the first preset condition, the second large language model adjusts the fifth guiding phrase corresponding to the first response step according to the sixth guiding phrase, and adjusts the first response step according to the adjusted fifth guiding phrase.

[0086] In one example, the method further includes:

[0087] After adjusting the fifth guiding phrase corresponding to the first response step using the second language model based on the sixth guiding phrase, the adjusted fifth guiding phrase is output.

[0088] In other embodiments, the first response outline includes one or more third states or a second identifier corresponding to each of the third states;

[0089] The step of processing the first question based on the first content and the first response outline using a second language model to obtain the first target response corresponding to the first question includes:

[0090] When processing the first question using the second language model, the fifth state corresponding to the first response step derived by the second language model is obtained; wherein, the first response step is a response step in the first target response;

[0091] Based on the first response outline, a sixth state corresponding to the first response step is determined, and the sixth state is one of the third states;

[0092] When it is determined that the fifth state corresponding to the first response step and the sixth state do not meet the second preset condition, the current state of the first device is adjusted according to the sixth state; when it is determined that the current state of the first device is adjusted to the sixth state, the first response step is adjusted according to the sixth state through the second large language model.

[0093] In one example, sending the first question to the second device includes:

[0094] Determine whether the first question contains sensitive content;

[0095] When it is determined that the first question includes sensitive content, the sensitive content is de-identified, and the de-identified first question is sent to the second device.

[0096] In some embodiments, the method further includes:

[0097] Obtain the second question and send the second question to the second device;

[0098] Obtain the second response outline returned by the second device. The second response outline includes a second outline identifier, which is determined by the second device based on the second question and the first question corresponding to the first outline identifier. The first outline identifier is the outline identifier corresponding to the first response outline. The first outline identifier is associated with the first identifier corresponding to the third guiding phrase included in the first response outline, or the first outline identifier is associated with the first identifier corresponding to the third guiding phrase included in the first response outline and the second identifier corresponding to the third state.

[0099] Obtain the second content;

[0100] Based on the second content and the second response outline, the second question is processed using the second major language model to obtain the second target response corresponding to the second question.

[0101] In one possible implementation, the step of processing the second question using a second language model based on the second content and the second response outline to obtain the second target response corresponding to the second question includes:

[0102] Based on the second outline identifier corresponding to the second response outline, determine the third guiding phrase and the third state corresponding to the second response outline;

[0103] When processing the second question using the second language model, the seventh guiding phrase corresponding to the second response step derived by the second language model is obtained; wherein, the second response step is a response step in the second target response;

[0104] Based on the third guiding phrase corresponding to the second response outline, adjust the seventh guiding phrase corresponding to the second response step;

[0105] When processing the second problem using the second language model, obtain the seventh state corresponding to the second response step derived by the second language model;

[0106] Based on the third state corresponding to the second response outline, the seventh state corresponding to the second response step is adjusted.

[0107] Thirdly, embodiments of this application provide a question-and-answer processing method applied to a second device, the method comprising:

[0108] Obtain the first question sent by the first device;

[0109] The first question is processed using a first language model to obtain a first response outline corresponding to the first question, and the first response outline is sent to the first device. The first response outline is used by the first device to adjust the response steps proposed by the second language model when processing the first question using a second language model, so as to obtain the first target response corresponding to the first question.

[0110] In the question-and-answer processing method described above, the second device can collaborate with the first device. When the second device collaborates with the first device, the first device can send only the first question to be processed to the second device, without sending the first content generated on the first device. This avoids sending content involving user privacy, preventing the leakage of user privacy information. The first language model in the second device can accurately infer the corresponding response outline based solely on the first question, reducing the processing time of each step and increasing the throughput of the second device. Meanwhile, the first device can obtain the first content generated on the first device and, based on the first content and the first response outline, process the first question using the second language model to obtain the first target response. Accurately determining the first target response based on the first response outline improves the accuracy of the first target response and enhances the user experience. In other words, question processing through multi-device collaboration can improve the accuracy of responses without leaking user privacy information.

[0111] In some embodiments, the first device stores a guide phrase library and a state library, the guide phrase library including a first guide phrase and the state library including a first state;

[0112] The process of processing the first question using the first major language model to obtain the first response outline corresponding to the first question includes:

[0113] A second guiding phrase is determined from the guiding phrase library based on the first question, and a second state is determined from the state library based on the first question, wherein the second guiding phrase includes one or more of the first guiding phrases, and the second state includes one or more of the first states;

[0114] Based on the second guiding phrase, the second state, the first question, and the first thought chain guiding prompt, the first input text is obtained. The first thought chain guiding prompt is used to guide the first large language model to reason about the outline of the response to the first question.

[0115] The first input text is input into the first large language model for processing to obtain the first response outline output by the first large language model;

[0116] Wherein, the first response outline includes a third guiding phrase, or the first response outline includes the third guiding phrase and a third state, wherein the third guiding phrase includes one or more of the second guiding phrases, and the third state includes one or more of the second states.

[0117] In other embodiments, the second device stores a guide phrase library and a state library, the guide phrase library including a first guide phrase and a first identifier corresponding to the first guide phrase, and the state library including a first state and a second identifier corresponding to the first state;

[0118] The process of processing the first question using the first major language model to obtain the first response outline corresponding to the first question includes:

[0119] Based on the first question, a second guiding phrase is determined from the guiding phrase library, and a first identifier corresponding to the second guiding phrase is determined; the second guiding phrase includes one or more of the first guiding phrases;

[0120] Based on the first question, a second state is determined from the state database, and a second identifier corresponding to the second state is determined; the second state includes one or more of the first states;

[0121] Based on the second guiding phrase and the first identifier corresponding to the second guiding phrase, the second state and the second identifier corresponding to the second state, the first question, and the second thought chain guiding prompt, the second input text is obtained. The second thought chain guiding prompt is used to guide the first large language model to reason about the response identifier of the first question.

[0122] The second input text is input into the first large language model for processing to obtain the first response outline output by the first large language model. The first response outline includes a first identifier corresponding to the third guiding phrase, or the first response outline includes a first identifier corresponding to the third guiding phrase and a second identifier corresponding to the third state.

[0123] In one possible implementation, the first response outline includes a first identifier corresponding to the third guiding phrase, or includes the first identifier corresponding to the third guiding phrase and a second identifier corresponding to the third state;

[0124] After processing the first question using the first major language model to obtain the first response outline corresponding to the first question, the method further includes:

[0125] Determine the first outline identifier corresponding to the first response outline, associate and save the first question with the first outline identifier, and associate the first outline identifier with the first identifier corresponding to the third guiding phrase, or associate the first outline identifier with the first identifier corresponding to the third guiding phrase and the second identifier corresponding to the third state.

[0126] In some embodiments, the method further includes:

[0127] Obtain the second question sent by the second device;

[0128] Based on the second question and the first question associated with the first outline identifier, determine the second outline identifier corresponding to the second question, use the second outline identifier as the second response outline corresponding to the second question, and send the second response outline to the first device. The second outline identifier is one of the first outline identifiers.

[0129] In one example, sending the second response outline to the first device includes:

[0130] After determining the second outline identifier corresponding to the second question, determine whether the second outline identifier and the first identifier associated with the second outline identifier have been sent to the first device, or determine whether the second outline identifier and the first and second identifiers associated with the second outline identifier have been sent to the first device.

[0131] When it is determined that the second outline identifier and the first identifier associated with the second outline identifier have been sent to the first device, or when it is determined that the second outline identifier and the first and second identifiers associated with the second outline identifier have been sent to the first device, the second response outline is sent to the first device.

[0132] If it is determined that the second outline identifier and the first identifier associated with the second outline identifier have not been sent to the first device, then the second outline identifier and the first identifier associated with the second outline identifier are sent to the first device; or,

[0133] When it is determined that the second outline identifier and the first and second identifiers associated with the second outline identifier have not been sent to the first device, the second outline identifier and the first and second identifiers associated with the second outline identifier are sent to the first device.

[0134] Fourthly, embodiments of this application provide a question-and-answer processing apparatus, which is included in a first device and has the function of implementing the behavior of the first device in the second aspect and various possible implementations of the second aspect.

[0135] Fifthly, embodiments of this application provide a question-and-answer processing apparatus, which is included in a second device and has the function of implementing the behavior of the second device in the third aspect and various possible implementations of the third aspect.

[0136] In a sixth aspect, embodiments of this application provide a first device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the first device to implement the question-and-answer processing method described in any one of the second aspects above.

[0137] In a seventh aspect, embodiments of this application provide a second device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the second device to implement the question-and-answer processing method described in any one of the third aspects above.

[0138] Eighthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to implement the question-and-answer processing method described in any one of the second aspects above, or to implement the question-and-answer processing method described in any one of the third aspects above.

[0139] In a ninth aspect, embodiments of this application provide a computer program product that, when run on a first device, causes the first device to execute the question-and-answer processing method described in any one of the second aspects; or, when run on a second device, causes the first device to execute the question-and-answer processing method described in any one of the third aspects.

[0140] It is understood that the beneficial effects of aspects two through nine above can be found in the relevant descriptions in aspect one above, and will not be repeated here. Attached Figure Description

[0141] Figure 1 This is a schematic diagram of an application scenario;

[0142] Figure 2 This is a schematic diagram of the structure of the first device to which the question-and-answer processing method provided in this application embodiment is applicable;

[0143] Figure 3 This is a schematic diagram of the software architecture to which the question-and-answer processing method provided in the embodiments of this application is applicable;

[0144] Figure 4 This is a schematic diagram of the structure of the interactive system to which the question-and-answer processing method provided in this application is applicable;

[0145] Figure 5 This is a flowchart illustrating the question-and-answer processing method provided in the embodiments of this application. Figure 1 ;

[0146] Figure 6 This is a flowchart illustrating the question-and-answer processing method provided in the embodiments of this application. Figure 2 ;

[0147] Figure 7 This is a schematic diagram illustrating an application scenario for correcting intermediate results provided in the embodiments of this application. Detailed Implementation

[0148] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0149] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0150] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0151] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0152] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0153] Furthermore, the term "multiple" mentioned in the embodiments of this application should be interpreted as two or more.

[0154] The steps involved in the question-and-answer processing method provided in this application are merely examples. Not all steps are mandatory, nor are all information or message contents required. They can be added or removed as needed during use. The same step, or a step or message with the same function, can be referenced and learned from each other in different embodiments of this application.

[0155] The business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0156] LLM refers to a Natural Language Processing (NLP) model with over a billion parameters, ranging from billions to hundreds of billions. LLMs are the core of applications such as intelligent question answering or intelligent assistants. Users or systems can input questions in the form of queries, and the LLM can output corresponding responses. To improve the accuracy of LLM responses, users or systems can add Guided Messages (CoTs) such as "Step-by-step" after the question input to guide the LLM to elaborate on the details, enabling it to output responses containing more comprehensive information. In other words, if a Guided Message (CoT) such as "Step-by-step" is added after the question input, the LLM will expand on the details step by step in its response, resulting in a more detailed and comprehensive answer.

[0157] For example, please see Figure 1, Figure 1 A schematic diagram of an application scenario is shown.

[0158] like Figure 1 As shown in (a), when the input question is "Should the current page have a recommended action?", if CoT is not added after the question, the LLM output response can be "The brightness of the current page is too low".

[0159] like Figure 1 As shown in (b), when the input question is "Should the current page have a recommended action?", and the question is followed by the CoT guidance "Step by step", the LLM output response can be "S1, The current user is browsing application A; S2, Location information is enabled; S3, The interface search records a page with topic B; S4, There are no recommendations for content B nearby." Here, S1, S2, S3, and S4 can be step identifiers.

[0160] Depend on Figure 1 (a) and Figure 1 As shown in (b), when no CoT (Coding on Entries) is added after the input question, the LLM output response is generally simple and less accurate. However, when a CoT is added after the input question, the LLM can output a response containing more details and with higher accuracy.

[0161] While CoT bootstrapping can improve the accuracy of LLM responses, it requires access to relevant content on the user's device, such as information about the application the user is currently browsing, the page's topic content, or location information. This content on the device may involve the user's privacy.

[0162] When performing question-and-answer processing based on a server-provided LLM (Linux Virtual Machine), it is generally necessary to upload content involving user privacy to the server. After obtaining the question and related content, the server can process the question and related content through the LLM to obtain the corresponding response and send the response to the terminal device. However, uploading content involving user privacy to the server can lead to the leakage of user privacy information, resulting in a poor user experience.

[0163] When performing question-and-answer processing based on an LLM provided by a terminal device, the number of parameters in the LLM deployed on the terminal device is generally much smaller than that of an LLM deployed on a server, due to limitations such as the device's performance. For example, the number of parameters in an LLM deployed on a terminal device is typically a few byte (B, where B is a unit representing billions of parameters), while the number of parameters in an LLM deployed on a server is typically tens or hundreds of bytes. Because of the smaller number of parameters in the LLM deployed on the terminal device, although the terminal device can process questions and related content using the LLM, the accuracy of the responses output by the LLM will be lower.

[0164] In summary, how to improve the accuracy of LLM responses without disclosing user privacy has become an urgent problem for those skilled in the art.

[0165] To address the aforementioned problems, embodiments of this application provide an interactive system, a question-and-answer processing method, a first device, a second device, and a computer-readable storage medium. The interactive system may include a first device and a second device. During question-and-answer processing, the first device can acquire a first question and send it to the second device. After acquiring the first question, the second device can process the first question using a first language model to obtain a first response outline corresponding to the first question, and can send the first response outline to the first device. The first device can acquire first content and, based on the first content and the first response outline, process the first question using a second language model to obtain a first target response corresponding to the first question.

[0166] In other words, this application embodiment can perform question-and-answer processing through multi-device collaboration. When processing questions and answers collaboratively across multiple devices, the first device can send only the first question to be processed to the second device, without needing to send the first content generated on the first device. This avoids sending content involving user privacy, preventing the leakage of user privacy information. The first language model in the second device can accurately infer the corresponding response outline based solely on the first question, reducing the processing time of each step and increasing the throughput of the second device. Meanwhile, the first device can obtain the first content generated on the first device and, based on the first content and the first response outline, process the first question using the second language model to obtain the first target response. Accurately determining the first target response based on the first response outline improves the accuracy of the first target response and enhances the user experience. In short, this application embodiment's question processing through multi-device collaboration can improve the accuracy of responses without disclosing user privacy information, demonstrating strong usability and practicality.

[0167] In this embodiment, the first device can be a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), desktop computer, etc. This embodiment does not limit the specific type of the first device. The second device can be an electronic device capable of deploying large language models with a large number of parameters, such as a server, cloud server, or in-vehicle device.

[0168] The first device involved in the embodiments of this application is described below. Please refer to... Figure 2 , Figure 2 A schematic diagram of one structure of the first device 200 is shown.

[0169] The first device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, antenna 1, antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a camera 291, and a display screen 292, etc. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, a barometric pressure sensor 280C, a magnetic sensor 280D, an accelerometer 280E, a proximity sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, and a bone conduction sensor 280M, etc.

[0170] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the first device 200. In other embodiments of this application, the first device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0171] Processor 210 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0172] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0173] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0174] In some embodiments, the processor 210 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0175] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the first device 200. In other embodiments of this application, the first device 200 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0176] The charging management module 240 is used to receive charging input from the charger.

[0177] The power management module 241 is used to connect the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to power the processor 210, internal memory 221, display 292, camera 291, and wireless communication module 260, etc.

[0178] The wireless communication function of the first device 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor, and baseband processor.

[0179] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first device 200 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0180] The mobile communication module 250 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the first device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 250 may be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 may be housed in the same device.

[0181] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 270A, receiver 270B, etc.) or displays images or videos through display screen 292. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and may be housed in the same device as the mobile communication module 250 or other functional modules.

[0182] The wireless communication module 260 can provide solutions for wireless communication applications on the first device 200, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 210. The wireless communication module 260 can also receive signals to be transmitted from processor 210, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0183] In some embodiments, antenna 1 of the first device 200 is coupled to mobile communication module 250, and antenna 2 is coupled to wireless communication module 260, enabling the first device 200 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0184] The first device 200 implements display functions through a GPU, a display screen 292, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 292 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0185] Display screen 292 is used to display images, videos, etc. Display screen 292 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the first device 200 may include one or N displays 292, where N is a positive integer greater than 1.

[0186] The first device 200 can perform shooting functions through an ISP, camera 291, video codec, GPU, display 292, and application processor.

[0187] The ISP is used to process the data fed back by camera 291.

[0188] Camera 291 is used to capture still images or videos. In some embodiments, the first device 200 may include one or N cameras 291, where N is a positive integer greater than 1.

[0189] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when the first device 200 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0190] Video codecs are used to compress or decompress digital video. The first device 200 may support one or more video codecs. Thus, the first device 200 can play or record video in various encoded formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0191] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in devices such as image recognition, facial recognition, speech recognition, and text understanding.

[0192] The external storage interface 220 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the first device 200. The external storage card communicates with the processor 210 through the external storage interface 220 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.

[0193] Internal memory 221 can be used to store computer executable program code, which includes instructions. Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the first device 200 (such as audio data, phonebook, etc.). Furthermore, internal memory 221 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, universal flash storage (UFS), etc. Processor 210 executes various functional applications and data processing of the first device 200 by running instructions stored in internal memory 221 and / or instructions stored in memory disposed in the processor.

[0194] The first device 200 can implement audio functions, such as music playback and recording, through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, and an application processor.

[0195] Audio module 270 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 270 can also be used for encoding and decoding audio signals.

[0196] The software system of the first device 200 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. For example, the software system of the first device 200 can adopt a layered architecture such as Android Operating System (OS), Harmony OS, or iOS. This application embodiment uses a layered architecture as an example to illustrate the software structure of the first device 200.

[0197] Figure 3 This is a software structure block diagram of the first device 200 according to an embodiment of this application.

[0198] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom: the application layer, the application framework layer, the runtime and system libraries, and the kernel layer.

[0199] The application layer can include a series of application packages.

[0200] like Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0201] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0202] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0203] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0204] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0205] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0206] The phone manager is used to provide communication functions for the first device 200. This includes managing call status (including connection and disconnection).

[0207] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0208] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating, or flashing indicator lights.

[0209] Runtime consists of core libraries and a virtual machine. Runtime is responsible for the scheduling and management of the operating system.

[0210] The core library consists of two parts: one part is the functionalities that the Java language needs to call, and the other part is the core library of the operating system.

[0211] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0212] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0213] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0214] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0215] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0216] A 2D graphics engine is a graphics engine for 2D drawing.

[0217] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0218] The question-and-answer processing method provided in this application embodiment will be described in detail below with reference to the accompanying drawings and specific application scenarios.

[0219] Please see Figure 4 , Figure 4 A schematic diagram of the structure of an interactive system provided in an embodiment of this application is shown.

[0220] like Figure 4 As shown, the interactive system may include at least one first device 200. Figure 4 (Only one first device 200 is shown as an example) and at least one second device 420. Figure 4 (Only one second device 420 is shown as an example). The first device 200 may deploy a large language model (e.g., large language model A). The second device 420 may also deploy a large language model (e.g., large language model B). The number of parameters in large language model B may be greater than the number of parameters in large language model A.

[0221] It should be noted that the first device 200 can be a terminal device such as a mobile phone, tablet, wearable device, in-vehicle device, AR / VR device, or laptop. The second device 420 can be an electronic device such as a server, cloud server, or in-vehicle device that can deploy a large language model B with a large number of parameters.

[0222] It should be understood that the first device 200 can communicate with the second device 420 via a communication network to enable interaction between the two devices. For example, the first device 200 can send a question to the second device 420 via the communication network. Alternatively, the second device 420 can send a response outline to the first device 200 via the communication network. This application embodiment does not limit the communication method between the first device 200 and the second device 420. For example, the first device 200 may include a communication module (e.g., communication module A), which allows the first device 200 to connect to the network and communicate with the second device 420. Similarly, the second device 420 may include a communication module (e.g., communication module B), allowing the first device 200 to communicate with the second device 420 via both communication modules A and B.

[0223] like Figure 4As shown, the first device 200 may further include a processing module (e.g., processing module A). During question-and-answer processing, the first device 200 can process the question and related content through processing module A to obtain text (e.g., text A), and input text A into a large language model A for processing to obtain the response corresponding to the question. Furthermore, while the large language model A processes text A, the first device 200 can also use processing module A to identify whether the response steps (e.g., the guiding phrases and / or states corresponding to the response steps) of the large language model A are accurate. If an inaccurate response step is detected, the first device 200 instructs the large language model A to adjust the response steps, so that the large language model A outputs an accurate response.

[0224] like Figure 4 As shown, the second device 420 may also include a processing module (e.g., processing module B). During question-and-answer processing, for example, after the second device 420 receives a question sent by the first device 200, the second device 420 can process the question through processing module B to obtain text (e.g., text B), and can input text B into the large language model B for processing to obtain the response outline corresponding to the question.

[0225] Please see Figure 5 , Figure 5 This application provides a flowchart illustrating a question-and-answer processing method according to an embodiment. Figure 1 This method can be applied to Figure 4 The interactive system shown. (As shown in the image) Figure 5 As shown, the method may include:

[0226] S501, First device 200 obtains the first problem.

[0227] S502, the first device 200 sends the first question to the second device 420.

[0228] S503 and the second device 420 process the first question through the large language model B to obtain the first response outline corresponding to the first question.

[0229] S504, the second device 420 sends the first response outline to the first device 200.

[0230] S505, First device 200 acquires first content.

[0231] S506, the first device 200, based on the first content and the first response outline, processes the first question through the large language model A to obtain the first target response corresponding to the first question.

[0232] This application embodiment can perform question-and-answer processing through multi-device collaboration. Specifically, in this multi-device collaborative approach, the first device 200 can send only the first question to be processed to the second device 420, without sending the first content generated on the first device 200. This avoids sending content involving user privacy, preventing the leakage of user privacy information. After the second device 420 obtains the first question, its large language model B can infer the corresponding first response outline based solely on the first question, reducing the processing time of each step and increasing its throughput. The first device 200 can process the first question using its large language model A based on the first content and the first response outline generated on it, obtaining the corresponding first target response. The large language model A of the first device 200, guided by the first response outline determined by the second device 420, obtains an accurate first target response, improving the accuracy of the first target response and enhancing the user experience. In other words, the question-and-answer processing performed through multi-device collaboration in this application embodiment can improve the accuracy of responses without disclosing user privacy information.

[0233] It should be noted that the first question may be generated by an application (or application) in the first device 200 according to the actual scenario, or the first question may be input by the user in the first device 200, and so on. This application embodiment does not limit the way the first question is generated, and it can be determined specifically according to the actual scenario.

[0234] It should be understood that when the first question is a question input by the user in the first device 200, this application embodiment does not limit the specific method by which the user inputs the first question. For example, the user can input the first question by touch. For example, the user can input the first question by pressing a button. For example, the user can input the first question by voice, and so on.

[0235] It should be noted that large language models (such as large language model A and large language model B) can be used for text content processing. That is, the input to both large language models A and B can be text-based questions, and the output can also be text-based responses. Specifically, when a user inputs the first question via voice, the first device 200 can activate its speech recognition function to acquire the user's voice input and convert it into text content, thus obtaining the text-based first question. This allows large language model A in the first device 200 to process the text-based question and obtain the first target response. Alternatively, the first device 200 can also send the text-based first question to the second device 420, allowing large language model B in the second device 420 to process the text-based first question and obtain a first response outline.

[0236] For example, the first question sent by the first device 200 to the second device 420 can be a non-sensitive question, meaning the first question sent by the first device 200 to the second device 420 can be a question that does not involve sensitive content such as user privacy, thus avoiding the leakage of user privacy. However, if the first question received by the first device 200 is a sensitive question, the first device 200 can perform de-sensitization processing on the first question and can send the de-sensitized first question to the second device 420. It should be understood that the specific method of de-sensitizing the first question in this embodiment is not limited and can be determined according to the actual scenario.

[0237] In one example, the first content may include content generated on the first device 200, such as information stacks and / or various states generated by the user using the first device 200. For example, the first content may include information about applications used by the user on the first device 200, information about search history, location information, battery information of the first device 200, information about Bluetooth status, and information about questions and answers previously asked by the user, etc.

[0238] In another example, the first content may include the intermediate result inferred by the large language model A when the first device 200 processes the first question. For example, when the second device 420 processes the first question using the large language model B, the first device 200 can also process the first question using the large language model A to obtain an intermediate result (which may be called intermediate result A), and can use intermediate result A as the first content. After the first device 200 obtains the first response outline sent by the second device 420, the first device 200 can process the first question using the large language model A based on the first response outline and the first content (which may include the content generated on the first device 200 and intermediate result A) to obtain the first target response corresponding to the first question.

[0239] It should be noted that the question-answering processing method provided in this application embodiment can be applied to question-answering scenarios based on CoT guidance. That is, when reasoning for a response using a large language model, CoT guidance prompts can be used to guide the large language model in outputting the response, thereby improving the accuracy of the large language model's response.

[0240] For example, when the first device 200 processes the first question through the large language model A, a preset CoT guidance prompt (e.g., CoT guidance prompt A) can be added after the first question to guide the large language model A to process the first question and obtain the first target response corresponding to the first question.

[0241] For example, when the second device 420 processes the first question through the large language model B, a preset CoT guidance prompt (e.g., CoT guidance prompt B) can be added after the first question to guide the large language model B to process the first question and obtain the first response outline corresponding to the first question.

[0242] The second device 420 will then process the first question using the large language model B to obtain the corresponding solution for the first question. The process of outlining the first response will be explained in detail.

[0243] In this embodiment of the application, after obtaining the first question sent by the first device 200, the second device 420 (e.g., the processing module B of the second device 420) can assemble the first question according to a fixed format (e.g., it can be called fixed format B) to obtain text B, and can input text B into the large language model B for processing to obtain the first response outline corresponding to the first question.

[0244] In some embodiments, the fixed format B can be: a foreground background (e.g., it can be called foreground background B) + a first question + CoT guidance prompt B. The second device 420 can output only a response outline to help the first device 200 output an accurate response. Therefore, the CoT guidance prompt B can be a guidance prompt that guides the large language model B to output only a response outline.

[0245] For example, the first response outline may include the guiding phrase and status corresponding to each response step. Alternatively, the first response outline may include the identifier of the guiding phrase (hereinafter referred to as the step identifier) ​​and the identifier of the status (hereinafter referred to as the status identifier) ​​corresponding to each response step. It should be understood that the status or status identifier may be optional in the first response outline. For example, when a certain response step (e.g., response step A) does not have a corresponding status, for response step A, the first response outline may only include the guiding phrase or the step identifier corresponding to response step A. For example, when a certain response step (e.g., response step B) contains a corresponding status, for response step B, the first response outline may include the guiding phrase and status corresponding to response step B, or include the step identifier and status identifier corresponding to response step B.

[0246] It should be understood that when the first response outline output by the large language model B includes guiding phrases and states corresponding to each response step, the CoT guiding prompt B can be a guiding prompt that guides the large language model B to output guiding phrases and states. For example, the CoT guiding prompt B could be "Step by step, only reasoning guiding phrases and states". When the first response outline output by the large language model B includes step identifiers and state identifiers corresponding to each response step, the CoT guiding prompt B can be a guiding prompt that guides the large language model B to output step identifiers and state identifiers. For example, the CoT guiding prompt B could be "Step by step, only reasoning step identifiers and state identifiers".

[0247] It's important to note that the input to a large language model can be a text-based question, and the output can be a text-based response. For text-based questions, the large language model typically outputs the first character of the response through full inference and then outputs the remaining characters through incremental inference. In other words, after inputting a text-based question, the large language model generally needs to perform one full inference and multiple incremental inferences to output the corresponding response. This means that each character in each response step can be derived character by character through one full inference and multiple incremental inferences. Therefore, the time taken for each inference step of the large language model can be calculated as: full inference time + number of characters per step * time of single-character incremental inference. The more characters in the response step, the longer the time required for each inference step will be.

[0248] Therefore, in this embodiment of the application, the CoT guidance prompt B guides the large language model B to reason only about the response outline (e.g., guiding phrases and states, or step identifiers and state identifiers), so that the large language model B only needs to reason about the response outline with fewer characters, which can reduce the number of characters in each reasoning of the large language model B and reduce the time of each reasoning of the large language model B. This can not only improve the reasoning speed of the large language model B, but also improve the throughput of the large language model B.

[0249] In some embodiments, the background B can be determined based on guide phrases in the guide phrase library and states in the state library. That is, the large language model B can infer and output a first response outline based on the guide phrases and states indicated by the background B. In other words, the guide phrases and states included in the first response outline can be determined based on the background B, or the step identifiers and state identifiers included in the first response outline can be determined based on the background B.

[0250] It should be noted that the second device 420 may store a guide phrase library and a status library. The guide phrase library may store guide phrases for each step. For example, the guide phrase library may include: <Step 1, Current User Browsing>, <Step 2, Location Information Status>, ..., <Step 7, Interface Search History>, ..., etc. Here, "Current User Browsing" can be the guide phrase for Step 1, "Location Information Status" can be the guide phrase for Step 2, and "Interface Search History" can be the guide phrase for Step 7. Similarly, the status library may store multiple states. For example, the status library may include: <State 101, Location Enabled>, <State 102, Brightness Adjusted to 10%>, <State 103, Bluetooth Enabled>, etc.

[0251] In one possible implementation, the second device 420 (e.g., the processing module B of the second device 420) can determine all the guiding phrases in the guiding phrase library and all the states in the state library as the content of the preceding background B. That is, the large language model B can infer the guiding phrases and states included in the first response outline based on all the guiding phrases in the guiding phrase library and all the states in the state library, or infer the step identifiers and state identifiers included in the first response outline.

[0252] In another possible implementation, the second device 420 (e.g., processing module B of the second device 420) can determine some guiding phrases from a guiding phrase library based on the first question, and can determine some states from a state library. Subsequently, the processing module B of the second device 420 can determine the content of the preceding background B based on the partial guiding phrases and partial states determined based on the first question. That is, the large language model B can infer the guiding phrases and states included in the first response outline based on the partial guiding phrases in the guiding phrase library and the partial states in the state library, or infer the step identifiers and state identifiers included in the first response outline.

[0253] For example, the processing module B of the second device 420 can determine the scenario type to which the first question belongs based on the first question. Subsequently, the processing module B of the second device 420 can determine a guiding phrase matching the scenario type from the guiding phrase library and a state matching the scenario type from the state library, based on the scenario type to which the first question belongs.

[0254] It should be noted that the scenario type and the method of determining the scenario type can be determined according to the actual application scenario, and this application embodiment does not impose any restrictions on this.

[0255] In one example, after determining each guiding phrase and each state, the processing module B of the second device 420 can directly concatenate each guiding phrase and each state to obtain the preceding background B.

[0256] For example, the foreground background B could be: "The following is the guide phrase library, <Step 1, Current user browsing>, <Step 2, Location information status>, ..., <Step 7, Interface search history>, .... The following is the status library, <Status 101, Location enabled>, <Status 102, Brightness adjusted to 10%>, <Status 103, Bluetooth enabled>, ...."

[0257] In another example, after determining each guiding phrase and each state, the processing module B of the second device 420 can also determine the step identifier corresponding to each guiding phrase and the state identifier corresponding to each state, and can concatenate each guiding phrase, the step identifier corresponding to each guiding phrase, each state, and the state identifier corresponding to each state to obtain the preceding background B.

[0258] For example, the preceding background B could be: "The following is a library of guiding phrases, in the format of..."<A,B> A represents a step identifier, and B represents a guiding phrase. <1, Current User Browsing>, <2, Location Information Status>, ..., <7, Interface Search History>, ... The following is the status library, in the format...<C,D> C represents a status indicator, and D represents a status. <101, Enable location services>, <102, Adjust brightness to 10%>, <103, Enable Bluetooth>, ...

[0259] For example, for each guiding phrase, the step identifier corresponding to that guiding phrase can be determined based on the content of that guiding phrase in the guiding phrase library. For instance, for each guiding phrase, the processing module B of the second device 420 can determine the step number corresponding to that guiding phrase in the guiding phrase library as the step identifier corresponding to that guiding phrase. This facilitates the subsequent quick determination of the guiding phrase indicated by the step identifier, reduces the number of characters required for the large language model B to perform the first response outline inference, and improves the inference speed of the large language model B.

[0260] For example, when the guiding phrase library includes <Step 1, Current User Browsing>, <Step 2, Location Information Status>, ..., <Step 7, Interface Search History>, ..., the processing module B of the second device 420 can determine the step number (i.e., 1) corresponding to "Current User Browsing" as the step identifier corresponding to "Current User Browsing", can determine the step number (i.e., 2) corresponding to "Location Information Status" as the step identifier corresponding to "Location Information Status", and can determine the step number (i.e., 7) corresponding to "Interface Search History" as the step identifier corresponding to "Interface Search History", and so on. That is, the step identifier corresponding to "Current User Browsing" can be 1, the step identifier corresponding to "Location Information Status" can be 2, the step identifier corresponding to "Interface Search History" can be 7, and so on.

[0261] Similarly, for each state, the corresponding state identifier can be determined based on the content of that state in the state database. For example, for each state, the processing module B of the second device 420 can determine the state sequence number corresponding to that state in the state database as the state identifier. This facilitates the quick determination of the state indicated by the state identifier in subsequent operations, reduces the number of characters required for the large language model B to perform the first response outline inference, and improves the inference speed of the large language model B.

[0262] For example, when the state library includes <State 101, Location Enabled>, <State 102, Brightness Adjusted to 10%>, <State 103, Bluetooth Enabled>, the processing module B of the second device 420 can determine the state number (i.e., 101) corresponding to "Location Enabled" as the state identifier corresponding to "Location Enabled", the state number (i.e., 102) corresponding to "Brightness Adjusted to 10%" as the state identifier corresponding to "Brightness Adjusted to 10%", and the state number (i.e., 103) corresponding to "Bluetooth Enabled" as the state identifier corresponding to "Bluetooth Enabled", and so on. That is, the state identifier corresponding to "Location Enabled" can be 101, the state identifier corresponding to "Brightness Adjusted to 10%" can be 102, the state identifier corresponding to "Bluetooth Enabled" can be 103, and so on.

[0263] In other embodiments, the fixed format B can be: background B + first question + CoT guidance prompt B + output prompt. The output prompt can be used to instruct the large language model B to output the first response outline according to the specified output format. For example, when the first response outline includes a guidance phrase and a status, the output prompt can be: output multiple tuples, each tuple having the format: <guiding phrase, status (optional)>. For example, when the first response outline includes a step identifier and a status identifier, the output prompt can be: output multiple tuples, each tuple having the format: <step identifier, status identifier (optional)>.

[0264] It should be noted that a tuple can represent a response step. That is, the number of tuples in the first response outline indicates how many response steps are required for the response to the first question. For each tuple, the guiding phrase in `<guiding phrase, state (optional)>` can be a guiding phrase included in that response step, and the state can be a state included in that response step. It should be understood that the state (optional) can be used to instruct the large language model B that when a response step includes a state, the state corresponding to that response step can be output; that is, the first response outline can include both the guiding phrase and the state corresponding to that response step. Conversely, when a response step does not include a state, the state does not need to be output; that is, the first response outline can only include the guiding phrase corresponding to that response step.

[0265] Similarly, for each tuple, the step identifier in <step identifier, state identifier (optional)> can be the identifier of the guiding phrase corresponding to the response step, and the state identifier can be the identifier of the state corresponding to the response step. The state identifier (optional) can be used to indicate to the large language model B that when a response step includes a state, the state identifier corresponding to that response step can be output; that is, the first response outline can include both the step identifier and the state identifier corresponding to that response step. Conversely, when a response step does not include a state, the state identifier does not need to be output; that is, the first response outline can only include the step identifier corresponding to that response step.

[0266] In this embodiment, after the processing module B of the second device 420 assembles the first question according to a fixed format B to obtain the text B corresponding to the first question, the processing module B of the second device 420 can input the text B into the large language model B. The large language model B can perform reasoning on the text B to obtain the first response outline corresponding to the first question.

[0267] In one example, the large language model B can output a first response outline based on the output hints included in text B.

[0268] For example, when text B includes the output prompt: output multiple tuples, each tuple in the format: <guide phrase, status (optional)>, the first response outline output by the large language model B can include three tuples: <current user browsing>, <location status information, location enabled>, and <interface search history>. These three tuples represent that completing the response to the first question requires three steps (also called response steps). The first and third steps can contain only the guide phrase, while the second step can contain both the guide phrase and the status. That is, completing the response to the first question requires three steps: one related to the current user's browsing content, one related to the location status, and one related to the interface search history. The location-related steps can also include a target status (i.e., location enabled), meaning the first device 200 needs to enable location.

[0269] For example, when text B includes the output prompt: output multiple tuples, each tuple being in the format: <step identifier, status identifier (optional)>, the first response outline output by the large language model B can be: <1> <2,101> <7> There are three steps involved. This means that completing the response to the first question requires three steps. The first and third steps can each contain only one identifier (step identifier), while the second step can contain two identifiers: a step identifier and a status identifier. For example, if step identifier 1 indicates the guiding phrase "current user browsing," step identifier 2 indicates the guiding phrase "location status information," step identifier 7 indicates the guiding phrase "interface search history," and status identifier 101 indicates the status "location enabled," then the first response outline obtained by the large language model B inference can include three steps: the step indicated by step identifier 1 (related to the current user's browsing content), the step indicated by step identifier 2 (related to location), and the step indicated by step identifier 3 (related to the interface search history). The location-related steps can also include a target status (i.e., location enabled), meaning the first device 200 needs to enable location.

[0270] It should be noted that the second device 420 can be configured with a default output format. When text B does not include output prompts, the large language model B can output the first response outline according to the default output format. The default output format can be determined based on the actual scenario, and this embodiment does not impose any restrictions on it.

[0271] In this embodiment, after the second device 420 obtains the first response outline output by the large language model B, it can send the first response outline to the first device 200 via a communication network. After obtaining the first response outline sent by the second device 420, the first device 200 can process the first question based on the first content and the first response outline using the large language model A to obtain the first target response corresponding to the first question, thereby improving the accuracy of the first target response obtained by the large language model A based on the first response outline.

[0272] The following will analyze the first question using the large language model A, based on the first content and the first response outline, from the first device 200. The process of processing the question to obtain the first target response corresponding to the first question will be explained in detail.

[0273] In this embodiment, after the first device 200 acquires the first question and the first content, the first device 200 (e.g., processing module A of the first device 200) can assemble the first question and the first content according to a fixed format (e.g., fixed format A) to obtain text A. Text A can then be input into a large language model A for processing to obtain a first target response corresponding to the first question. The first target response may include one or more response steps. Each response step may include a guiding phrase and a detail portion. For each response step, the guiding phrase may include the guiding phrase corresponding to that response step. If the response step includes a state, the detail portion may include the state corresponding to that response step.

[0274] It should be understood that during the processing of text A by the large language model A, the processing module A of the first device 200 can adjust each response step of the large language model A's inference based on the first response outline, so that the large language model A can accurately output the first target response corresponding to the first question. The details of how the processing module A of the first device 200 adjusts each response step of the large language model A's inference based on the first response outline will be described in detail later.

[0275] In one possible implementation, the fixed format A can be: background (e.g., background A) + first content + first question + CoT guidance prompt A. Since the first device 200 needs to output a target response containing detailed content, the CoT guidance prompt A can be a guidance prompt that guides the large language model A to provide a detailed response; that is, the CoT guidance prompt A can be used to guide the large language model A to elaborate on the details of the response. For example, the CoT guidance prompt A could be "Step by step".

[0276] It should be noted that the CoT guidance prompt A described above as "take it one step at a time" is merely an illustrative explanation and should not be construed as a limitation on the embodiments of this application. In the embodiments of this application, CoT guidance prompt A can also be other guidance prompts that can be used to guide the large language model A to elaborate on the details of the response. For example, CoT guidance prompt A can be "Please think step by step." For example, CoT guidance prompt A can be "Please reason step by step," and so on.

[0277] In one example, the first device 200 can obtain the first content after receiving the first reply outline sent by the second device 420. After obtaining the first content, the first device 200 can assemble the first content and the first question according to a fixed format A to obtain text A, and can input text A into a large language model A for processing to obtain the first target reply corresponding to the first question. At this time, the first content may include the information stack and / or various states generated by the user using the first device 200. For example, the first content may include information related to applications used by the user on the first device 200, information related to search history, location information, battery information of the first device 200, information related to Bluetooth status, and information related to previous questions and answers by the user, etc.

[0278] In another example, when the second device 420 determines the first response outline based on the first question, the first device 200 can obtain the first content, assemble the first content and the first question according to a fixed format A to obtain text A, and input text A into a large language model A for processing to obtain intermediate results. For example, the first device 200 can input text A into the large language module A in batches according to a preset number of characters for processing to obtain intermediate results. After obtaining the intermediate results, the first device 200 can use the intermediate results as the first content and cache the intermediate results. Therefore, after obtaining the first response outline sent by the second device 420, the first device 200 can process the first question through the large language model A based on the first response outline and the first content (which may include intermediate results) to obtain the first target response corresponding to the first question. That is, during the reasoning process of the first response outline by the second device 420, the first device 200 can infer the first question in advance through the large language model A to obtain intermediate results, so that the large language model A can subsequently infer based on the intermediate results. In the process of reasoning by the large language model B, the reasoning of the large language model A can be carried out simultaneously, which can reduce the reasoning latency of the large language model A, improve the speed of the first target response, and enhance the user experience.

[0279] It should be understood that the preset number of characters can be determined according to the actual scenario, and the embodiments of this application do not limit this. For example, the preset number of characters can be determined to be 10, 9, or 8, etc., depending on the actual scenario.

[0280] In some embodiments, the background A can be determined based on guide phrases in a guide phrase library and states in a state library. That is, the large language model A can infer and output a first target response based on the guide phrases and states indicated by the background A. In other words, the guide phrases and states included in each response step of the first target response can be determined based on the background A.

[0281] It should be noted that the first device 200 may store a guide phrase library and a state library. The guide phrase library stored in the first device 200 may be the same as the guide phrase library stored in the second device 420. Similarly, the state library stored in the first device 200 may be the same as the state library stored in the second device 420.

[0282] In one example, the processing module A of the first device 200 can determine all the pre-context A content as all the pre-context phrases in the pre-context phrase library and all the states in the state library of the first device 200.

[0283] In another example, processing module A of the first device 200 can determine a partial guiding phrase from the guiding phrase library of the first device 200 based on a first question, and can determine a partial state from the state library of the first device 200 based on the first question. Subsequently, processing module A of the first device 200 can determine the partial guiding phrase and partial state determined based on the first question as the content of the preceding background A.

[0284] For example, the first device 200 can determine the scenario type to which the first question belongs based on the first question. Subsequently, the first device 200 can determine a guiding phrase that matches the scenario type from its guiding phrase library, and can also determine a state that matches the scenario type from its state library.

[0285] It should be noted that the scenario type and the method of determining the scenario type can be determined according to the actual application scenario, and this application embodiment does not impose any restrictions on this.

[0286] In another example, processing module A of the first device 200 can determine a partial guiding phrase from the guiding phrase library of the first device 200 based on the first question and the first content, and can determine a partial state from the state library of the first device 200 based on the first question and the first content. Subsequently, processing module A of the first device 200 can determine the partial guiding phrase and partial state determined based on the first question and the first content as the content of the preceding background A.

[0287] For example, the first device 200 can determine the scenario type to which the first question belongs based on the first question and the first content. Subsequently, the first device 200 can determine a guiding phrase matching the scenario type from its guiding phrase library, and can also determine a state matching the scenario type from its state library.

[0288] In another example, after the second device 420 determines the preceding background B based on the first question, the second device 420 can send the guiding phrase and status included in the preceding background B to the first device 200. The first device 200 can then determine the guiding phrase and status sent by the second device 420 as the content of the preceding background A.

[0289] For example, when the background B determined by the second device 420 is: "The following is a guide phrase library: <Step 1, Current user browsing>, <Step 2, Location information status>, ..., <Step 7, Interface search history>, .... The following is a status library: <Status 101, Location enabled>, <Status 102, Brightness adjusted to 10%>, <Status 103, Bluetooth enabled>, ....", the second device 420 can send the guide phrases and statuses included in the background B to the first device 200. That is, it can send the guide phrases such as <Step 1, Current user browsing>, <Step 2, Location information status>, ..., and <Step 7, Interface search history>, as well as the statuses such as <Status 101, Location enabled>, <Status 102, Brightness adjusted to 10%>, and <Status 103, Bluetooth enabled> to the first device 200. The first device 200 can determine the background A based on the guide phrases and statuses sent by the second device 420. For example, the background A can be determined as: "The following is the guide phrase library: <Step 1, Current user browsing>, <Step 2, Location information status>, ..., <Step 7, Interface search history>, .... The following is the status library: <Status 101, Location enabled>, <Status 102, Brightness adjusted to 10%>, <Status 103, Bluetooth enabled>, ...."

[0290] It should be noted that the preceding background A can also be empty. That is, the fixed format A can be: first content + first question + CoT guidance prompt A. In other words, the large language model A can directly process the first question and obtain the first target response corresponding to the first question, even in scenarios without the preceding background A, based on the first content, the first question, and the CoT guidance prompt A.

[0291] The following will describe in detail the process by which the processing module A of the first device 200 adjusts each response step of the reasoning of the large language model A based on the first response outline.

[0292] In some embodiments, the first target response may include one or more response steps. Each response step may be separated by a delimiter, and the end of the first target response may be identified by an end character. For example, the delimiter may be a semicolon, and the end character may be a period. That is, the first target response may take the form of "AAAA; BBBB; CCCC; ...".

[0293] It should be noted that the use of a semicolon as the separator and a period as the terminator described above is merely illustrative and should not be construed as a limitation on the embodiments of this application. In the embodiments of this application, the separator and terminator can be determined according to the actual scenario. For example, the separator can be a colon. For example, the terminator can be an exclamation mark. The following will use a semicolon as the separator and a period as the terminator as an example for illustrative explanation.

[0294] In this embodiment, the large language model A can perform reasoning for the first target response using a word-by-word approach. That is, when processing text A using the large language model A, the large language model A can output the first target response corresponding to the first question word by word using a word-by-word approach. The first target response can include one or more response steps. For each response step, the response step can include a guiding phrase and detailed parts. The guiding phrase can include the guiding phrase corresponding to the response step. For response steps with an existing state, the detailed parts can include the state corresponding to the response step.

[0295] For example, a response step in the first target response could be: "ABCabcde;". Here, "ABC" can be the introductory phrase, and "abcde" can be the details. That is, "ABC" can contain the introductory phrase corresponding to that response step. And when the response step includes a state, "abcde" can contain the state corresponding to that response step.

[0296] Please see Figure 6 , Figure 6 This application illustrates a flowchart of the question-and-answer processing method provided in an embodiment. Figure 2 .

[0297] like Figure 6 As shown, during question-and-answer processing, the first device 200 can obtain the first question and send it to the second device 420. After obtaining the first question, the second device 420 can process it using the large language model B to obtain the first response outline corresponding to the first question, and can send the first response outline (e.g., the step identifiers and status identifiers corresponding to each response step) to the first device 200. The first device 200 can obtain the first content and use the large language model A to reason about the first content and the first question to obtain the first target response, i.e., the response steps.

[0298] When the large language model A infers the first target response, the first device 200 can adjust the response steps of the large language model A inference step by step based on the first response outline. For example, the first device 200 can adjust the response steps based on the guiding phrase corresponding to the first response step in the first response outline (or the step identifier corresponding to the guiding phrase). Figure 6 (Taking step identifiers as an example for illustrative purposes) Determine whether the guiding phrase corresponding to the first response step of the large language model A inference is accurate. If it is determined that the guiding phrase corresponding to the first response step of the large language model A inference is inaccurate, the first device 200 can correct the guiding phrase corresponding to the first response step of the large language model A inference based on the guiding phrase indicated by the step identifier in the first response outline. If it is determined that the guiding phrase corresponding to the first response step of the large language model A inference is accurate, or after adjusting the guiding phrase corresponding to the first response step of the large language model A inference, if the first response step also includes a state, the first device 200 can determine whether the guiding phrase corresponding to the first response step (or state identifier) ​​in the first response outline is accurate. Figure 6 (Using a status identifier as an example for illustration) Determine whether the status corresponding to the first response step of the large language model A inference is accurate. If it is determined that the status corresponding to the first response step of the large language model A inference is inaccurate, the first device 200 can adjust the status corresponding to the first response step of the large language model A inference based on the status indicated by the status identifier in the first response outline.

[0299] Upon determining that the state of the first response step is accurate, or after adjusting the state corresponding to the first response step, the first device 200 can determine whether the large language model A has inferred a terminator (e.g., a period). If it is determined that the large language model A has not inferred a terminator, the first device 200 can correct the guiding phrase corresponding to the second response step inferred by the large language model A based on the guiding phrase (or the step identifier corresponding to the guiding phrase) in the first response outline, and / or adjust the state corresponding to the second response step inferred by the large language model A based on the state (or state identifier) ​​corresponding to the second response step in the first response outline. Upon determining that the second response step is accurate, or after adjusting the second response step, the first device 200 can determine whether the large language model A has inferred a terminator. When it is determined that the large language model A has not inferred the end symbol, the first device 200 can correct the guiding phrase corresponding to the third response step of the large language model A based on the guiding phrase (or the step identifier corresponding to the guiding phrase) corresponding to the third response step in the first response outline, and / or adjust the state corresponding to the third response step of the large language model A based on the state (or state identifier) ​​corresponding to the third response step in the first response outline, and so on, until the large language model A infers the end symbol, thus obtaining the first target response corresponding to the first question.

[0300] In one example, when the large language model A infers a response step (e.g., response step A1) in the first target response, the first device 200 determines which response step A1 is the nth response step in the large language model A inference, thereby determining which response step in the first response outline corresponds to the guiding phrase (or the step identifier corresponding to the guiding phrase) to adjust the guiding phrase corresponding to the response step A1 inferred by the large language model A, and / or which state (or state identifier) ​​in the first response outline corresponds to adjust the state corresponding to the response step A1 inferred by the large language model A.

[0301] For example, when response step A1 is determined to be the first response step in the reasoning of the large language model A, the first device 200 can adjust the guiding phrase corresponding to response step A1 inferred by the large language model A based on the guiding phrase (or the step identifier corresponding to the guiding phrase) corresponding to the first response step in the first response outline. And / or, the first device 200 can adjust the state corresponding to response step A1 inferred by the large language model A based on the state (or state identifier) ​​corresponding to the first response step in the first response outline.

[0302] For example, when it is determined that response step A1 is the second response step in the reasoning of the large language model A, the first device 200 can adjust the guiding phrase corresponding to response step A1 inferred by the large language model A based on the guiding phrase (or the step identifier corresponding to the guiding phrase) corresponding to the second response step in the first response outline. And / or, the first device 200 can adjust the state corresponding to response step A1 inferred by the large language model A based on the state (or state identifier) ​​corresponding to the second response step in the first response outline.

[0303] For example, the first device 200 may store the same guide phrase library as the second device 420, and the first device 200 may also store the same status library as the second device 420. Therefore, when the first response outline includes step identifiers and status identifiers corresponding to each response step, the processing module A of the first device 200 can search the guide phrase library in the first device 200 according to the step identifier to determine the guide phrase corresponding to each response step in the first response outline, and can search the status library in the first device 200 according to the status identifier to determine the status corresponding to each response step in the first response outline.

[0304] For example, the first response outline includes <1> <2,101> and <7> At that time, the processing module A of the first device 200 can respond according to the first response step (i.e. <1> The corresponding step identifier (i.e., 1) is used to search the guide phrase library in the first device 200 to determine the guide phrase corresponding to the first reply step. Assuming that the guide phrase associated with step identifier 1 is "current user browsing", the processing module A of the first device 200 can determine that the guide phrase corresponding to the first reply step in the first reply outline is "current user browsing".

[0305] The processing module A of the first device 200 can search the guide phrase library in the first device 200 based on the step identifier (i.e., 2) corresponding to the second response step (i.e., <2, 101>) to determine the guide phrase corresponding to the second response step. Assuming that the guide phrase associated with step identifier 2 is "location information status", the processing module A of the first device 200 can determine that the guide phrase corresponding to the second response step in the first response outline is "location information status". In addition, the processing module A of the first device 200 can search the status library in the first device 200 based on the status identifier (i.e., 101) corresponding to the second response step (i.e., <2, 101>) to determine the status corresponding to the second response step. Assuming that the status associated with status identifier 101 is "location enabled", the processing module A of the first device 200 can determine that the status corresponding to the second response step in the first response outline is "location enabled".

[0306] Similarly, the processing module A of the first device 200 can respond according to the third response step (i.e. <7> The corresponding step identifier (i.e., 7) is used to search the guide phrase library in the first device 200 to determine the guide phrase corresponding to the third reply step. Assuming that the guide phrase associated with step identifier 7 is "interface browsing history", the processing module A of the first device 200 can determine that the guide phrase corresponding to the third reply step in the first reply outline is "interface browsing history".

[0307] The following will use response step A1 in the first target response as an example to illustrate the process by which the processing module A of the first device 200 adjusts the response steps.

[0308] For response step A1, the processing module A of the first device 200 can determine the guiding phrase indicated by the first response outline (for example, it can be called guiding phrase A2) based on the first response outline (i.e., the guiding phrase or step identifier included in the first response outline). When response step A1 includes a status, the processing module A of the first device 200 can also determine the status indicated by the first response outline (for example, it can be called status B2) based on the first response outline (i.e., the status or status identifier included in the first response outline). The following will be an illustrative example of response step A1 including a status.

[0309] During the word-by-word reasoning and response step A1 of the large language model A, the processing module A of the first device 200 can acquire each character reasoned by the large language model A in real time. Based on these characters and the guiding phrase indicated by the first response outline (i.e., guiding phrase A2), it can determine whether the guiding phrase corresponding to response step A1 (for example, it can be called guiding phrase A1) reasoned by the large language model A is accurate, that is, whether guiding phrase A1 and guiding phrase A2 are consistent. When it is determined that guiding phrase A1 and guiding phrase A2 are inconsistent, it can be determined that the guiding phrase A1 reasoned by the large language model A is inaccurate. At this time, the processing module A of the first device 200 can instruct the large language model A to correct the guiding phrase A1 corresponding to response step A1 based on guiding phrase A2, that is, it can instruct the large language model A to adjust the guiding phrase A1 corresponding to response step A1 to guiding phrase A2. After adjusting the guiding phrase corresponding to response step A1 to guiding phrase A2, the large language model A can continue reasoning and responding to step A1 based on guiding phrase A2.

[0310] During the process that the large language model A continues to reason and reply to step A1 based on the guiding phrase A2, the processing module A of the first device 200 can continue to obtain each character inferred by the large language model A. For example, it can obtain all the characters before the delimiter (i.e., semicolon) inferred by the large language model A, and can determine the state (e.g., which can be called state B1) corresponding to the reply step A1 inferred by the large language model A based on these characters. Subsequently, the processing module A of the first device 200 can determine whether the state B1 corresponding to the reply step A1 inferred by the large language model A is accurate based on state B1 and state B2, that is, determine whether state B1 is consistent with state B2. When it is determined that state B1 is inconsistent with state B2, it can be determined that the state B1 inferred by the large language model A is inaccurate. At this time, the processing module A of the first device 200 can determine that the current state of the first device 200 needs to be adjusted. For example, the processing module A of the first device 200 can output a prompt message according to state B2 to prompt the user to adjust the current state of the first device 200 to state B2 through the prompt message. After determining that the current state of the first device 200 is adjusted to state B2, the processing module A of the first device 200 can instruct the large language model A to re-reason the details part in reply step A1 based on state B2 to obtain an accurate reply step A1.

[0311] Exemplarily, the state is generally located in the details part. Therefore, after obtaining all the characters corresponding to reply step A1, the processing module A of the first device 200 can determine the characters corresponding to the details part from all the characters, and can determine the state B1 inferred by the large language model based on the characters corresponding to the details part. For example, the processing module A of the first device 200 can determine the characters other than the characters corresponding to the guiding phrase part among all the characters as the characters corresponding to the details part.

[0312] Exemplarily, the characters representing the state are generally followed by characters such as "is" or "are". Therefore, after obtaining all the characters corresponding to reply step A1 or the characters corresponding to the details part, the processing module A of the first device 200 can determine the characters such as "is" or "are" from all the characters or the characters corresponding to the details part, and can determine the characters after the characters such as "is" or "are" as the state B1 inferred by the large language model.

[0313] In one possible implementation, the processing module A of the first device 200 can determine whether the guiding phrase A1 and the guiding phrase A2 are identical based on whether they are completely identical. When the guiding phrase A1 and the guiding phrase A2 are completely identical, the processing module A of the first device 200 can determine that the guiding phrase A1 and the guiding phrase A2 are identical. When the guiding phrase A1 and the guiding phrase A2 are not completely identical, the processing module A of the first device 200 can determine that the guiding phrase A1 and the guiding phrase A2 are not identical. It should be understood that the guiding phrase A1 and the guiding phrase A2 being completely identical can mean that the length of the guiding phrase A1 is the same as the length of the guiding phrase A2, and that each character of the guiding phrase A1 is identical to each character of the guiding phrase A2.

[0314] In another possible implementation, the processing module A of the first device 200 can determine whether the guiding phrase A1 and the guiding phrase A2 are consistent based on whether the keywords contained in the guiding phrase A1 are the same as those contained in the guiding phrase A2. When the keywords contained in the guiding phrase A1 are the same as those contained in the guiding phrase A2, the processing module A of the first device 200 can determine that the guiding phrase A1 and the guiding phrase A2 are consistent. When the keywords contained in the guiding phrase A1 are different from those contained in the guiding phrase A2, the processing module A of the first device 200 can determine that the guiding phrase A1 and the guiding phrase A2 are inconsistent.

[0315] In one example, in a scenario where the consistency between guiding phrase A1 and guiding phrase A2 is determined based on whether they are completely identical, during the word-by-word reasoning response step A1 of the large language model A, the processing module A of the first device 200 can acquire the characters inferred by the large language model A in real time, and can match the acquired characters with the guiding phrase A2. That is, it can match the acquired characters with the characters at the corresponding positions in the guiding phrase A2 to determine whether the guiding phrase A1 and guiding phrase A2 inferred by the large language model A are consistent.

[0316] When the large language model A infers the first character, the processing module A of the first device 200 can acquire the first character and determine whether it is the same as the first character in the guiding phrase A2. When it is determined that the first character is the same as the first character in the guiding phrase A2, the processing module A of the first device 200 can acquire the second character inferred by the large language model A and determine whether it is the same as the second character in the guiding phrase A2. When it is determined that the second character is the same as the second character in the guiding phrase A2, the processing module A of the first device 200 can acquire the third character inferred by the large language model A, and so on, until the processing module A of the first device 200 acquires the Nth character inferred by the large language model A. When it is determined that the Nth character is the same as the Nth character in the guiding phrase A2, the processing module A of the first device 200 can determine that the guiding phrase A1 inferred by the large language model A is consistent with the guiding phrase A2. Here, N is the number of characters contained in the guiding phrase A2, and N is greater than or equal to 1.

[0317] Specifically, when it is determined that the first character is different from the first character in the guiding phrase A2, the processing module A of the first device 200 can determine that the guiding phrase A1 inferred by the large language model A is inconsistent with the guiding phrase A2, meaning that the second character does not need to be obtained. Alternatively, when it is determined that the second character is different from the second character in the guiding phrase A2, the processing module A of the first device 200 can determine that the guiding phrase A1 inferred by the large language model A is inconsistent with the guiding phrase A2. Similarly, when it is determined that the third character is different from the third character in the guiding phrase A2, the processing module A of the first device 200 can determine that the guiding phrase A1 inferred by the large language model A is inconsistent with the guiding phrase A2, and so on.

[0318] For example, during the word-by-word reasoning response step A1 of the large language model A, the processing module A of the first device 200 can obtain the first character reasoned by the large language model A. Assume the guiding phrase A2 is "ABC", and the first character reasoned by the large language model A is "A". The processing module A of the first device 200 can determine that the first character reasoned by the large language model A is the same as the first character in the guiding phrase A2, and can continue to obtain the second character reasoned by the large language model A. Assume the second character reasoned by the large language model A is "B", and the processing module A of the first device 200 can determine that the second character reasoned by the large language model A is the same as the second character in the guiding phrase A2, and can continue to obtain the third character reasoned by the large language model A. Assume the third character reasoned by the large language model A is "C", and the processing module A of the first device 200 can determine that the third character reasoned by the large language model A is the same as the third character in the guiding phrase A2. Therefore, the processing module A of the first device 200 can determine that the guiding phrase A1 (i.e., ABC) reasoned by the large language model A is consistent with the guiding phrase A2 (i.e., ABC).

[0319] For example, during the word-by-word reasoning response step A1 of the large language model A, the processing module A of the first device 200 can obtain the first character reasoned by the large language model A. Assume the guiding phrase A2 is "ABC", and the first character reasoned by the large language model A is "D". The processing module A of the first device 200 can determine that the first character reasoned by the large language model A (i.e., D) is different from the first character in the guiding phrase A2 (i.e., A). Therefore, the processing module A of the first device 200 can directly determine that the guiding phrase A1 reasoned by the large language model A is inconsistent with the guiding phrase A2.

[0320] In another example, in a scenario where the consistency of guiding phrases A1 and A2 is determined by whether they are identical, the processing module A of the first device 200 can determine the number of characters (assuming N) in guiding phrase A2 based on the first response outline. During the word-by-word reasoning response step A1 of the large language model A, the processing module A of the first device 200 can obtain the first N characters inferred by the large language model A and match these first N characters with guiding phrase A2. When these first N characters are identical to guiding phrase A2, the processing module A of the first device 200 can determine that guiding phrase A1 and guiding phrase A2 are consistent. When these first N characters are not identical to guiding phrase A2, for example, if one or more characters in these first N characters are different from the corresponding characters in guiding phrase A2, the processing module A of the first device 200 can determine that guiding phrase A1 and guiding phrase A2 are inconsistent.

[0321] For example, when the guiding phrase A2 is "ABC", during the word-by-word reasoning response step A1 of the large language model A, the processing module A of the first device 200 can obtain the first three characters reasoned by the large language model A. Assume that the first three characters reasoned by the large language model A are "ABC". Therefore, the processing module A of the first device 200 can determine that the guiding phrase A1 (i.e., ABC) reasoned by the large language model A is inconsistent with the guiding phrase A2 (i.e., ABC).

[0322] For example, when the guiding phrase A2 is "ABC", during the word-by-word reasoning response step A1 of the large language model A, the processing module A of the first device 200 can obtain the first three characters reasoned by the large language model A. Assume that the first three characters reasoned by the large language model A are "DEF". Therefore, the processing module A of the first device 200 can determine that the guiding phrase A1 (i.e., DEF) reasoned by the large language model A is inconsistent with the guiding phrase A2 (i.e., ABC).

[0323] In another example, in a scenario where the consistency between guiding phrase A1 and guiding phrase A2 is determined based on whether the keywords contained in guiding phrase A1 are the same as those contained in guiding phrase A2, the processing module A of the first device 200 can determine the number of characters (assuming N) in guiding phrase A2 based on the first response outline. During the word-by-word reasoning response step A1 of the large language model A, the processing module A of the first device 200 can obtain the first M characters inferred by the large language model A based on the number of characters in guiding phrase A2. Here, M can be greater than or equal to N, and the specific value of M can be determined according to the actual scenario.

[0324] Subsequently, processing module A of the first device 200 can determine whether the keywords contained in the first M characters are the same as the keywords contained in the guiding phrase A2. If the keywords contained in the first M characters are the same as the keywords contained in the guiding phrase A2, processing module A of the first device 200 can determine that the guiding phrase A1 inferred by the large language model A is consistent with the guiding phrase A2. If the keywords contained in the first M characters are not the same as the keywords contained in the guiding phrase A2, processing module A of the first device 200 can determine that the guiding phrase A1 inferred by the large language model A is inconsistent with the guiding phrase A2.

[0325] It should be understood that the processing module A of the first device 200 can determine whether state B1 and state B2 are consistent based on whether state B1 and state B2 are exactly the same. When state B1 and state B2 are exactly the same, the processing module A of the first device 200 can determine that state B1 and state B2 are consistent. When state B1 and state B2 are not exactly the same, the processing module A of the first device 200 can determine that state B1 and state B2 are inconsistent.

[0326] Alternatively, processing module A of the first device 200 can determine whether state B1 and state B2 are consistent based on whether the keywords contained in state B1 are the same as those contained in state B2. When the keywords contained in state B1 are the same as those contained in state B2, processing module A of the first device 200 can determine that state B1 and state B2 are consistent. When the keywords contained in state B1 are different from those contained in state B2, processing module A of the first device 200 can determine that state B1 and state B2 are inconsistent.

[0327] It should be noted that the specific content of the processing module A of the first device 200 in determining whether state B1 and state B2 are consistent can be found in the relevant content of the processing module A of the first device 200 in determining whether the guiding phrase A1 and guiding phrase A2 are consistent. For the sake of brevity, it will not be repeated here.

[0328] In one possible implementation, the first device 200 can perform inference for the large language model A using an NPU (or GPU). When the large language model A performs inference using a word-by-word approach, intermediate results (i.e., K and V variables in the inference process of the large language model A, hereinafter referred to as KV) can be generated. Inference based on these intermediate results can reduce computational load and improve the inference efficiency of the large language model A. Therefore, during the inference process of the large language model A using an NPU (or GPU), a key-value cache (KV cache, i.e., key cache and value cache) needs to be implemented on the NPU (or GPU) to cache the intermediate results in the inference process of the large language model A, that is, to cache the KV variables in the inference process of the large language model A.

[0329] When it is determined that a certain response step (e.g., response step A1) in the first target response is inaccurate, it can be determined that the intermediate result generated by the large language model A in reasoning for response step A1 is inaccurate. Therefore, when correcting response step A1, it is necessary to correct the intermediate result cached by the NPU (or GPU) so that the large language model A can perform a small-scale re-reasoning for response step A1 based on the corrected intermediate result.

[0330] For example, a large language model A can correct intermediate results cached by NPU (or GPU) through rollback overwriting. For instance, based on the content that needs to be corrected in the recovery step A1, the position where the intermediate results need to be rolled back can be determined, and the intermediate results can be regenerated from the rolled-back position in an overwrite manner.

[0331] It should be noted that inaccuracy in response step A1 could be due to an inaccurate guiding phrase or an inaccurate state. If the guiding phrase for response step A1 is determined to be inaccurate, it can be corrected, and the intermediate results cached by the NPU (or GPU) can be corrected based on the corrected guiding phrase. The state corresponding to response step A1 can then be inferred from the corrected intermediate results. Similarly, if the state corresponding to response step A1 is determined to be inaccurate, it can be corrected, and the intermediate results cached by the NPU (or GPU) can be corrected based on the corrected state. The next response step (e.g., response step A2) can then be inferred from the corrected intermediate results.

[0332] For example, please see Figure 7 , Figure 7 This illustration shows an application scenario diagram of intermediate result correction provided in an embodiment of this application. The application scenario is illustrated by taking as an example that the guiding phrase corresponding to response step A1 inferred by the large language model A is "ABC", and the guiding phrase inferred by the large language model A is inconsistent with the guiding phrase (e.g., DE) in the first response outline.

[0333] like Figure 7 As shown, when the large language model A infers the guiding phrase "ABC" corresponding to step A1, it can infer and output A based on the historical key-value pairs. The large language model A can use A as input for the next incremental inference, generating an intermediate result KV1, and can infer and output B based on the intermediate result KV1. The large language model A can use B as input for the next incremental inference, generating an intermediate result KV2, and can infer and output C based on the intermediate result KV2, and so on.

[0334] For response step A1, since the guiding phrase inferred by the large language model A is different from the guiding phrase indicated in the first response outline, it is necessary to correct the guiding phrase "ABC" inferred by the large language model A to the guiding phrase "DE". At this point, the large language model A needs to backtrack on a portion of the key words (KV) in the inference process. Based on the content to be corrected in response step A1 (i.e., ABC), the large language model A can determine the position to be backtracked to is KV1. For example... Figure 7 As shown, the large language model A can be regenerated from KV1 in a covering manner. That is, the large language model A can use D as new input to perform incremental inference corresponding to KV1 again, generating a new intermediate result (i.e., a new KV1), and can infer and output E based on the new KV1. Subsequently, the large language model A can continue inference based on E and the new KV1. For example, the large language model A can continue to infer the details of replying to step A1 and other subsequent content based on E and the new KV1.

[0335] In one possible implementation, when performing question-and-answer processing based on user interaction, for each response step of the large language model A inference, when it is necessary to adjust the response step of the large language model A inference based on the first response outline, the first device 200 can output the response step when it is determined that the content of the response step is accurate, that is, after it is determined that the guiding phrase and state corresponding to the response step have been adjusted, that is, the response step is displayed in the first device 200.

[0336] In another possible implementation, when performing question-and-answer processing based on user interaction, for each response step of the large language model A inference, when it is necessary to adjust that response step based on the first response outline, the first device 200 can output the corresponding guiding phrase for that response step after determining that the guiding phrase has been adjusted. This can improve the user's interactive experience. Specifically, when outputting the guiding phrase for that response step, the characters in the guiding phrase can be output at certain intervals, achieving a smooth response interval effect and improving the user experience.

[0337] In one possible implementation, after the second device 420 obtains the first response outline corresponding to the first question, the second device 420 can associate and save the first question and the first response outline. Alternatively, the second device 420 can determine the outline identifier corresponding to the first response outline, and can associate and save the first question and the outline identifier corresponding to the first response outline, as well as associate and save the outline identifier corresponding to the first response outline with the guiding phrase indicated by the first response outline. It should be understood that when the first response outline also includes a status, the second device 420 can also associate and save the outline identifier corresponding to the first response outline with the status indicated by the first response outline. Alternatively, the second device 420 can determine the outline identifier corresponding to the first response outline, and can associate and save the first question and the outline identifier corresponding to the first response outline, as well as associate and save the outline identifier corresponding to the outline identifier corresponding to the guiding phrase indicated by the first response outline. It should be understood that when the first response outline also includes a status or status identifier, the second device 420 can also associate and save the outline identifier corresponding to the status with the status identifier indicated by the first response outline. Subsequently, when a question (which may be referred to as the second question) is received from a device (e.g., the first device 200), the second device 420 can directly determine the response outline (which may be referred to as the second response outline) corresponding to the second question based on the second question and the relationship between the question and the response outline, or determine the outline identifier (which may be referred to as the outline identifier A) corresponding to the second question, and can send the outline identifier A as the response outline corresponding to the second question to the first device 200.

[0338] That is, after the second device 420 infers the response outline corresponding to a question through the large language model B, the second device 420 can associate and save the response outline with the question; or, it can determine the outline identifier corresponding to the response outline and associate and save the outline identifier with the question and the guiding phrases and states contained in the response outline (or the step identifiers corresponding to the guiding phrases and the state identifiers corresponding to the states). This allows the second device 420 to match the question with the questions corresponding to each response outline (or outline identifier) ​​when it infers a question in the future, thereby determining the response outline corresponding to the question and improving the speed of determining the response outline.

[0339] It should be noted that the second device 420 can determine the response outline (or outline identifier) ​​corresponding to the second question based on the similarity between the second question and the questions associated with each response outline (or outline identifier). For example, the second device 420 can determine the similarity between the second question and the questions associated with each outline identifier, and can determine the outline identifier associated with the question with the greatest similarity as the outline identifier A corresponding to the second question.

[0340] It should be understood that the outline identifier can be determined according to the actual scenario, and the embodiments of this application do not limit this.

[0341] In one example, in a scenario where the second device 420 saves the association between the question and the outline identifier, after the second device 420 determines the outline identifier A corresponding to the second question, the second device 420 can first determine whether it has previously sent the outline identifier A and the related identifiers associated with the outline identifier A to the first device 200. It should be understood that when the response outline only includes a guiding phrase or the step identifier corresponding to the guiding phrase, the related identifiers may include the step identifier. When the response outline includes a guiding phrase and a status, or includes the step identifier and status identifier corresponding to the guiding phrase, the related identifiers may include the step identifier and the status identifier.

[0342] Specifically, if it is determined that outline identifier A and related identifiers associated with outline identifier A (such as step identifier and status identifier) ​​have been sent to the first device 200, the second device 420 may send outline identifier A only to the first device 200. If it is determined that no outline identifier A and related identifiers (i.e., step identifiers and status identifiers) associated with outline identifier A have been sent to the first device 200, the second device 420 may send outline identifier A and related identifiers (i.e., step identifiers and status identifiers) associated with outline identifier A to the first device 200. This allows the first device 200 to accurately determine the step identifiers and status identifiers associated with outline identifier A after obtaining outline identifier A. Consequently, it can accurately determine the guiding phrases and statuses indicated by outline identifier A. When the first device 200 infers the target response (e.g., the second target response) corresponding to the second question through the large language model A, it can adjust the guiding phrases corresponding to each response step inferred by the large language model A according to the guiding phrases indicated by outline identifier A, and adjust the statuses corresponding to each response step inferred by the large language model A according to the statuses indicated by outline identifier A, so as to accurately obtain the second target response.

[0343] It should be noted that the specific content of the second target response to the second question inferred by the first device 200 through the large language model A can be found in the aforementioned content on the first target response to the first question inferred by the first device 200 through the large language model A. For the sake of brevity, it will not be repeated here.

[0344] It should be understood that after the first device 200 obtains the response outline (or outline identifier) ​​corresponding to a certain question, the first device 200 can associate and save the response outline (or outline identifier) ​​with the question and the guiding phrases and states (or the step identifiers corresponding to the guiding phrases and the state identifiers corresponding to the states) contained in the response outline. This allows the first device 200 to directly match the question with the questions corresponding to each response outline (or outline identifier) ​​when performing reasoning for a certain question in the future, thereby determining the response outline (or outline identifier outline) corresponding to the question. Based on the response outline, reasoning for the question can be performed through the large language model A, which can improve the speed of determining the response outline, improve the reasoning speed, and improve the user experience.

[0345] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0346] Corresponding to the question-and-answer processing method described in the above embodiments, this application also provides a question-and-answer processing device, the various modules of which can correspondingly implement the various steps of the question-and-answer processing method.

[0347] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0348] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0349] This application embodiment also provides a first device, the first device including at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, it causes the first device to perform the steps performed by the first device 200 in any of the above method embodiments. Exemplarily, the structure of the first device can be as follows: Figure 2 As shown.

[0350] This application also provides a second device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, it causes the second device to perform the steps executed by the second device 420 in any of the above method embodiments.

[0351] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the steps in any of the above method embodiments.

[0352] This application provides a computer program product that, when run on a first device, causes the first device to perform the steps executed by the first device 200 in any of the above method embodiments.

[0353] This application provides a computer program product that, when run on a second device, causes the second device to perform the steps executed by the second device 420 in any of the above method embodiments.

[0354] 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, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a device / equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0355] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0356] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0357] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or 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 through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0358] 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.

[0359] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An interactive system, characterized by The interaction system comprises a first device and a second device; The first device is configured to acquire a first question and send the first question to the second device; The second device is configured to receive the first question, process the first question by using a first large language model to obtain a first reply outline corresponding to the first question, and send the first reply outline to the first device; The first device is further configured to acquire first content, and process the first question by using a second large language model based on the first content and the first reply outline to obtain a first target reply corresponding to the first question.

2. The system of claim 1, wherein, The second device stores a guide phrase library and a state library, the guide phrase library comprises a first guide phrase, and the state library comprises a first state; The second device is further configured to determine a second guide phrase from the guide phrase library according to the first question, and determine a second state from the state library according to the first question, the second guide phrase comprises one or more of the first guide phrase, and the second state comprises one or more of the first state; The second device is further configured to obtain a first input text according to the second guide phrase, the second state, the first question, and a first thinking chain guide prompt, input the first input text into the first large language model for processing, and obtain the first reply outline output by the first large language model, the first thinking chain guide prompt is used to guide the first large language model to perform reasoning on the reply outline of the first question; The first reply outline comprises a third guide phrase, or the first reply outline comprises the third guide phrase and a third state, the third guide phrase comprises one or more of the second guide phrase, and the third state comprises one or more of the second state.

3. The system of claim 1, wherein, The second device stores a guide phrase library and a state library, the guide phrase library comprises a first guide phrase and a first identifier corresponding to the first guide phrase, and the state library comprises a first state and a second identifier corresponding to the first state; The second device is further configured to determine a second guide phrase from the guide phrase library according to the first question, and determine a first identifier corresponding to the second guide phrase, determine a second state from the state library according to the first question, and determine a second identifier corresponding to the second state; The second device is further configured to obtain a second input text according to the second guide phrase and the first identifier corresponding to the second guide phrase, the second state and the second identifier corresponding to the second state, the first question, and a second thinking chain guide prompt, input the second input text into the first large language model for processing, and obtain the first reply outline output by the first large language model, the second thinking chain guide prompt is used to guide the first large language model to perform reasoning on the reply identifier of the first question; The first reply outline includes a first identifier corresponding to a third guiding phrase, or the first reply outline includes a first identifier corresponding to the third guiding phrase and a second identifier corresponding to a third state, the third guiding phrase includes one or more of the second guiding phrases, and the third state includes one or more of the second states.

4. The system of claim 2 or 3, wherein, The first device is further configured to obtain the second guiding phrase and the second state, obtain a third input text according to the second guiding phrase, the second state, the first content, the first question, and a third thinking chain guiding prompt, and process the third input text by the second large language model based on the first reply outline to obtain a first target reply corresponding to the first question, the third thinking chain guiding prompt being used to guide the second large language model to perform detailed reasoning for the first question.

5. The system of any one of claims 1 to 3, wherein, The first device is further configured to obtain a fourth input text according to the first content, the first question, and a third thinking chain guiding prompt, and process the fourth input text by the second large language model based on the first reply outline to obtain a first target reply corresponding to the first question, the third thinking chain guiding prompt being used to guide the second large language model to perform detailed reasoning for the first question.

6. The system of any one of claims 1 to 3, wherein, The first device stores a guiding phrase library and a state library, the guiding phrase library includes a first guiding phrase, and the state library includes a first state; The first device is further configured to determine a fourth guiding phrase from the guiding phrase library according to the first question and / or the first content, and determine a fourth state from the state library according to the first question and / or the first content, the fourth guiding phrase including one or more of the first guiding phrases, and the fourth state including one or more of the first states; The first device is further configured to obtain a fifth input text according to the fourth guiding phrase, the fourth state, the first content, the first question, and a third thinking chain guiding prompt, and process the fifth input text by the second large language model based on the first reply outline to obtain a first target reply corresponding to the first question, the third thinking chain guiding prompt being used to guide the second large language model to perform detailed reasoning for the first question.

7. The system of any one of claims 1 to 6, wherein, The first reply outline includes one or more third guiding phrases or a first identifier corresponding to each of the third guiding phrases; The first device is further configured to obtain a fifth guiding phrase corresponding to a first reply step of the first target reply output by the second large language model when processing the first question by the second large language model, the first reply step being one of the first target replies; The first device is further configured to, for the first reply step, determine a sixth guiding phrase corresponding to the first reply step according to the first reply outline, the sixth guiding phrase being one of the third guiding phrases. The first device is further configured to, when determining that the fifth guiding phrase corresponding to the first reply step does not satisfy the first preset condition with the sixth guiding phrase, adjust the fifth guiding phrase corresponding to the first reply step according to the sixth guiding phrase, and adjust the first reply step according to the adjusted fifth guiding phrase through the second large language model.

8. The system of claim 7, wherein, The first device is further configured to, after adjusting the fifth guiding phrase corresponding to the first reply step according to the sixth guiding phrase through the second large language model, output the adjusted fifth guiding phrase.

9. The system of any one of claims 1 to 8, wherein, The first reply outline includes one or more third states or second identifiers corresponding to the third states; The first device is further configured to, when processing the first question through the second large language model, acquire a fifth state corresponding to a first reply step output by the second large language model, wherein the first reply step is one of the first target replies; The first device is further configured to, for the first reply step, determine a sixth state corresponding to the first reply step according to the first reply outline, wherein the sixth state is one of the third states. The first device is further configured to, when determining that the fifth state corresponding to the first reply step does not satisfy a second preset condition with the sixth state, adjust the current state of the first device according to the sixth state, and when determining that the current state of the first device is adjusted to the sixth state, adjust the first reply step according to the sixth state through the second large language model.

10. The system of any one of claims 1 to 9, wherein, The first device is further configured to, after acquiring the first question, determine whether the first question contains sensitive content, and when determining that the first question contains sensitive content, perform desensitization processing on the sensitive content and send the desensitized first question to the second device.

11. The system of any one of claims 1 to 10, wherein, The first reply outline includes a first identifier corresponding to a third guiding phrase, or includes the first identifier corresponding to the third guiding phrase and a second identifier corresponding to a third state; The second device is further configured to determine a first outline identifier corresponding to the first reply outline, save the first question and the first outline identifier in association, and associate the first outline identifier with the first identifier corresponding to the third guiding phrase, or associate the first outline identifier with the first identifier corresponding to the third guiding phrase and the second identifier corresponding to the third state.

12. The system of claim 11, wherein, The first device is further configured to acquire a second question and send the second question to the second device. The second device is further configured to, according to the second question and the first question associated with the first question, determine a second outline identifier corresponding to the second question, take the second outline identifier as a second reply outline corresponding to the second question, and send the second reply outline to the first device, wherein the second outline identifier is one of the first outline identifiers. The first device is further configured to obtain second content, and process the second question based on the second content and the second reply outline to obtain a second target reply corresponding to the second question by using a second large language model.

13. The system of claim 12, wherein, The second device is further configured to determine whether the second outline identifier and the first identifier associated with the second outline identifier have been sent to the first device, or determine whether the second outline identifier, the first identifier associated with the second outline identifier and the second identifier have been sent to the first device after determining the second outline identifier corresponding to the second question. The second device is further configured to send the second outline identifier and the first identifier associated with the second outline identifier to the first device when it is determined that the second outline identifier and the first identifier associated with the second outline identifier have not been sent to the first device. The second device is further configured to send the second outline identifier and the first identifier and the second identifier associated with the second outline identifier to the first device when it is determined that the second outline identifier and the first identifier and the second identifier associated with the second outline identifier have not been sent to the first device.

14. The system of claim 12 or 13, wherein, The first device is further configured to determine a third guide phrase corresponding to the second reply outline according to the second outline identifier. The first device is further configured to obtain a seventh guide phrase corresponding to a second reply step when processing the second question by using the second large language model, and adjust the seventh guide phrase corresponding to the second reply step according to the third guide phrase corresponding to the second reply outline, wherein the second reply step is one of the second target reply. The first device is further configured to determine a third guide phrase and a third state corresponding to the second reply outline according to the second outline identifier. The first device is further configured to obtain a seventh guide phrase corresponding to a second reply step when processing the second question by using the second large language model, and adjust the guide phrase corresponding to the second reply step according to the third guide phrase corresponding to the second reply outline. The first device is further configured to obtain a seventh state corresponding to a second reply step when processing the second question by using the second large language model, and adjust the seventh state corresponding to the second reply step according to the third state corresponding to the second reply outline.

15. A question and answer processing method characterized by, The method applied to a first device comprises: obtaining a first question and sending the first question to a second device; obtaining a first reply outline sent by the second device, wherein the first reply outline is obtained by processing the first question by using a first large language model by the second device; obtaining first content; processing the first question based on the first content and the first reply outline by using a second large language model to obtain a first target reply corresponding to the first question.

16. The method of claim 15, wherein, The first question is processed by a second large language model based on the first content and the first reply outline to obtain a first target reply corresponding to the first question, including: determining a second guide phrase and a second state, the second guide phrase being a guide phrase determined by the second device from a guide phrase library of the second device according to the first question, and the second state being a state determined by the second device from a state library of the second device according to the first question; obtaining a third input text according to the second guide phrase, the second state, the first content, the first question, and a third thinking chain guide prompt, the third thinking chain guide prompt being used to guide the second large language model to perform detailed reply reasoning on the first question; processing the third input text by the second large language model based on the first reply outline to obtain the first target reply corresponding to the first question.

17. The method of claim 15, wherein, The first question is processed by a second large language model based on the first content and the first reply outline to obtain a first target reply corresponding to the first question, including: obtaining a fourth input text according to the first content, the first question, and a third thinking chain guide prompt, the third thinking chain guide prompt being used to guide the second large language model to perform detailed reply reasoning on the first question; processing the fourth input text by the second large language model based on the first reply outline to obtain the first target reply corresponding to the first question.

18. The method of any one of claims 15-17, wherein, The first device stores a guide phrase library and a state library, the guide phrase library includes a first guide phrase, and the state library includes a first state; The first question is processed by a second large language model based on the first content and the first reply outline to obtain a first target reply corresponding to the first question, including: determining a fourth guide phrase from the guide phrase library according to the first question and / or the first content, and determining a fourth state from the state library according to the first question and / or the first content, the fourth guide phrase including one or more of the first guide phrase, and the fourth state including one or more of the first state; obtaining a fifth input text according to the fourth guide phrase, the fourth state, the first content, the first question, and a third thinking chain guide prompt, the third thinking chain guide prompt being used to guide the second large language model to perform detailed reply reasoning on the first question; processing the fifth input text by the second large language model based on the first reply outline to obtain the first target reply corresponding to the first question.

19. The method according to any one of claims 15 to 18, characterized in that, The first reply outline includes one or more third guide phrases or a first identifier corresponding to each of the third guide phrases; The first question is processed by a second large language model based on the first content and the first reply outline to obtain a first target reply corresponding to the first question, including: In the processing of the first question by the second large language model, a fifth guide phrase corresponding to a first reply step of the first question is obtained; the first reply step is one of the first target replies; According to the first reply outline, a sixth guide phrase corresponding to the first reply step is determined, and the sixth guide phrase is one of the third guide phrases; When it is determined that the fifth guide phrase corresponding to the first reply step and the sixth guide phrase do not satisfy a first preset condition, the fifth guide phrase corresponding to the first reply step is adjusted by the second large language model according to the sixth guide phrase, and the first reply step is adjusted according to the adjusted fifth guide phrase.

20. The method of claim 19, wherein, The method further comprises: After the fifth guide phrase corresponding to the first reply step is adjusted by the second large language model according to the sixth guide phrase, the adjusted fifth guide phrase is output.

21. The method of any one of claims 15-20, wherein, The first reply outline comprises one or more third states or second identifiers corresponding to the third states; The processing of the first question by the second large language model based on the first content and the first reply outline to obtain the first target reply corresponding to the first question comprises: In the processing of the first question by the second large language model, a fifth state corresponding to a first reply step of the first question is obtained; the first reply step is one of the first target replies; According to the first reply outline, a sixth state corresponding to the first reply step is determined, and the sixth state is one of the third states; When it is determined that the fifth state corresponding to the first reply step and the sixth state do not satisfy a second preset condition, the current state of the first device is adjusted according to the sixth state; When it is determined that the current state of the first device is adjusted to the sixth state, the first reply step is adjusted by the second large language model according to the sixth state.

22. The method of any one of claims 15-21, wherein, The sending of the first question to the second device comprises: Determining whether the first question contains sensitive content; When it is determined that the first question contains sensitive content, the sensitive content is desensitized, and the desensitized first question is sent to the second device.

23. The method of any one of claims 15-22, wherein, The method further comprises: A second question is obtained, and the second question is sent to the second device; A second reply outline returned by the second device is obtained, the second reply outline comprises a second outline identifier, the second outline identifier is determined by the second device according to the second question and a first question corresponding to a first outline identifier, the first outline identifier is an outline identifier corresponding to the first reply outline, and the first outline identifier is associated with a first identifier corresponding to a third guide phrase included in the first reply outline or the first outline identifier is associated with a first identifier corresponding to the third guide phrase and a second identifier corresponding to a third state included in the first reply outline; Second content is obtained; Based on the second content and the second reply outline, the second question is processed by a second large language model to obtain a second target reply corresponding to the second question.

24. The method of claim 23, wherein, The processing of the second question by the second large language model based on the second content and the second reply outline to obtain the second target reply corresponding to the second question comprises: According to the second outline identifier corresponding to the second reply outline, a third guiding phrase and a third state corresponding to the second reply outline are determined; When the second question is processed by the second large language model, a seventh guiding phrase corresponding to a second reply step output by the second large language model is obtained; wherein the second reply step is one of the second target reply steps; According to the third guiding phrase corresponding to the second reply outline, the seventh guiding phrase corresponding to the second reply step is adjusted; When the second question is processed by the second large language model, a seventh state corresponding to a second reply step output by the second large language model is obtained; According to the third state corresponding to the second reply outline, the seventh state corresponding to the second reply step is adjusted.

25. A question and answer processing method characterized by, The method applied to the second device comprises: Obtaining a first question sent by a first device; Processing the first question by a first large language model to obtain a first reply outline corresponding to the first question, and sending the first reply outline to the first device, the first reply outline being used for adjusting a reply step output by a second large language model when the second large language model processes the first question, to obtain a first target reply corresponding to the first question.

26. The method of claim 25, wherein, The first device stores a guiding phrase library and a state library, the guiding phrase library comprising a first guiding phrase, and the state library comprising a first state; The processing of the first question by the first large language model to obtain the first reply outline corresponding to the first question comprises: According to the first question, a second guiding phrase is determined from the guiding phrase library, and a second state is determined from the state library, the second guiding phrase comprising one or more of the first guiding phrase, and the second state comprising one or more of the first state; According to the second guiding phrase, the second state, the first question, and a first thought chain guiding prompt, a first input text is obtained, the first thought chain guiding prompt being used to guide the first large language model to infer a reply outline for the first question; The first input text is input into the first large language model for processing to obtain the first reply outline output by the first large language model; The first reply outline comprises a third guiding phrase, or the first reply outline comprises the third guiding phrase and a third state, the third guiding phrase comprising one or more of the second guiding phrase, and the third state comprising one or more of the second state.

27. The method of claim 25, wherein, The second device stores a guide phrase library and a state library, the guide phrase library includes a first guide phrase and a first identifier corresponding to the first guide phrase, and the state library includes a first state and a second identifier corresponding to the first state; The first problem is processed by the first large language model to obtain a first reply outline corresponding to the first problem, which includes: A second guide phrase is determined from the guide phrase library according to the first question, and a first identifier corresponding to the second guide phrase is determined; the second guide phrase includes one or more of the first guide phrase; A second state is determined from the state library according to the first question, and a second identifier corresponding to the second state is determined; the second state includes one or more of the first state; A second input text is obtained according to the second guide phrase and the first identifier corresponding to the second guide phrase, the second state and the second identifier corresponding to the second state, the first question, and a second thinking chain guide prompt for guiding the first large language model to infer the reply identifier of the first question; The second input text is input into the first large language model for processing to obtain the first reply outline output by the first large language model, and the first reply outline includes a first identifier corresponding to a third guide phrase, or the first reply outline includes a first identifier corresponding to the third guide phrase and a second identifier corresponding to a third state.

28. The method of any one of claims 25-27, wherein, The first reply outline includes a first identifier corresponding to a third guide phrase, or includes a first identifier corresponding to the third guide phrase and a second identifier corresponding to a third state. After the first question is processed by the first large language model to obtain the first reply outline corresponding to the first question, the method further includes: A first outline identifier corresponding to the first reply outline is determined, the first question and the first outline identifier are associated and saved, and the first outline identifier is associated with the first identifier corresponding to the third guide phrase, or the first outline identifier is associated with the first identifier corresponding to the third guide phrase and the second identifier corresponding to the third state.

29. The method of claim 28, wherein, The method further includes: Obtaining a second question sent by the second device; According to the second question and the first question associated with the first outline identifier, a second outline identifier corresponding to the second question is determined, the second outline identifier is taken as a second reply outline corresponding to the second question, and the second reply outline is sent to the first device, and the second outline identifier is one of the first outline identifier.

30. The method of claim 29, wherein, The second reply outline is sent to the first device, which includes: After determining the second outline identifier corresponding to the second question, it is determined whether the second outline identifier and the first identifier associated with the second outline identifier have been sent to the first device, or it is determined whether the second outline identifier and the first identifier and the second identifier associated with the second outline identifier have been sent to the first device; sending the second reply outline to the first device upon determining that the second outline identifier and the first identifier associated with the second outline identifier have been sent to the first device, or upon determining that the second outline identifier, the first identifier associated with the second outline identifier, and the second identifier have been sent to the first device.

31. The method of claim 30, wherein, The method further comprises: sending the second outline identifier and the first identifier associated with the second outline identifier to the first device upon determining that the second outline identifier and the first identifier associated with the second outline identifier have not been sent to the first device; or, sending the second outline identifier, the first identifier associated with the second outline identifier, and the second identifier to the first device upon determining that the second outline identifier, the first identifier associated with the second outline identifier, and the second identifier have not been sent to the first device.

32. A first device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, The processor, when executing the computer program, causes the first device to implement the question and answer processing method according to any one of claims 15 to 24.

33. A second device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, The processor, when executing the computer program, causes the second device to implement the question and answer processing method according to any one of claims 25 to 31.

34. A computer-readable storage medium, the computer-readable storage medium storing a computer program, characterized in that, The computer program, when executed by a computer, causes the computer to implement the question and answer processing method according to any one of claims 15 to 24, or implement the question and answer processing method according to any one of claims 25 to 31.