Dialogue information processing method and apparatus, device, and storage medium

By receiving and processing text units generated by the language model in the terminal device, and using grammar check data to correct grammatical errors, the problems of out-of-order text and missing characters were solved, thus achieving accuracy and stability in responses.

WO2026001142A1PCT 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/085165
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-25
Filing Date
2025-03-26
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In existing technologies, responses generated by machine learning models may contain grammatical errors due to out-of-order text and missing characters, affecting the accuracy of the responses.

Method used

By receiving text units generated by the language model in the terminal device and presenting responses in the order of receipt, the system uses syntax checking data to process syntax errors in the current response, ensuring the accuracy of the response.

Benefits of technology

This improves the accuracy of responses, ensures that the text stream received by the user is free of syntax errors, and enhances the stability and accuracy of information transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025085165_02012026_PF_FP_ABST
    Figure CN2025085165_02012026_PF_FP_ABST
Patent Text Reader

Abstract

A dialogue information processing method and apparatus, a device, and a storage medium. The method comprises: in a conversational page, receiving a first set of text units from a language model, wherein the first set of text units is included in a first portion of a response of the language model, and the response is a text stream generated in a streaming manner by the language model on the basis of a prompt (210); according to a time sequence in which respective text units in the first set of text units are received, presenting a current response to the prompt (220); and processing the current response on the basis of grammar check data, wherein the grammar check data indicates a grammatical error in the current response (230).
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and equipment for processing dialogue information and storage medium

[0001] The present application claims priority to the Chinese patent application No. 202410832682.6, filed on June 25, 2024, entitled “Method, device and equipment for processing dialogue information and storage medium”, 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 text processing, and in particular, to a method, device, equipment and computer readable storage medium for checking grammatical errors in text. BACKGROUND

[0003] Machine learning techniques have been widely used in various technical fields. In the prior art, machine learning models are provided to assist users in various task processing needs in different applications and scenarios. A trained machine learning model can have a specific task processing capability. For example, a trained language model can dynamically generate an answer to a question according to the user's question. The process of generating an answer by a language model is often generated word by word and issued in a streaming manner. Due to network delay and other reasons, the text in the answer received by the user can be out of order and thus have errors. It is desirable to improve the accuracy of the answer ultimately obtained by the user. SUMMARY

[0004] In a first aspect of the present disclosure, a method for processing dialogue information is provided. The method comprises: receiving, in a dialogue page, a first set of text units from a language model, the first set of text units being included in a first part of an answer of the language model, the answer being a text stream generated by the language model in a streaming manner based on a prompt word; presenting a current answer to the prompt word in a time order in which the text units in the first set of text units are received; and processing the current answer based on grammar checking data, the grammar checking data indicating a grammatical error in the current answer.

[0005] In a second aspect of the present disclosure, a device for processing dialogue information is provided. The device comprises: a text receiving module configured to receive, in a dialogue page, a first set of text units from a language model, the first set of text units being included in a first part of an answer of the language model, the answer being a text stream generated by the language model in a streaming manner based on a prompt word; an answer presenting module configured to present a current answer to the prompt word in a time order in which the text units in the first set of text units are received; and an answer processing module configured to process the current answer based on grammar checking data, the grammar checking data indicating a grammatical error in the current answer.

[0006] In a third aspect of the 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. The instructions, when executed by the at least one processor, cause the device to perform the method of the first aspect of the disclosure.

[0007] In a fourth aspect of the disclosure, a computer-readable storage medium is provided. The computer-readable storage medium has stored thereon computer-executable instructions that are executable by a processor to implement the method of the first aspect of the disclosure.

[0008] In a fifth aspect of the disclosure, a computer program product is provided, comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method of the first aspect of the disclosure.

[0009] It should be understood that the contents described in this section are not intended to limit the key features or important features of the embodiments of the disclosure, nor are they used to limit the scope of the disclosure. Other features of the disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

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

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

[0012] FIG. 2 shows a flowchart of a dialogue information processing process according to some embodiments of the disclosure;

[0013] FIG. 3 shows a schematic diagram of a dialogue information processing example according to some embodiments of the disclosure;

[0014] FIG. 4 shows a block diagram of a dialogue information processing apparatus according to some embodiments of the disclosure; and

[0015] FIG. 5 shows a block diagram of an electronic device in which one or more embodiments of the disclosure can be implemented. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be implemented in various forms and should not be interpreted as being limited to the embodiments set forth herein, but rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It is understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] In the description of embodiments of the present disclosure, the term "comprising" and its conjugations should be understood to encompass the meaning of "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions can also be included below.

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

