Question-answer method and related apparatus

By generating and broadcasting the information simultaneously using a large language model, user commands are detected and the broadcasted content and user intent are recorded. This solves the problem of discontinuous broadcast content in existing question-answering methods and improves the user experience.

WO2025130156A9PCT designated stage Publication Date: 2026-05-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-09-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

The existing question-and-answer method cannot recognize the user's continued delivery of relevant instructions, resulting in interrupted delivery and poor user experience.

Method used

By generating and broadcasting responses simultaneously using a large language model, user commands are detected and the broadcasted content and user intent are recorded, enabling the continuous broadcasting of response content.

Benefits of technology

It enables the broadcast content to be accurately resumed according to user instructions after being interrupted, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024116567_15052026_PF_FP_ABST
    Figure CN2024116567_15052026_PF_FP_ABST
Patent Text Reader

Abstract

A question-answer method, applied to a terminal device which is deployed with a large language model. The method comprises: the large language model generating answer content on the basis of a first user instruction, and the terminal device broadcasting the answer content; in the answer content broadcasting process, detecting a second user instruction, interrupting the broadcast, sending a processing instruction to the large language model, on the basis of the processing instruction, the large language model instructing to interrupt the generation of the answer content or continuing to generate the answer content, and caching the continuously generated content; in response to a broadcast interruption request, interrupting the broadcast of the answer content; detecting a third user instruction to instruct to continue to broadcast, broadcasting unbroadcast content that is obtained by the large language model on the basis of the first user instruction and broadcast content, or is obtained by reading the cached continuously generated content. According to the present application, on the basis of the characteristics of edge generation and edge broadcast of a large language model, the broadcast of answer content can be continued after an interruption by controlling the generation process of the large language model.
Need to check novelty before this filing date? Find Prior Art

Description

A question-and-answer method and related apparatus

[0001] This application claims priority to Chinese patent application No. 202311764553X, filed on December 20, 2023, entitled “A Question-Answering Method and Related Apparatus”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of artificial intelligence technology, and in particular to a question-answering method and related apparatus. Background Technology

[0003] With the development of artificial intelligence technology, question-answering technology has become increasingly mature. Existing question-answering methods can interrupt the playback of the current response based on user commands, thus initiating a new conversation. However, when the user wants to continue playback of the interrupted response, existing methods only associate it with adjacent conversations and therefore cannot recognize the user's command to continue. In other words, the user needs to ask a new question and regenerate the playback content, rather than continuing playback at the interrupted point, resulting in a poor user experience.

[0004] Summary of the Invention

[0005] To address the aforementioned issues, embodiments of this application provide a question-and-answer method and related apparatus that perform corresponding processing after a broadcast interruption, thereby enabling the response content to be broadcast again after the interruption.

[0006] Therefore, the following technical solutions are adopted in the embodiments of this application:

[0007] In a first aspect, embodiments of this application provide a question-and-answer method. This method is applied to a terminal device, which is equipped with a large language model. The method mainly includes: the large language model generating response content based on a first user instruction, and the terminal device broadcasting the response content; during the broadcasting of the response content, the terminal device detects a second user instruction, generates an interruption broadcast request, and sends a processing instruction to the large language model. The large language model, based on the processing instruction, instructs to interrupt the generation of the response content, or continues the generation of the response content based on the processing instruction. The terminal device or a cloud device caches the content to be continuously generated; upon receiving the interruption broadcast request, the terminal device interrupts the broadcasting of the response content; upon detecting a third user instruction, the third user instruction instructs to continue broadcasting the response content, and the terminal device broadcasts the unbroadcast content in the response content. The unbroadcast content is generated by the large language model based on the first user instruction and the already broadcast content, or the unbroadcast content is read from the cached content to be continuously generated.

[0008] In other words, based on the characteristics of generating response content using a large language model—generating and broadcasting simultaneously—this application provides a question-and-answer method that allows the broadcasting of response content to resume after interruption. From the user's perspective, the user sends a first user command to obtain and broadcast the response content; during the broadcasting of the response content, the user sends a second user command, requiring an interruption of the broadcasting to execute the second user command or other commands; after executing several user commands, including the second user command, the user can send a third user command to continue broadcasting the unbroadcast portion of the response content after the interruption.

[0009] In this embodiment, to achieve the purpose of continuing broadcasting, after receiving the second user instruction, an interruption broadcasting request and a processing instruction are generated. First, the interruption broadcasting request can control the interruption of the broadcasting of the current response content to respond to other user instructions. Second, the processing instruction can control the interruption of response content generation and the recording of the first user instruction and the already broadcasted content simultaneously with the interruption of broadcasting, so that when a user instruction to continue broadcasting appears, the unbroadcasted content can be determined based on the recorded first user instruction and the already broadcasted content; or, the generation of response content can continue without interruption, recording the unbroadcasted content from the interruption point, so that when a user instruction to continue broadcasting appears, the unbroadcasted content can be directly obtained. Therefore, this embodiment achieves the continuous broadcasting of response content. Therefore, based on the method of this embodiment, a user can interrupt the broadcasting of response content during its execution to execute other user instructions; after executing the other instructions, the user can resume broadcasting of the response content from the interruption point. Based on the characteristics of large language models that generate and broadcast simultaneously, this application controls the generation process of large language models so that the broadcast of response content can be resumed after interruption.

[0010] In one possible implementation, when the generation of the response content is interrupted by the large language model, the first user instruction and / or the already played content are cached. When a third user instruction is detected, the cached first user instruction and / or the already played content are retrieved, and the unplayed content can then be obtained through the large language model.

[0011] This implementation provides a method for determining unplayed content based on a first user instruction and the already played content. For example, the first user instruction and the already played content of the response are used as input to a large language model, and the unplayed content of the response is output; or the first user instruction is used as input to a speech model, the entire content of the response is output, and the unplayed content is determined from the entire content based on the already played content of the response. In other words, when the response playback is interrupted, only the first user instruction and the already played content of the response are cached. If there is a user instruction to continue playback, the unplayed content is generated by the speech model based on the cached first user instruction and the already played content of the response; if there is no user instruction to continue playback, the speech model is not needed to generate the response content. Therefore, this implementation method only calls the large language model when there is a user instruction to continue playback, consuming fewer logical resources and achieving high efficiency.

[0012] In another possible implementation, when the generation of the response content is interrupted by the large language model, the context of the first user instruction is also cached. When a third user instruction is detected, the cached first user instruction, the context of the first user instruction, and the already played content are obtained. Through the large language model, the unplayed content can then be obtained.

[0013] In this implementation, the context of the first user instruction also needs to be recorded to more accurately resume playback. For example, the context could be the conversation round at the time of interruption, whether the user's vehicle was parked, the user's past questions, or the user profile. For instance, if the user interrupts the playback and then engages in multiple conversations, the context may have changed, such as changes in the user's past questions or updates to the user profile. Therefore, when resuming playback, the playback content after the breakpoint can be generated based on the already played content and the recorded context of the first user instruction, ensuring that the resumed playback content better reflects the scenario before the interruption and is unaffected by changes in context.

[0014] In another possible implementation, when a second user instruction is detected, an interruption broadcast request will be generated and a processing instruction will be sent to the large language model only if the user intent corresponding to the second user instruction meets the preset conditions.

[0015] In this implementation, the streaming of the language model can only be interrupted when the user has a clear intent, thus achieving the goal of controllable interruption of streaming.

[0016] In another possible implementation, determining whether the user intent corresponding to the second user instruction meets preset conditions can be achieved using a preset whitelist. That is, by determining that the user intent corresponding to the second user instruction falls within the preset whitelist, it can be determined that the second user instruction can interrupt the broadcast of the current response content; that is, an interruption request is generated and a processing instruction is sent to the large language model.

[0017] In this implementation, the method for determining whether a user has a clear intent is not limited; for example, a whitelist management method can be used. User intents within the preset whitelist are considered clear intents, while user intents not within the preset whitelist are considered indefinite intents. When an intent from the whitelist appears, the language model can respond to the user's intent by performing actions such as interrupting streaming playback or starting a new dialogue round.

[0018] In another possible implementation, one use of natural language understanding models is for user intent analysis. Therefore, a natural language understanding model can be used to determine the user intent corresponding to a second user instruction.

