Question answering method and apparatus, and device and storage medium

By coordinating the voice module and the question-and-answer module on the server side, the response text and voice are directly generated and played synchronously, which solves the problems of complex interaction and long delay in traditional human-computer dialogue and realizes a more efficient question-and-answer process.

WO2026001140A1PCT designated stage Publication Date: 2026-01-02BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/085161
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2025-03-26
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In traditional human-computer dialogue using voice and large language models, the client and server need to repeatedly transmit text and voice, resulting in a complex and time-consuming interaction process.

Method used

The server-side voice module recognizes the client's voice and generates text, the question-and-answer module determines the response text, and the response voice and text are played synchronously on the client, simplifying the interaction process between the client and the server.

Benefits of technology

It reduces the interaction latency between the client and the server, simplifies the interaction process, and improves the efficiency of question answering and the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025085161_02012026_PF_FP_ABST
    Figure CN2025085161_02012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a question answering method and apparatus, and a device and a storage medium. The method comprises: in response to first question speech having been received from a client, a speech module of a serving end sending to the client first question text obtained by means of recognizing the first question speech; causing the first question text to be sent from the speech module to a question answering module of the serving end; using the question answering module to determine response text for the first question text; and the question answering module sending the response text to the client.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, apparatus and storage medium for question answering

[0001] The present application claims priority to the Chinese patent application No. 202410841333.0, filed on June 26, 2024, entitled “Method, device, apparatus and storage medium for question answering”, the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The example embodiments of the present disclosure generally relate to the field of computer, and in particular, to a method, device, apparatus and computer readable storage medium for question answering. BACKGROUND

[0003] Conventionally, human-computer dialogue is performed by using voice and large language model, and the process of speech recognition and response of large language model is scheduled by a client. In this way, text and voice need to be repeatedly transmitted between the client and the server, resulting in a complex interaction process and long delay. SUMMARY

[0004] In a first aspect of the present disclosure, a method for question answering is provided. The method comprises: in response to receiving a first question voice from a client, sending, by a voice module of a server, a first question text recognized from the first question voice to the client, the first question text being generated by the voice module by invoking a first machine learning model; sending the first question text from the voice module to a question answering module of the server; determining, by the question answering module, a response text for the first question text, the response text being determined by the question answering module by invoking a second machine learning model; and sending, by the question answering module, the response text to the client.

[0005] In a second aspect of the present disclosure, a method for question answering is provided. The method comprises: sending a first question voice to a server via a first interface interfacing with the server; in response to receiving a first question text corresponding to the first question voice from the server via the first interface, presenting the first question text at a client; receiving a response text for the first question text via a second interface interfacing with the server; receiving a response voice corresponding to the response text via the first interface; and presenting the response text while playing the response voice at the client, the playing of the response voice being synchronized with the presenting of the response text.

[0006] In a third aspect of the present disclosure, an apparatus for question answering is provided. The apparatus comprises: a question voice receiving module configured to, in response to receiving a first question voice from a client, send, by a voice module of a server, a first question text recognized from the first question voice to the client, the first question text being generated by the voice module by invoking a first machine learning model; a question text sending module configured to send the first question text from the voice module to a question answering module of the server; an answer text determining module configured to determine, by the question answering module, an answer text for the first question text, the answer text being determined by the question answering module by invoking a second machine learning model; and an answer text sending module configured to send, by the question answering module, the answer text to the client.

[0007] In a fourth aspect of the present disclosure, an apparatus for question answering is provided. The apparatus comprises: a question voice sending module configured to send, via a first interface interfacing with a server, a first question voice to the server; a question text presenting module configured to present, at a client, a first question text corresponding to the first question voice, in response to receiving the first question text from the server via the first interface; an answer text receiving module configured to receive, via a second interface interfacing with the server, an answer text for the first question text; an answer voice receiving module configured to receive, via the first interface, an answer voice corresponding to the answer text; and a playing presenting module configured to present the answer text while playing the answer voice at the client, the playing of the answer voice being synchronized with the presenting of the answer text.

[0008] In a fifth aspect of the present disclosure, an electronic device is provided. The device comprises at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor. The instructions, when executed by the at least one processor, cause the electronic device to perform the method of the first aspect or the method of the second aspect.

[0009] In a sixth aspect of the present disclosure, a computer-readable storage medium is provided. The medium has stored thereon computer-executable instructions that, when executed by a processor, implement the method of the first aspect or the method of the second aspect.

[0010] In a seventh aspect of the present disclosure, a computer-executable instruction product is provided. The product comprises computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method of the first aspect or the method of the second aspect according to the present disclosure.

[0011] It should be understood that the content described in this section is not intended to limit key features or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS

[0012] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

[0013] FIG. 1 illustrates a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

[0014] FIG. 2 illustrates a flow diagram of a signaling flow for a question and answer according to some embodiments of the present disclosure;

[0015] FIG. 3 illustrates a schematic diagram of an example architecture for a question and answer according to some embodiments of the present disclosure;

[0016] FIG. 4 illustrates a schematic diagram of an example of a first queue according to some embodiments of the present disclosure;

[0017] FIGS. 5A to 5C respectively illustrate a schematic diagram of an example of sending a response voice according to some embodiments of the present disclosure;

[0018] FIG. 6 illustrates a flow diagram of a process for a question and answer according to some embodiments of the present disclosure;

[0019] FIG. 7 illustrates a flow diagram of a process for a question and answer according to some embodiments of the present disclosure;

[0020] FIG. 8 illustrates an exemplary structural block diagram of an apparatus for a question and answer according to some embodiments of the present disclosure;

[0021] FIG. 9 illustrates an exemplary structural block diagram of an apparatus for a question and answer according to some embodiments of the present disclosure; and

[0022] FIG. 10 illustrates a block diagram of an electronic device that can implement one or more embodiments of the present disclosure. DETAILED DESCRIPTION

[0023] Embodiments of the present disclosure will be described hereinafter with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein; rather, these embodiments are provided so that the present disclosure will be more thoroughly and completely understood. It is understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.

[0024] In the description of embodiments of the disclosure, the term "comprising" and similar terms are to be interpreted as open-ended, i.e., "including but not limited to". The term "based on" is to be interpreted as "based, at least in part, on". The term "one embodiment" or "the embodiment" is to be interpreted as "at least one embodiment". The term "some embodiments" is to be interpreted as "at least some embodiments". Other explicit and implicit definitions can also be included below.