[0019] 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 or use of the data) should comply with the requirements of relevant laws and regulations and relevant provisions.

[0020] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the scope of use, the use scenario, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0021] For example, in response to receiving the active request of the user, a prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user, so that the user can voluntarily choose whether to provide the personal 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.

[0022] As an optional but non-limiting implementation manner, in response to receiving the active request of the user, the manner of sending the prompt information to the user can be, for example, the manner of 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 personal information to the electronic device.

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

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

[0025] “Neural network” is a machine learning network based on deep learning. 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. Neural networks used in deep learning applications generally include 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.

[0026] 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, constantly iterating and 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. The testing stage can sometimes be integrated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values obtained by training to determine the corresponding model output.

[0027] FIG. 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. In this example environment 100, a terminal device 110 can present a corresponding page 140 to a user 130 based on an operation of the user 130 to output and / or receive information from the user 130. For example, the terminal device 110 can receive a user query (also referred to as a user question, a user request, etc.) from the user 130 via the page 140. The terminal device 110 can determine a response to the user query and provide the response to the user 130 via the page 140.

[0028] In some embodiments, the terminal device 110 can determine the response to the user query with the help of a language model (LM) 120. The language model 120 can be capable of question-answering by learning from a large amount of corpus. The language model 120 can be deployed locally at the terminal device 110 or at other devices (e.g., remote devices). If the language model 120 is deployed locally at the terminal device 110, the terminal device 110 can determine the response directly with the help of the language model 120. If the language model 120 is deployed at other devices, the terminal device 110 can send the user query to the other devices via a communication connection between the terminal device 110 and the other devices. The other devices can generate the response to the user query with the help of the language model 120. The terminal device 110 can obtain the response from the other devices.

[0029] The terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal including a mobile handset, a tablet computer, a notebook computer, a laptop computer, a netbook computer, a smartbook, 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 e-book device, a game device, or any combinations of these devices, including accessories and peripherals of these devices, or any combinations thereof. In some embodiments, the terminal device 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.

[0030] It should be understood that the structures and functions of the various elements in the environment 100 are described for illustrative purposes only, and do not imply any limitation on the scope of the present disclosure.

[0031] As mentioned above, the trained language model can dynamically generate a response to a user's question according to the question. The process of generating the response by the language model is often word-by-word generation and streaming delivery (rendering a similar effect of a typewriter outputting words one by one at the terminal device side). In order to improve the speed and stability of information transmission, multiple communication links can be established between the terminal device and the language model, and multiple text units (e.g., multiple words) in the response generated by the language model can be sent to the terminal device through different links respectively. However, simultaneous transmission through multiple links cannot guarantee that the time sequence of each text unit reaching the terminal device is consistent with the normal sequence. The terminal device will compose a text sequence (e.g., a sentence) from the received streaming message, which is the response. It cannot be determined whether the obtained response has grammatical errors (e.g., out-of-order, missing words, etc.).

[0032] In view of this, according to an embodiment of the present disclosure, a dialogue information processing improvement scheme is provided. According to the scheme, in a dialogue page, a first set of text units from a language model is received. The first set of text units is included in a first part of a response of the language model. The response is a text stream generated by the language model in a streaming manner based on a prompt word. A current response to the prompt word is rendered in a time sequence in which the text units in the first set of text units are received. The current response is processed based on grammar check data, which indicates a grammatical error in the current response.

[0033] Here, a text unit can represent a language unit of a natural language. For example, in a Chinese language environment, a text unit can represent a Chinese character; for another example, in an English language environment, a text unit can represent an English word, etc. Thus, it can be determined whether the received text stream has a grammatical error, and the response is processed to obtain a correct response in the case where there is a grammatical error. This can improve the accuracy of the response.

[0034] Some example embodiments of the present disclosure will be described in detail below with reference to examples of the accompanying drawings. FIG. 2 shows a flowchart of a dialogue information processing process 200 according to some embodiments of the present disclosure. The process 200 can be implemented at the terminal device 110. The process 200 is described below with reference to FIG. 1.

[0035] At block 210, the terminal device 110 receives, in a dialogue page, a first set of text units from a language model, the first set of text units being included in a first part of a response of the language model, the response being a text stream generated by the language model in a streaming manner based on a prompt word, and each text unit in the text stream being transmitted to the client terminal device 110 step by step.