[0019] In this implementation, the intent recognition function of the natural language understanding model is used to understand and analyze user commands to determine the user intent corresponding to the command.

[0020] In another possible implementation, this application embodiment does not limit the form of user input content. When the user input content is in the form of audio, speech analysis is performed on the user input audio to obtain the corresponding first user instruction and / or second user instruction and / or third user instruction; when the user input content is in the form of text, the user input text is processed based on preset processing rules to obtain the first user instruction and / or second user instruction and / or third user instruction.

[0021] In this implementation, the form of user input is not limited. That is, user input can be either speech or text. When the user input is audio, speech analysis processing can be performed to obtain the user instructions in this embodiment. When the user input is text, the user input can be processed based on preset processing rules to obtain the user instructions in this embodiment. The preset processing rules include rules such as generating prompt text based on the user input text.

[0022] Secondly, this application provides a question-answering method applied to a question-answering system. The question-answering system includes a terminal device and a cloud device, which are communicatively connected. The cloud device is equipped with a large language model, and the terminal device detects user commands and broadcasts response content. The question-answering method includes: when the terminal detects a first user command, it sends the first user command to the cloud device; after receiving the first user command, the cloud device generates response content through the large language model; the terminal device receives and broadcasts the response content; during the broadcasting process, the terminal device detects a second user command and sends the second user command to the cloud device; after receiving the second user command, the cloud device generates an interruption request, sends the interruption request to the terminal device, and sends a processing instruction to the large language model, wherein the processing instruction instructs the large language model to interrupt the generation of response content, or instructs the large language model to continue answering. Content is generated so that the content to be generated subsequently is cached; after receiving an interruption broadcast request, the terminal device interrupts the broadcast of the response content; the terminal device detects a third user instruction and sends a third user instruction to the cloud device, which instructs the continued broadcast of the response content; the cloud device receives the third user instruction, generates content based on the first user instruction and the already broadcast content, determines the unbroadcast content in the response content through a large language model, and sends the unbroadcast content to the terminal device; or, the cloud device or the terminal device reads the unbroadcast content in the response content from the cached content to be generated subsequently; the terminal device broadcasts the obtained unbroadcast content.

[0023] In one possible implementation, the method further includes: when the generation of response content is interrupted by the large language model, the cloud device or terminal device caches the first user instruction and / or the already played content. Therefore, the large language model can generate the unplayed content based on the cached first user instruction and the already played content.

[0024] In another possible implementation, the method further includes: when the large language model interrupts the generation of response content, the cloud device or terminal device caches the context of the first user instruction. Therefore, the large language model can generate unplayed content based on the cached first user instruction, the context of the first user instruction, and the already played content. This avoids the impact of context changes on the generation of unplayed content.

[0025] In another possible implementation, the cloud device receives a second user instruction and, after determining that the user intent corresponding to the second user instruction meets preset conditions, generates an interruption broadcast request. In other words, the broadcast of the current response content will only be interrupted if the user intent corresponding to the second user instruction meets the preset conditions.

[0026] In another possible implementation, a preset whitelist is used to restrict the user intent that can interrupt the playback of the response content. That is, the playback of the response content will only be interrupted if the user intent corresponding to the second user command falls within the preset whitelist.

[0027] In another possible implementation, the user intent corresponding to the second user instruction is determined through a natural language understanding model.

[0028] In another possible implementation, the applicable scenarios for this method are not limited; it can be applied to question-and-answer scenarios involving both audio and text. The first user instruction and / or the second user instruction and / or the third user instruction can be obtained based on speech analysis of the user's audio input, or it can be obtained by processing the user's text input according to preset processing rules.

[0029] Thirdly, this application provides a question-answering method applied to a cloud device. The cloud device is equipped with a large language model. The question-answering method includes: using the large language model, in response to a first user instruction, generating corresponding response content, which can be broadcast to the user; during the broadcasting of the response content, when a second user instruction is received, generating an interruption broadcast request to instruct the interruption of the broadcasting of the response content, and also sending a processing instruction to the large language model to cause the large language model to interrupt or continue generating the response content. If the large language model continues generating the response content, the continued-generated content is cached, and the interruption broadcast request is used to interrupt the broadcasting of the response content; upon receiving a third user instruction, when the user intent indicated by the third user instruction is to continue broadcasting the response content, generating, based on the first user instruction and the already broadcasted content, using the large language model, determining the unbroadcast content in the response content, or reading the cached continued-generated content to obtain the unbroadcast content, so that the unbroadcast content is broadcast. Therefore, the purpose of interrupting and continuing the broadcasting process of the response content is achieved.

[0030] In another possible implementation, the method further includes caching the first user instruction and / or the already played content when the generation of response content is interrupted by the large language model. Therefore, the large language model can generate the unplayed content based on the cached first user instruction and the already played content.

[0031] In another possible implementation, the method further includes caching the context of the first user instruction when the generation of response content is interrupted by the large language model. Therefore, the large language model can generate unplayed content based on the first user instruction, the context of the first user instruction, and the already played content.

[0032] In another possible implementation, restrictions are placed on user commands that interrupt the broadcast. Furthermore, the user intent corresponding to the second user command is determined, and an interrupt broadcast request is generated only when the user intent meets preset conditions.

[0033] In another possible implementation, the preset condition is implemented by setting a whitelist to determine the user intent corresponding to the second user command. When the user intent is within the preset whitelist, the broadcast of the response content is interrupted.

[0034] In another possible implementation, a natural language understanding model is used to analyze and obtain the user intent corresponding to the second user instruction.

[0035] In another possible implementation, when the user input is in the form of audio, speech analysis is performed on the audio input to obtain the corresponding first user command and / or second user command and / or third user command. When the user input is in the form of text, text processing is performed based on preset processing rules to obtain the corresponding first user command and / or second user command and / or third user command.

[0036] Fourthly, this application provides a question-and-answer method applied to a terminal device. The method includes: the terminal device detecting a first user instruction and sending the first user instruction to a cloud device, wherein the first user instruction instructs the cloud device to generate response content based on a large language model; the terminal device receiving and broadcasting the response content sent by the cloud device; during the broadcasting of the response content, the terminal device detecting a second user instruction instructing the cloud device to generate an interruption broadcast request and sending the second user instruction to the cloud device; subsequently, the terminal device receiving an interruption broadcast request from the cloud device and interrupting the broadcasting of the response content; the terminal device detecting a third user instruction and sending the third user instruction to the cloud device, the third user instruction instructing continued broadcasting of unbroadcast content in the response content; and finally, the terminal device receiving the unbroadcast content from the aforementioned response content sent by the cloud device and broadcasting the unbroadcast content.

[0037] In another possible implementation, when the user input is in the form of audio, speech analysis is performed on the audio input to obtain the corresponding first user command and / or second user command and / or third user command. When the user input is in the form of text, text processing is performed based on preset processing rules to obtain the corresponding first user command and / or second user command and / or third user command.

[0038] Fifthly, this application provides a terminal device. The terminal device is equipped with a large language model and is used to execute the method described in any of the first aspects above. Alternatively, the terminal device is used to execute the method described in any of the fourth aspects above.

[0039] Sixthly, this application provides a question-answering system, which includes a terminal device and a cloud device. The terminal device and the cloud device are communicatively connected. The cloud device is deployed with a large language model. The terminal device is used to execute the method of any one of the fourth aspects above, and / or the cloud device is used to execute the method of any one of the third aspects above, and / or the question-answering system is used to execute the method of any one of the second aspects above.

[0040] In a seventh aspect, this application provides a cloud device, which is deployed with a large language model, and is communicatively connected to a terminal device. The cloud device is used to execute the method of any one of the third aspects above.

[0041] Eighthly, this application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it causes the methods described in any of the above-mentioned embodiments to be implemented.

[0042] Ninthly, this application provides a chip including a processing circuit and a storage medium storing computer program code; when the computer program code is executed by the processing circuit, it implements the method of any one of the above.

[0043] In a tenth aspect, this application provides a computer program product comprising program instructions that, when executed by a computer, cause the computer to perform any of the methods described above. Attached Figure Description

[0044] The accompanying drawings used in the embodiments or technical description are briefly introduced below.

[0045] Figure 1 is a schematic diagram of a scenario using an existing question-answering method;

[0046] Figure 2 is a schematic diagram of a question-and-answer method provided in an embodiment of this application;

