Dialogue information processing method and apparatus, device, and storage medium
By receiving and processing the text sequence of language model responses on the client side, the problems of unstable text rendering speed and large data traffic are solved, achieving uniform text sequence rendering and saving data traffic, thus improving the dialogue experience.
Patent Information
- Application Number
- PCT/CN2025/085131
- 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
In existing technologies, language models are deployed on the server side, which causes the text rendering speed to vary depending on the quality of the network signal, and the data traffic is relatively large.
After the client receives the response, it is added to the message queue and removed and presented in sequence. The text sequence is presented on the user interface using the target text speed, reducing the server-side segmentation and transmission process.
It solves the problems of unstable text rendering speed and high data traffic, and achieves uniform text sequence rendering and data traffic saving, thus improving the dialogue experience.
Smart Images

Figure CN2025085131_02012026_PF_FP_ABST
Abstract
Description
Method, device and storage medium for processing dialogue information
[0001] The present application claims priority to the Chinese patent application No. 202410841357.6, filed on June 26, 2024, entitled “Method, device and storage medium for processing dialogue information”, 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 and computer readable storage medium for processing dialogue information. BACKGROUND
[0003] A language model usually adopts a streaming output text, and an application of conducting a human-computer dialogue with the language model usually also adopts a streaming to present the text in a user interface. In the conventional technology, the language model is usually deployed on a server side, and after the language model outputs the text, the text is combined and segmented by the server, and then the text is sequentially sent to the client. However, such a processing manner is easily affected by the network signal quality, causing the text presentation speed to be fast or slow, and the required data traffic to be large. SUMMARY
[0004] In a first aspect of the present disclosure, a method for processing dialogue information is provided. The method is applied to a client, and the method comprises: receiving at least one answer to at least one question from a server, the at least one answer being generated by a machine learning model; adding text sequences in the at least one answer into a message queue based on a first order, the first order representing an order in which the client receives the at least one answer and an order of the text sequences in the respective answers; removing the text sequences in the at least one answer from the message queue based on the first order; and sequentially presenting the text sequences removed from the message queue in a user interface of the client based on a target text presentation speed at the client.
[0005] In a second aspect of the present disclosure, a device for processing dialogue information is provided. The device comprises: an answer receiving module configured to receive at least one answer to at least one question from a server by a client, the at least one answer being generated by a machine learning model; a text sequence adding module configured to add text sequences in the at least one answer into a message queue based on a first order, the first order representing an order in which the client receives the at least one answer and an order of the text sequences in the respective answers; a text sequence removing module configured to remove the text sequences in the at least one answer from the message queue based on the first order; and a text sequence presenting module configured to sequentially present the text sequences removed from the message queue in a user interface of the client based on a target speed at the client.
[0006] In a third aspect of this disclosure, an electronic device is provided. The device includes 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. When executed by the at least one processor, the instructions cause the electronic device to perform the method of the first aspect.
[0007] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The medium stores computer-executable instructions that, when executed by a processor, implement the method of the first aspect.
[0008] In a fifth aspect of this disclosure, a computer program product is provided. The product includes computer-executable instructions, wherein when executed by a processor, the computer-executable instructions implement the method according to a first aspect of this disclosure.
[0009] It should be understood that the description in this section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0011] Figure 1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;
[0012] Figure 2 shows a flowchart of a dialogue information processing procedure according to some embodiments of the present disclosure;
[0013] Figure 3A illustrates an example of a user interface according to some embodiments of the present disclosure;
[0014] Figure 3B illustrates a flowchart of the signaling flow for dialogue information processing according to some embodiments of the present disclosure;
[0015] Figure 4A illustrates a flowchart of the signaling flow for sending a query request to a server according to some embodiments of the present disclosure;
[0016] Figure 4B illustrates a flowchart of the signaling flow for sending a query request to a server according to some embodiments of the present disclosure;
[0017] Figure 4C shows a flowchart of the process of sending a query request to a server according to some embodiments of the present disclosure;
[0018] Figure 5 illustrates a flowchart of the signaling flow for dialogue information processing according to some embodiments of the present disclosure;
[0019] FIG. 6A shows a flowchart of a signaling flow of a dialog information processing, according to some embodiments of the present disclosure;
[0020] FIG. 6B shows a flowchart of a signaling flow of a dialog information processing, according to some embodiments of the present disclosure;
[0021] FIG. 7 shows an exemplary structural block diagram of a dialog information processing apparatus, according to some embodiments of the present disclosure; and
[0022] FIG. 8 shows 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 in more detail 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 interpreted 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.
[0024] In the description of embodiments of the present disclosure, the term "comprising" and its conjugations should be understood to encompass the terms "including but not limited to" and "including at least". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "an embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit or 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, the obtaining, use, storage or deletion of the data) 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, wherein the relevant user can include any type of right subject, such as individuals, enterprises and groups.
[0028] For example, in response to receiving an active request of a user, a 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 information of the relevant user, so that the relevant user can autonomously select whether to provide information to the software or hardware such as an electronic device, an application program, a server or a storage medium, etc. performing the operation of the technical solution of the present disclosure according to the prompt information.
[0029] As an optional but non-limiting implementation manner, in response to receiving an active request of a relevant user, the manner of sending a prompt information to the relevant user may, for example, be a pop-up window manner, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may 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 obtaining process is only illustrative and does not limit the implementation manner of the present disclosure, and other manners meeting relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0031] As used herein, the term "model" can learn an association between respective inputs and outputs from training data, such that a corresponding output can be generated for a given input after training is complete. The generation of a model can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. A neural network model is one example of a model based on deep learning. In this document, a "model" can also be referred to as a "machine learning model", a "learning model", a "machine learning network", or a "learning network", which terms are used interchangeably herein.
[0032] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs, which typically includes an input layer and an output layer and one or more hidden layers between the input layer and the output layer. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected in sequence, such that the output of a previous layer is provided as input to a subsequent layer, with the input layer receiving the input to the neural network and the output of the output layer as the final output of the neural network. Each layer of a neural network includes one or more nodes (also referred to as processing nodes or neurons), each of which processes input from the previous layer.
[0033] Generally, machine learning can include three stages, namely a training stage, a testing stage, and an application stage (also referred to as an inference stage). In the training stage, a given model can be trained using a large amount of training data, iteratively updating parameter values until the model is able to derive consistent inferences from the training data that satisfy an intended objective. Through training, the model can be considered to have learned an association (also referred to as a mapping) from input to output from the training data. The parameter values of the trained model are determined. In the testing stage, test inputs are applied to the trained model to determine whether the model is able to provide correct outputs, thereby determining the performance of the model. In the application stage, the model can be used to process actual inputs based on the trained parameter values to determine corresponding outputs.
[0034] FIG. 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. In the 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.
[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 to support interactions with the user 140. In the environment 100, the client 110 can present a user interface 150 of the application 120 if the application 120 is in an active state. The user interface 150 can include various pages that the application 120 is capable of providing, such as a dialog page for the user and the digital assistant (in which current and historical dialog, including text dialog content, can be presented), and so on.
[0036] In some embodiments, the machine learning model can be constructed based on a language model (LM). The machine learning model used is a content generative model that is capable of generating a corresponding output based on a model input. In some embodiments, the language model-based machine learning model is capable of processing a model input in a text modality (e.g., natural language and / or machine language) and / or a non-text modality (e.g., image, voice, video, etc.), and is capable of generating a desired output from the model input and a prompt word. The prompt word here is used to guide the machine learning model to generate an output that is capable of addressing a user need indicated by the model input. In an application scenario for supporting user dialog, an input of the user 140 can be provided as at least a portion of the model input (other portions can include the prompt word) to the machine learning model 160. The input of the user 140 is considered a question. Based on the model output, a corresponding answer can be generated to be provided to the user 140.
[0037] In some embodiments, the client 110 communicates with the server 130 to enable provisioning of services of the application 120. As shown in FIG. 1, the server 130 can invoke the machine learning model 160 to support the human-machine conversation 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 an apparatus and peripherals 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.
[0038] 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.
[0039] Conventionally, a language model is usually deployed on the server side. After the language model outputs a word, the server combines and splits the word, and sends the split word to the client in sequence. After the client receives the word, the word is presented on the user interface. However, in actual application scenarios, the network signal quality can dynamically change, which can cause the transmission speed of the word to be fast or slow. This in turn can cause the presentation speed of the word on the user interface to be fast or slow, affecting the conversation experience. Moreover, the message used to transmit the word not only includes the transmitted word, but also includes an IP address, a port number, a flag bit, and other necessary information. The processing manner of combining the word to form a text segment and sending the split word to the client in sequence can cause a large number of transmission times to be required, and in turn cause a large amount of data traffic to be required.
[0040] According to an embodiment of the present disclosure, an improved solution for dialogue information processing is provided. According to the solution of the embodiment of the present disclosure, the client receives at least one response to at least one question from the server, the at least one response being generated by using a machine learning model; adds text sequences in the at least one response into a message queue based on a first order, the first order representing an order in which the client receives the at least one response and an order of the text sequences in the respective response; removes the text sequences in the at least one response from the message queue based on the first order; and presents the text sequences removed from the message queue in sequence on a user interface of the client based on a target text presentation speed at the client.
[0041] In this way, in the scenario of human-computer dialogue, not only the problem of large data traffic required for cutting the response into texts and transmitting in sequence is solved, but also the problem of easy influence of network signal quality on the speed of text presentation is solved. Through the solution, after the server receives the response from the machine learning model, the server can transmit the response to the client, and the server does not need to cut the response into texts for transmission. After the client receives the response, the client adds the text sequences in the response to the message queue, and the message queue can be used to present the text sequences at a uniform speed on the user interface. This not only forms the effect of uniform presentation of the text sequences, but also simplifies the processing process of the server, saves data traffic, and is conducive to forming a better dialogue experience.
[0042] Some example embodiments of the present disclosure will be described below with continuous reference to the drawings. FIG. 2 shows a flowchart of a process 200 of dialogue information processing according to some embodiments of the present disclosure. The process 200 can be implemented at the client 110. In order to more clearly describe the process 200, the process 200 will be explained with reference to the environment 100 in FIG. 1, and in combination with the examples shown in FIGS. 3A to 6B. FIGS. 3A to 6B show schematic diagrams of examples 300A to 600B according to some embodiments of the present disclosure.
[0043] It should be noted that the operations performed by the client 110 described above and the operations performed by the client 110 described below can be performed by a related application (for example, the application 120) installed on the client 110. In some embodiments, the operations performed on the electronic device can be completed with the assistance of the server 130.
[0044] At block 210, the client 110 can receive at least one response to at least one question from the server 130, the at least one response being generated by using the machine learning model 160.
[0045] Here, before the client 110 receives the at least one answer to the at least one question from the server 130, the client 110 can receive the at least one question in response to an input operation of the user 140. The client 110 can send the at least one question to the server 130, and the server 130 can send the at least one question to the machine learning model 160, triggering the machine learning model to generate at least one answer to the at least one question.
[0046] Exemplarily, as shown in FIG. 3A, FIG. 3A shows an example 300A of a user interface according to some embodiments of the present disclosure. The example 300A includes a region 310 for presenting questions and answers, a question input box 340, and a question confirmation control 350. The client 110 can receive at least one question in response to an input operation of the user 140 via an input device (e.g., a keyboard, a touch screen, a handwriting board, etc.). The client 110 can present the received question 320 in the question input box 340, and the client 110 can present the question 320 in the region 310 in response to a triggering operation of the question confirmation control 350. The client 110 can also send the question 320 to the server 130, instructing the server 130 to send the question 320 to the machine learning model 160, triggering the machine learning model 160 to generate an answer 330 to the question 320.
[0047] At block 220, the client 110 adds the text sequences in the at least one answer to the message queue 360 based on a first order. Here, the first order represents the order in which the client receives the at least one answer and the order of the text sequences in the respective answers. Optionally, the client 110 can sort the answers based on the order in which the client 110 receives the at least one answer, and then the client 110 can add the text sequences in the respective answers to the message queue in the order of the text sequences in the respective answers according to the sorting.
[0048] To better understand the interaction between the client 110, the server 130, and the machine learning model 160, reference will be made to FIG. 3B. FIG. 3B shows a flowchart of a signaling flow 300B of a conversation information processing according to some embodiments of the present disclosure. The signaling flow 300B involves the machine learning model 160, the server 130, the client 110, and the user interface 150. In the signaling flow 300B, the machine learning model 160 feeds back (301) an answer to a question to the server 130, assuming that the answer includes text sequences A1A2A3...A n . After receiving the feedback of the machine learning model 160, the server 130 sends (302) the answer fed back by the machine learning model 160 to the client 110, including the text sequences A1A2A3...A n .
[0049] After feeding back (301) the response containing the text sequence A1A2A3...A n to the server, the machine learning model 160 can further feed back (304) another response to the server 130, assuming that the other response includes the text sequence B1B2B3...B m . After receiving the feedback from the machine learning model 160, the server 130 sends (305) the other response fed back by the machine learning model 160 to the client 110, including the text sequence B1B2B3...B m in it.
[0050] The client 130 first receives the response containing the text sequence A1A2A3...A n , and then receives the other response containing the text sequence B1B2B3...B m . The client 130 first adds (303) the text sequence A1A2A3...A n to the message queue 360 according to its order in the response, and then adds (306) the text sequence B1B2B3...B m to the message queue 360 according to its order in the other response, with the text sequence in the message queue 360 being A1A2A3...A n B1B2B3...B m .
[0051] At block 230, the client 110 can remove the text sequences in the at least one response from the message queue based on the first order.
[0052] Optionally, the message queue here can be in a First In, First Out (FIFO) mode, and the client 110 can remove the text sequences from the message queue based on the FIFO mode. For example, as shown in FIG. 3B, in the signaling flow 300B, the client 110 can remove (307) the text sequences A1A2A3...A n B1B2B3...B m from the message queue 360 in turn according to the FIFO mode from the head of the message queue 360.
[0053] It can be understood that the message queue here can be any type of message queue, not limited to the message queue in the FIFO mode, as long as the message queue enables the client 110 to remove the text sequences according to the first order.
[0054] At block 240, the client 110 can present the text sequences removed from the message queue in turn in the user interface 150 of the client 110 based on a target text presentation speed at the client 110.
[0055] The target text presentation speed can be any suitable speed. For example, the client 110 can present the text sequence removed from the message queue at a speed of one character per K milliseconds. Alternatively, the speed at which the text sequence is removed from the message queue can be the same as the target text presentation speed of the text sequence. For example, the client 110 can remove one character from the message queue per K milliseconds, and the client 110 can present one character in the user interface 150 per K milliseconds.
[0056] For example, as shown in FIG. 3B, in the signaling flow 300B, the client 110 can present (308) the text sequence removed from the message queue in the user interface 150 in sequence. The presentation effect of the user interface 150 can be as shown in FIG. 3A, and the text sequence A1A2A3...A n B1B2B3...B m The uniform presentation in the area 310 can form a better conversation experience.
[0057] In some embodiments, the client 110 can send a questioning request to the server 130 through the first connection or the second connection established between the client 110 and the server 130 in response to receiving the sending request of the at least one question. The questioning request includes all or part of the questions in the at least one question, and the questioning request is used to request the server 130 to trigger the machine learning model 160 to generate corresponding answers based on all or part of the questions. Specifically, the server 130 receives the questioning request, sends one or more questions included in the questioning request to the machine learning model 160, and triggers the machine learning model 160 to generate answers corresponding to the one or more questions.
[0058] Here, the first connection established between the client and the server each time is configured to transmit one or more questioning requests. Here, the second connection established between the client and the server each time is configured to transmit one questioning request. The first connection and the second connection will be exemplarily described below in two embodiments.
[0059] To better understand the interaction process of sending the question request between the client 110 and the server 130 through the first connection, the description will be made with reference to FIG. 4A. FIG. 4A shows a flowchart of a signaling flow 400A of sending the question request to the server 130, which involves the client 110 and the server 130, according to some embodiments of the present disclosure. In the signaling flow 400A, the client 110 can establish (401) the first connection with the server 130. For example, the first connection can be a long connection conforming to the Transmission Control Protocol (TCP), and the client 110 can establish the long connection with the server 130 through three interaction processes (also can be referred to as three handshakes) specified by the TCP protocol.
[0060] After that, the client 110 can send (402) the question request a to the server 130 by using the first connection. After receiving the question request a, the server 130 can feed back (403) the response a to the client 110 by using the first connection. The client 110 can also send (404) the question request b to the server 130 by using the established first connection without the need of re-establishing the first connection. The server 130 can feed back (405) the response b to the client 110 in response to receiving the question request b. In this way, the client 110 can also send (406) the question request n to the server 130 by using the first connection. The server 130 can feed back (407) the response n to the client 110 in response to receiving the question request n.
[0061] After sending the question request n, if the client 110 determines that the question request has been sent completely, the established first connection can be closed (408). Still taking the long connection conforming to the TCP protocol as an example, the client 110 can close the established long connection with the server 130 through four interaction processes (also can be referred to as four handshakes) specified by the TCP protocol.
[0062] It should be noted that although the long connection conforming to the TCP protocol is taken as an example to exemplarily illustrate the first connection, the first connection is not limited to the long connection conforming to the TCP protocol. The first connection can also be a connection conforming to other communication protocols, as long as each time the first connection is established, the established first connection can be used to perform multiple data transmissions.
[0063] To better understand the interaction process of sending the question request between the client 110 and the server 130 through the second connection, the description will be made with reference to FIG. 4B. FIG. 4B shows a flowchart of a signaling flow 400B of sending the question request to the server 130, which involves the client 110 and the server 130, according to some embodiments of the present disclosure. In the signaling flow 400B, the client 110 can establish (411) a second connection a with the server 130. For example, the second connection a can be a short connection conforming to the Transmission Control Protocol (TCP). The client 110 can send a connection request to the server 130, and the server 130 receives the connection request, thereby completing the process of establishing the short connection conforming to the TCP between the client 110 and the server 130. In the case that the second connection a has been established, the client 110 can send (412) a question request a to the server 130 by using the second connection a, and the server 130 can feed back (413) a response a to the client 110 in response to receiving the question request a. Thereafter, the operation of closing (414) the second connection a can be triggered by the client 110 or the server 130. For example, the client 110 can send a closing request of closing the short connection conforming to the TCP to the server 130, and the server 130 receives the closing request, thereby completing the process of closing the short connection.
[0064] Similarly, the client 110 can also establish (415) a second connection b with the server 130, and the client 110 can send (416) a question request b to the server 130 by using the second connection b, and the server 130 can feed back (417) a response b to the client 110 in response to receiving the question request b. Thereafter, the second connection b can be closed (418) by the client 110 or the server 130. In this way, before the client 110 needs to send a question request to the server 130 each time, the client 110 needs to reestablish the second connection with the server 130, and after transmitting a question request based on the second connection each time, the established second connection needs to be closed.
[0065] In some embodiments, the client 110 can determine whether the first connection has been established between the client 110 and the server 130 in response to receiving the sending request of at least one question. If the first connection has been established, the client 110 can send one or more question requests to the server 130 through the established first connection. If the first connection has not been established, the second connection can be established between the client 110 and the server 130 at least once. The client 110 can send a question request to the server 130 through the second connection established between the client 110 and the server 130 each time.
[0066] The first connection established here should include the case that the first connection between the client 110 and the server 130 is established before the client 110 receives the sending request of the at least one question, and the first connection is determined to be in the keep-alive state after the client 110 receives the sending request. The first connection established here should also include the case that the client 110 triggers the operation of establishing the first connection between the client 110 and the server 130 in response to receiving the sending request of the at least one question. The first connection is determined to be established in response to the completion of the establishment of the first connection. The first connection not established here should be understood as that the first connection is not established between the client 110 and the server 130, and the first connection cannot be established after a preset number of attempts.
[0067] In this way, the first connection can be preferentially selected to transmit the question request, which is beneficial to reduce the time required for transmitting the question request, and further beneficial to improve the response speed of the answer, so as to improve the conversation experience. In the case that the first connection is not established, the second connection is used to transmit the question request to the server 130, which can ensure the normal progress of the conversation.
[0068] In order to better understand the process of transmitting the question request to the server through the first connection or the second connection, the process will be described with reference to FIG. 4C. FIG. 4C shows a flowchart of a process 400C of transmitting a question request to the server 130 according to some embodiments of the present disclosure. In the process 400C, the client 110 can generate (421) a question request containing all or part of the at least one question in response to receiving the sending request of the at least one question. The client 110 can determine (422) whether a long connection conforming to the TCP protocol has been established between the client 110 and the server 130. If the client 110 determines that the long connection has been established, the client 110 can transmit (423) the question request to the server 130 through the long connection.
[0069] After that, the client 110 can determine (424) whether the response feedback by the server 130 to the question request is received within a first preset time. If it is determined that the response feedback by the server 130 is received within the first preset time, it is determined (425) that the transmission of the question request is successful. If it is determined that the response feedback by the server 130 is not received within the first preset time, the client 110 can determine (426) whether the number of continuous transmissions of the question request is greater than a first preset number (for example, once, twice, three times, etc.). If the client 110 determines that the number of continuous transmissions of the question request is greater than the first preset number, the client 110 transmits (427) the question request to the server 130 through the short connection.
[0070] Afterwards, the client 110 can determine whether a response is received from the server 130 within a second preset time, the response being feedback to the question request sent through the short connection. If it is determined (428) that the response is received from the server 130 within the second preset time, it can be determined (425) that the question request is sent successfully. If it is determined (428) that the response is not received from the server 130 within the second preset time, the client can determine (429) whether the number of consecutive times of sending the question request through the short connection is greater than a second preset number of times (for example, twice, three times, four times, etc.). If the number of consecutive times of sending does not exceed the second preset number of times, the client 110 can resend (427) the question request to the server through the short connection. If the number of consecutive times of sending exceeds the second preset number of times, it can be determined (430) that the question request is sent unsuccessfully.
[0071] In some embodiments, after determining that the first question request is sent successfully through the second connection, the client 110 can determine whether a first connection is established between the client 110 and the server 130; and if the first connection is established, send at least one second question request to the server 130 through the first connection. The successful sending of the first question request can indicate that the current network signal quality is relatively good to some extent. In turn, sending at least one second question request through the first connection has a greater probability of being sent successfully. And in the case that the at least one second question request is sent successfully, it is beneficial to shorten the response time of the answer, and in turn, it is beneficial to improve the quality of human-computer dialogue.
[0072] Exemplarily, after the client 110 sends the first question request to the server 130 through the short connection, if a response is received from the server 130 within a second preset time, it can be determined that the first question request is sent successfully. After determining that the first question request is sent successfully, the client 110 can request to establish a long connection between the client 110 and the server 130. If it is determined that the long connection is established, the at least one second question request can be sent to the server 130 through the long connection.
[0073] In some embodiments, after determining that the number of consecutive failures of sending the question request through the second connection exceeds the first threshold value, the client 110 establishes a first connection between the client 110 and the server 130. The client 110 can send one or more question requests to the server 130 through the first connection in response to the first connection being established.
[0074] Exemplarily, as shown in FIG. 4C, in block 429, the client 110 determines whether the number of consecutive sending times of the question request sent to the server 130 through the short connection exceeds the second preset number. If it is determined that the number of consecutive sending times exceeds the second preset number, it is determined (430) that the sending of the question request fails. At this time, the client 110 can request to establish a long connection between the client 110 and the server 130, and determine (422) whether the long connection has been established. If it is determined that the long connection has been established, the one or more question requests after the question request are sent (423) through the long connection.
[0075] In some embodiments, the client 110 can receive the multiple answers sent by the server 130 in the second order through the second connection established between the client 110 and the server 130 multiple times in response to receiving the answer request sent by the server 130. Here, the second connection established between the client and the server each time is configured to transmit one answer, and the second order here is the order in which the server receives the multiple answers from the machine learning model. In this way, the second connection established between the client 110 and the server 130 each time only transmits one answer. After determining that the previous answer is successfully received, the second connection is re-established to transmit the next answer, which not only avoids the out-of-order of the answers, but also guarantees the success rate of the answer feedback and avoids the missing of the answers. This ensures the continuity and smoothness of the conversation content, which is conducive to improving the conversation experience.
[0076] To better understand the interaction process of transmitting the answers between the client 110, the server 130 and the machine learning model 160 through the second connection, it will be described with reference to FIG. 5. FIG. 5 shows a flowchart of a signaling flow 500 of conversation information processing according to some embodiments of the present disclosure, the signaling flow 500 involving the client 110, a long connection 530, an interface 540, the server 130 and the machine learning model 160. In the signaling flow 500, the client 110 can interact with the server 130 through the interface 540 of the server 130, and establish (501) a long connection 550 between the client 110 and the server 130. The client 110 can send a question request containing at least one question to the server 130 through the long connection 530. The server 130 can send (504) the question to the machine learning model 160, triggering the machine learning model 160 to generate at least one answer to the question. The server 130 can send (506) an answer request to the client 110 in response to the machine learning model 160 receiving (505) the first answer (e.g., answer a) to the question. The client 110 can interact with the server 130 to close (507) the long connection in response to receiving the answer request.
[0077] The client 110 can interact with the server 130 through the interface 540, and a short connection is established (511) between the client 110 and the server 130. The client 110 can receive (512) the response a fed back by the server through the short connection. The client 110 can feed back (513) the response a to the server 130 in response to receiving the response a. The client 110 can close (514) the short connection.
[0078] In the process of feeding back the response by the server 130 to the client 110, the machine learning model 160 can also feed back (521) at least one response (for example, the response b, the response c, and the like) after the first response (for example, the response a) to the server 130. The client 110 can re-establish (522) a short connection between the client 110 and the server 130, and receive (523) the response b fed back by the server 130 through the short connection. The client 110 can feed back (524) the response b to the server 130 in response to the successful reception of the response b, and the client 110 or the server 130 can close (525) the short connection established this time. In this way, the client 110 can receive multiple responses (for example, the response c, the response d, and the like) from the server 130 in sequence through the short connection, and details are not repeated here.
[0079] In some embodiments, the client 110 can also send a first questioning request including the first question to the server 130 in response to receiving the sending request for the first question. The server 130 can trigger the machine learning model 160 to generate at least one first response based on the first question in response to the first questioning request, so that the server 130 can feed back the at least one first response to the client 110. If the client 110 receives a sending request for a second question, the client 110 determines a questioning strategy based on the time relationship between the sending request for the second question and the reception of the at least one first response. Based on the questioning strategy, a second questioning request including at least the second question is sent to the server 130. The server can interrupt the machine learning model 160 from generating the first response of the first question in response to the second questioning request, and trigger the machine learning model 160 to generate at least one second response based on at least the second question.
[0080] It can be understood that here the client 110 receives the sending request for the second question before receiving the at least one first response, or before the reception of the at least one first response is completed. The client 110 can determine a questioning strategy based on the time relationship between the sending request for the second question and the reception of the at least one first response in response to receiving the sending request for the second question. In this way, the interrupting operation can be more intelligent, which is conducive to improving the conversation experience.
[0081] In some embodiments, the first asking strategy indicates the client 110 to send the first question and the second question to the server 130. The client 110 can send, based on the first asking strategy, a second asking request including the first question and the second question to the server 130. The server 130 can respond to the second asking request, interrupt the machine learning model 160 from generating the first answer to the first question. The server 130 can also trigger the machine learning model 160 to generate at least one second answer based on the first question and the second question. In a human-machine conversation scenario, a user inputs a previous question (e.g., the first question) and inputs a subsequent question (e.g., the second question) before the machine learning model 160 gives an answer. In most cases, the subsequent question is a supplement to the previous question. In this case, the answer generated by the machine learning model 160 based on the previous question and the subsequent question together has a relatively large probability of being the expected answer of the user.
[0082] Here, the server 130 can send an interrupt instruction to the machine learning model 160 alone to interrupt the machine learning model 160 from continuing to generate the first answer to the first question. The server 130 can also input the first question and the second question to the machine learning model 160 in response to the second asking request, interrupt the machine learning model 160 from continuing to generate the first answer, and trigger the machine learning model 160 to generate at least one second answer to the first question and the second question.
[0083] To better understand the interaction process between the client 110, the server 130, and the machine learning model 160 in the case of interruption, reference will be made to FIG. 6A. FIG. 6A shows a flowchart of a signaling flow 600A of conversation information processing involving the client 110, the server 130, and the machine learning model 160, according to some embodiments of the present disclosure. In the signaling flow 600A, the client 110 receives (601) a first question input by the user 140 through an input device (e.g., a keyboard, a touch screen, a handwriting board, etc.), and sends (602) the first question to the server 130. The server 130 sends (603) the first question to the machine learning model 160, and the machine learning model 160 generates (604) a first answer to the first question.
[0084] The client 110 receives (605) a second question input by the user 140 through the input device before receiving the first answer fed back by the server 130. The client 110 determines to adopt the first questioning strategy and sends (606) the first question and the second question to the server 130 together. The server 130 sends (607) the first question and the second question to the machine learning model 160. The operation of the machine learning model 160 generating the first answer is interrupted, and then the machine learning model 160 generates (609) at least one second answer for the first question and the second question. In fact, the process of the machine learning model 160 feeding back (608) the first answer to the server 130 in the signaling flow 600A does not occur. Subsequently, the machine learning model 160 feeds back (610) the second answer to the server 130, and the server 130 feeds back (611) the second answer to the client 110.
[0085] In some embodiments, if the client 110 receives a sending request for a second question during the process of the server 130 feeding back at least one first answer, it is determined to adopt a second questioning strategy. The second questioning strategy here indicates that the client 110 sends the second question to the server 130. The client 110 sends a second questioning request including the second question to the server 130 based on the second questioning strategy. The server 130 can interrupt the feedback of the at least one first answer in response to the second questioning request, interrupt the machine learning model 160 to generate the first answer for the first question, and trigger the machine learning model 160 to generate at least one second answer based on the second question. In the human-computer dialogue scenario, the user inputs a previous question (for example, after the first question) and has received a part of the answer to the previous question. The user does not wait for the machine learning model 160 to continue to feed back the remaining answer, but inputs a subsequent question (for example, the second question). It is likely that the user already knows the answer to the previous question, or determines that the answer given by the machine learning model 160 is not what the user wants to obtain according to the part of the answer fed back by the machine learning model 160. At this time, the answer generated by the machine learning model 160 based on the subsequent question (for example, the second question) has a relatively large probability of being the expected answer of the user.
[0086] To better understand the interaction process between the client 110, the server 130, and the machine learning model 160 in the case of interruption, reference will be made to FIG. 6B. FIG. 6B illustrates a flowchart of a signaling flow 600B of dialogue information processing involving the client 110, the server 130, and the machine learning model 160, according to some embodiments of the present disclosure. In the signaling flow 600B, the client 110 receives (621) a sending request of a first question and sends (622) the first question to the server 130. The server 130 sends (623) the first question to the machine learning model 160, and the machine learning model 160 generates (624) at least one first answer to the first question. For example, the at least one first answer can include first answer a, first answer b, …, first answer n. The machine learning model 160 can feed back (625) the first answer a, the first answer b, …, the first answer n to the server 130 in sequence. The server 130 feeds back (626) the first answer a, the first answer b, …, the first answer n to the client 110 in sequence.
[0087] After the client 110 receives the first answer a and the first answer b, the client 110 receives (627) a sending request of a second question. The client 110 can determine to use a second questioning strategy and send (628) the second question to the server 130. The server 130 can stop feeding back the remaining first answers after the first answer b to the client 110 in response to receiving the second question (i.e., the process 629 of the server 130 feeding back the first answer c to the first answer n to the client 110 in the signaling flow 600B will not occur). The server 130 can also send (630) the second question to the machine learning model 160, triggering the machine learning model 160 to generate (631) a second answer to the second question. If the machine learning model 160 has not completed generating the first answers to the first question at this time, the machine learning model 160 is interrupted from generating the first answers to the first question. Then, the machine learning model 160 feeds back (632) the second answer to the server 130, and the server 130 feeds back (633) the second answer to the client 110.
[0088] In summary, according to the embodiments of the present disclosure, in the scenario of human-computer conversation, not only the problem of large data flow required for transmitting the response divided into texts in turn is solved, but also the problem that the speed of text presentation is easily affected by network signal quality is solved. Through the scheme, after the server receives the response from the machine learning model, the server can transmit the response to the client, and the server does not need to divide the response into texts for transmission. After the client receives the response, the text sequence in the response is added to the message queue, and the message queue can be used to present the text sequence at a uniform speed in the user interface. This not only forms the effect of uniform presentation of the text sequence, but also simplifies the processing process of the server, saves data flow, and is conducive to forming a better conversation experience.
[0089] Embodiments of the present disclosure also provide a corresponding device for implementing the above method or process. FIG. 7 shows an exemplary structural block diagram of a conversation information processing device according to some embodiments of the present disclosure. The device 700 can be implemented as or included in the client 110. The various modules / components in the device 700 can be implemented by hardware, software, firmware, or any combination thereof.
[0090] As shown in FIG. 7, the device 700 includes a response receiving module 710, a text sequence adding module 720, a text sequence moving out module 730, and a text sequence presenting module 740. The response receiving module 710 is configured to receive at least one response to at least one question from a server, the at least one response being generated by a machine learning model. The text sequence adding module 720 is configured to add text sequences in the at least one response to a message queue based on a first order, the first order representing an order in which the client receives the at least one response and an order of the text sequences in the respective responses. The text sequence moving out module 730 is configured to move the text sequences in the at least one response out of the message queue based on the first order. The text sequence presenting module 740 is configured to present the text sequences moved out of the message queue in turn in a user interface of the client based on a target speed at the client.
[0091] In some embodiments, the device 700 further includes a request sending module configured to, in response to receiving a sending request for the at least one question, send a questioning request including all or part of the at least one question to the server through the first connection or the second connection established between the client and the server, the questioning request being used to request the server to trigger the machine learning model to generate corresponding responses based on the all or part of the questions; wherein each time the first connection established between the client and the server is configured to transmit one or more questioning requests, and each time the second connection established between the client and the server is configured to transmit one questioning request.
[0092] In some embodiments, the request sending module is further configured to: in response to receiving the sending request for the at least one question, determine whether the first connection has been established between the client and the server; if the first connection has been established, send the one or more question requests to the server through the established first connection; if the first connection has not been established, establish the second connection between the client and the server at least once; and send a question request to the server through the second connection established between the client and the server each time.
[0093] In some embodiments, the request sending module is further configured to: after determining that the first question request is successfully sent through the second connection, determine whether the first connection is established between the client and the server; and if the first connection has been established, send at least one second question request to the server through the first connection.
[0094] In some embodiments, the request sending module is further configured to: after determining that the number of consecutive failures of sending the question request through the second connection exceeds the first threshold, establish the first connection between the client and the server; in response to the first connection being established, send the one or more question requests to the server through the first connection.
[0095] In some embodiments, the answer receiving module 710 is further configured to: in response to receiving the answer request sent by the server, receive the multiple answers sent by the server in the second order through the second connection established between the client and the server multiple times; wherein the second connection established between the client and the server each time is configured to transmit one answer, and the second order is the order in which the server receives the multiple answers from the machine learning model.
[0096] In some embodiments, the apparatus 700 further includes a request sending module configured to, in response to receiving a sending request for a first question, send a first question request including the first question to the server, wherein the first question request is used to instruct the server to trigger the machine learning model to generate at least one first answer based on the first question, so that the server feeds back the at least one first answer; if a sending request for a second question is received, determine a questioning strategy based on a time relationship between the sending request for the second question and the receiving of the at least one first answer; based on the questioning strategy, send a second question request including at least the second question to the server; wherein the second question request is used to instruct the server to interrupt the machine learning model to generate the first answer for the first question, and trigger the machine learning model to generate at least one second answer based on at least the second question.
[0097] In some embodiments, the request sending module is further configured to: if the client receives a sending request for the second question before the server feeds back the at least one first answer, determine a first questioning strategy, the first questioning strategy indicating sending the first question and the second question to the server; and send, based on the first questioning strategy, a second questioning request including the first question and the second question to the server, the second questioning request being used to instruct the server to interrupt the machine learning model from generating the first answer to the first question and trigger the machine learning model to generate at least one second answer based on the first question and the second question.
[0098] In some embodiments, the request sending module is further configured to: if the client receives a sending request for the second question during the process that the server feeds back the at least one first answer, determine a second questioning strategy, the second questioning strategy indicating sending the second question to the server; and send, based on the second questioning strategy, a second questioning request including the second question to the server, the second questioning request being used to instruct the server to interrupt the feedback of the at least one first answer and trigger the machine learning model to generate at least one second answer based on the second question.
[0099] The units and / or modules included in the apparatus 700 can be implemented utilizing a variety of means, including software, hardware, firmware, or any combination of these. 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 machine readable medium. In addition to or alternatively, some or all of the units and / or modules in the apparatus 700 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 systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0100] 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.
[0101] FIG. 8 shows a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure can be implemented. It should be understood that the electronic device 800 shown in FIG. 8 is merely an example and should not be construed to limit the functionality and scope of the embodiments described herein. The electronic device 800 shown in FIG. 8 can be used to implement the client 110 in FIG. 1 or the apparatus 700 in FIG. 7.
[0102] As shown in FIG. 8, electronic device 800 is in the form of a general-purpose electronic device. Components of electronic device 800 can include, but are not limited to, one or more processors or processing units 810, memory 820, storage 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. Processing unit(s) 810 can be actual or virtual processors and capable of executing various processing in accordance with programs stored in memory 820. In a multi-processing system, multiple processing units execute computer-executable instructions in parallel to improve the processing power of electronic device 800.
[0103] Electronic device 800 typically includes a plurality of computer storage media. Such media can be removable and / or non-removable, and can include volatile and / or nonvolatile media. Memory 820 can be volatile (such as, for example, registers, cache, random access memory (RAM)), non-volatile (such as, for example, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage 830 can be removable or non-removable and can include machine-readable media, such as, for example, flash drives, disks, or any other media capable of storing information and / or data and accessible by electronic device 800.
[0104] Electronic device 800 can further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 8, a disk drive or other computer-readable media drive can be provided for reading from or writing to a removable, non-removable, volatile, or non-volatile media slot (such as a "floppy" disk). In such cases, each drive can be connected to the bus (not shown) by one or more data media interfaces. Memory 820 can include a computer program product 825 having one or more program modules configured to carry out the various methods or actions of the various embodiments of the present disclosure.
[0105] Communication unit(s) 840 enable communication with other electronic devices via communication media. Additionally, functionality of components of electronic device 800 can be implemented in a single computing cluster or a plurality of computer machines capable of communicating over a communication connection. As such, electronic device 800 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network nodes.
[0106] Input device 850 can be one or more input devices, such as a mouse, a keyboard, a trackball, etc. Output device 860 can be one or more output devices, such as a display, a speaker, a printer, etc. Electronic device 800 can also communicate with one or more external devices (not shown), such as a storage device, a display device, etc., through communication unit 840, as desired, in order to communicate with a user in order to interact with electronic device 800, or to communicate with any device (e.g., a network card, a modem, etc.) that enables electronic device 800 to communicate with one or more other electronic devices. Such communication can be carried out via an input / output (I / O) interface (not shown).
[0107] According to an example implementation of the present disclosure, a computer readable storage medium is provided 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, a computer program product is also provided that is tangibly stored on a non-transitory computer readable medium and includes computer executable instructions, where the computer executable instructions are executed by a processor to implement the method described above.
[0108] The computer readable program instructions can also 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 apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0109] The computer readable program instructions can also 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 apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0110] The computer readable program instructions can also 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 apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0111] The computer program product of the present disclosure can be a computer program product, which is a machine-readable medium (media) having instances of the software embodied thereon, such as computer software, firmware, wireless application protocol (WAP), middleware or microcode. For example, a computer program product can be a floppy disk, a CD-ROM, a DVD, a Blu-ray Disc™, a flash drive, a memory stick, a magnetic tape, or a hard disk drive. The machine-readable medium can be a single medium, or multiple media, of the same or different type. The computer program product can be one or more computer program components embodied in medium and / or transmission signals. The computer program product can have one or more computer program components embodied in medium and / or transmission signals.
[0112] The implementations of the disclosure have been described above with the intent to be illustrative rather than limiting. Although the implementations of the disclosure have been described with regard to one or more implementations, it will be recognized that a variety of modifications and changes can be made to these implementations without departing from the broader spirit and scope of the implementations as set forth in the preceding disclosure. For example, certain aspects of the implementations can be performed using hardware, software, and / or firmware, or any combination thereof. The above-described implementations should therefore be regarded as merely illustrative, and not as narrowing the scope of the disclosure, which is defined by the appended claims and their equivalents.
Claims
1. A conversational information processing method applied to a client, the method comprising: receiving, from a server, at least one answer to at least one question, the at least one answer being generated using a machine learning model; adding text sequences in the at least one answer to a message queue based on a first order, the first order representing an order in which the client receives the at least one answer and an order of the text sequences in the respective answer; removing the text sequences in the at least one answer from the message queue based on the first order; and presenting the text sequences removed from the message queue in a user interface of the client in a sequence based on a target text presentation speed at the client.
2. The method of claim 1, further comprising: in response to receiving a sending request for the at least one question, sending, to the server, a questioning request including all or part of the at least one question through a first connection or a second connection established between the client and the server, the questioning request being used to request the server to trigger the machine learning model to generate corresponding answers based on the all or part of the question; wherein the first connection established between the client and the server each time is configured to transmit one or more questioning requests, and the second connection established between the client and the server each time is configured to transmit one questioning request.
3. The method of claim 2, wherein sending the questioning request to the server comprises: in response to receiving the sending request for the at least one question, determining whether the first connection has been established between the client and the server; if the first connection has been established, sending one or more questioning requests to the server through the established first connection; if the first connection has not been established, establishing the second connection between the client and the server at least once; and sending one questioning request to the server through the second connection established between the client and the server each time.
4. The method of claim 3, wherein sending the questioning request to the server further comprises: after determining that a first questioning request is successfully sent through the second connection, determining whether the first connection is established between the client and the server; and if the first connection has been established, sending at least one second questioning request to the server through the first connection.
5. The method of claim 3, wherein sending the questioning request to the server further comprises: after determining that a number of consecutive failures of sending the questioning request through the second connection exceeds a first threshold, establishing the first connection between the client and the server; in response to the first connection being established, sending one or more questioning requests to the server through the first connection.
6. The method of claim 1, wherein receiving, from a server, at least one answer to at least one question comprises: in response to receiving the response request sent by the server, receiving a plurality of responses sent by the server in a second order through a second connection established between the client and the server multiple times; wherein the second connection established between the client and the server each time is configured to transmit one response, and the second order is the order in which the server receives the plurality of responses from the machine learning model.
7. The method of claim 1, further comprising: in response to receiving the sending request for the first question, sending a first questioning request including the first question to the server, wherein the first questioning request is used to instruct the server to trigger the machine learning model to generate at least one first response based on the first question, so that the server feeds back the at least one first response; if the sending request for the second question is received, determining a questioning strategy based on a time relationship between the sending request for the second question and the receiving of the at least one first response; based on the questioning strategy, sending a second questioning request including at least the second question to the server; wherein the second questioning request is used to instruct the server to interrupt the machine learning model from generating the first response to the first question, and trigger the machine learning model to generate at least one second response based on at least the second question.
8. The method of claim 7, wherein determining the questioning strategy comprises: if the client receives the sending request for the second question before the server feeds back the at least one first response, determining a first questioning strategy, the first questioning strategy instructing to send the first question and the second question to the server; wherein sending the second questioning request including at least the second question to the server based on the questioning strategy comprises: based on the first questioning strategy, sending a second questioning request including the first question and the second question to the server, the second questioning request being used to instruct the server to interrupt the machine learning model from generating the first response to the first question, and trigger the machine learning model to generate at least one second response based on the first question and the second question.
9. The method of claim 7, wherein determining the questioning strategy comprises: if the client receives the sending request for the second question during the process of the server feeding back the at least one first response, determining a second questioning strategy, the second questioning strategy instructing to send the second question to the server; wherein sending the second questioning request including at least the second question to the server based on the questioning strategy comprises: based on the second questioning strategy, sending a second questioning request including the second question to the server, the second questioning request being used to instruct the server to interrupt the feedback of the at least one first response, and trigger the machine learning model to generate at least one second response based on the second question.
10. A dialog information processing apparatus, comprising: a response receiving module configured to receive at least one response to the at least one question from the server by the client, the at least one response being generated using the machine learning model; a text sequence adding module configured to add text sequences in the at least one response into a message queue based on a first order, the first order representing an order in which the client receives the at least one response and an order of the text sequences in the respective response; a text sequence removing module configured to remove text sequences in the at least one response from the message queue based on the first order, and a text sequence presenting module configured to sequentially present the text sequences removed from the message queue in a user interface of the client based on a target speed at the client. 11.An electronic device comprising: 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 according to any one of claims 1 to 9. 12.A computer-readable storage medium having stored thereon computer-executable instructions that are executable by a processor to implement the method according to any one of claims 1 to 9. 13.A computer program 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 9.
Citation Information
Patent Citations
Message processing method and device, electronic equipment and computer medium
CN113094002A
Method and system for realizing question and answer service, electronic equipment and storage medium
CN117909465A
Live broadcast message display method and device, and storage medium
CN118175355A
System and method for a cognitive conversation service
US20220358295A1