[0036] In some embodiments, the terminal device 110 can determine the user input received via the conversational page as a user query (may also be referred to as a user question, etc.). The terminal device 110 may, for example, generate a prompt for a language model based on a predetermined prompt template and the user query. The terminal device 110 can provide the prompt to the language model so that the language model can generate a response to the user query based on the prompt. The terminal device 110 may, in turn, obtain the response from the language model.

[0037] In some embodiments, the language model generates a text stream in a streaming manner, the length of the text stream gradually increases over time, and each text unit in the text stream can be continuously transmitted to the terminal device. In some embodiments, the terminal device 110 can be installed with an application (such as a social application, a chat application, a query application, etc.) that can provide the conversational page, and the terminal device 110 can also be referred to as a client device of the application. If the language model is deployed at a remote device (such as a server device), the terminal device 110 can receive a plurality of text units (such as a first group of text units) via a plurality of communication links between the terminal device 110 and the server device of the language model. In this way, the data receiving bandwidth can be improved.

[0038] At block 220, the terminal device 110 determines a current response to the prompt and presents the current response to the prompt in the conversational page in a time order in which each text unit in the first group of text units is received. At this time, the current response is determined based on each text unit in the first group of text units and the time order in which the text units are received. For example, if the terminal device 110 receives the text units “I”, “like”, “love”, “to”, and “kick a ball” at the 1st to 5th seconds, respectively. The terminal device 110 can present the first group of text units “I like to kick a ball” in the conversational page, that is, the current response at this time includes “I like to kick a ball”.

[0039] Further, the terminal device 110 can also receive a second group of text units from the language model, the second group of text units being included in a second part of the response, the second part being located after the first part. The terminal device 110 can add each text unit in the second group of text units to the current response in a time order in which each text unit in the second group of text units is received, so as to continue processing the current response based on the grammar checking data. It can be understood that the terminal device 110 can continuously receive each part of the response from the language model until the entire response is received. In this way, as time elapses, subsequent text units generated can be continuously received in a similar manner, and grammar checking can be performed.

[0040] At block 230, the terminal device 110 processes the current response based on the grammar checking data, the grammar checking data indicating a grammatical error in the current response.

[0041] This grammar check data can be obtained locally on the terminal device 110 or from a remote grammar check service (such as a Natural Language Processing (NLP) service). Specifically, the terminal device 110 can send the current response to the grammar check service. The grammar check service can generate grammar check data based on the current response and send the generated grammar check data to the terminal device 110. The terminal device 110 can receive the grammar check data from the grammar check service. This grammar check data may include, for example, the location of the grammar error in the current response, and the type of the grammar error, etc. Error types may include, for example, out-of-order (i.e., the word order in the response is incorrect), missing (i.e., the response contains missing content), and / or incomplete (i.e., the response is not finished). In this way, the processing capabilities of the grammar check service can be invoked to determine various types of errors that may exist in the response, thereby providing the user with a more accurate response.

[0042] In some embodiments, since the response is a text stream generated in a streaming manner, there is a possibility that the current response may not be fully sent to the terminal device. Therefore, if it is determined that the error position is at the end of the current response and the error type is incomplete, the terminal device 110 can ignore the syntax error. In this way, it is not necessary to handle incomplete syntax errors, but to focus on handling other types of syntax errors.

[0043] In some embodiments, if the syntax check data indicates that the current response contains a syntax error, the terminal device 110 may request a text block from the currently generated portion of the response from the language model and update the current response using the received text block. This text block may, for example, be a text fragment within the response. In this way, a text fragment with correct grammatical structure generated by the language model can be directly used to replace the text fragment containing error information presented at the terminal device.

[0044] Specifically, for the user query "What are the characteristics of ###?", the language model can generate a response word by word and send the response word by word to the client through multiple links. Suppose the client combines the first n received words in the order they were received to get "### is a famous heritage city of world culture, possessing rich cultural and natural landscapes". After a grammar check, a grammatical error is found. The client can then request the language model to send the complete generated content "### is a famous world cultural heritage city, possessing rich cultural and natural landscapes" all at once (instead of sending it word by word), and then replace it. Because the subsequent content is sent all at once (e.g., in string format), rather than word by word through multiple links, the accuracy of the subsequently received content is guaranteed, without out-of-order issues or missing words.