[0047] Figure 3 is a schematic diagram illustrating a scenario example of a question-and-answer method for users and terminal devices provided in an embodiment of this application;

[0048] Figure 4 is a flowchart illustrating a question-and-answer method provided in an embodiment of this application;

[0049] Figure 5 is a schematic diagram of the flow of the first example of a question-and-answer method provided in the embodiments of this application;

[0050] Figure 6a is a schematic diagram of a question-and-answer system provided in an embodiment of this application;

[0051] Figure 6b is a schematic diagram of another question-and-answer system provided in an embodiment of this application;

[0052] Figure 7 is a schematic diagram of the method flow of the first example of a question-and-answer system provided in the embodiments of this application;

[0053] Figure 8 is a flowchart illustrating a second example of a question-and-answer method provided in an embodiment of this application;

[0054] Figure 9 is a schematic diagram of the method flow of a second example of a question-and-answer system provided in the embodiments of this application;

[0055] Figure 10 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application. Detailed Implementation

[0056] In this article, the term "and / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. The symbol " / " in this article indicates that the related objects have an "or" relationship; for example, A / B means A or B.

[0057] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.

[0058] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0059] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.

[0060] To facilitate understanding of the solutions provided in the embodiments of this application, a brief introduction to some of the terms involved in this solution will be given first.

[0061] Single-round recording: After recording is completed once, the system needs to complete all operations of speech-to-text, text-to-intent, and intent-to-broadcast before exiting the conversation. If the user wants to continue using voice conversation, they need to be woken up again.

[0062] Multi-round recording: After recording is completed, and all operations such as speech-to-text, text-to-intention, and intention-to-broadcast are completed, the user can start the next round of dialogue without waking up, but cannot interrupt the previous round of dialogue.

[0063] Full-duplex recording: Supports recording the next round of voice recording while processing the previous round of speech-to-text, text-to-intent, and intent-to-broadcast. The previous round of conversation can be interrupted at any time.

[0064] Large Language Models (LLMs) typically refer to neural network models containing an extremely large number of parameters (usually over a billion). They possess the following characteristics: First, they have a massive parameter scale, containing billions of parameters and reaching sizes of hundreds of gigabytes or even larger. This enormous scale provides them with powerful expressive and learning capabilities. Second, they can learn multiple tasks simultaneously. Large language models often learn various NLP (Neuro-Linguistic Programming) tasks together, such as machine translation, text summarization, and question-answering systems. Multi-task learning allows the model to learn broader and more generalized language understanding abilities. Third, they require powerful computing resources. Training large language models typically requires hundreds or even thousands of GPUs (graphics processing units) and a significant amount of time, usually ranging from weeks to months. Powerful computing resources can accelerate the training process while preserving the capabilities of the large language model. Fourth, they require abundant data. Large language models require vast amounts of data for training; only with a large amount of data can the advantages of their parameter scale be fully realized. Furthermore, large language models are widely used in the field of natural language processing (NLP) and are fundamentally changing the landscape of NLP tasks, giving rise to more powerful and intelligent language technologies. Large language models are one of the important directions in the development of AI (Artificial Intelligence). At the same time, large language models also possess the ability to perform exceptionally well in various NLP tasks, such as text classification, sentiment analysis, summarization, and translation. Large language models can be used in multiple application areas, including automatic writing, chatbots, virtual assistants, voice assistants, and automatic translation.

[0065] With the development of artificial intelligence technology, question-answering technology is becoming increasingly mature. Taking large language models as an example, the dialogue between users and large speech models can no longer be a simple question-and-answer format, but can also lean towards analytical and interpretive dialogues, such as situation analysis, news analysis, and topic writing. Since analytical and interpretive dialogues are generally lengthy, users often interrupt the current broadcast to discuss other issues, and then resume the broadcast after the discussion is completed. Generally, the development from single-turn recording to multi-turn recording to full-duplex recording has enabled interactive dialogue, especially with the emergence of large language models, where interruptions and resumptions of broadcasts occur frequently.

[0066] Existing question-and-answer methods can interrupt the current broadcast based on user commands to start a new discussion. However, when a user wants to continue the interrupted broadcast, the system only associates adjacent dialogues and therefore cannot recognize the user's command to continue. In other words, the user needs to ask a new question and regenerate the broadcast content, rather than continuing the broadcast at the interruption point, resulting in a poor user experience.

[0067] Please refer to Figure 1, which illustrates a scenario of an existing question-answering method. As shown in Figure 1, in one scenario of an existing question-answering method, a user issues the instruction "Analyze the development trends of the Internet." Based on this instruction, the terminal device broadcasts, "Based on the current development situation, several possible trends in Internet development include: First, the widespread application of artificial intelligence." During the broadcast, the user issues the instruction "Turn on the air conditioner." The terminal device interrupts the broadcast and, based on the "Turn on the air conditioner" instruction, broadcasts the corresponding text "Okay." The user issues the instruction "Continue the analysis, I'm listening," wanting to continue the broadcast of "analyzing Internet trends," but the terminal device does not associate the interval dialogue turns and cannot recognize the current instruction, thus preventing the interrupted broadcast from continuing.

[0068] One solution involves configuring the original dialogue stream with node information such as "If you exit from this node, you will be automatically pulled back." This allows the original dialogue stream to be pulled back and replayed when the new dialogue stream ends after the interruption.

[0069] In this solution, the pre-set method of "whether to pull back the original conversation flow" can only mechanically pull back the conversation, without being influenced by the user's will. In other words, when a user is conversing with the machine, whether certain conversations are automatically pulled back may contradict the user's intention, thus degrading the user experience.

[0070] Another solution involves associating the first parameter of the initial conversation between the user and the automated assistant with a third-party application. The system can obtain the first parameter and reconstruct the initial human-machine conversation between the user and the automated assistant based on it. In other words, if the user wishes to continue a previously paused topic, the abandoned conversation can be reconstructed using the first parameter, without forcing the user to start the conversation from scratch.

[0071] In this solution, the discarded dialogue context can be reconstructed using the first parameter, allowing the previously paused topic to resume. In scenarios involving interrupted broadcasts, this solution can reconstruct the discarded dialogue context using the recorded first parameter to locate the interruption point, but it cannot determine the subsequent broadcast content, thus preventing continued broadcasting.

[0072] To address the existing technical problems, this application provides another solution: when a user intends to interrupt the broadcast content, the system records the user's command information and the already broadcast content, or interrupts the broadcast without interrupting content generation to obtain the unbroadcast content after the interruption position. When the user resumes the broadcast content, based on the recorded user command information and the already broadcast content, the system regenerates the broadcast content, and then, based on the already broadcast content, obtains the broadcast content after the interruption position for continued broadcasting, or obtains the already generated unbroadcast content for continued broadcasting.

[0073] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. In this application, to concisely describe the specific implementation methods, voice interaction is used as an example for illustration. It should be further noted that the methods or related devices of the present application embodiments can also be applied to any other form of dialogue content, such as text dialogue. When a user interrupts text display to execute other instructions, and a user instruction to continue display is given, the text display resumes from the interrupted position.

[0074] Please refer to Figure 2, which illustrates a scenario of a question-and-answer method. As shown in Figure 2, users can receive or send messages through the transceiver module, and the processing module processes user commands and sends the processing results back to the transceiver module to achieve interaction with the user.

[0075] Optionally, the voice transceiver module and the voice processing module can be integrated and deployed on the terminal device, or the terminal device can only deploy the transceiver module for voice pickup and playback, while the voice processing module is deployed on the server.

[0076] As shown in Figure 2, the terminal devices can be terminal devices 101, 102, and 103 as shown in Figure 2, and the server can be server 104 as shown in Figure 2. As shown in Figure 2, when the voice processing module is deployed on the server, terminal devices 101, 102, and 103 communicate with server 104 through a communication link. The communication link can include various connection types, such as wired communication links, wireless communication links, or fiber optic cables.

[0077] Optionally, terminal devices 101, 102, and 103 may have various communication client applications installed, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc. Terminal devices 101, 102, and 103 may be various electronic devices with displays and supporting web browsing, including but not limited to mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. This application embodiment does not impose any limitations on these. Server 104 may be a server providing various services, such as a backend server supporting the pages displayed on terminal devices 101, 102, and 103.

