Conversation state display method, device and equipment and readable storage medium

Through the real-time interaction with the big model and sentence end character detection of the streaming interface, the problem of long-term processing of big model dialogue response is solved, and the immediacy of the conversation and the improvement of the user experience is achieved.

CN119621205AActive Publication Date: 2025-03-14ZHEJIANG GEELY HLDG GRP CO LTD +1

Patent Information

Application Number
CN202411585181.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-03-14
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

In automatic dialogue systems, large-model-based dialogue response processing takes longer, causing users to wait for a long time, reducing the interactive experience and increasing anxiety.

Method used

Through the real-time interaction between the streaming interface and the big model, combined with the detection strategy of the sentence ending characters in the received response dialogue segment, the response dialogue segment is gradually returned, and the information to be sent is segmented during the cache process, and the complete dialogue sentence is sent to the client in a timely manner.

Benefits of technology

It realizes the immediacy of conversations, reduces users' waiting anxiety, improves user interaction experience, and enhances the transparency and credibility of the conversation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621205A_ABST
    Figure CN119621205A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue state display method and device, equipment and a readable storage medium, and the method enables a large model to gradually return response dialogue segments in a streaming manner through the real-time interaction of a streaming interface and the large model, and achieves the dialogue state display in combination with a detection strategy of sentence ending characters in the received response dialogue segments. A complete dialogue sentence can be sent to a client in time, it is ensured that a user can check part of response content in time, meanwhile, whether follow-up dialogue fragments to be returned exist after the complete dialogue sentence sent in time can be accurately recognized, and the user is informed of the progress of a current large model responding to a dialogue in time through state prompt. And the uncertainty and anxiety of the user are effectively relieved while the conversation instantaneity is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment and readable storage medium for displaying a conversation status. Background Art

[0002] In the scenario of an automatic dialogue system, the original server preset by the system in the traditional method usually automatically matches the set response results based on the client's input dialogue and sends them to the client. This method is difficult to cope with changing user needs and complex dialogue scenarios. For this reason, the automatic dialogue system introduces custom servers and large models to customize the response logic that meets the needs of specific scenarios.

[0003] In the application scenario of a custom server that implements dialogue response with a large model, it takes a long time to process complex dialogues based on the large model. Users need to wait for a long time before receiving a reply after sending an input dialogue. This long wait not only reduces the user's interactive experience, but the uncertainty associated with waiting can easily cause users to feel anxious. Therefore, how to reduce users' waiting anxiety while ensuring the immediacy of the dialogue and improving the user's dialogue experience has become an urgent problem to be solved. Summary of the invention

[0004] In view of this, in order to solve the above technical problems, the present application provides a conversation status display method, device, equipment and readable storage medium.

[0005] Specifically, the present application is implemented through the following technical solutions:

[0006] According to a first aspect of an embodiment of the present application, a method for displaying a dialog status is provided, which is applied to a custom server of a dialog system, wherein the dialog system further includes a client and an original server preset by the system; the method includes:

[0007] Receiving the client input dialogue forwarded by the original server, and sending the input dialogue to the preset large model through a streaming interface;

[0008] receiving response dialogue segments sequentially returned by the large model in response to the input dialogue;

[0009] In the process of sequentially caching the response dialogue segments, if a sentence ending character is detected in the cached response dialogue segments, the cached characters before the sentence ending character are segmented and determined as information to be sent;

[0010] The information to be sent is forwarded to the client through the original server, and when there are other characters after the sentence end character, the status input interface preset in the dialogue system is called to send the first control information to the client; the first control information is used to instruct the client to update the dialogue interface to display a first status prompt that there is a response dialogue to be returned.

[0011] Optionally, the method further comprises:

[0012] In the process of sending the input dialogue to the preset large model through the streaming interface, the status input interface is called to send second control information to the client; the second control information is used to instruct the client to update the dialogue interface to display a second status prompt that the input dialogue is being processed.

[0013] Optionally, the method further comprises:

[0014] In the sequential caching process, if the total length of characters included in the cached response dialogue segment reaches the set character length, then according to the cache reverse order of the cached response dialogue segment, detect whether there is a sentence end character in the cached response dialogue segment;

[0015] When the first sentence ending character is detected, the detection is stopped and all the buffered characters before the first sentence ending character are segmented and determined as information to be sent.

[0016] Optionally, the detecting whether there is a sentence ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment includes:

[0017] According to the cache reverse order, check whether the last character is a sentence end character;

[0018] If not, then detection is performed character by character in reverse order starting from the last character until the sentence ending character is detected for the first time or all the cached response dialogue segments are detected.

[0019] Optionally, in the case of detecting whether there is a sentence ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment, the method further comprises:

[0020] In the case where the sentence-ending character is not detected, the response dialogue segments received after the buffered response dialogue segment are detected in sequence until the sentence-ending character is detected.

[0021] Optionally, the method further comprises:

[0022] In the sequential caching process, detecting whether there is a sentence ending character in the latest cached response dialogue segment;

[0023] When a sentence ending character is detected, the buffered characters before the sentence ending character are segmented and determined as information to be sent.

[0024] Optionally, the method further comprises:

[0025] When the number of times the sentence end character is detected reaches a set number, stop detecting the sentence end character, and when the large model stops returning the answering dialogue segment, segment all the buffered characters after the last detected sentence end character and determine them as information to be sent;

[0026] The set number of times is the limit on the number of response dialogues for input dialogues in the dialogue system minus one.

[0027] Optionally, the determination condition for the large model to stop returning the response dialogue segment includes at least one of the following:

[0028] After a first set period of time, no response dialogue segment returned by the large model is received;

[0029] or, detecting that the status indicator of the streaming interface indicates that the interface is disconnected;

[0030] Or, an interface disconnection notification message is received from the large model.

[0031] Optionally, the display time of the first status prompt on the dialogue interface is limited to a second set time length; the method further includes:

[0032] receiving response information to the first control information returned by the client through the preset status interface, and starting timing;

[0033] When the timing duration reaches the second set duration, if the information to be sent is not sent to the original server within the timing period, the status input interface is re-called to send the first control information.

[0034] According to a second aspect of an embodiment of the present application, a dialog status display device is provided, which is applied to a custom server of a dialog system, wherein the dialog system further includes a client and an original server preset by the system; the device includes:

[0035] An input dialogue receiving and sending module, used for receiving the client input dialogue forwarded by the original server, and sending the input dialogue to the preset large model through a streaming interface;