[0045] In some embodiments, a text segment that meets predetermined conditions can be selected from the response of the language model, and the end of the text segment can include punctuation marks that indicate grammatical meaning, i.e., the end of the text segment can be determined according to symbols such as a period, a semicolon, a question mark, etc. For the above example, assuming that the client receives the response “... has rich”, the response is not complete at this time, and thus the subsequent content of the response can be waited for. Assuming that it can be determined whether there is a grammatical error when the response “... has rich human and natural landscapes.” is received. In this way, it can be ensured that the selected text segment has a correct grammatical structure. Exemplarily, for the first set of text units, if it is determined that the received first set of text units has a grammatical error, the terminal device 110 can request the text block in the first part from the language model, and update the response of the first part using the text block. Further, the updated response can be presented at the terminal device 110.

[0046] In the process of determining whether to include a grammatical error, the language model also generates new text units, and the terminal device 110 can also receive the new text units from the language model. The terminal device 110 can request the complete text block from the text generated by the language model, and update the response of the first part using the text block. In some embodiments, the terminal device 110 can determine the to-be-replaced part in the current response corresponding to the text block, for example, and update the to-be-replaced part using the text block. In some embodiments, the terminal device 110 can also determine whether the updated response has a grammatical error by means of the grammar checking data.

[0047] In some embodiments, before performing grammar checking on the current response, it can be determined whether the current response includes a part that has undergone grammar checking. If the determination result is “yes”, the part that has undergone grammar checking can be removed from the current response. Specifically, in the case of using a grammar checking service, in the process of sending the current response to the grammar checking service, the part that has been previously sent to the grammar checking service is removed from the current response in response to determining that the current response includes the part.

[0048] In some embodiments, if it is determined that the to-be-replaced part is updated, the terminal device 110 can also determine other parts after the to-be-replaced part in the current response as the current response. For example, if the first round of syntax check finds that the first 10 text units have errors and have been successfully replaced, the terminal device subsequently receives the 11th to 20th text units. In the second round of syntax check, the part that has been checked (i.e., the first 10 text units) can be removed, and only the part that has not been checked (i.e., the 11th to 20th text units) is retained in the current response. That is, the second round of syntax check only processes the part that has not been checked. Since the replaced part does not involve syntax errors, it is not necessary to repeat the processing, which helps to reduce the computing load of the terminal device 110. Alternatively and / or additionally, the part that has been confirmed to not involve syntax errors can be removed from the current response, thereby reducing the computing load of the terminal device 110.

[0049] FIG. 3 shows a schematic diagram of a dialogue information processing example 300 according to some embodiments of the present disclosure. The example 300 involves a terminal device 110, a language model 120, and an NLP service 301 (the NLP service 301 can be an example of a syntax check service).

[0050] The terminal device 110 can send 302 a user question (which can also be referred to as a user query) from a user to the language model 120. The terminal device 110 can receive 304 a streaming response generated by the language model 120 (the streaming response is also referred to as a response generated by the language model 120 in a streaming manner). Since the terminal device 110 receives the streaming response via multiple links, if the streaming response is assembled according to the receiving order, there can be a case that the terminal device 110 does not receive a part of the streaming response sent by the language model 120 (i.e., there is a case of text unit loss) and / or a case that the assembled streaming response has a syntax error.

[0051] The terminal device 110 can send 306 the currently received response to the NLP service 301 to query the NLP service 301 for syntax errors. At the same time, the terminal device 110 can continue to receive 308 the streaming response from the language model 120. The NLP service 301 can determine whether the response has syntax errors and send 310 syntax check data to the terminal device 110 to indicate whether the response has syntax errors.

[0052] The terminal device 110 can determine a syntax error in the current response based on the received syntax check data. The terminal device 110 may, for example, request (312) a text block (e.g., a complete paragraph, a sentence, etc.) in the current already generated portion of the response from the language model 120. The language model 120 can return (314) the text block (e.g., a complete paragraph) to the terminal device 110. The terminal device 110 can determine a replacement portion in the response corresponding to the text block and update (316) the replacement portion with the text block to update the response.

[0053] In summary, according to embodiments of the present disclosure, it can be determined whether there is a syntax error in the received text stream, and the response is processed to obtain a correct response in the case where there is a syntax error. This can improve the accuracy of the response.

[0054] According to some embodiments of the present disclosure, a dialog information processing apparatus is also provided. FIG. 4 shows a block diagram of a dialog information processing apparatus 400 according to some embodiments of the present disclosure. The apparatus 400 can be implemented as or included in the terminal device 110. Various modules / components in the apparatus 400 can be implemented by hardware, software, firmware, or any combination thereof.