[0078] It should be noted that the question-and-answer method in this application embodiment is generally executed by a terminal device or a server, and the interaction with the user is realized through the terminal device.

[0079] Please refer to Figure 3, which illustrates a scenario example of a question-and-answer method involving a user and a terminal device. As shown in Figure 3, in this example, the user issues a first user command; the question-and-answer system generates a first response based on the first user command; during the playback of the first response, the user issues a second user command; the question-and-answer system interrupts the first response and generates a second response based on the second user command; the user issues a third user command, which instructs the user to continue playing the first response; the question-and-answer system recognizes the third user command and continues playing the unplayed content of the first response.

[0080] In this embodiment of the application, the question-answering system generates response content using a large language model and broadcasts it through a terminal device. That is, the large language model can be deployed on the terminal device, and optionally, the entire question-answering system can be deployed on the terminal device; or the large language model can be deployed on a cloud device, and after the cloud device generates the response content, the response content is broadcast through the terminal device.

[0081] In this embodiment, based on the evolution of single-round recording, it supports simultaneous processing and recording, and can associate the previous and next rounds of conversation. That is, the previous round of conversation can be interrupted by continuing to send instructions, and the interval conversation rounds can be associated. Therefore, it can realize uninterrupted streaming and resume streaming playback in full-duplex mode.

[0082] Optionally, the interval between interrupting the first response and continuing the un-broadcast content is not limited to one user command interaction. In other words, after interrupting the first response, multiple user command interactions can be performed before continuing the un-broadcast content.

[0083] For example, as shown in Figure 3, the first user instruction issued by the user can be "Analyze the development trend of the Internet"; the first response generated by the question-and-answer system based on the first user instruction can be "Based on the current development situation, several possible trends in the development of the Internet include: First, the widespread application of artificial intelligence", and then start streaming the message.

[0084] For example, as shown in Figure 3, the second user instruction issued by the user can be a hardware-related instruction such as "turn on the air conditioner." The question-and-answer system interrupts the first response and, based on the second user instruction, identifies the intention to turn on the air conditioner, provides the second response "okay," and sends the relevant instruction to the control system to turn on the air conditioner. The specific operations of the control system will not be elaborated further in this embodiment. Alternatively, the second user instruction can also be a generative instruction such as "analyze the development trends of the manufacturing industry." The question-and-answer system interrupts the first response and, based on the second user instruction, generates a second response, such as "The development trends of the manufacturing industry can be analyzed from the following aspects."

[0085] In this embodiment, the specific implementation of interrupting the currently broadcast second user instruction is not limited. For example, as shown in Figure 1, the second user instruction issued by the user can be a hardware-related instruction such as "turn on the air conditioner" or "open the car window." The terminal device interrupts the first response content, and based on the second user instruction, identifies the intention to turn on the air conditioner, responds with the second response "OK," and sends the relevant instruction to the control system to turn on the air conditioner. The relevant operations of the control system will not be elaborated further in this embodiment. The second user instruction issued by the user can also be a generative instruction such as "analyze the development trend of the manufacturing industry." The terminal device interrupts the first response content and, based on the second user instruction, broadcasts the second response content such as "The development trend of the manufacturing industry can be analyzed from the following aspects."

[0086] For example, as shown in Figure 3, after one or more conversations, a user can issue a third user instruction, "Continue analysis, I'm listening," to continue the first response content. Because this embodiment of the application processes the interrupted first response content, when the user expresses an intention to resume the conversation, such as "Continue analysis," this embodiment of the application can resume the previously interrupted streaming and continue broadcasting the unfinished content, such as "Artificial intelligence will penetrate into various fields, including smart homes, intelligent transportation, and smart healthcare."

[0087] In this embodiment, taking a large language model as an example, the streaming playback of the large language model can be interrupted at any time. Furthermore, the streaming playback of the large language model can only be interrupted when the user's speech contains a clear intent. This embodiment does not limit the method for determining a user's clear intent; for example, it can be managed through a whitelist, where user intents within the whitelist are considered clear intents, and intents outside the whitelist are considered indistinct intents. When an intent from the whitelist appears, the large language model can respond to the user's intent by performing actions such as interrupting streaming playback or starting a new dialogue round. After the streaming playback of the large language model is interrupted, it can resume playback from the point of interruption after determining the user's intent to resume playback.

[0088] For example, as shown in Figure 3, when a user says "Baby, let's go to the amusement park tomorrow," the streaming playback of the large language model will not be interrupted if the user's intent in the voice content is determined to be non-explicit.

[0089] Please refer to Figure 4, which illustrates a flowchart of a question-answering method. As shown in Figure 4, this application embodiment provides a question-answering method applied to a terminal device equipped with a large language model. The method mainly includes the following steps:

[0090] Step S401: Broadcast the response content, which is generated by the large language model based on the first user instruction.

[0091] In another possible implementation, in response to user input in the form of audio, the method further includes: performing speech analysis on the user-input audio to obtain a first user instruction and / or a second user instruction and / or a third user instruction; or, in response to user input in the form of text, the method further includes: processing the user-input text based on preset processing rules to obtain a first user instruction and / or a second user instruction and / or a third user instruction.

[0092] In step S402, during the process of broadcasting the response content, when a second user instruction is detected, an interruption broadcast request is generated and a processing instruction is sent to the large language model; the processing instruction instructs the large language model to interrupt the generation of the response content, or the processing instruction instructs the large language model to continue generating the response content, so as to cache the content to be generated.

[0093] In one possible implementation, in response to a second user instruction, after determining that the user intent corresponding to the second user instruction meets preset conditions, an interruption broadcast request is generated and a processing instruction is sent to the large language model.

[0094] In another possible implementation, the preset condition is a preset whitelist. After determining that the user intent corresponding to the second user instruction is within the preset whitelist, an interruption broadcast request is generated and a processing instruction is sent to the large language model.

[0095] In another possible implementation, determining whether the user intent corresponding to the second user instruction meets the preset conditions includes: determining the user intent corresponding to the second user instruction through a natural language understanding model based on the second user instruction; and judging whether the user intent meets the preset conditions.

[0096] Step S403: In response to the interruption broadcast request, the broadcast of the response content is interrupted.

[0097] Step S404: A third user instruction is detected, and the un-played content in the response content is broadcast. The third user instruction instructs the continued broadcasting of the response content. The un-played content is generated by the large language model based on the first user instruction and the already broadcast content, or the un-played content is read from the cached content to be generated.

[0098] In one possible implementation, when the unbroadcast content is generated by the large language model based on the first user instruction and the already broadcast content, the first user instruction and / or the already broadcast content are obtained after being cached when the generation of the large language model interrupts the response content.

[0099] In another possible implementation, the unbroadcast content is generated by the large language model based on the first user instruction, the context of the first user instruction, and the already broadcast content. The context of the first user instruction is obtained after being cached when the generation of the response content is interrupted by the large language model.

[0100] Please refer to Figures 5 to 7, which illustrate an example of a question-and-answer method. It should be noted that, for ease of description of the technical solutions of this application's embodiments, in this application's embodiments, a user's question and the corresponding answer from the terminal device are defined as a round. This application's embodiments focus on the interruption and resumption of a broadcast; therefore, the round in which the user sends a command to generate a broadcast and the terminal device generates the corresponding broadcast is defined as a generation round; the round in which the user sends a command to resume broadcasting and the terminal device resumes broadcasting is defined as a resumption round; and one or more intermediate dialogue rounds are defined as sub-rounds.

[0101] Please refer to Figure 5, which shows a flowchart of a first example of a question-and-answer method. As shown in Figure 5, it is assumed that the functional components in the terminal device used for information detection and broadcasting are transceiver modules, and the functional components in the terminal device or cloud device used for voice processing are processing modules. The question-and-answer method of the first example of this application mainly includes the following steps:

[0102] In step S501, the transceiver module detects the first user command. The first user command can be in the form of audio, such as voice or recording.

[0103] In step S502, the transceiver module sends the first user instruction to the processing module.

[0104] In step S503, the processing module performs speech processing and generates the first response content using a large language model. Optionally, when generating the first response content, the first user instruction and the generated portion of the first response content are recorded.

[0105] Step S504: The processing module sends the first response content to the transceiver module.

[0106] Step S505: The transceiver module broadcasts the first response.