[0036] A response dialogue segment receiving module, used for receiving the response dialogue segments sequentially returned by the large model for the input dialogue;

[0037] A detection and information to be sent determination module, used for, in the process of sequentially caching the response dialogue segments, if a sentence ending character is detected in the cached response dialogue segments, segmenting the cached characters before the sentence ending character and determining them as information to be sent;

[0038] The answer sending and status prompt module is used to forward the information to be sent to the client through the original server, and when there are other characters after the sentence end character, call the status input interface preset in the dialogue system to send the first control information to the client; the first control information is used to instruct the client to update the dialogue interface to display the first status prompt that there is a response dialogue to be returned.

[0039] Optionally, the device further comprises:

[0040] In the process of sending the input dialogue to the preset large model through the streaming interface, the status input interface is called to send second control information to the client; the second control information is used to instruct the client to update the dialogue interface to display a second status prompt that the input dialogue is being processed.

[0041] Optionally, the device further comprises:

[0042] A detection module, configured to detect whether there is a sentence ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment if the total length of characters included in the cached response dialogue segment reaches a set character length during the sequential caching process;

[0043] The segmentation module is used to stop detection and segment all cached characters before the first sentence-ending character as information to be sent when the first sentence-ending character is detected.

[0044] Optionally, the detection module is specifically used to:

[0045] According to the cache reverse order, check whether the last character is a sentence end character;

[0046] If not, then detection is performed character by character in reverse order starting from the last character until the sentence ending character is detected for the first time or all the cached response dialogue segments are detected.

[0047] Optionally, in the case of detecting whether there is a sentence ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment, the device further comprises:

[0048] In the case where the sentence-ending character is not detected, the response dialogue segments received after the buffered response dialogue segment are detected in sequence until the sentence-ending character is detected.

[0049] Optionally, the device further comprises:

[0050] In the sequential caching process, detecting whether there is a sentence ending character in the latest cached response dialogue segment;

[0051] When a sentence ending character is detected, the buffered characters before the sentence ending character are segmented and determined as information to be sent.

[0052] Optionally, the device further comprises:

[0053] When the number of times the sentence end character is detected reaches a set number, stop detecting the sentence end character, and when the large model stops returning the answering dialogue segment, segment all the buffered characters after the last detected sentence end character and determine them as information to be sent;

[0054] The set number of times is the limit on the number of response dialogues for input dialogues in the dialogue system minus one.

[0055] Optionally, the determination condition for the large model to stop returning the response dialogue segment includes at least one of the following:

[0056] After a first set period of time, no response dialogue segment returned by the large model is received;

[0057] or, detecting that the status indicator of the streaming interface indicates that the interface is disconnected;

[0058] Or, an interface disconnection notification message is received from the large model.

[0059] Optionally, the display time of the first status prompt on the dialogue interface is limited to a second set time length; the device further includes:

[0060] receiving response information to the first control information returned by the client through the preset status interface, and starting timing;

[0061] When the timing duration reaches the second set duration, if the information to be sent is not sent to the original server within the timing period, the status input interface is re-called to send the first control information.

[0062] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the above-mentioned conversation status display method by calling the computer program.

[0063] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned dialog status display method is implemented.

[0064] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0065] In the technical solution provided by the present application, through real-time interaction with the big model through the streaming interface, the big model is allowed to gradually return the response dialogue fragments in a streaming manner. Combined with the detection strategy of the sentence ending characters in the received response dialogue fragments, not only can the complete dialogue sentence be sent to the client instantly, ensuring that the user can view part of the response content in time, but also it can accurately identify whether there are subsequent dialogue fragments to be returned after the complete dialogue sentence sent instantly. The status prompt is used to instantly inform the user of the current progress of the big model's response to the dialogue, thereby enhancing the transparency and credibility of the dialogue system, effectively alleviating the user's uncertainty and anxiety, increasing the immediacy of interaction and improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0067] Figure 1 It is a schematic diagram of a dialogue system architecture that introduces a custom server, shown by an exemplary embodiment in the related art;

[0068] Figure 2A It is a schematic diagram of a dialogue system architecture that introduces a custom server and a large model, shown in an exemplary embodiment of the present application;

[0069] Figure 2B It is a flowchart of a method for displaying a dialog status according to an exemplary embodiment of the present application;

[0070] Figure 2C It is a schematic diagram of a flow chart of a large model returning a response dialogue fragment through a streaming interface, shown in an exemplary embodiment of the present application;

[0071] Figure 2D It is a flowchart showing a custom server receiving response dialogue segments for sequential storage and executing sentence end character detection according to an exemplary embodiment of the present application;

[0072] Figure 3A is a schematic diagram of sentence ending character detection based on a response dialogue segment as a unit, shown in an exemplary embodiment of the present application;

[0073] Figure 3Bis a schematic diagram of sentence ending character detection in character units shown in an exemplary embodiment of the present application;

[0074] Figure 4 is a structural schematic diagram of a conversation status display device shown in an exemplary embodiment of the present application;

[0075] Figure 5 It is a hardware schematic diagram of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0076] In the automatic dialogue system, the traditional preset original server can often only provide fixed-mode responses. For example, the system usually pre-sets the corresponding relationship between the input dialogue and the response, which leads to a single response content and poor scene adaptability, making it difficult to cope with changing user needs and complex dialogue scenarios. To this end, based on the powerful processing capabilities and in-depth understanding of natural language of the big model, it can provide the dialogue system with more flexible and accurate response options. By introducing custom servers and big models in the automatic dialogue system to customize the response logic that meets the needs of specific scenarios, the big model responds to the input dialogue from the client to improve the dialogue fluency and flexibility of the dialogue system.

[0077] like Figure 1 The structure and interaction diagram of the dialogue system that introduces a custom server and a large model is shown as an example. Based on the dialogue system supporting user-defined servers, the dialogue system includes not only the client and the original server preset by the system, but also the custom server set by the user according to the dialogue requirements. The custom server uses the large model to implement responses to input dialogues. After the introduction of the custom server, the dialogue system uses the original server as a message transfer station for the consideration of the flexibility and scalability of the dialogue system architecture, the reliability and security of message transmission, and the maintainability of the system. Messages from the client are forwarded to the custom server by the original server, and messages from the custom server are forwarded to the client through the original server.