[0025] In this document, unless explicitly stated, performing a step "in response to A" does not mean performing the step immediately after A, but can include one or more intermediate steps.

[0026] It can be understood that the data involved in the technical solutions of the present disclosure (including but not limited to the data itself, obtaining, using, storing or deleting) should comply with the requirements of relevant laws and regulations and relevant provisions.

[0027] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type of information involved in the present disclosure, the scope of use, the use scenario, etc. should be informed to the relevant user and the authorization of the relevant user should be obtained by appropriate means according to relevant laws and regulations, wherein the relevant user can include any type of right subject, such as individual, enterprise, group.

[0028] For example, in response to receiving the active request of the user, the prompt information is sent to the relevant user to explicitly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can voluntarily choose whether to provide information to the software or hardware such as electronic device, application program, server or storage medium, etc. performing the operation of the technical solutions of the present disclosure according to the prompt information.

[0029] As an optional but not limited implementation manner, in response to receiving the active request of the relevant user, the prompt information is sent to the relevant user, for example, in the form of a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to select "agree" or "disagree" to provide information to the electronic device.

[0030] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure, and other ways that meet the relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0031] As used herein, the term “model” can learn the relationship between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes input and provides a corresponding output by using multiple layers of processing units. The neural network model is one example of a model based on deep learning. In this document, “model” can also be referred to as “machine learning model”, “learning model”, “machine learning network” or “learning network”, which are used interchangeably herein.

[0032] A “neural network” is a machine learning network based on deep learning. The neural network is capable of processing input and providing a corresponding output, which generally includes an input layer and an output layer and one or more hidden layers between the input layer and the output layer. The neural network used in deep learning applications generally includes many hidden layers, thereby increasing the depth of the network. The layers of the neural network are connected in sequence, so that the output of the previous layer is provided as the input of the next layer, where the input layer receives the input of the neural network, and the output of the output layer is the final output of the neural network. Each layer of the neural network includes one or more nodes (also known as processing nodes or neurons), each of which processes the input from the previous layer.

[0033] Generally, machine learning can include three stages, namely training stage, testing stage and application stage (also known as inference stage). In the training stage, a given model can be trained using a large amount of training data, iteratively updating the parameter values until the model can obtain consistent inference from the training data that meets the expected target. Through training, the model can be considered to be able to learn the relationship between input and output (also known as input to output mapping) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, so as to determine the performance of the model. In the application stage, the model can be used to process the actual input based on the parameter values obtained by training to determine the corresponding output.

[0034] FIG. 1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. In this example environment 100, an application 120 is installed in a client 110. A user 140 can interact with the application 120 via the client 110 and / or an attached device of the client 110. For example, the application 120 can capture a voice 145 of the user 140 via a voice capture device (e.g. a microphone) of the client 110.

[0035] In embodiments of the present disclosure, the application 120 can be any suitable application with human-to-computer dialog functionality. For example, the application 120 can provide a digital assistant for human-to-computer dialog. The digital assistant supports text dialog services, voice dialog services, and content dialog in other modalities with the user 140. In some embodiments, the application 120 or the digital assistant therein can utilize a machine learning model 160 (which can include one or more machine learning models, e.g., can include machine learning model 160-1, machine learning model 160-2,..., machine learning model 160-N, etc., where N is a positive integer. For ease of description, one or more machine learning models are collectively referred to as the machine learning model 160 herein) to support interactions with the user 140. For example, the application 120 or the digital assistant therein can utilize one or more machine learning models 160 to provide question-and-answer services to the user 140.

[0036] In the environment 100, the client 110 can present a user interface 150 of the application 120 if the application 120 is active. The user interface 150 can include various pages that the application 120 is capable of providing, such as a dialog page between the user and the digital assistant (where current and historical dialog, including text dialog content, can be presented), etc. In some embodiments, the client 110 can play a voice 152 and present text 154 in the user interface 150. The voice 152 can include, for example, the voice 145 from the user 140 or a voice of a response to the voice 145.

[0037] The machine learning model 160 can be different types of models. In some embodiments, one or more machine learning models 160 can be built based on a language model (LM). The machine learning model used is a content generative model, capable of generating a corresponding output based on a model input. In some embodiments, the language model based machine learning model is capable of text modal model input (e.g., natural language and / or machine language) and / or non-text modal model input (e.g., image, voice, video, etc.), and is capable of generating a desired output according to the model input and a prompt word. The prompt word here is used to guide the machine learning model to generate an output that can address a user need indicated by the model input. In the application scenario for supporting user dialog, the input of the user 140 can be provided to the machine learning model 160 as at least a part of the model input (other parts can include the prompt word). The user input is considered as a question. Based on the model output, a corresponding response can be generated to be provided to the user 140.

[0038] In some embodiments, the one or more machine learning models 160 can be speech-related models, including an automatic speech recognition (ASR) model and a text-to-speech (TTS) model. The input of the ASR model is speech, and the output is text. The input of the TTS model is text, and the output is corresponding speech.

[0039] In some embodiments, the client 110 communicates with the server 130 to implement the provisioning of services for the application 120. As shown in FIG. 1, the server 130 can invoke the machine learning model 160 to support the human-to-computer dialog function between the application 120 and the user 140 based on the output of the machine learning model 160. The client 110 can be any type of mobile terminal, fixed terminal, or portable terminal including a mobile handset, a tablet computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a game device, or any combination thereof, including accessories and peripherals of such devices, or any combination thereof. In some embodiments, the client 110 can also support any type of interface to the user (such as “wearable” circuitry, etc.). The server 130 can be various types of computing systems / servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in a cloud environment, etc. The server 130 can be implemented, for example, based on a cloud environment.

[0040] It should be understood that the structure and function of the various elements in the environment 100 are described for illustrative purposes only, without implying any limitation on the scope of the present disclosure.

[0041] As mentioned previously, the human-to-computer dialog with the voice and question-answering model is usually scheduled by the client to send the voice service and answer service. Specifically, usually the user voice is sent by the application voice module of the client to the server to request the ASR service, and the server feeds back the ASR text to the application voice module of the client based on the user voice. The application voice module of the client sends the ASR text to the application message module of the client, and the ASR text is sent by the application message module to the server to request the question-answering service from the server. The server feeds back the answer text to the application message module based on the ASR text. The application message module sends the answer text to the application voice module, and the application voice module sends the answer text to the server to request the TTS service from the server. The server feeds back the TTS voice to the application voice module of the client. In this way, the transmission of text and voice needs to be repeated between the client and the server, resulting in a complex interaction process and a long delay.