[0107] In this embodiment, steps S501 to S505 are also referred to as the generation wheel. In the generation wheel, the user generates a first user instruction, the transceiver module in the terminal device picks up the user's first user instruction, and the processing module performs voice processing to generate a first response content.

[0108] In step S506, the transceiver module detects a second user command. The second user command can be in the form of audio, such as voice or recording.

[0109] In step S507, the transceiver module sends a second user instruction to the processing module.

[0110] Optionally, in step S508, the processing module performs voice processing to determine the user's intent. If the user's intent is in the intent whitelist, the first response content is paused, and the second user instruction is executed to generate the second response content.

[0111] In this embodiment, the generation and recovery rounds also include a step to determine the user's intent, the purpose of which is to determine whether the user's intent is an explicit intent within the whitelist. When the user's intent is determined to be an explicit intent, the transceiver module performs voice broadcasting or stops broadcasting.

[0112] In step S509, the processing module sends a pause broadcast command to the transceiver module. Optionally, the processing module also sends a second response to the transceiver module.

[0113] In step S510, the transceiver module pauses broadcasting the first response content. Optionally, the transceiver module broadcasts the second response content.

[0114] Optionally, in step S511, a pause processing event is reported.

[0115] Step S512: Pause the generation of the first response content. Optionally, record the generation portion of the first user instruction and the first response content.

[0116] Optionally, recording the first user instruction can be either recording all or key information of the first user instruction; key information refers to relevant information that can be used to generate the first response content, such as "Internet" or "development trends" as shown in Figure 3. Recording the generated portion of the first response content can be either text information or attribute information of the generated portion of the first response content; text information refers to the generated text content; attribute information refers to information such as the position, index, and number of words of the generated portion. For example, as shown in Figure 3, the text information is "Based on the current development situation, several possible trends in Internet development include: First, the widespread application of artificial intelligence"; the attribute information includes: the stop position is "...widespread application", the position of the first trend analysis, and thirty-six words generated, etc.

[0117] Optionally, based on the characteristics of streaming broadcasting—generating and broadcasting simultaneously—the steps of generating, sending, and broadcasting the first response content (i.e., steps S503 to S505) are performed concurrently. Therefore, the ungenerated content and the unbroadcast content in the first response content are identical. Furthermore, the generated content and the broadcast content in the first response content are also identical. Additionally, during the generation, sending, and broadcasting of the first response content, the first user instruction and the generated portion of the first response content can be recorded verbatim; alternatively, when a pause event is reported, the first user instruction and the generated portion of the first response content can be recorded.

[0118] Optionally, steps S506 to S512 are also referred to as the second round. In the second round, the user generates a second user instruction, the transceiver module in the terminal device picks up the user's second user instruction, and the processing module performs voice processing and determines the user's intent. When the user's intent is determined to be explicit, the transceiver module performs voice broadcast or stops broadcasting.

[0119] Optionally, the second round can be one or more dialogue rounds that interrupt the generation round. Figure 3 illustrates an application scenario where the second round is one dialogue round. In other scenarios, the second round can be multiple dialogue rounds.

[0120] In this embodiment of the application, the specific content of the second round is not limited. It can be the instruction to "turn on the air conditioner" as shown in Figure 3, or any other instruction.

[0121] In step S513, the transceiver module detects a third user command.

[0122] Step S514: The transceiver module sends a third-user instruction.

[0123] Optionally, in step S515, the processing module continues voice processing to determine the user's intent. The determination of the user's intent is the same as in step S508, except that the object of determination and the determination result are different, and will not be elaborated further here.

[0124] In step S516, when the user intends to continue broadcasting the first response content, the processing module obtains the ungenerated part of the first response content based on the recorded first user instruction and the generated part of the first response content.

[0125] For example, based on the recorded first user instruction, the processing module regenerates the entire content of the first response. Then, based on the generated portion of the first response content, the processing module can obtain the ungenerated portion of the first response content, which is the content that the recovery wheel needs to broadcast.

[0126] Step S517: The processing module sends the ungenerated portion of the first response content to the transceiver module.

[0127] In step S518, the transceiver module continues to broadcast the ungenerated portion of the first response content.

[0128] In this embodiment, steps S513 to S518 are also referred to as the recovery round. In the recovery round, the user generates a third user instruction, the transceiver module in the terminal device picks up the user's third user instruction, and the processing module performs voice processing and determines the user's intent. When the user's intent is determined to continue playing the first response content, the processing module, based on the recorded first user instruction and the generated portion of the first response content, obtains the ungenerated portion of the first response content, and the transceiver module plays the ungenerated portion of the first response content. Here, the user's intent to continue playing the first response content is a definite intent.

[0129] In this embodiment, the steps of generating the second user instruction, the next user instruction, and the recovery user instruction can be performed concurrently. For example, when the user starts generating the second user instruction, steps S506 and S505 are performed simultaneously, that is, the work of detecting the second user instruction and the work of broadcasting the first response content are performed simultaneously. In other words, the second user instruction is detected while the first response content is broadcast, until a complete second user instruction is detected and the user's intent is determined to be explicit, at which point the broadcasting of the first response content stops.

[0130] Please refer to Figures 6a and 6b, which show schematic diagrams of a question-and-answer system.

[0131] As shown in Figure 6a, in one specific implementation, both the transceiver module and the processing module are deployed on the terminal device. The transceiver module includes a voice assistant and an Automatic Speech Recognition (ASR) module. The voice assistant has voice pickup and voice playback functions. The ASR module has language processing functions to process user voice and obtain user commands. The processing module includes a Dialog Manager (DM) module, a large language model, and a Natural Language Understanding (NLU) module.

[0132] As shown in Figure 6b, in another specific implementation, the transceiver module is deployed in the terminal device, and the processing module is deployed in the cloud device. The implementation methods of the transceiver module and the processing module are the same as those in Figure 6a, and will not be repeated here. Additionally, a transmission channel (Access Services / kit, AS / kit) module is included between the transceiver module and the processing module. The AS / kit module serves as the signal transmission channel between the terminal device and the cloud, suitable for scenarios where large language models are deployed on a server. The AS module refers to the cloud input service, and the kit module refers to the toolkit of the terminal device, thereby enabling signal conversion and transmission between the cloud device and the terminal device.

[0133] For example, when a user activates the voice assistant by saying the wake word "Xiaoyi Xiaoyi," and then utters a voice command such as "Analyze the development trends of the internet?" or "Turn on the air conditioner," the voice command goes through a process involving the ASR module, AS / kit module, DM module, large language model, or NLU module, before the voice assistant outputs the response. Specifically, the DM module judges the voice command and inputs different voice commands into the large language model or NLU module. The large language model generates the response, while the NLU module determines the user's intent. Optionally, to improve the efficiency of voice interaction, the voice command can be sent to both the large language model and the NLU module simultaneously. The large language model or NLU module then analyzes and judges the voice command to proceed to the next execution step.

[0134] Please refer to Figure 7, which illustrates the flowchart of a first example of a question-and-answer system. As shown in Figure 7, it mainly includes a generation round, a sub-round, and a recovery round. In the generation round, the user's question and the generated content are recorded.

[0135] Optionally, in the next round, the user's intent needs to be determined to decide whether to interrupt or resume the broadcast. This is achieved through whitelist management; when the user's intent is on the whitelist, the user's intent is executed, and a pause event is reported to the cloud side, pausing the generation of the streaming broadcast. In the resumption round, the large language model is invoked to continuously generate subsequent content based on the recorded user questions and the generated content. The large language model supports the ability to generate subsequent content based on user questions and the generated content. It can be further understood that clarifying the user's intent can also be done in other dialogue rounds.

[0136] In this embodiment, the DM module records the dialogue in the generation round so that the recovery round can be used to replay and recover the dialogue. For example, it records the user's question and the generated content. For instance, the user's question could be "Analyze the development trends of the Internet," and the generated content could be "Based on the current development situation, several possible trends in Internet development include: First, the widespread application of artificial intelligence."

[0137] Optionally, the DM module also records the context of the generation round to more accurately resume playback. For example, the context could be the dialogue round number, whether the user's car is parked, the user's historical questions, or the user profile. For instance, if a user interrupts the playback and then engages in multiple conversations, the context may have changed, such as changes in the user's historical questions or updates to the user profile. Therefore, when resuming the dialogue in the recovery round, the module can generate unplayed content after the breakpoint based on the already played dialogue content and the recorded generation round context. This ensures that the subsequent unplayed content better matches the user's expectations for the generation round, guaranteeing consistency in the response content.