[0078] However, in the application scenario of a custom server that implements dialogue response with a large model, it takes a long time to process complex dialogues based on the large model. Users need to wait for a long time before receiving a reply after sending an input dialogue. This long wait not only reduces the user's interactive experience, but the uncertainty associated with waiting can easily cause users to feel anxious. Therefore, for the interactive scenario of the dialogue system that introduces a custom server and a large model, how to reduce the user's waiting anxiety while ensuring the immediacy of the dialogue, so as to improve the user's dialogue experience, has become an urgent problem to be solved.

[0079] In view of this, the present application proposes a method for displaying the dialogue input status for a dialogue system. Through the interaction between the customized server and the large model streaming interface, combined with the response dialogue fragment processing logic returned by the large model streaming, it ensures the immediacy of the dialogue while reducing the user's waiting anxiety, and achieves a more natural, smooth and efficient dialogue interaction experience.

[0080] This method is applied to the above-mentioned dialogue system, such as Figure 2A The dialog system architecture diagram shown in the figure supports user-defined servers, that is, users can configure a server address (also called callback URL or server address) on the original server. The server address serves as a communication bridge between the original server and the user-defined server. When the user sends a message through the client, the original server will forward the message to the server address configured by the user. The client refers to the terminal device or software interface for user interaction, which may include but is not limited to mobile phone APP, web browser, etc., and is used to display the response information of the dialog system and receive user input. In the embodiment of the present application, the customized server of the dialog system interacts with the preset large model through a streaming interface. Among them, the input dialogue from the client will be forwarded by the custom server to the big model through the streaming interface. The big model generates a corresponding response dialogue for the input dialogue, and continuously returns it to the custom server in the form of streaming results through the streaming interface; the custom server is used to process the received streaming results of the response dialogue to construct a message to be sent to the original server preset in the dialogue system, and the original server forwards it to the client; after receiving the message to be sent from the original server, the client displays it on the user dialogue interface of the client.

[0081] based on Figure 2A The dialog system shown exemplarily, the present application provides a method for displaying the dialog status, which is executed by the custom server of the above-mentioned dialog system, see Figure 2B The method may at least include the following steps:

[0082] S201, receiving a client input dialogue forwarded by the original server, and sending the input dialogue to a preset large model through a streaming interface;

[0083] Input dialogue refers to the text entered by the user on the client's dialogue interface. It can be questions, instructions, or any form of natural language text, which is used to interact with the custom server of the dialogue system.

[0084] Streaming interfaces include interfaces that allow data to be transmitted in the form of streams (i.e., continuous data blocks), which are suitable for scenarios where large amounts of data are processed or data is generated at a fast speed. The data stream returned by the streaming interface is the streaming result. The data is not returned all at once, but is gradually generated and sent over time. The amount of data sent each time depends on the generation speed of the large model and the data block segmentation design of the streaming interface.

[0085] The preset big model may include a machine learning model that is pre-trained and deployed on a custom server or other devices, which interacts with the custom server through a streaming interface. The big model is capable of handling complex natural language processing tasks, such as text generation, question-answering system, sentiment analysis, etc. During the training process, the preset big model can be trained in a scenario-specific manner according to the user's dialogue scenario requirements. For example, if the dialogue system is required to accurately answer questions about encyclopedia knowledge, a large amount of encyclopedia knowledge expectations can be collected as samples to train the model.

[0086] In this step, after the user sends the input dialogue through the dialogue interface of the client, the input dialogue can be sent to the original server through HTTP request, WebSocket connection or other communication protocols; the original server forwards the received input dialogue to the custom server, or the original server can also perform necessary verification and preprocessing on the input dialogue, such as format conversion, security verification, etc., and then forward the input dialogue to the custom server to ensure reliable transmission of messages between the client and the custom server. Based on the interaction between the custom server and the big model through the streaming interface, after receiving the input dialogue forwarded by the original server, the custom server calls the preset streaming interface to pass the message to the big model; after receiving the input dialogue, the big model understands the input dialogue and generates a response dialogue for the input dialogue, and sends the generated response dialogue to the custom server in the form of a stream through the streaming interface.

[0087] For example, Figure 2C The flowchart of the input dialogue sent to the big model is shown as an example. Suppose the user inputs "What's the weather like tomorrow?" (i.e., the input dialogue) through the dialogue interface of the client. The client sends the input dialogue to the original server, and the original server forwards it to the custom server. The custom server enables the streaming interface to send the input dialogue to the big model. After receiving the input dialogue, the big model starts to generate a response dialogue, such as "Tomorrow's weather will be cloudy with light rain, and the temperature will be 15℃-20℃. It is recommended to wear a coat to keep warm when traveling. Don't forget to bring an umbrella! Is there anything else I can help you with?" The response dialogue will be divided into multiple data blocks, namely, response dialogue fragments, and returned to the custom server in the form of streams through the streaming interface.

[0088] S202, receiving response dialogue segments sequentially returned by the large model in response to the input dialogue;

[0089] Based on the streaming interface, data is transmitted in continuous data blocks. In this embodiment, in order to efficiently and in real time process the input dialogue and return the response, the response dialogue generated by the large model for the input dialogue will be returned to the custom server in the form of response dialogue fragments in sequence. That is, when the large model receives the input dialogue, it immediately starts to process and generate the response content. Different from the traditional method of waiting for the entire response to be generated and then sending it all at once, the streaming interface enables the large model to send the part of the content (i.e., "tomorrow") to the server through the streaming interface as soon as there is content available (for example, the generation of the word "tomorrow" has been completed) during the process of generating the response dialogue. As the large model continues to process and generate subsequent response content (such as "weather" and its subsequent content), the newly generated content will also be sent to the server in real time and in sequence through the streaming interface.

[0090] For example, for Figure 2C In the example response dialogue, while the big model is generating the response dialogue, the generated available response dialogue can be sent to the client in response dialogue segments such as "tomorrow", "the weather", "it is cloudy with light rain", "the temperature is", "15℃-20℃." ... in sequence, and the generated available response dialogue segments are sent through the streaming interface, and the big model continues to generate the subsequent content of the response dialogue, which are executed in parallel to achieve the immediacy of the dialogue response.

[0091] For the custom server, the response dialogue fragments returned by the streaming interface are received in real time, and the response dialogue fragments are combined in sequence in the order received to form the complete response content of the large model for the input dialogue. Figure 2C In the example response dialogue, the custom server receives [tomorrow] [weather] [is cloudy with light rain,] [temperature is] [15℃-20℃.] [travel] [suggestion] [wear a coat]... in sequence through the streaming interface.

[0092] S203, in the process of sequentially caching the response dialogue segments, if a sentence ending character is detected in the cached response dialogue segments, segmenting the cached characters before the sentence ending character and determining them as information to be sent;