[0042] In view of this, according to an embodiment of the present disclosure, an improved solution for question answering is provided. According to the solution of the present disclosure, in response to receiving a first question voice from a client, a voice module of a server sends a first question text recognized from the first question voice to the client, the first question text being generated by the voice module by invoking a first machine learning model; the first question text is sent from the voice module to a question answering module of the server; the question answering module is used to determine a response text for the first question text, the response text being determined by the question answering module by invoking a second machine learning model; and the response text is sent by the question answering module to the client.

[0043] In this way, the client sends the first question voice to the server, and the server can coordinate the voice module and the question answering module to complete the generation of the first question text or the response text, which can simplify the interaction process between the client and the server and is conducive to reducing the delay.

[0044] Some example embodiments of the present disclosure will be described below with continuous reference to the drawings.

[0045] FIG. 2 shows a flowchart of a signaling flow 200 for question answering according to some embodiments of the present disclosure. The signaling flow 200 involves a client 110 and a server 130. FIG. 3 shows a schematic diagram of an example architecture 300 for question answering according to some embodiments of the present disclosure. For ease of discussion, the signaling flow 200 will be described with reference to the environment of FIG. 1 and in conjunction with the example architecture 300 shown in FIG. 3.

[0046] In an embodiment of the present disclosure, as shown in the signaling flow 200, the client 202 sends (202) a first question voice to the server 130 via a first interface 321 interfacing with the server 130. The server 130 receives (204) the first question voice from the client 110, and a voice module 350 of the server 130 can invoke a first machine learning model to generate (206) a first question text. The voice module 350 sends (208) the first question text recognized from the first question voice to the client 110.

[0047] As shown in FIG. 3, the client 110 can include a service module 310 and an interface module 320. The service module 310 can correspond to an application that supports voice conversation. The service module 310 includes an application voice module 311 and an application message module 312. The interface module 320 can include a first interface 321 and a second interface 322. The server 130 can include an access layer 340, a voice module 350, and a question-answer module 360. The access layer includes a network interface 341 and a network interface 342. A first network connection can be built between the network interface 341 of the server 130 and the first interface 321 of the client 110. A second network connection can be built between the network interface 342 of the server 130 and the second interface 322 of the client 110. Alternatively or additionally, the first network connection and / or the second network connection can be a long connection in compliance with a transmission control protocol (TCP).

[0048] The application voice module 311 can be configured to receive a voice (e.g., the voice 145) from a user (e.g., the user 140). In some embodiments, the application voice module 311 can receive a voice (i.e., “user voice”, also referred to as “first question voice” herein) from the user 140. The application voice module 311 can invoke the first interface 321 to send the user voice to the network interface 341 of the server 130, and send the user voice to the voice module 350 of the server 130 through the network interface 341.

[0049] The voice module 350 can perform an ASR function and / or a TTS function by means of an ASR model 371 (also referred to as “first machine learning model” herein) and / or a TTS model 372 (also referred to as “third machine learning model” herein) in a voice service 370. The ASR model 371 and / or the TTS model 372 are deployed in the server 130, and can also be referred to as the ASR model 371 and / or the TTS model 372 being deployed in the cloud. Illustratively, the voice module 350 can send the user voice to the ASR model 371, and obtain an ASR text (i.e., a first question text converted from the first question voice) corresponding to the user voice from the ASR model 371.

[0050] The voice module 350 can send the obtained ASR text to the network interface 341 of the access layer 340. The access layer 340 can in turn send the obtained ASR text to the first interface 321 of the interface module 320 of the client 110. Alternatively or additionally, the ASR text can be sent to the first interface 321 based on a long connection between the first interface 321 and the network interface 341.

[0051] In embodiments of the present disclosure, as shown in signaling flow 200, the client 110 can present (212) the first question text at the client 110 in response to receiving (210) the first question text corresponding to the first question voice from the service end 130 via the first interface 321.

[0052] As shown in FIG. 3, the interface module 320 can send the received ASR text to the application voice module 311 of the service module 310. The application voice module 311 can send the ASR text to the application message module 312, and the application message module 312 can present the ASR text to the user 140. For example, the application message module 312 can present the ASR text (i.e., the first question text converted from the first question voice) in the user interface corresponding to the question and answer dialogue.

[0053] In embodiments of the present disclosure, the service end 130 sends (214) the first question text from the voice module 350 to the question and answer module 360 of the service end 130, calls the second machine learning model by using the question and answer module 360 to determine (216) the answer text corresponding to the first question text, and sends (218) the answer text corresponding to the first question text from the question and answer module 360 of the service end 130 to the client 110. The client 110 receives (220) the answer text corresponding to the first question text via the second interface 322 connected to the service end 130.

[0054] In some embodiments, the voice module 350 in the service end 130 can also construct a sending message based on the obtained ASR text and send the sending message to the question and answer module 360. In some embodiments, the service end 130 can determine the message identifier (hereinafter, the ASR text and the message identifier are collectively referred to as “second question text”) corresponding to the ASR text (i.e., the first question text) by using the question and answer module 360. Alternatively or additionally, the message identifier herein can include various information capable of identifying the ASR text, such as encoding, numbering, etc., which can be flexibly configured according to actual needs in specific implementation.

[0055] The service end 130 can synchronize the ASR text and the message identifier (i.e., the second question text) to the client by using the question and answer module 360. Specifically, the question module 360 can send the ASR text and the message identifier to the network interface 342 of the access layer 340. The access layer 340 can send the ASR text and the message identifier to the second interface 322 of the interface module 320 of the client 110. Alternatively or additionally, the access layer 340 can send the ASR text and the message identifier to the second interface 322 based on the long connection between the network interface 342 and the second interface 322.

[0056] The second interface 322 can synchronize the ASR text and the message identification to the application message module 312 of the business module 310. The application message module 312 can update the rendered ASR text, and the application message module 312 can also save the ASR text and the message identification.