[0055] As shown in FIG. 4, the apparatus 400 includes a text receiving module 410 configured to receive, in a conversational page, a first set of text units from a language model, the first set of text units being included in a first portion of a response of the language model, the response being a text stream generated by the language model in a streaming manner based on a prompt word. The apparatus 400 further includes a response presenting module 420 configured to present a current response for the prompt word in a time order in which the text units in the first set of text units are received. The apparatus 400 further includes a response processing module 430 configured to process the current response based on syntax check data, the syntax check data indicating a syntax error in the current response.

[0056] In some embodiments, the response processing module 430 includes a text block requesting module configured to, in response to determining that the syntax check data indicates that the current response includes a syntax error, request a text block in a current already generated portion of the response from the language model, and a response updating module configured to update the current response with the received text block.

[0057] In some embodiments, the text block is a text segment in the response, an end of the text segment including a punctuation mark indicating a syntax meaning.

[0058] In some embodiments, the response updating module includes a replacement determining module configured to determine a replacement portion in the current response corresponding to the text block, and a text block updating module configured to update the replacement portion with the text block.

[0059] In some embodiments, the apparatus 400 further includes a response identifying module configured to identify, in response to determining that the replacement portion is updated, other portions of the current response except the replacement portion as the current response.

[0060] In some embodiments, the apparatus 400 further includes a second text receiving module configured to receive a second set of text units from the language model, the second set of text units being included in a second portion of the response, the second portion being located after the first portion; and a text adding module configured to add, in an order in which the text units in the second set of text units are received, the text units in the second set of text units to the current response to continue processing the current response based on the grammar checking data.

[0061] In some embodiments, the grammar checking data includes an error position of the grammatical error in the current response, and an error type of the grammatical error, the error type including at least any one of: an out-of-order type, a missing type, and an incomplete type.

[0062] In some embodiments, processing the current response includes, in response to determining that the error position is located at an end of the current response, and the error type is the incomplete type, ignoring the grammatical error.

[0063] In some embodiments, the text receiving module 410 is specifically configured to receive, at a client device providing the conversational page, the plurality of text units via a plurality of communication links between the client device and a server device of the language model.

[0064] In some embodiments, the apparatus 400 further includes a response sending module configured to send the current response to a grammar checking service; and a data receiving module configured to receive the grammar checking data from the grammar checking service, the grammar checking data being generated by the grammar checking service based on the current response.

[0065] In some embodiments, the response sending module is further configured to remove, in response to determining that the current response includes a portion that has been previously sent to the grammar checking service, the portion from the current response.

[0066] The units and / or modules included in the apparatus 400 can be implemented utilizing various means, including software, hardware, and / or firmware. 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 400 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.

[0067] FIG. 5 illustrates a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure can be implemented. It should be understood that the electronic device 500 illustrated in FIG. 5 is merely exemplary and should not be construed as limiting on the functionality and scope of the embodiments described herein. The electronic device 500 illustrated in FIG. 5 can be used to implement the terminal device 110 of FIG. 1, the server 130, and / or the apparatus 400 of FIG. 4.

[0068] As shown in FIG. 5, the electronic device 500 is in the form of a general computing device. Components of the electronic device 500 can include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 can be a real or virtual processor and capable of executing various processing in accordance with programs stored in the memory 520. In a multi-processing system, multiple processing units execute computer-executable instructions in parallel to improve the processing power of the electronic device 500.

[0069] The electronic device 500 typically includes a plurality of computer storage media. Such media can be volatile and / or non-volatile memory, removable and / or non-removable media, and / or any combination thereof. The memory 520 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically-erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 can be a removable or non-removable media, and can include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data and accessible by the electronic device 500.

[0070] The electronic device 500 can further include additional detachable / non-detachable, volatile / non-volatile storage media. Although not shown in FIG. 5, a disk drive for reading from or writing to a detachable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a detachable, non-volatile optical disk (e.g., a CD-ROM) can be provided. In these cases, each drive can be connected to the bus (not shown) by one or more data media interfaces. The memory 520 can include a computer program product 525 having one or more program modules configured to carry out the various methods or actions of the various implementations of the present disclosure.

[0071] The communication unit 540 enables communication through communication media with other computing devices. Additionally, the functionality of the components of the electronic device 500 can be implemented in a single computing cluster or a plurality of computer machines that are capable of communicating through a communication connection. Thus, the electronic device 500 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network nodes in the networking environment.