[0093] The sequential caching refers to storing the received response dialogues in the order in which they are received, and storing the received response dialogues in the cache area in order for easy access and processing. Figure 2DIn the sequential cache example shown, the custom server receives [tomorrow's weather] [is cloudy with light rain,] [temperature is] [15℃-20℃.] [travel advice] in sequence through the streaming interface, and the corresponding storage in the temporary storage space can be expressed as [tomorrow's weather is cloudy with light rain, and the temperature is 15℃-20℃. Travel advice].

[0094] The sentence end characters include special characters or character combinations used to mark the end of a sentence, such as punctuation marks such as a period, a question mark, and an exclamation mark. The sentence end characters can be dynamically adapted according to the language used by the dialogue system, and the dialogue system can maintain a configuration table containing different languages ​​and their corresponding sentence end character sets. For example, when the language of the dialogue system is English, the corresponding sentence end identifier is an English end punctuation mark such as a solid dot. In order to make a more accurate judgment, language recognition can be performed on the response dialogue segment to be detected, and the response dialogue segment can be detected by using a set sentence end character set that conforms to the recognized language.

[0095] The message to be sent refers to a message that is ready to be forwarded to the client by the custom server through the original server. In this embodiment, the message to be sent includes at least one complete sentence. The custom server sequentially caches the received response dialogue segments. During the caching process, the custom server can sequentially detect whether each received response dialogue segment contains a sentence ending character, or, after accumulating each response dialogue segment of a set character length, detect whether it contains a sentence ending character in reverse order of the cache time, and when the sentence ending character is detected, all characters cached before the sentence ending character and the sentence ending character itself are separated from the cache space, and the separated characters are sequentially composed into the message to be sent.

[0096] Among them, the following method can be used to detect in sequence whether each received response dialogue segment contains a sentence-ending character: in the sequential caching process, detect whether there is a sentence-ending character in the latest cached response dialogue segment; when a sentence-ending character is detected, segment the cached characters before the sentence-ending character and determine them as information to be sent.

[0097] That is, when the custom server receives a response dialogue segment, it can cache it sequentially in the cache area and detect whether the currently cached response dialogue segment contains a sentence-ending character: if so, the cached characters before the sentence-ending character and the sentence-ending character are sequentially combined into a string as the information to be sent, and the subsequent cached response dialogue segments are continued to be detected; if not, the next response dialogue segment received is continued to be cached and the sentence-ending character detection is performed.

[0098] by Figure 2DTaking the example of sequential caching shown in the figure as an example, taking the first six response dialogue segments as an example, for each response dialogue segment received in sequence, [tomorrow] [the weather] [is cloudy and turns to light rain,] [the temperature is] [15℃-20℃.] [travel], such as Figure 2D As shown, when each response dialogue segment is cached to the cache area, it is detected whether the response dialogue segment includes a sentence ending character. When the fifth response dialogue segment [15℃-20℃. ] is detected, the sentence ending character period is detected, and the cached characters before and including the period in the cache area (i.e., the first five response dialogue segments) are separated from the cache area and combined into a string according to the original cache order as the illustrated message M1 to be sent; next, the custom server continues to detect whether the sixth response dialogue segment [travel] includes a sentence ending character, and repeats the above process to continuously determine new messages to be sent until the streaming interface stops returning and all returned response dialogue segments have been detected.

[0099] Regarding the segmentation of the cached characters before the sentence end character to be determined as the information to be sent, in order to ensure that when the next sentence end character is detected and the cached characters before the next sentence end character are segmented, the next information to be sent can be correctly segmented to avoid repeatedly including the previously sent message to be sent, this can be specifically implemented by deleting the cache area or setting a cache start flag.

[0100] That is, after the cached characters before the sentence end character are segmented and determined as information to be sent, the cached characters before the sentence end character can be deleted from the sequentially cached buffer area to release buffer space; or, a pointer or a start mark can be maintained in the buffer area to indicate the starting position of the current data to be sent, and the pointer or mark will move as the data is processed. When the sentence end character is detected in the buffer area, the most recent cache start mark before the sentence end character (or the preset default cache start position during the first detection) is searched, and the cached characters before the sentence end character (including the sentence end character) and after the cache start mark are segmented and determined as information to be sent, and the cache pointer or start mark is moved to the position of the sentence end character to prepare for the detection and processing of the next sentence.

[0101] S204, forwarding the information to be sent to the client through the original server, and when there are other characters after the sentence end character, calling the status input interface preset in the dialogue system to send the first control information to the client; the first control information is used to instruct the client to update the dialogue interface to display a first status prompt that there is a response dialogue to be returned.

[0102] The state input interface is a preset interface in the dialogue system, which is used to send control information to the client under specific conditions to change the display state of the client or prompt the user. In this embodiment, when the state input interface is called by the custom server, it sends the first control information to the client. The first control information is a signal or message sent by the dialogue system to the client, which is used to instruct the client to perform a specific interface update operation. The first state prompt is a visual or text prompt on the dialogue interface, which is used to remind the user that there is a new response dialogue to be sent to the dialogue interface for display. For example, the first state prompt can be a text prompt such as "the other party is typing", "please wait, a new response is being generated", etc.

[0103] For each message to be sent determined by the sentence ending character segmentation in step S203, this step is used to send the message to be sent to the original server, which forwards it to the client. After receiving the message to be sent, the client updates and displays it on the dialogue interface, such as displaying the text content of the message to be sent in the form of a message bubble, so that the user can see the response of the dialogue system in time.

[0104] At the same time, in order to determine whether there is a new response that needs to be returned to the user, after the current message to be sent is forwarded to the client through the original server, check whether there is a character after the sentence end character of the message to be sent in the cache area: if there is a character, it indicates that there is a new response dialogue to be returned, and the custom server can send a first control message to the client through the above-mentioned status input interface; after receiving the first control message, the client will update its interface according to the instructions of the information and display the corresponding first status prompt. The first status prompt is a visual change, such as displaying a loading animation or a text prompt to prompt the user "More content is loading" or "Please wait" and other information.

[0105] Based on the response dialogue segments returned by the streaming interface in real time received by the custom server in step S202, step S203 caches the response dialogue segments in sequence according to the order of reception. Every time a sentence ending character is detected, all characters before the sentence ending character in the cache area and the sentence ending character are separated, and combined into a string as a message to be sent according to the cache order, and the message to be sent is forwarded to the client through the original server, and it is detected whether there are other characters after the sentence ending character to determine whether to control the display of the first status prompt on the client interface. That is, step S204 can be triggered by determining the message to be sent. In the process of sequentially caching the response dialogue segments, each time a message to be sent is determined, step S204 is executed accordingly.