[0057] In some embodiments, to improve the accuracy of the answer generated by the question answering module 360, the speech module 350 can also send the context of the first question speech to the question answering module 360 together with the message. The server 130 can determine the context of the ASR text based on the message identification using the question module 360, generate a model input for the question answering model 380 (i.e., the second machine learning model) based on the ASR text and the context of the ASR text. The question module 360 can invoke the question answering model 380 to determine the answer text based on the model input.

[0058] The question answering module 360 can send the answer text to the network interface 342 of the access layer 340. The access layer 340 can send the obtained answer text to the second interface 322 of the interface module 320 of the client 110. Alternatively or additionally, the answer text can be sent to the second interface 322 based on a long connection between the network interface 342 and the second interface 322.

[0059] The second interface 322 can send the received answer text to the application message module 312 of the business module 310. To synchronize the rendering of the answer text and the TTS speech, if the application message module 312 receives the answer text before the application speech module 311 receives the TTS speech, the application message module 312 can be configured to wait for the application speech module 311 to receive the TTS speech.

[0060] In embodiments of the present disclosure, as shown in the signaling flow 200, the server 130 causes the answer text to be sent (222) from the question answering module 360 to the speech module 350, invokes the third machine learning model using the speech module 350 to generate (224) the answer speech corresponding to the answer text, and sends (226) the answer speech to the client 110 via the speech module 350.

[0061] In some embodiments, the server 130 can invoke the TTS model 372 using the speech module 350 to divide the answer text into a plurality of text segments in a first order, the first order being the order in which the speech module 350 receives the text sequence of the answer text, and generate the answer speech based on the plurality of text segments by the TTS model 372, the answer speech including a plurality of speech segments corresponding to the plurality of text segments respectively. The answer speech is the speech converted from the answer text, which can also be referred to as TTS speech.

[0062] Exemplarily, the question-answer model 380 can output the response text based on the model input in a streaming manner, and send the response text to the question-answer module 360 in an output order of the text sequence of the response text. The question-answer module 360 can send the response text to the speech module 350 in an order of the text sequence of the response text (i.e., a first order), and the speech module 350 can send the response text to the TTS model 372 in the first order. The TTS model 372 can perform a punctuation processing on the text sequence in the response text in the process of receiving the response text, divide the response text into a plurality of text segments in the order of the text sequence of the response text, and generate a corresponding speech segment based on each text segment as it is divided. Then, the TTS model 372 sends the generated speech segments to the speech module 350 in sequence. The speech module 350 can send the speech segments to the network interface 341 of the access layer 340, and send the speech segments to the first interface 321 of the client 110 through the network interface 341. The punctuation processing on the text sequence in the response text is conducive to improving the naturalness and fluency of the TTS speech, so that the TTS speech is closer to human voice.

[0063] In an embodiment of the present disclosure, as shown in the signaling flow 200, the client 110 receives (228) the response speech corresponding to the response text via the first interface 321, and presents (230) the response text while playing (230) the response speech at the client 110, the playing of the response speech being synchronized with the presentation of the response text.

[0064] In an embodiment of the present disclosure, the “synchronization” of the presentation can refer to that the time when the response speech is played and the presentation time of the response text are the same or almost the same. It should be understood that the synchronization in time can allow a certain error depending on the time accuracy, processing performance, etc. For example, in the case that the time difference between the time when the response speech is played and the presentation time of the response text is less than a certain threshold, it can be considered that the playing of the response speech is synchronized with the presentation of the response text. In addition, the use of “synchronization” in other embodiments of the present disclosure also follows similar principles.

[0065] Exemplarily, after the first interface 321 of the client 110 receives the TTS speech corresponding to the response text, the TTS speech can be sent to the application speech module 311 in the service module 310. The service module 310 can play the TTS speech by using the application speech module 311 and present the response text in the user interface 150 by using the application message module 312 in synchronization with the playing of the TTS speech in response to receiving the TTS speech and the corresponding response text.

[0066] In some embodiments, the response text and the response voice are associated with the message identifier. The client 110 can determine, based on the message identifier, that the response voice is the voice for the response text, and present the response text while playing the response voice at the client 110.

[0067] Alternatively or additionally, the question-answering module 360 obtains the response text output by the question-answering model 380, and can add the message identifier corresponding to the model input to the response text (which can also be referred to as constructing the correspondence between the response text and the message identifier). The question-answering module 360 can feed the response text and the message identifier to the application message module 312 of the client 110. The question-answering module 360 can also send the response text and the message identifier to the voice module 350. The voice module 350 can invoke the TTS model 372 to generate the TTS voice corresponding to the response text, and the voice module 350 can send the TTS voice and the message identifier to the client 110. The application voice module 311 and the application message module 312 can play the TTS voice and present the response text based on the message identifier, respectively. Then, the application voice module 311 can play the TTS voice at the preset voice playing speed, and the application message module 312 can present the text sequence of the response text at the preset text presentation speed corresponding to the preset voice playing speed, so as to ensure that the playing of the TTS voice and the presentation of the response text are synchronized.

[0068] In some embodiments, the client 110 receives a plurality of first question voices in sequence, and adds the plurality of first question voices to the first queue in a second order, which is the receiving order of the plurality of first question voices. The client 110 sequentially removes the plurality of first question voices from the first queue in the second order, and sequentially sends the first question voices removed from the first queue to the server 130.

[0069] To better understand the process of the client 110 sending the first question voice to the server 130, reference will be made to FIG. 4. FIG. 4 shows a schematic diagram of an example 400 of a first queue, according to some embodiments of the present disclosure. In the example 400, the client 110 can receive a plurality of first question voices in sequence (for example, the plurality of first question voices can include question voice 441a, question voice 441b, question voice 441c, question voice 441d, and question voice 441e), and can add the question voice 441a, question voice 441b, question voice 441c, question voice 441d, and question voice 441e to the first queue 440 in sequence. At this time, the first queue 440 is in the state shown in 410 in FIG. 4. The client 110 can sequentially remove each question voice from the first queue 440, and sequentially send the question voice removed from the first queue to the server.

[0070] In some embodiments, the client 110 can add the one or more first question audios that fail to be sent to a first position of the first queue, the first position being after the first question audios that are not sent. In this way, re-sending of the question audios that fail to be sent can be implemented.