[0138] As shown in Figure 7, in the generation round, the user initiates a dialogue by waking up the voice assistant. During the first dialogue, the voice assistant records the user's voice, obtaining the first audio and corresponding first context, and sends the first audio and first context to the ASR module for speech recognition. The ASR module receives the first audio and first context from the voice assistant, performs speech recognition, and obtains the corresponding first user command. The ASR module sends the first user command and first context to the AS / kit module. The ASR module is also used for Voice Activity Detection (VAD) and sends the first event text corresponding to the VAD event to the AS / kit module. The AS / kit module sends the first user command, first event text, and first context to the DM module. The DM module receives the first user command, first event text, and first context, and sends the first user command to the large language model. The large language model generates the first response content based on the first user command and sends the first response content to the DM module. The characteristic of streaming generation is that it generates and sends simultaneously. Through command issuance, the DM module sends the first response content to the voice assistant. The voice assistant streams the first response content. Streaming refers to the process where a large language model generates the first response content, and the voice assistant simultaneously reads out the first response content.

[0139] As shown in Figure 7, the second round includes two scenarios: In the first scenario, after the first response content is played, the user starts one or more conversations. This scenario does not involve interrupting the streaming playback, and will not be described in detail in this application embodiment; In the second scenario, the user starts one or more conversations before the first response content is played. In this case, it is necessary to interrupt the playback of the first response content in order to start a new conversation.

[0140] In other words, in this second round of VAD event processing, the voice assistant sends the VAD event's audio to the ASR module. The ASR module performs speech recognition on the VAD event's audio and simultaneously transmits the recognized text to both the end and the cloud. That is, the recognized text is sent to the DM module via the AS / kit module to interrupt the streaming generation of the large language model. Optionally, the voice assistant simultaneously sends the recognized text for display.

[0141] Optionally, in the second round, after simultaneous transmission from the edge and cloud, the AS / kit module sends the text of the VAD event to the DM module. The DM module sends the processed VAD event text to the NLU module. The NLU module determines the user intent based on the VAD event text and sends the user intent to the DM module. Based on a preset intent whitelist, the DM module determines whether the user intent of the VAD event is in the intent whitelist. When the user intent is in the intent whitelist, the DM module sends a command to interrupt streaming playback to the voice assistant. The voice assistant pauses the playback of the first response content and reports the pause streaming generation event to the DM module. The DM module controls the large language model to pause the generation of the first response content. At this time, the DM module records the generated content in the first response content.

[0142] As shown in Figure 7, in the recovery round, the ASM module detects VAD events; the specific process is not detailed here. The NLU module determines the user's intent based on the VAD event's voice. When it determines that the user's intent is to continue interrupting the playback content, it uses the generated round dialogue, such as the recorded user question and the already generated content, to continuously generate subsequent content using the large language model. In other words, the large language model has the ability to generate subsequent content based on the user question and the already generated content.

[0143] Please refer to Figures 8 and 9, which illustrate another example of a question-answering method. It should be noted that this example implements the technical solution of this example based on the question-answering system shown in Figure 6a or Figure 6b. The parts of the second round that are the same as those in the examples of Figures 5 to 7, as well as the parts of the generation round and the recovery round that are the same as those in the examples of Figures 5 to 7, will not be described again. That is to say, this example only explains and clarifies the parts of the generation round and the recovery round that are different from those in the examples of Figures 5 to 7.

[0144] Please refer to Figure 8, which shows a flowchart of a second example of a question-and-answer method. As shown in Figure 8, compared with the first example, the processing module of this example does not record the generation part of the first user instruction and the first response content. Instead, after pausing the broadcast, it continues to generate and cache the unbroadcast content of the first response content. Optionally, the unbroadcast content generated can be cached in the transceiver module, i.e., on the end side. When it is determined that the user intends to continue the interrupted broadcast content, the cached content can be broadcast. The question-and-answer method of the second example of this application embodiment mainly includes the following steps:

[0145] In step S801, the transceiver module detects the first user command. The first user command can be in the form of audio, such as voice or recording.

[0146] In step S802, the transceiver module sends the first user instruction to the processing module.

[0147] In step S803, the processing module generates the first response content through the large language model.

[0148] Step S804: The processing module sends the first response content to the transceiver module.

[0149] Step S805: The transceiver module broadcasts the first response.

[0150] In step S806, the transceiver module detects a second user command. The second user command can be in the form of audio, such as voice or recording.

[0151] In step S807, the transceiver module sends a second user instruction to the processing module.

[0152] Optionally, in step S808, the processing module performs voice processing to determine the user's intent. If the user's intent is in the intent whitelist, the first response content is paused, and the second user instruction is executed to generate the second response content.

[0153] In step S809, the processing module sends a pause broadcast command to the transceiver module. Optionally, the processing module also sends a second response to the transceiver module.

[0154] In step S810, the transceiver module pauses broadcasting the first response. Optionally, the transceiver module may also broadcast the second response.

[0155] In step S811, the large language model continues to generate the first response content without interruption, sends the content to be generated, and caches the content to be generated. That is, step S803 continues to execute, the generation of the first response content continues uninterrupted, and the unplayed content of the first response content is cached. This application embodiment does not limit the cache location. For example, the unplayed content can be stored on the terminal side so that when the unplayed content is to be replayed, it can be directly read from the terminal side, reducing signal transmission paths, improving the working efficiency of the terminal device, and enhancing the user experience.

[0156] In step S812, the transceiver module detects a third user command.

[0157] Step S813: The transceiver module sends a third user instruction.

[0158] Optionally, in step S814, the processing module continues voice processing to determine the user's intent.

[0159] In step S815, when the user intends to continue broadcasting the first response content, the processing module obtains the unbroadcast content of the first response content cached on the end side and sends a command to the transceiver module to continue broadcasting.

[0160] In step S816, the transceiver module continues to broadcast the unbroadcast content of the first response.

[0161] In other words, during the generation round, the context, question, and generated content for that round are no longer cached separately. Instead, when playback is interrupted, the generation round continues to generate the remaining content that needs to be played and caches that remaining content. Therefore, when a third-party user command to resume the round is sent, the cached remaining content is played directly by the client.

[0162] Please refer to Figure 9, which illustrates a schematic diagram of the method flow for a second example of a question-answering system. As shown in Figure 9, the steps within the box corresponding to label A represent the main differences between this example and the first example. The processing module does not interrupt the generation of the first content by the large language model; instead, it obtains and caches the unplayed content after the first content has been fully generated. This application embodiment does not limit the cache location. For example, the unplayed content is sent to the terminal device, and the unplayed content is cached on the terminal device. When, in the recovery round, the user sends a user command instructing the resumption of interrupted playback, the unplayed content cached on the terminal device is read and played.

[0163] Based on the same concept as the aforementioned embodiments, another question-and-answer method is also provided in the embodiments of this application.

[0164] Please refer to Figure 10. This application provides another question-answering method applied to a question-answering system, which includes a terminal device and a cloud device. The terminal device and the cloud device are communicatively connected, and the cloud device deploys a large language model. The method mainly includes the following steps:

[0165] In step S1001, the terminal device detects the first user instruction and sends the first user instruction to the cloud device.

[0166] In one possible implementation, in response to user input in the form of audio, the method further includes: the terminal device performing voice analysis on the user-input audio to obtain a first user instruction and / or a second user instruction and / or a third user instruction; or, in response to user input in the form of text, the method further includes: the terminal device processing the user-input text based on preset processing rules to obtain a first user instruction and / or a second user instruction and / or a third user instruction.

[0167] In step S1002, after receiving the first user's instruction, the cloud device generates a response using a large language model.

[0168] In step S1003, the terminal device receives and broadcasts the response content. During the broadcast of the response content, the terminal device detects the second user instruction and sends the second user instruction to the cloud device.

[0169] In step S1004, after receiving the second user's instruction, the cloud device generates an interruption broadcast request and sends the interruption broadcast request to the terminal device.