[0106] by Figure 2CTaking the example of "Tomorrow's weather is cloudy with light rain, and the temperature is 15℃-20℃. Northwest wind is level 4. It is recommended to wear a coat to keep warm when traveling. Don't forget to bring an umbrella! Is there anything else I can help you with?", the custom server receives [tomorrow's] [weather] [is cloudy with light rain,] [temperature is] [15℃-20℃.] [travel] [recommendation] [wear a coat to keep warm.] [don't forget] [bring an umbrella! Is there anything else I can help you with?] in sequence through the streaming interface.

[0107] In the sequential caching process, if the method of sequentially detecting whether each received response dialogue segment contains a sentence ending character is adopted, such as Figure 2D As shown, when the fifth dialogue segment [15℃-20℃. ] is detected, a period is detected, and [tomorrow's weather is cloudy with light rain, and the temperature is 15℃-20℃. ] is stored in the cache area, and the message M1 to be sent is determined: "tomorrow's weather is cloudy with light rain, and the temperature is 15℃-20℃.", then M1 is sent to the client through the original server, and the content of M1 is deleted from the cache area. The operation of receiving the response dialogue segment and sequentially caching based on the custom server is synchronized with the operation of determining and sending M1. For example, in the process of sending M1, the dialogue segment [travel] [suggestion] is received and sequentially cached in the cache position after the fifth response dialogue segment. After sending M1, based on the character "travel suggestion" after the period of M1, the custom server calls the status input interface to send the first control information.

[0108] Similarly, when the eighth dialogue segment [Wear a coat to keep warm.] is detected, a period is detected, and the message to be sent M2: "It is recommended to wear a coat to keep warm when traveling." is determined to be sent to the client, and the state input interface is called to send the first control information; when the tenth dialogue segment [Take an umbrella! Anything else] is detected, an exclamation mark is detected, and the message to be sent M3: "Don't forget to bring an umbrella!" is determined to be sent to the client, and the state input interface is called to send the first control information; when the eleventh dialogue segment [Can I help you?] is detected, a question mark is detected, and the message to be sent M4: "Is there anything else I can help you with?" is determined to be sent to the client. Based on the stop return of the streaming interface and the absence of other characters after the question mark, there is no need to call the first state interface.

[0109] In the disclosed embodiment, the custom server uses a streaming interface to interact with the large model in real time, and uses sentence end character detection to automatically splice and segment the response dialogue fragments returned by the large model in real time, and immediately sends the complete dialogue sentence to the client after forming it, ensuring a quick response to the dialogue, increasing the immediacy of interaction, and enabling users to obtain and understand information more quickly, reducing the interference of fragmented information, and improving the coherence and comprehension of the dialogue. At the same time, in the case where there is new dialogue content to be sent, a status prompt mechanism is provided in conjunction with the sentence end character detection method, which immediately informs the user of the dialogue progress through the status prompt, enhances the user's perception of the dialogue process, and improves the friendliness and interactivity of the system, thereby achieving the goal of reducing the user's uncertainty and anxiety while ensuring the immediacy of the dialogue.

[0110] In addition, this application detects and processes the sentence-ending characters to form a complete conversation sentence before sending it. Compared with directly sending streaming fragments to the client, this effectively avoids the fragmentation of the conversation content, reduces the forwarding and processing burden of the original server and client, reduces redundancy and errors in data transmission and processing, improves processing efficiency, and thus improves the overall performance and stability of the system.

[0111] In the aforementioned embodiment, the response dialogue fragment returned from the large model is effectively processed, and a status prompt is provided after the sentence end character is detected to enhance the user experience. The first status prompt first appears when the custom server first determines the message to be sent from the response dialogue fragment returned by the large model for the input dialogue, and there are other characters besides the message to be sent in the buffer area. During the buffer time range between the user sending the input dialogue through the client and the first receipt of the first response dialogue returned by the custom server, the user may feel anxious about waiting.

[0112] Therefore, in order to further improve the user experience, this embodiment proposes an optimization solution, which provides a clear dialogue processing progress prompt method specifically for the buffer time range, and may include the following steps: in the process of sending the input dialogue to the preset large model through the streaming interface, calling the status input interface to send a second control information to the client; the second control information is used to instruct the client to update the dialogue interface to display a second status prompt that the input dialogue is being processed.

[0113] That is, after the client sends an input dialogue to the custom server, the custom server can immediately trigger the progress prompt mechanism when forwarding the input dialogue to the large model, and send the second control information to the client by calling the preset status input interface, triggering the client's dialogue interface to update and display the second status prompt to inform the user that the dialogue system has received the input dialogue and is processing it, thereby reducing the user's waiting anxiety and improving the interactive friendliness and user satisfaction of the dialogue system.

[0114] For example, after the user inputs a conversation on the client's conversation interface and clicks send, the display text on the client's conversation interface used to display the name of the conversation object can be replaced with a text prompt such as "Processing, please wait", "Processing...", etc.

[0115] In the embodiment of the present disclosure, by adding a dialogue processing progress feedback method for the time period between the user sending an input dialogue and the first receipt of a response dialogue, the feedback mechanism of the dialogue system is improved, ensuring that the user can obtain timely and clear progress feedback during the entire dialogue process, thereby enhancing the overall performance of the dialogue system and user experience.

[0116] In some embodiments, regarding the detection of sentence-ending characters in the sequential caching process, in addition to the method of sequentially detecting whether each received response dialogue segment contains a sentence-ending character, in order to balance the timeliness of detecting the sentence-ending character and avoiding the processing burden caused by frequent detection, this embodiment proposes another detection method of triggering detection when the character length of the buffer area reaches a certain threshold, that is, when the total character length of the response dialogue segments stored in the buffer area is greater than or equal to the set character length, the detection of the sentence-ending character can be triggered. This detection method can be implemented by the following steps a1-a3:

[0117] a1, in the sequential caching process, if the total length of characters included in the cached response dialogue segment reaches the set character length, then according to the cache reverse order of the cached response dialogue segment, detect whether there is a sentence end character in the cached response dialogue segment;

[0118] Character length can be used to indicate the number of characters. The setting of the character length can be adjusted according to the actual application scenario and requirements. A too low threshold will lead to frequent detection and increase the system burden; while a too high threshold may delay the detection of the end of the sentence, affecting the timeliness of the dialogue interaction and the user experience. Therefore, in actual applications, the most appropriate threshold can be found through testing and adjustment. In addition, other factors can be considered to optimize the detection strategy, such as dynamically adjusting the threshold according to the context of the dialogue, the user's interaction habits, etc., to further improve the intelligence and adaptability of the system.

[0119] During the sequential caching process, the custom server can maintain a counter to track the total length of characters in the cached response dialogue segments. When a new response dialogue segment is received for caching, the character length of the segment can be added to the counter. When the value of the counter reaches or exceeds the preset character length, the sentence end character detection is triggered. The response dialogue segment can be used as a unit to check each response dialogue segment in the reverse order of the cache of the response dialogue segment to see if there is a sentence end character. Alternatively, the check can be performed character by character in reverse order by traversing the cached characters until the first sentence end character is found or all cached characters are traversed.

[0120] The custom server will sequentially cache the response dialogue segments received in sequence into the cache area, see Figure 3A In the schematic diagram shown as an example, it is assumed that the cache area has stored M response dialogue segments (P1-Pm in the figure), and the corresponding total character length is S1 which is less than the set character length S. After the (M+1)th response dialogue segment P(m+1) is cached, the corresponding total character length is S2 which is greater than S. Then, the sentence ending character detection of the M+1 response dialogue segments that have been stored can be triggered, and the detection is carried out in order from the M+1th to the 1st.

[0121] a2, when the first sentence ending character is detected, stop detecting and segment all the buffered characters before the first sentence ending character to be determined as information to be sent.

[0122] In the process of detecting in reverse order from the M+1th response dialogue segment to the 1st response dialogue segment, if a sentence-ending character is detected for the first time, such as a sentence-ending character is detected in the M+1th response dialogue segment, then all cached characters before the first sentence-ending character, that is, all characters of length S1 corresponding to the first M response dialogue segments, and the sentence-ending character itself and the characters before it in the M+1th response dialogue segment, are separated from the cache area and combined into a message to be sent in the cache order of the characters.

[0123] a3, when no sentence ending character is detected, the response dialogue segments received after the buffered response dialogue segment are detected in sequence until the sentence ending character is detected.

[0124] That is, if the sentence ending character is still not found after all cached response dialogue segments are checked in reverse order, the received new response dialogue segment is checked to see if it contains the sentence ending character until the sentence ending character is detected. When the sentence ending character is detected, the sentence ending character itself and the characters cached before it are used as the information to be sent, and the length of the characters cached in the buffer area is re-counted and the counter is updated to prepare for the next round of detection.

[0125] For example, in the process of detecting from the M+1th response dialogue segment in reverse order to the 1st response dialogue segment, if the 1st response dialogue segment is detected and no sentence-ending character is detected in the response dialogue segment, it means that the cached M+1 response dialogue segments do not include sentence-ending characters. Then, sentence-ending character detection can be performed on the M+2th, M+3th, etc. response dialogue segments in turn until a sentence-ending character is detected, the message to be sent is determined, and the above a1-a3 is repeated until the large model completes processing of all response dialogue segments for the input dialogue.

[0126] In the disclosed embodiment, a reasonable character length threshold is set to timely evaluate the contents of the buffer area. When the total character length of the response dialogue segments accumulated in the buffer area reaches or exceeds this threshold, a sentence end character detection is performed, thereby ensuring that important information is not missed while reducing the number of unnecessary detections and optimizing system performance.

[0127] In some embodiments, for the aforementioned step a1 of detecting whether there is a sentence-ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment, this embodiment provides a character-by-character reverse order checking method, which traverses the cached characters until the first sentence-ending character is found or all cached characters are traversed.

[0128] That is, according to the cache reverse order, detect whether the last character in the cached response dialogue segment is a sentence-ending character; if not, start detecting character by character in reverse order from the last character until the sentence-ending character is detected for the first time or all the cached response dialogue segments are detected.

[0129] like Figure 3B As shown in the detection method schematic diagram, it is assumed that the cache area has stored M response dialogue segments, and the corresponding total character length is S1 (such as S1 characters), which is less than the set character length S (such as S characters). After the (M+1)th response dialogue segment is cached, the corresponding total character length is S2 (such as S2 characters), which is greater than S. Then, the sentence-ending character detection of the M+1 response dialogue segments that have been stored can be triggered. Starting from the last character in the M+1th response dialogue segment, the detection is started in the reverse order of the character cache, that is, starting from the S2th character, traversing one character at a time in reverse order to the 1st character, to identify whether the character is a sentence-ending character.

[0130] During the reverse traversal of characters, it is possible to first detect whether the S2th character is a sentence ending character: if so, stop detecting and segment the 1st to S2th characters to determine the message to be sent; if not, perform the reverse traversal detection.

[0131] In the disclosed embodiment, the sentence-ending character in the response dialogue segment returned based on the streaming interface is usually present at the end of the segment. This embodiment detects whether the sentence-ending character exists in the cached response dialogue segment by checking in reverse order character by character, thereby maintaining a high retrieval efficiency. The implementation of the reverse order check character by character is simple and intuitive, avoiding complex logic or additional data structure support, and reducing the risk of errors.

[0132] In some embodiments, based on the input dialogue for the user in some dialogue systems, the original server sends a response dialogue for the input dialogue with a message limit. For example, the server can only return a maximum of 5 response messages to the user's input dialogue, and the 6th response message cannot be sent. Under such dialogue requirements, in order to return the response dialogue generated by the large model for the input dialogue to the client in its entirety, this embodiment provides a processing method for the number of response messages that is limited, which is implemented based on the value of the response dialogue number limit.

[0133] That is, for the operation of detecting the sentence end character during the sequential caching process, when the number of times the sentence end character is detected reaches the set number, if the streaming interface continues to return the response dialogue segment, then stop detecting the sentence end character, and keep receiving the response dialogue segment returned by the streaming interface and the sequential caching operation, and when the large model stops returning the response dialogue segment, all cached characters after the sentence end character detected when the set number of times (i.e., the last detected) is segmented and determined as the information to be sent. The set number of times is the limit value of the number of response dialogues for the input dialogue in the dialogue system minus one.

[0134] For example, the server can only return a maximum of 5 response messages to the user's input dialogue, and the number of times is set to 4. When the sentence end character is detected four times, the detection of the sentence end character is stopped, and the fourth message to be sent is sent to the client. When the streaming interface stops returning the response dialogue fragment, all the cached characters after the fourth detected sentence end character are determined as the fifth message to be sent and sent to the client.

[0135] Whether the large model stops returning the response dialogue fragment can be determined by timeout determination, status mark detection, interface disconnection notification, etc. Regarding timeout determination, it can include that the response dialogue fragment returned by the large model has not been received after the first set time, that is, if the response dialogue fragment returned by the large model through the streaming interface is still not received after the preset first time threshold, it can be determined that the large model has stopped returning data to handle the waiting situation caused by uncertain factors such as network delay and large model processing time. Regarding status mark detection, it can include detecting that the status mark of the streaming interface indicates that the interface has been disconnected. The custom server can continuously monitor the status mark of the streaming interface. When it is detected that the status mark indicates that the interface has been disconnected or has entered an inactive state, it can be confirmed that the large model has stopped returning the response dialogue fragment through the interface, which relies on the state feedback at the interface level and has high accuracy and real-time performance. Regarding interface disconnection notification, it can include receiving an interface disconnection notification message from the large model, that is, relying on the clear communication protocol between the large model and the custom server. When such a notification is received, it is directly confirmed that the large model has actively or passively stopped returning the response dialogue fragment, ensuring the accuracy and reliability of information transmission.

[0136] In actual applications, the above judgment conditions can be dynamically adjusted and optimized according to the specific settings of the streaming interface, the performance characteristics of the large model, and the actual needs of the system. For example, the timeout threshold can be adjusted according to the stability of the network environment, or the sensitivity to the interface disconnection notification can be adjusted according to the load of the large model, so as to better adapt to different operating environments and scenario requirements and improve overall stability and response speed.

[0137] In the disclosed embodiment, by intelligently detecting the number of sentence-ending characters and adjusting the processing logic accordingly, it is ensured that even when the number of response messages is limited, the complete response content generated by the large model for the user input dialogue can be returned to the client, effectively avoiding the truncation of the response content due to the number limit and ensuring the integrity of the information received by the user.

[0138] In some embodiments, the first status prompt has a time limit for displaying in the dialogue interface, such as a display time limit of a second set duration. In order to ensure the accuracy and effectiveness of the status prompt in this display scenario and improve the interaction efficiency and user experience of the dialogue system, this embodiment provides a display and retransmission mechanism for the status prompt, which starts timing based on the response message received from the client after calling the preset status interface to send the first control information to the client, and decides whether to retransmit the first control information based on the relationship between the timing duration and the second set duration. The response information is used to confirm that the first control information has been successfully received and processed. Based on this, the method can further include the following steps b1-b2:

[0139] b1, receiving response information to the first control information returned by the client through the preset status interface, and starting timing;

[0140] Response information returned by the client to the first control information is received through the preset status interface. In response to receiving the response information, a timing operation is triggered to monitor the display time of the first status prompt.

[0141] b2, when the timing duration reaches the second set duration, if the information to be sent is not sent to the original server within the timing period, the status input interface is re-called to send the first control information.

[0142] When the timing reaches the first set time, the first status display on the dialogue interface of the client is about to stop displaying, and a check is made to see whether the information to be sent has been sent to the original server within this timing cycle. If not, it indicates that the message sending is delayed or blocked. In order to give the user clear feedback, the custom server re-calls the status input interface to send the first control information to update the prompt status of the dialogue processing progress.

[0143] In the disclosed embodiment, the timing duration judgment and resending mechanism are used to ensure that users receive timely feedback, thereby improving the stability and reliability of the dialogue system.

[0144] Corresponding to the embodiment of the above-mentioned method for displaying the dialog status, see Figure 4 As shown, the present application also provides an embodiment of a dialog status display device, which is applied to a custom server of a dialog system, wherein the dialog system also includes a client and an original server preset by the system; the device includes:

[0145] An input dialogue receiving and sending module 401 is used to receive the client input dialogue forwarded by the original server, and send the input dialogue to the preset large model through a streaming interface;

[0146] A response dialogue segment receiving module 402 is used to receive the response dialogue segments sequentially returned by the large model in response to the input dialogue;

[0147] The detection and information to be sent determination module 403 is used for, in the process of sequentially caching the response dialogue segments, if a sentence ending character is detected in the cached response dialogue segments, segmenting the cached characters before the sentence ending character and determining them as information to be sent;

[0148] The response sending and status prompt module 404 is used to forward the information to be sent to the client through the original server, and when there are other characters after the sentence end character, call the status input interface preset in the dialogue system to send the first control information to the client; the first control information is used to instruct the client to update the dialogue interface to display the first status prompt that there is a response dialogue to be returned.

[0149] Optionally, the device further comprises:

[0150] In the process of sending the input dialogue to the preset large model through the streaming interface, the status input interface is called to send second control information to the client; the second control information is used to instruct the client to update the dialogue interface to display a second status prompt that the input dialogue is being processed.

[0151] Optionally, the device further comprises:

[0152] A detection module, configured to detect whether there is a sentence ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment if the total length of characters included in the cached response dialogue segment reaches a set character length during the sequential caching process;

[0153] The segmentation module is used to stop detection and segment all cached characters before the first sentence-ending character as information to be sent when the first sentence-ending character is detected.

[0154] Optionally, the detection module is specifically used to:

[0155] According to the cache reverse order, check whether the last character is a sentence end character;

[0156] If not, then detection is performed character by character in reverse order starting from the last character until the sentence ending character is detected for the first time or all the cached response dialogue segments are detected.

[0157] Optionally, in the case of detecting whether there is a sentence ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment, the device further comprises:

[0158] In the case where the sentence-ending character is not detected, the response dialogue segments received after the buffered response dialogue segment are detected in sequence until the sentence-ending character is detected.

[0159] Optionally, the device further comprises:

[0160] In the sequential caching process, detecting whether there is a sentence ending character in the latest cached response dialogue segment;

[0161] When a sentence ending character is detected, the buffered characters before the sentence ending character are segmented and determined as information to be sent.

[0162] Optionally, the device further comprises:

[0163] When the number of times the sentence end character is detected reaches a set number, stop detecting the sentence end character, and when the large model stops returning the answering dialogue segment, segment all the buffered characters after the last detected sentence end character and determine them as information to be sent;

[0164] The set number of times is the limit on the number of response dialogues for input dialogues in the dialogue system minus one.

[0165] Optionally, the determination condition for the large model to stop returning the response dialogue segment includes at least one of the following:

[0166] After a first set period of time, no response dialogue segment returned by the large model is received;

[0167] or, detecting that the status indicator of the streaming interface indicates that the interface is disconnected;

[0168] Or, an interface disconnection notification message is received from the large model.

[0169] Optionally, the display time of the first status prompt on the dialogue interface is limited to a second set time length; the device further includes:

[0170] receiving response information to the first control information returned by the client through the preset status interface, and starting timing;

[0171] When the timing duration reaches the second set duration, if the information to be sent is not sent to the original server within the timing period, the status input interface is re-called to send the first control information.

[0172] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0173] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application. Ordinary technicians in this field can understand and implement it without creative work.