[0071] Exemplarily, as shown in FIG. 4, it is assumed that the question audio 441a and the question audio 441b can be sequentially removed from the first queue 440 and sent to the server 130. If it is determined that the question audio 441a and the question audio 441b fail to be sent, the question audio 441a and the question audio 441b can be added to the first queue 440 after the question audios 441c, 441d and 441e that are not sent, forming the question audio 441a' and the question audio 441b' shown in 420 of FIG. 4.

[0072] In some embodiments, the client 120 receives a second question audio after determining that the one or more first question audios fail to be sent, and adds the second question audio to a second position of the first queue, the second position being after the first question audios that are not sent and before the first question audios that fail to be sent. In this way, the latest received question audio can be sent to the server 130 before the question audios that fail to be sent, which is beneficial to improving user experience.

[0073] Exemplarily, as shown in 420 of FIG. 4, the question audios that are not sent in the first queue 440 include the question audios 441c, 441d and 441e, and the question audios that fail to be sent in the first queue 440 include the question audio 441a' and the question audio 441b'. At this time, if the client 110 receives the question audio 442 of the user 140, the question audio 442 can be added to the first queue 440 at a position after the question audios 441c, 441d and 441e and before the question audio 441a' and the question audio 441b', as shown in 430 of FIG. 4.

[0074] In some embodiments, the server 130 sends each audio segment in the response audio to the client 110 in sequence via the voice module 350. The server 130 can continue to send the audio segments in the response audio starting from the most front audio segment of the one or more audio segments in response to determining that the one or more audio segments in the response audio fail to be sent.

[0075] To better understand the sending process of the TTS voice, the description will be made with reference to FIGS. 5A-5C. FIGS. 5A-5C respectively show schematic diagrams of examples 500A-500C of the reply voice according to some embodiments of the present disclosure. In the examples 500A-500C, it is assumed that the reply voice 510 includes the voice segment 511a, the voice segment 511b, the voice segment 511c, the voice segment 511d and the voice segment 511e arranged in sequence. After the voice module 350 sends the voice segment 511a, the voice segment 511b, the voice segment 511c, the voice segment 511d and the voice segment 511e to the client 110, if it is determined that the sending of the voice segment 511c and the voice segment 511d fails, the voice module 350 re-sends the voice segment 511c, the voice segment 511d and the voice segment 511e from the voice segment 511c, as shown in FIG. 5A. If it is determined that the sending of the voice segment d fails, the voice module 350 re-sends the voice segment 511d and the voice segment 511e, as shown in FIG. 5B. If it is determined that the sending of the voice segment a fails, the voice module 350 re-sends the voice segment 511a, the voice segment 511b, the voice segment 511c, the voice segment 511d and the voice segment 511e, i.e. the voice module 350 re-sends the entire reply voice 510, as shown in FIG. 5C. In this way, it is conducive to improving the sending success rate of the reply voice.

[0076] Alternatively or additionally, the voice module 350 can be configured to send at least one voice segment in the reply voice and an identifier for identifying the ordering of the at least one voice segment in the reply voice to the client 110 in sequence. The client 110 can be configured to feed back the identifier to the server 130 in response to receiving the at least one voice segment and the identifier for identifying the ordering of the at least one voice segment in the reply voice. The server 130 can determine that the sending of one or more voice segments in the reply voice fails based on the identifier fed back by the client 110.

[0077] For example, as shown in FIG. 5A, assume that the voice module 350 sends the client 110 voice segment 511a, voice segment 511b, voice segment 511c, voice segment 511d, and voice segment 511e, and identifiers #01, #02, #03, #04, and #05 corresponding to the voice segment 511a, voice segment 511b, voice segment 511c, voice segment 511d, and voice segment 511e. If the client 110 receives the voice segment 511a, voice segment 511b, and voice segment 511e in sequence, the client 110 feeds back identifiers #01, #02, and #05 to the server 130 in sequence. The server 130 can determine the voice segments that failed to be sent in the response voice 510 based on the break position in the order of the at least one identifier fed back by the client 110, e.g., the server 130 can determine that the voice segment c and the voice segment d failed to be sent based on the identifiers #01, #02, and #05 fed back by the client.

[0078] In some embodiments, the client 110 can receive, from the server 130 via the first interface 321, at least one first voice segment in the response voice and a first identifier used to identify an order of the at least one first voice segment in the response voice. The client 110 can receive, from the server 130 via the first interface 321, at least one second voice segment in the response voice and a second identifier used to identify an order of the at least one second voice segment in the response voice. The client 110 can determine a voice segment to be played based on the first identifier and the second identifier.

[0079] Here the client 110 determining the voice segment to be played based on the first identifier and the second identifier can include at least two cases. In one case, the response voice does not have a voice segment that failed to be sent. The client 110 can determine a play order of the voice segment to be played based on the first identifier and the second identifier, and play the at least one first voice segment and the at least one second voice segment in the determined play order.

[0080] In another case, the response voice has a voice segment that failed to be received, the client 110 can determine a voice segment that needs to be played among the at least one first voice segment and the at least one second voice segment and a play order of the voice segment that needs to be played based on the first identifier and the second identifier. Alternatively or additionally, if the client 110 determines that one or more voice segments in the response voice failed to be received based on the first identifier and the second identifier, the client 110 determines a voice segment located before the one or more voice segments that failed to be received in the response voice as the voice segment that needs to be played.

[0081] Exemplarily, as shown in FIG. 5A, it is assumed that the voice module 350 sends the voice segment 511a, the voice segment 511b, the voice segment 511c, the voice segment 511d and the voice segment 511e to the client 110, and the voice segment 511a, the voice segment 511b, the voice segment 511c, the voice segment 511d and the voice segment 511e correspond to the identifiers #01, #02, #03, #04 and #05. If the client 110 receives the voice segment 511a, the voice segment 511b and the voice segment 511e in sequence, and the identifiers #01, #02 and #05, the client 110 can determine the voice segment 511a and the voice segment 511b as the voice segments that need to be played, and can play the voice segment 511a and the voice segment 511b by using the application voice module 311.

[0082] In summary, according to the embodiments of the present disclosure, the client sends the first question voice to the server, and the server can coordinate the voice module and the question and answer module to complete the generation of the first question and answer text or the answer text, can simplify the interaction process between the client and the server, and is conducive to reducing the delay.

[0083] FIG. 6 shows a flowchart of a process 600 for question and answer, according to some embodiments of the present disclosure. The process 600 can be implemented at the server 130.