[0072] The input device 550 can be one or more input devices, such as a mouse, a keyboard, a trackball, etc. The output device 560 can be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 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 500, or any devices (e.g., a network card, a modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices, as needed, through the communication unit 540. Such communication can be carried out via an input / output (I / O) interface (not shown).

[0073] According to an example implementation of the present disclosure, a computer readable storage medium having computer executable instructions stored thereon is provided, 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, which 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.

[0074] Various aspects of the disclosure are now described with reference to the drawings. In general, the drawings described below are diagrammatic and schematic representations of actual or conceptual structures and processes, and are not limiting of the scope of the present disclosure. In the drawings, the size and relative positioning of components can be exaggerated for clarity and / or descriptive purposes. Also, the drawings represent examples of the various aspects of the disclosure and are not limiting of the scope of the present disclosure. It should be understood that the drawings are not necessarily drawn to scale.

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

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

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

[0078] implementations of the present disclosure have been described above, the description is illustrative only and not restrictive ones, and is not limited to the disclosed implementations. Numerous modifications and variations will become apparent to those skilled in the art in light of the above teachings. The terminology used is for the purpose of describing the various implementations, and is not intended to limit the scope of the present disclosure.

Claims

1. A conversational information processing method, comprising: receiving, in a conversational page, a first set of text units from a language model, the first set of text units being included in a first portion of a response of the language model, the response being a text stream generated by the language model in a streaming manner based on a prompt word; presenting a current response for the prompt word in an order of time at which respective text units in the first set of text units are received; and processing the current response based on grammar check data, the grammar check data indicating a grammatical error in the current response.

2. The method of claim 1, wherein processing the current response comprises: in response to determining that the grammar check data indicates that the current response includes a grammatical error, requesting, from the language model, a text block in a current portion of the response that has been generated so far; and updating the current response with the received text block.

3. The method of claim 2, wherein the text block is a text segment in the response, an end of the text segment including a punctuation mark indicating a grammatical meaning.

4. The method of claim 2, wherein updating the current response with the received text block comprises: determining a to-be-replaced portion in the current response that corresponds to the text block; and updating the to-be-replaced portion with the text block.

5. The method of claim 1, further comprising: receiving a second set of text units from the language model, the second set of text units being included in a second portion of the response, the second portion being subsequent to the first portion; and adding respective text units in the second set of text units to the current response in an order of time at which the respective text units in the second set of text units are received to continue processing the current response based on the grammar check data. an error location of the grammatical error in the current response, and an error type of the grammatical error, the error type including at least any one of: an out-of-order type, a missing type, and an incomplete type.

6. The method of claim 1, wherein the syntax check data comprises: in response to determining that the error location is at an end of the current response and the error type is the incomplete type, ignoring the grammatical error.

7. The method of claim 6, wherein processing the current response comprises: receiving the plurality of text units at a client device that provides the conversational page via a plurality of communication links between the client device and a server device of the language model.

8. The method of claim 1, wherein receiving the first set of text units comprises:

9. The method of claim 1, further comprising: sending the current response to a grammar check service; and receiving the grammar check data from the grammar check service, the grammar check data being generated by the grammar check service based on the current response. in response to determining that the current response includes a portion that has been previously sent to the grammar check service, removing the portion from the current response.

10. The method of claim 9, wherein sending the current acknowledgement further comprises:

11. A conversational information processing apparatus, comprising: a text receiving module configured to receive, in a conversational page, a first set of text units from a language model, the first set of text units being included in a first portion of a response of the language model, the response being a text stream generated by the language model in a streaming manner based on a prompt word; ​ a response presentation module configured to present a current response to the prompt word in an order of time at which respective text units in the first set of text units are received; and a response processing module configured to process the current response based on grammar check data indicating a grammatical error in the current response.

12. 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 of any of claims 1-10.

13. A computer-readable storage medium having computer-executable instructions stored thereon that are executable by a processor to implement the method of any of claims 1-10.

14. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method of any of claims 1-10.

Citation Information

Patent Citations

  • Text processing method and device, electronic equipment and computer readable storage medium

    CN116680379A

  • Medical question answering system based on large language model

    CN117851558A

  • Customer service intelligent question and answer implementation method and device, equipment and storage medium

    CN117891917A

  • Method and system for processing user inputs using natural language processing

    US20210350073A1

  • Correlating event data across multiple data streams to identify compatible distributed data files with which to integrate data at various networked computing devices

    US20220358115A1