[0174] The present application also provides an electronic device. The structural diagram of the electronic device is as follows: Figure 5 As shown, the electronic device 500 includes at least one processor 501, a memory 502 and a bus 503, and the at least one processor 501 is electrically connected to the memory 502; the memory 502 is configured to store at least one computer-executable instruction, and the processor 501 is configured to execute the at least one computer-executable instruction, thereby performing the steps of any one of the conversation status display methods provided in any one of the embodiments or any one of the optional implementation modes in the present application.

[0175] Furthermore, the processor 501 may be a Field-Programmable Gate Array (FPGA) or other devices with logic processing capabilities, such as a Microcontroller Unit (MCU) or a Central Process Unit (CPU).

[0176] The embodiment of the present application also provides another readable storage medium storing a computer program, which is used to implement the steps of any dialogue status display method provided in any embodiment or any optional implementation manner of the present application when executed by a processor.

[0177] The readable storage medium provided in the embodiments of the present application includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable storage medium includes any medium that can store or transmit information in a readable form by a device (e.g., a computer).

[0178] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for displaying a dialog status, characterized in that: A custom server applied to a dialogue system, wherein the dialogue system also includes a client and an original server preset by the system; the method includes: Receiving the client input dialogue forwarded by the original server, and sending the input dialogue to the preset large model through a streaming interface; receiving response dialogue segments sequentially returned by the large model in response to the input dialogue; In the process of sequentially caching the response dialogue segments, if a sentence ending character is detected in the cached response dialogue segments, the cached characters before the sentence ending character are segmented and determined as information to be sent; The information to be sent is forwarded to the client through the original server, and when there are other characters after the sentence end character, the status input interface preset in the dialogue system is called to send the first control information to the client; the first control information is used to instruct the client to update the dialogue interface to display a first status prompt that there is a response dialogue to be returned.