[0084] At block 610, in response to receiving the first question voice from the client, the server 130 sends, by the voice module of the server 130, a first question text recognized from the first question voice to the client, the first question text being generated by the voice module by invoking a first machine learning model.

[0085] At block 620, the server 130 causes the first question text to be sent from the voice module to a question and answer module of the server 130.

[0086] At block 630, the server 130 determines, by the question and answer module, an answer text for the first question text, the answer text being determined by the question and answer module by invoking a second machine learning model.

[0087] At block 640, the server 130 sends, by the question and answer module, the answer text to the client.

[0088] In some embodiments, the process 600 is further configured to cause the answer text to be sent from the question and answer module to the voice module, generate, by the voice module, an answer voice corresponding to the answer text by invoking a third machine learning model, and send, via the voice module, the answer voice to the client.

[0089] In some embodiments, the process 600 is further configured to: utilize the voice module to invoke the third machine learning model to divide the response text into a plurality of text segments in a first order, the first order being an order in which the voice module receives the text sequence of the response text; and generate, by the third machine learning model, the response voice based on the plurality of text segments, the response voice comprising a plurality of voice segments corresponding to the plurality of text segments respectively.

[0090] In some embodiments, the process 600 is further configured to: send, via the voice module, the voice segments in the response voice to the client in sequence; and in response to determining that sending one or more voice segments in the response voice fails, continue sending the voice segments in the response voice starting from a most front voice segment among the one or more voice segments.

[0091] In some embodiments, the process 600 is further configured to: utilize the question and answer module to determine, based on the first question text, a corresponding second question text, the second question text comprising at least the first question text and a message identification for identifying the first question text; and send, by the question and answer module, the second question text to the client.

[0092] In some embodiments, the process 600 is further configured to: utilize the question module to determine, based on the message identification, context information of the second question text; generate, based on the second question text and the context information of the second question text, a model input for the second machine learning model; and utilize the question module to invoke the second machine learning model to generate the response text based on the model input.

[0093] FIG. 7 illustrates a flowchart of a process 700 for question and answer, according to some embodiments of the present disclosure. The process 700 can be implemented at the client 110.

[0094] At block 710, the client 110 sends, via a first interface interfacing with a server, a first question voice to the server.

[0095] At block 720, the client 110 presents, at the client, a first question text corresponding to the first question voice, in response to receiving the first question text from the server via the first interface.

[0096] At block 730, the client 110 receives, via a second interface interfacing with the server, a response text for the first question text.

[0097] At block 740, the client 110 receives, via the first interface, a response voice corresponding to the response text.

[0098] At block 750, the response text is presented at the client 110 while the response voice is played, the playing of the response voice being synchronized with the presenting of the response text.

[0099] In some embodiments, the process 700 is further configured to: receive, via the second interface, a second question text corresponding to the first question text, the second question text comprising at least the first question text and a message identifier identifying the first question text; and update, based on the second question text, the first question text presented at the client.

[0100] In some embodiments, the process 700 is further configured to: determine, based on the message identifier, that the response speech is speech corresponding to the response text; and present the response text while playing the response speech at the client.

[0101] In some embodiments, the process 700 is further configured to: receive the plurality of first question speeches sequentially; add the plurality of first question speeches to the first queue in a second order, the second order being an order of receiving the plurality of first question speeches; sequentially remove the plurality of first question speeches from the first queue in the second order; and sequentially send the first question speeches removed from the first queue to the server.

[0102] In some embodiments, the process 700 is further configured to: in response to a sending failure of one or more first question speeches of the plurality of first question speeches, add the failed one or more first question speeches to a first position of the first queue, the first position being after the unsent first question speeches.

[0103] In some embodiments, the process 700 is further configured to: after determining the sending failure of the one or more first question speeches, receive a second question speech; and add the second question speech to a second position of the first queue, the second position being after the unsent first question speeches and before the failed first question speeches.

[0104] In some embodiments, the process 700 is further configured to: receive, via the first interface, at least one first speech segment of the response speech and a first identifier identifying an order of the at least one first speech segment in the response speech from the server; receive, via the first interface, at least one second speech segment of the response speech and a second identifier identifying an order of the at least one second speech segment in the response speech from the server; and determine, based on the first identifier and the second identifier, the speech segment to be played.

[0105] Embodiments of the present disclosure also provide corresponding apparatuses for implementing the above-described methods or processes. FIG. 8 shows an exemplary structural block diagram of an apparatus 800 for question answering, according to some embodiments of the present disclosure. The apparatus 800 can be implemented as or included in the server 130. Various modules / components in the apparatus 800 can be implemented by hardware, software, firmware, or any combination thereof.

[0106] As shown in FIG. 8, the apparatus 800 includes a question voice receiving module 810, a question text sending module 820, an answer text determining module 830, and an answer text sending module 840. The question voice receiving module 810 is configured to, in response to receiving a first question voice from a client, send, by a voice module of a server, a first question text recognized from the first question voice to the client, the first question text being generated by the voice module by invoking a first machine learning model. The question text sending module 820 is configured to cause the first question text to be sent from the voice module to a question-answering module of the server. The answer text determining module 830 is configured to determine, by the question-answering module, an answer text for the first question text, the answer text being determined by the question-answering module by invoking a second machine learning model. The answer text sending module 840 is configured to send, by the question-answering module, the answer text to the client.

[0107] In some embodiments, the answer text sending module 840 is further configured to: cause the answer text to be sent from the question-answering module to the voice module; generate, by the voice module, an answer voice corresponding to the answer text by invoking a third machine learning model; and send, via the voice module, the answer voice to the client.

[0108] In some embodiments, the answer text sending module 840 is further configured to: cause the answer text to be sent from the question-answering module to the voice module; generate, by the voice module, an answer voice corresponding to the answer text by invoking a third machine learning model; and send, via the voice module, the answer voice to the client.

[0109] In some embodiments, the answer text sending module 840 is further configured to: cause the answer text to be sent from the question-answering module to the voice module; generate, by the voice module, an answer voice corresponding to the answer text by invoking a third machine learning model; and send, via the voice module, the answer voice to the client.

[0110] In some embodiments, the answer text sending module 840 is further configured to: cause the answer text to be sent from the question-answering module to the voice module; generate, by the voice module, an answer voice corresponding to the answer text by invoking a third machine learning model; and send, via the voice module, the answer voice to the client.