[0170] In one possible implementation, the cloud device receiving the second user instruction and generating the interruption broadcast request includes: the cloud device receiving the second user instruction and, after determining that the user intent corresponding to the second user instruction meets preset conditions, generating the interruption broadcast request.

[0171] In another possible implementation, the preset condition is a preset whitelist. Determining that the user intent corresponding to the second user instruction meets the preset condition includes: determining that the user intent corresponding to the second user instruction is an intent within the preset whitelist.

[0172] In another possible implementation, determining whether the user intent corresponding to the second user instruction meets the preset conditions includes: determining the user intent corresponding to the second user instruction through a natural language understanding model based on the second user instruction; and judging whether the user intent meets the preset conditions.

[0173] Step S1005: Send a processing instruction to the large language model. The processing instruction instructs the large language model to interrupt the generation of response content, or instructs the large language model to continue generating response content, so that the terminal device or cloud device can cache the continuously generated content.

[0174] Step S1006: The terminal device receives the interruption broadcast request and interrupts the broadcast of the response content.

[0175] In step S1007, the terminal device detects a third user instruction and sends the third user instruction to the cloud device, which instructs the continued broadcast of the response content.

[0176] In step S1008-1, the cloud device receives a third user instruction, generates a response based on the first user instruction and the already broadcast content, determines the unbroadcast content in the response content using a large language model, or reads the unbroadcast content from the cached content to be generated, and sends the unbroadcast content to the terminal device.

[0177] Step S1008-2: The terminal device reads the unbroadcast content from the cached content to be generated.

[0178] Steps S1008-1 and S1008-2 provide two methods for determining unbroadcast content. That is, when a third user instruction indicating to continue broadcasting the response content is detected, executing either step S1008-1 or step S1008-2 can determine the unbroadcast content.

[0179] Step S1009: The terminal device broadcasts the content that was not broadcast.

[0180] In one possible implementation, the method further includes: when the generation of response content is interrupted by the large language model, the terminal device or cloud device caches the first user instruction and / or the already broadcast content, so that the large language model can generate unbroadcast content based on the first user instruction and the already broadcast content.

[0181] In another possible implementation, the method further includes: when the generation of response content is interrupted by the large language model, the terminal device or cloud device caches the context of the first user instruction, so that the large language model can generate un-broadcast content based on the first user instruction, the context of the first user instruction, and the already broadcast content.

[0182] Based on the same concept as the aforementioned embodiments, this application also provides a question-answering method applied to a cloud device. The cloud device is deployed with a large language model. The question-answering method includes: using the large language model, generating corresponding response content based on a first user instruction, and the generated response content can be broadcast to the user; during the broadcasting of the response content, when a second user instruction is received, generating an interruption broadcasting request to instruct the interruption of the broadcasting of the response content, and sending a processing instruction to the large language model to cause the large language model to interrupt or continue the generation of the response content; when the large language model is instructed to continue generating the response content, the continued-generated content is cached, and the interruption broadcasting request is used to interrupt the broadcasting of the response content; when a third user instruction is received, and the user's intention indicated by the third user instruction is to continue broadcasting the response content, generating, based on the first user instruction and the already broadcasted content, using the large language model, determining the unbroadcast content in the response content, or reading the cached continued-generated content to obtain the unbroadcast content, so that the unbroadcast content is broadcast. Therefore, the purpose of interrupting and continuing the broadcasting process of the response content is achieved.

[0183] In another possible implementation, the method further includes caching the first user instruction and / or the already played content when the generation of response content is interrupted by the large language model. Therefore, the large language model can generate the unplayed content based on the cached first user instruction and the already played content.

[0184] In another possible implementation, the method further includes caching the context of the first user instruction when the generation of response content is interrupted by the large language model. Therefore, the large language model can generate unplayed content based on the first user instruction, the context of the first user instruction, and the already played content.

[0185] In another possible implementation, restrictions are placed on user commands that interrupt the broadcast. Furthermore, the user intent corresponding to the second user command is determined, and an interrupt broadcast request is generated only when the user intent meets preset conditions.

[0186] In another possible implementation, the preset condition is implemented by setting a whitelist to determine the user intent corresponding to the second user command. When the user intent is within the preset whitelist, the broadcast of the response content is interrupted.

[0187] In another possible implementation, a natural language understanding model is used to analyze and obtain the user intent corresponding to the second user instruction.

[0188] In another possible implementation, when the user input is in the form of audio, speech analysis is performed on the audio input to obtain the corresponding first user command and / or second user command and / or third user command. When the user input is in the form of text, text processing is performed based on preset processing rules to obtain the corresponding first user command and / or second user command and / or third user command.

[0189] Based on the same concept as the foregoing embodiments, this application also provides a question-and-answer method applied to a terminal device. The method includes: the terminal device detecting a first user instruction and sending the first user instruction to a cloud device, wherein the first user instruction instructs the cloud device to generate response content based on a large language model; the terminal device receiving and broadcasting the response content sent by the cloud device; during the broadcasting of the response content, the terminal device detecting a second user instruction instructing the cloud device to generate an interruption broadcast request and sending the second user instruction to the cloud device; subsequently, the terminal device receiving an interruption broadcast request from the cloud device and interrupting the broadcasting of the response content; the terminal device detecting a third user instruction and sending the third user instruction to the cloud device, the third user instruction instructing continued broadcasting of unbroadcast content in the response content; and finally, the terminal device receiving the unbroadcast content from the aforementioned response content sent by the cloud device and broadcasting the unbroadcast content.

[0190] In another possible implementation, when the user input is in the form of audio, speech analysis is performed on the audio input to obtain the corresponding first user command and / or second user command and / or third user command. When the user input is in the form of text, text processing is performed based on preset processing rules to obtain the corresponding first user command and / or second user command and / or third user command.

[0191] Based on the same concept as the foregoing embodiments, this application provides a terminal device for executing the methods provided in the embodiments of this application.

[0192] Based on the same concept as the foregoing embodiments, this application provides a cloud device, which is deployed with a large language model, and is communicatively connected to a terminal device. The cloud device is used to execute the methods provided in the embodiments of this application.

[0193] Based on the same concept as the foregoing embodiments, this application provides a question-answering system, which includes a terminal device and a cloud device. The terminal device and the cloud device are communicatively connected. The cloud device is deployed with a large language model. The terminal device is used to execute the methods provided in the embodiments of this application, and / or the cloud device is used to execute the methods provided in the embodiments of this application, and / or the question-answering system is used to execute the methods provided in the embodiments of this application.

[0194] Based on the same concept as the foregoing embodiments, this application provides a chip including a processing circuit and a storage medium storing computer program code. When the computer program code is executed by the processing circuit, it implements the method provided in the embodiments of this application. Based on the same concept as the foregoing embodiments, this application provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it causes the method provided in the embodiments of this application to be implemented.

[0195] Based on the same concept as the foregoing embodiments, this application provides a computer program product that includes program instructions, which, when executed by a computer, cause the computer to perform the method provided in the embodiments of this application.

[0196] Those skilled in the art will further 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, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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.

[0197] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, processor-executed software modules, or a combination of both. The software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.

[0198] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A question-and-answer method, characterized in that, Applied to a terminal device, the terminal device having a large language model deployed thereon, the method includes: The response content is broadcast, wherein the response content is generated by the large language model based on the first user instruction; During the process of broadcasting the response content, when a second user instruction is detected, an interruption broadcast request is generated and a processing instruction is sent to the large language model. The processing instruction instructs the large language model to interrupt the generation of the response content, or the processing instruction instructs the large language model to continue the generation of the response content to cache the content to be generated. In response to the interruption broadcast request, the broadcast of the response content is interrupted; Upon detecting a third user instruction, the un-broadcast content in the response content is broadcast. The third user instruction instructs the continued broadcasting of the response content. The un-broadcast content is generated by the large language model based on the first user instruction and the already broadcast content, or the un-broadcast content is read from the cached content to be generated.

2. The method according to claim 1, characterized in that, When the unbroadcast content is generated by the large language model based on the first user instruction and the already broadcast content, the first user instruction and / or the already broadcast content are obtained after being cached when the generation of the response content is interrupted by the large language model.

3. The method according to claim 1 or 2, characterized in that, The unbroadcast content is generated by the large language model based on the first user instruction, the context of the first user instruction, and the already broadcast content. The context of the first user instruction is obtained after being cached when the generation of the response content is interrupted by the large language model.