2. The method according to claim 1, characterized in that The method further comprises: In the process of sending the input dialogue to the preset large model through the streaming interface, the status input interface is called to send second control information to the client; the second control information is used to instruct the client to update the dialogue interface to display a second status prompt that the input dialogue is being processed.

3. The method according to claim 1, characterized in that The method further comprises: In the sequential caching process, if the total length of characters included in the cached response dialogue segment reaches the set character length, then according to the cache reverse order of the cached response dialogue segment, detect whether there is a sentence end character in the cached response dialogue segment; When the first sentence ending character is detected, the detection is stopped and all the buffered characters before the first sentence ending character are segmented and determined as information to be sent.

4. The method according to claim 3, characterized in that The step of detecting whether there is a sentence ending character in the cached response dialogue segment according to the cache reverse order of the cached response dialogue segment comprises: According to the cache reverse order, check whether the last character is a sentence end character; If not, then detection is performed character by character in reverse order starting from the last character until the sentence ending character is detected for the first time or all the cached response dialogue segments are detected.

5. The method according to claim 3, characterized in that: The method further comprises: In the case where the sentence-ending character is not detected, the response dialogue segments received after the buffered response dialogue segment are detected in sequence until the sentence-ending character is detected.

6. The method according to claim 1, characterized in that The method further comprises: In the sequential caching process, detecting whether there is a sentence ending character in the latest cached response dialogue segment; When a sentence ending character is detected, the buffered characters before the sentence ending character are segmented and determined as information to be sent.