[0111] In some embodiments, the response text sending module 840 is further configured to: determine, by the question module, context information of the second question text based on the message identifier; generate a model input for the second machine learning model based on the second question text and the context information of the second question text; and invoke, by the question module, the second machine learning model to generate the response text based on the model input.

[0112] FIG. 9 illustrates an exemplary structural block diagram of an apparatus 900 for question answering, according to some embodiments of the present disclosure. The apparatus 900 can be implemented as or included in the client 110. Various modules / components in the apparatus 900 can be implemented by hardware, software, firmware, or any combination thereof.

[0113] As shown in FIG. 9, the apparatus 900 includes a question voice sending module 910, a question text presenting module 920, a response text receiving module 930, a response voice receiving module 940, and a playing presenting module 950. The question voice sending module 910 is configured to send, to a server via a first interface interfacing with the server, a first question voice. The question text presenting module 920 is configured to present, at the client, a first question text corresponding to the first question voice in response to receiving the first question text from the server via the first interface. The response text receiving module 930 is configured to receive, via a second interface interfacing with the server, a response text for the first question text. The response voice receiving module 940 is configured to receive, via the first interface, a response voice corresponding to the response text. The playing presenting module 950 is configured to present the response text while playing the response voice at the client, the playing of the response voice being synchronized with the presenting of the response text.

[0114] In some embodiments, the response text receiving module 930 is further configured to: receive, via the second interface, a second question text corresponding to the first question text, the second question text including at least the first question text and a message identifier identifying the first question text; and update the first question text presented at the client based on the second question text.

[0115] In some embodiments, the playing presenting module 950 is further configured to: determine, based on the message identifier, that the response voice is a voice for the response text; and present the response text while playing the response voice at the client.

[0116] In some embodiments, the question voice sending module 910 is further configured to: receive a plurality of first question voices in sequence; add the plurality of first question voices to a first queue in a second order, the second order being a receiving order of the plurality of first question voices; remove the plurality of first question voices from the first queue in the second order in sequence; and send the first question voices removed from the first queue to the server in sequence.

[0117] In some embodiments, the question voice sending module 910 is further configured to, in response to the sending of one or more of the first question voices failing, add the failed one or more first question voices to a first position of the first queue, the first position being after the unsent first question voices.

[0118] In some embodiments, the apparatus 900 further includes a question voice adding module configured to, after determining that the sending of the one or more first question voices fails, receive a second question voice; and add the second question voice to a second position of the first queue, the second position being after the unsent first question voices and before the failed first question voices.

[0119] In some embodiments, the answer voice receiving module 940 is further configured to: receive, from the server via the first interface, at least one first voice segment in the answer voice and a first identifier for identifying an order of the at least one first voice segment in the answer voice; receive, from the server via the first interface, at least one second voice segment in the answer voice and a second identifier for identifying an order of the at least one second voice segment in the answer voice; and determine the voice segment to be played based on the first identifier and the second identifier.

[0120] The units and / or modules included in the apparatus 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, e.g., machine executable instructions stored on a storage medium. In addition to or alternatively, some or all of the units and / or modules in the apparatus 500 can be implemented at least partially by one or more hardware logic components. As an example and not by way of limitation, example types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SOCs), complex programmable logic devices (CPLDs), etc.

[0121] It should be understood that one or more steps in the above methods can be performed by an appropriate electronic device or combination of electronic devices. Such an electronic device or combination of electronic devices may, for example, include the client 110 in FIG. 1.

[0122] FIG. 10 illustrates a block diagram of an electronic device 1000 in which one or more embodiments of the disclosure can be implemented. It should be understood that the electronic device 1000 illustrated in FIG. 10 is merely an example and should not be construed to limit the functionality and scope of the embodiments described herein. The electronic device 1000 illustrated in FIG. 10 can be used to implement the client 110 or the server 130 of FIG. 1, or to implement the apparatus 800 of FIG. 8 or the apparatus 900 of FIG. 9.

[0123] As shown in FIG. 10, the electronic device 1000 is in the form of a general electronic device. Components of the electronic device 1000 can include, but are not limited to, one or more processors or processing units 1010, a memory 1020, a storage device 1030, one or more communication units 1040, one or more input devices 1050, and one or more output devices 1060. The processing unit 1010 can be a real or virtual processor and is capable of executing various processing in accordance with programs stored in the memory 1020. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to improve parallel processing capability of the electronic device 1000.

[0124] The electronic device 1000 typically includes a number of computer storage media. Such media can be any available media that is accessible by the electronic device 1000 and includes both volatile and non-volatile media, removable and non-removable media. The memory 1020 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read-only memory (EEPROM)), or some combination thereof. The storage device 1030 can be a removable or non-removable media, and can include machine-readable media, such as a flash drive, a magnetic disk, or any other media that can be used to store information and / or data and that can be accessed by the electronic device 1000.

[0125] The electronic device 1000 can further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 10, a disk drive for reading from or writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk (e.g., a CD-ROM) can be provided. In such instances, each drive can be connected to the bus (not shown) by one or more data media interfaces. The memory 1020 can include a computer program product 1025 having one or more program modules configured to carry out the various methods or actions of the various embodiments of the present disclosure.

[0126] The communication unit 1040 enables communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 1000 can be implemented in a single computing cluster or a plurality of computer machines that are capable of communicating with each other through a communication connection. As such, the electronic device 1000 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0127] The input device 1050 can be one or more input devices, such as a mouse, a keyboard, a trackball, etc. The output device 1060 can be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 1000 can also communicate with one or more external devices (not shown) such as a storage device, a display device, etc., one or more devices that enable a user to interact with the electronic device 1000, or any devices (e.g., a network card, a modem, etc.) that enable the electronic device 1000 to communicate with one or more other electronic devices, through the communication unit 1040, as desired. Such communication can be carried out via an input / output (I / O) interface (not shown).

[0128] According to an example implementation of the present disclosure, there is provided a computer-readable storage medium having computer-executable instructions stored thereon, where the computer-executable instructions are executed by a processor to implement the method described above. According to an example implementation of the present disclosure, there is also provided a computer program product tangibly stored on a non-transitory computer-readable medium and comprising computer-executable instructions, where the computer-executable instructions are executed by a processor to implement the method described above.