4. The method according to any one of claims 1-3, characterized in that, The step of generating an interruption broadcast request and sending processing instructions to the large language model when a second user instruction is detected includes: When the second user instruction is detected, in response to the second user instruction, after determining that the user intent corresponding to the second user instruction meets the preset conditions, the interruption broadcast request is generated and the processing instruction is sent to the large language model.

5. The method according to claim 4, characterized in that, The preset condition is a preset whitelist. After determining that the user intent corresponding to the second user instruction is an intent within the preset whitelist, the interruption broadcast request is generated and the processing instruction is sent to the large language model.

6. The method according to claim 4 or 5, characterized in that, The step of determining that the user intent corresponding to the second user instruction meets the preset conditions includes: Based on the second user instruction, the user intent corresponding to the second user instruction is determined through a natural language understanding model; Determine whether the user's intent meets the preset conditions.

7. The method according to any one of claims 1-6, characterized in that, The first user instruction and / or the second user instruction and / or the third user instruction are obtained based on speech analysis of the audio input by the user, or based on processing of the text input by the user according to preset processing rules.

8. A question-and-answer method, characterized in that, Applied to a question-answering system, the question-answering system including a terminal device and a cloud device, the terminal device being communicatively connected to the cloud device, the cloud device deploying a large language model, the method includes: The terminal device detects the first user instruction and sends the first user instruction to the cloud device; After receiving the first user's instruction, the cloud device generates a response using the large language model. The terminal device receives and broadcasts the response content. During the broadcasting of the response content, the terminal device detects a second user instruction and sends the second user instruction to the cloud device. After receiving the second user instruction, the cloud device generates an interruption broadcast request, sends the interruption broadcast request to the terminal device, and sends a processing instruction to the large language model. The processing instruction instructs the large language model to interrupt the generation of the response content, or the processing instruction instructs the large language model to continue generating the response content so that the cloud device or the terminal device caches the content to be generated. The terminal device receives the interruption broadcast request and interrupts the broadcast of the response content; The terminal device detects a third user instruction and sends the third user instruction to the cloud device, the third user instruction instructing the continued broadcast of the response content; The cloud device receives the third user instruction, generates a response based on the first user instruction and the already broadcast content, determines the unbroadcast content in the response content through the large language model, and sends the unbroadcast content to the terminal device; or, the cloud device or the terminal device reads the unbroadcast content in the response content from the cached content to be generated. The terminal device broadcasts the unbroadcast content.

9. The method according to claim 8, characterized in that, Also includes: When the large language model interrupts the generation of the response content, the cloud device or the terminal device caches the first user instruction and / or the already broadcast content, so that the large language model can generate the unbroadcast content based on the first user instruction and the already broadcast content.

10. The method according to claim 8 or 9, characterized in that, Also includes: When the large language model interrupts the generation of the response content, the cloud device or the terminal device caches the context of the first user instruction, so that the large language model can generate the un-broadcast content based on the first user instruction, the context of the first user instruction, and the already broadcast content.

11. The method according to any one of claims 8-10, characterized in that, After receiving the second user's instruction, the cloud device generates an interruption broadcast request, including: The cloud device receives the second user instruction and, after determining that the user intent corresponding to the second user instruction meets the preset conditions, generates the interruption broadcast request.

12. The method according to claim 11, characterized in that, The preset condition is a preset whitelist, and determining that the user intent corresponding to the second user instruction meets the preset condition includes: The user intent corresponding to the second user instruction is determined to be an intent within the preset whitelist range.

13. The method according to claim 11 or 12, characterized in that, The step of determining that the user intent corresponding to the second user instruction meets the preset conditions includes: Based on the second user instruction, the user intent corresponding to the second user instruction is determined through a natural language understanding model; Determine whether the user's intent meets preset conditions.

14. The method according to any one of claims 8-13, characterized in that, The first user instruction and / or the second user instruction and / or the third user instruction are obtained based on speech analysis of the audio input by the user, or based on processing of the text input by the user according to preset processing rules.

15. A question-and-answer method, characterized in that, Applied to a cloud device, wherein a large language model is deployed on the cloud device, the method includes: In response to the first user instruction, the response content is generated using the large language model; During the process of broadcasting the response content, in response to the second user instruction, an interruption broadcast request is generated, and a processing instruction is sent to the large language model. The processing instruction instructs the large language model to interrupt the generation of the response content, or the processing instruction instructs the large language model to continue the generation of the response content so that the continuously generated content is cached. The interruption broadcast request is used to interrupt the broadcasting of the response content. In response to a third user instruction, based on the first user instruction and the already played content, the unplayed content in the response content is determined through the large language model, or the unplayed content in the response content is read from the cached content to be continuously generated so that the unplayed content is played, wherein the third user instruction instructs to continue playing the response content.

16. The method according to claim 15, characterized in that, Also includes: When the large language model interrupts the generation of the response content, the first user instruction and / or the already broadcast content are cached, so that the large language model can generate the unbroadcast content based on the first user instruction and the already broadcast content.

17. The method according to claim 15 or 16, characterized in that, Also includes: When the large language model interrupts the generation of the response content, the context of the first user instruction is cached so that the large language model can generate the un-broadcast content based on the first user instruction, the context of the first user instruction, and the already broadcast content.

18. The method according to any one of claims 15-17, characterized in that, The process of generating an interruption broadcast request in response to a second user instruction includes: In response to the second user instruction, after determining that the user intent corresponding to the second user instruction meets the preset conditions, the interruption broadcast request is generated.

19. The method according to claim 18, characterized in that, The preset condition is a preset whitelist, and determining that the user intent corresponding to the second user instruction meets the preset condition includes: The user intent corresponding to the second user instruction is determined to be an intent within the preset whitelist range.

20. The method according to claim 18 or 19, characterized in that, The step of determining that the user intent corresponding to the second user instruction meets the preset conditions includes: Based on the second user instruction, the user intent corresponding to the second user instruction is determined through a natural language understanding model; Determine whether the user's intent meets preset conditions.

21. The method according to any one of claims 15-20, characterized in that, The first user instruction and / or the second user instruction and / or the third user instruction are obtained based on speech analysis of the audio input by the user, or based on processing of the text input by the user according to preset processing rules.

22. A question-and-answer method, characterized in that, Applied to a terminal device, the method includes: The terminal device detects the first user instruction and sends the first user instruction to the cloud device, wherein the first user instruction is used to instruct the cloud device to generate response content based on the large language model; The terminal device receives and broadcasts the response content sent by the cloud device. During the broadcasting of the response content, the terminal device detects a second user instruction and sends the second user instruction to the cloud device. The second user instruction is used to instruct the cloud device to generate an interrupt broadcast request. The terminal device receives the interruption broadcast request sent by the cloud device and interrupts the broadcast of the response content; The terminal device detects a third user instruction and sends the third user instruction to the cloud device. The third user instruction instructs the continued broadcasting of the unbroadcast content in the response content. The terminal device receives the unbroadcast content from the response content sent by the cloud device and broadcasts the unbroadcast content.

23. The method according to claim 22, characterized in that, The first user instruction and / or the second user instruction and / or the third user instruction are obtained based on speech analysis of the audio input by the user, or based on processing of the text input by the user according to preset processing rules.

24. A terminal device, characterized in that, The terminal device is used to perform the method as described in any one of claims 1-7, or to perform the method as described in any one of claims 22-23.

25. A question-and-answer system, characterized in that, The question-answering system includes a terminal device and a cloud device. The terminal device is communicatively connected to the cloud device. The cloud device is deployed with a large language model. The terminal device is used to perform the method as described in any one of claims 22-23, and / or the cloud device is used to perform the method as described in any one of claims 15-21, and / or the question-answering system is used to perform the method as described in any one of claims 8-14.

26. A cloud-based device, characterized in that, The cloud device is deployed with a large language model, the cloud device is communicatively connected to the terminal device, and the cloud device is used to perform the method as described in any one of claims 15-21.

27. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it causes the method as described in any one of claims 1-23 to be implemented.

28. A chip, characterized in that, The chip includes a processing circuit and a storage medium, wherein the storage medium stores computer program code; when the computer program code is executed by the processing circuit, it implements the method as described in any one of claims 1 to 23.

29. A computer program product, characterized in that, The computer program product includes program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-23.