7. The method according to claim 1, characterized in that The method further comprises: When the number of times the sentence end character is detected reaches a set number, stop detecting the sentence end character, and when the large model stops returning the answering dialogue segment, segment all the buffered characters after the last detected sentence end character and determine them as information to be sent; The set number of times is the limit on the number of response dialogues for input dialogues in the dialogue system minus one.

8. The method according to claim 7, characterized in that The determination condition for the large model to stop returning the response dialogue segment includes at least one of the following: After a first set period of time, no response dialogue segment returned by the large model is received; or, detecting that the status indicator of the streaming interface indicates that the interface is disconnected; Or, an interface disconnection notification message is received from the large model.

9. The method according to claim 1, characterized in that: The display time of the first status prompt on the dialogue interface is limited to a second set time length; the method further includes: receiving response information to the first control information returned by the client through the preset status interface, and starting timing; When the timing duration reaches the second set duration, if the information to be sent is not sent to the original server within the timing period, the status input interface is re-called to send the first control information.

10. A dialogue status display device, characterized in that: A custom server for a dialogue system, wherein the dialogue system also includes a client and an original server preset by the system; the device includes: An input dialogue receiving and sending module, used for receiving the client input dialogue forwarded by the original server, and sending the input dialogue to the preset large model through a streaming interface; A response dialogue segment receiving module, used for receiving the response dialogue segments sequentially returned by the large model for the input dialogue; A detection and information to be sent determination module, used for, in the process of sequentially caching the response dialogue segments, if a sentence ending character is detected in the cached response dialogue segments, segmenting the cached characters before the sentence ending character and determining them as information to be sent; The answer sending and status prompt module is used to forward the information to be sent to the client through the original server, and when there are other characters after the sentence end character, call the status input interface preset in the dialogue system to send the first control information to the client; the first control information is used to instruct the client to update the dialogue interface to display the first status prompt that there is a response dialogue to be returned.

11. An electronic device, characterized in that: include: Memory, processor; The memory is used to store computer programs; The processor is used to call the computer program to implement the method according to any one of claims 1-9.

12. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Generating method and device, training method and device, computer readable medium and electronic equipment

    CN108920560A

  • Information collection method and device and storage medium

    CN112214506A

  • Multi-round dialogue generation method, terminal and computer readable storage medium

    CN113962213A

  • Interaction method and device integrating generative artificial intelligence and instant messaging

    CN118488029A

  • Answering of consecutive questions

    US20180129734A1

Cited By

  • Comment content generation method and device and electronic equipment

    CN121255319A