[0129] Various aspects of the disclosure are now described with reference to the drawings. In general, the drawings described herein relate to a method, an apparatus, a device, and a computer program product implemented in accordance with the present disclosure. It should be understood that each block of the flowchart diagrams and / or block diagrams, and combinations of blocks in the flowchart diagrams and / or block diagrams, can be implemented by computer readable program instructions.

[0130] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0131] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some, as newer, implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0133] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A method for question answering, applied on a server side, the method comprising: In response to receiving a first question voice from the client, the server's voice module sends a first question text identified from the first question voice to the client. The first question text is generated by the voice module by calling a first machine learning model. The first question text is sent from the voice module to the question-and-answer module on the server. Using the question-answering module, a response text is determined for the first question text, wherein the response text is determined by the question-answering module by invoking a second machine learning model; and The question-and-answer module sends the response text to the client.

2. The method according to claim 1, further comprising: The response text is sent from the question-and-answer module to the voice module; Using the aforementioned speech module, a third machine learning model is invoked to generate the corresponding speech text for the response; and The response voice is sent to the client via the voice module.

3. The method according to claim 2, wherein generating the response speech corresponding to the response text by calling a third machine learning model using the speech module includes: Using the voice module, the third machine learning model is invoked to divide the response text into multiple text segments according to a first order, where the first order is the order in which the voice module receives the text sequence in the response text; as well as The response speech is generated by the third machine learning model based on the multiple text segments, and the response speech includes multiple speech segments that correspond to the multiple text segments respectively.

4. The method of claim 2, wherein sending the response voice to the client via the voice module comprises: The voice module sequentially sends each voice segment of the response voice to the client. as well as In response to determining that one or more audio segments in the response audio have failed to be transmitted, the audio segments in the response audio are continued to be transmitted starting from the first audio segment among the one or more audio segments.

5. The method according to claim 1, further comprising: Using the question-and-answer module, a corresponding second question text is determined based on the first question text. The second question text includes at least the first question text and a message identifier used to identify the first question text. as well as The question-and-answer module sends the second question text to the client.

6. The method of claim 5, wherein determining the response text for the first question text comprises: The question module uses the message identifier to determine the context information of the second question text; Based on the second question text and the contextual information related to the second question text, generate model input for the second machine learning model; as well as Using the question module, the second machine learning model is invoked to generate the response text based on the model input.

7. A method for question answering, applied to a client, the method comprising: Send a first question voice message to the server via the first interface that connects with the server; In response to receiving a first question text corresponding to the first question voice from the server via the first interface, the first question text is presented on the client. The response text to the first question text is received via a second interface that interfaces with the server. Receive the response voice corresponding to the response text via the first interface; as well as The response voice is played and the response text is displayed simultaneously at the client. The playback of the response voice and the display of the response text are synchronized.

8. The method according to claim 7, further comprising: The second question text corresponding to the first question text is received via the second interface. The second question text includes at least the first question text and a message identifier for identifying the first question text. as well as Based on the second question text, update the first question text presented at the client.

9. The method of claim 8, wherein the response text and the response voice are associated with the message identifier, and wherein presenting the response text while playing the response voice at the client comprises: Based on the message identifier, it is determined that the response voice is a voice addressing the response text; as well as The response text is displayed while the response voice is played at the client.

10. The method of claim 7, wherein sending the first question voice to the server comprises: Receive multiple voice messages with the first question in sequence; The plurality of first question voice messages are added to a first queue in a second order, wherein the second order is the receiving order of the plurality of first question voice messages; The plurality of first question voices are removed from the first queue in the second order; as well as The first question voice, removed from the first queue, is sequentially sent to the server.

11. The method of claim 10, wherein sending the first question voice to the server further comprises: In response to the failure to send one or more of the plurality of first question voices, the failed one or more first question voices are added to a first position in the first queue, the first position being after the unsent first question voices.

12. The method of claim 11, further comprising: After determining that the transmission of one or more first question voice messages has failed, a second question voice message is received; as well as The second question voice is added to the second position of the first queue, which is after the first question voice that has not been sent and before the first question voice that has failed.

13. The method of claim 7, wherein receiving the response voice comprises: via the first interface, at least one first voice segment from the response voice and a first identifier for identifying the order of the at least one first voice segment in the response voice are received from the server. via the first interface, at least one second voice segment from the response voice and a second identifier for identifying the order of the at least one second voice segment in the response voice are received from the server. The method further includes: Based on the first identifier and the second identifier, the audio segment to be played is determined.

14. An apparatus for question answering, comprising: The question voice receiving module is configured to, in response to receiving a first question voice from a client, send a first question text identified from the first question voice to the client by the voice module on the server side. The first question text is generated by the voice module by calling a first machine learning model. The question text sending module is configured to send the first question text from the voice module to the question-and-answer module on the server. The response text determination module is configured to use the question-and-answer module to determine the response text for the first question text, wherein the response text is determined by the question-and-answer module by invoking a second machine learning model; and The response text sending module is configured to send the response text to the client by the question-and-answer module.

15. An apparatus for question answering, comprising: The question voice sending module is configured to send a first question voice to the server via a first interface that interfaces with the server; The question text presentation module is configured to present the first question text on the client side in response to receiving a first question text corresponding to the first question voice from the server via the first interface; The response text receiving module is configured to receive response text in response to the first question text via a second interface that interfaces with the server. The response voice receiving module is configured to receive response voice corresponding to the response text via the first interface; as well as The playback and presentation module is configured to play the response voice at the client while simultaneously presenting the response text, with the playback of the response voice and the presentation of the response text synchronized.

16. An electronic device comprising: At least one processor; as well as At least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions causing the electronic device to perform the method according to any one of claims 1 to 6 or 7 to 13 when executed by the at least one processor.

17. A computer-readable storage medium having stored thereon computer-executable instructions that can be executed by a processor to implement the method according to any one of claims 1 to 6 or 7 to 13.

18. A computer-executable instruction product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 6 or 7 to 13.

Citation Information

Patent Citations

  • Automatic retransmission request mechanism suitable for mobile stream media application

    CN101179362A

  • Online voice consultation system

    CN105912626A

  • Voice service method and system, electronic apparatus and storage medium

    CN108877804A

  • Voice conversation method and device, electronic equipment and storage medium

    CN113571038A

  • Question answering system using speech recognition by radio wire communication and its application method thereof

    KR1020140123370A