Conversation interface data display method and system, terminal and medium

By building StreamGpt class and Typewriter class modules in streaming data transmission, and using character queues and dynamic speed adjustment strategies, the delay and lag problems of traditional typewriter effects in streaming data transmission are solved, achieving a more natural and smooth data display.

CN119829754APending Publication Date: 2025-04-15INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411941368.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When the prior art applies traditional typewriter effects to streaming data transmission, the verbatim speed of data display cannot match the real-time nature of data transmission, resulting in the problem of display delay and lag.

Method used

By building a streaming data request module in the form of StreamGpt and a data display module in the form of Typewriter, and using character queue management and dynamic speed adjustment strategies, the verbatim display of streaming data is achieved.

Benefits of technology

It improves the naturalness of data display, avoids the problems of lag, delay and incoherence of display, and significantly improves the user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829754A_ABST
    Figure CN119829754A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of front-end data display, and particularly relates to a dialogue interface data display method and system, a terminal and a medium, and the method comprises the steps: constructing a streaming data request module in a StreamGpt class form and a data display module in a Typewriter class form; deploying the streaming data request module and the data display module into a front-end framework; the streaming data request module responds to user input, requests streaming data from a server, decodes the streaming data and transmits the streaming data to the data display module; and the data display module adds the decoded data to a character queue according to a character queue mechanism, and extracts characters from the character queue at a set speed according to a dynamic speed control mechanism for word-by-word display. According to the method, the instance class based on TypeScript is introduced, and character queue management and a dynamic speed adjustment strategy are utilized to realize word-by-word display of the streaming data, so that the naturalness of data display is improved, and the problems of jamming, delay and display incoherence are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of front-end data display, and in particular relates to a dialogue interface data display method, system, terminal and medium. Background Art

[0002] In front-end applications, the dynamic display of real-time data is an important part of improving user experience, especially in scenarios with extremely high requirements for immediacy, such as chat systems and AI conversation assistants. These applications need to be able to quickly and smoothly reflect the latest information changes to ensure that users can seamlessly participate in the communication process.

[0003] Existing typewriter effects are usually used to display data word by word, but in actual applications, traditional typewriter effects often face the problem of not being closely integrated with streaming data transmission. Streaming data transmission refers to the process of transmitting data from the server to the client in a continuous and real-time manner, which ensures that users can receive the latest messages and replies in real time. However, when traditional typewriter effects are applied to streaming data transmission, they often cause display delays and freezes because the speed of data display word by word cannot match the real-time nature of data transmission. Specifically, if the data display speed of the typewriter effect is too slow, users may feel a noticeable delay. If the data display speed is too fast, it will also cause visual discomfort. Summary of the invention

[0004] To solve the above problems, the present invention provides a method, system, terminal and medium for displaying data in a dialogue interface. By introducing an instance class based on TypeScript and utilizing character queue management and dynamic speed adjustment strategies, word-by-word display of streaming data is achieved, thereby improving the naturalness of data display and avoiding freezes, delays and display incoherence problems.

[0005] In a first aspect, the technical solution of the present invention provides a method for displaying data in a dialogue interface, comprising the following steps: Construct a streaming data request module in the form of StreamGpt class and a data display module in the form of Typewriter class; Deploy the streaming data request module and data display module to the front-end framework; The streaming data request module responds to user input, requests streaming data from the server, decodes it, and passes it to the data display module; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

[0006] In an optional implementation, the streaming data request module responds to user input, requests streaming data from the server and passes it to the data display module after decoding, specifically including: In response to the message entered by the user in the front-end application, the stream() method is triggered to send a streaming data acquisition request to the server; Read the streaming data fed back by the server in response to the streaming data acquisition request; Decode the streaming data and pass the decoded data to the data presentation module.

[0007] In an optional implementation, decoding the streaming data and passing the decoded data to the data display module specifically includes: Use the TextDecoder tool to decode streaming data; Pass the decoded data to the data display module through the onPatch() callback function.

[0008] In an optional implementation, the data display module adds the decoded data to the character queue according to the character queue mechanism, specifically comprising the following steps: Build character queue; Use the add() method to split the string of decoded data and add the split characters to the character queue one by one.

[0009] In an optional implementation, extracting characters from a character queue at a set speed for character-by-character display according to a dynamic speed control mechanism specifically includes: Pre-configure the mapping relationship between the number of remaining characters and the output speed. The more characters remaining, the faster the output speed. Check the number of characters currently remaining in the character queue; Based on the pre-configured mapping relationship, the character output speed is adjusted according to the current number of remaining characters; Characters are extracted from the character queue according to the adjusted character output speed and displayed word by word.

[0010] In an optional implementation, extracting characters from the character queue for character-by-character display specifically includes: The consume() method consumes the characters in the character queue word by word to display them word by word.

[0011] In a second aspect, the technical solution of the present invention provides a conversational interface data display system, including a streaming data request module in the form of a StreamGpt class and a data display module in the form of a Typewriter class; The streaming data request module is used to respond to user input, request streaming data from the server and pass it to the data display module after decoding; The data display module is used to add the decoded data to the character queue according to the character queue mechanism, and extract characters from the character queue at a set speed according to the dynamic speed control mechanism for word-by-word display.

[0012] In an optional implementation, the stream data request module and the data display module are separately encapsulated.

[0013] In a third aspect, the technical solution of the present invention provides a terminal, including: A memory, used for storing a dialog interface data display program; The processor is used to implement the following steps when executing the dialogue interface data display program: The streaming data request module responds to user input, requests streaming data from the server and passes it to the data display module after decoding; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

[0014] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, wherein a dialog interface data display program is stored on the computer-readable storage medium, and when the dialog interface data display program is executed by a processor, the following steps are implemented: The streaming data request module responds to user input, requests streaming data from the server and passes it to the data display module after decoding; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

[0015] A method, system, terminal and medium for displaying data in a dialogue interface provided by the present invention have the following beneficial effects compared with the prior art: first, a streaming data request module in the form of a StreamGpt class and a data display module in the form of a Typewriter class are constructed and deployed to the front end. When there is user input in the front end, the two modules are triggered to execute, wherein the streaming data request module obtains streaming data from the server, and the data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for word-by-word display. The present invention combines the StreamGpt class with the Typewriter class, introduces an instance class based on TypeScript, and utilizes character queue management and dynamic speed adjustment strategies to realize word-by-word display of streaming data, thereby improving the naturalness of data display and avoiding problems such as freeze, delay and incoherent display. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flow chart of a method for displaying data in a dialogue interface provided by an embodiment of the present invention.

[0018] Figure 2 The present invention provides a dialog interface data display system structure schematic diagram.

[0019] Figure 3 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0022] The key terms appearing in the present invention are explained below.

[0023] StreamGpt class: Application or implementation of GPT (such as GPT-4 Turbo) related to Stream mode. Stream mode is an interface calling method based on streaming transmission, which is suitable for processing large and continuous data streams. In Stream mode, a continuous connection is established between the client and the server. The client can send data to the server in real time and receive the server's response.

[0024] Typewriter class: used to simulate the effect of a typewriter. It manages the string queue, dynamically adjusts the output speed, and triggers the callback function character by character to achieve the function of dynamically and gradually displaying text.

[0025] stream() method: It is a powerful feature introduced in Java8, which belongs to the StreamAPI in Java8. StreamAPI allows data collections (such as lists, sets, etc.) to be processed in a declarative way, and can support sequential and parallel data processing. By using the stream() method, a collection can be converted into a stream, and then various stream operations (such as filtering, mapping, sorting, and reduction) can be applied to generate results.

[0026] Fetch API: is a modern JavaScript API for making network requests and processing response data. It provides a simpler and more flexible way to perform network requests, which has significant advantages over traditional XMLHttpRequest (XHR). Fetch API is based on Promise design and allows asynchronous requests to be processed using chained calls. It supports multiple HTTP request methods (such as GET, POST, PUT, DELETE, etc.) and can handle various types of response data (such as JSON, text, binary data, etc.).

[0027] When the current traditional typewriter effect is applied to streaming data transmission, the speed of data word-by-word display cannot match the real-time nature of data transmission, which often leads to display delay and jamming. This embodiment provides a method for displaying data in a dialogue interface. First, a streaming data request module in the form of a StreamGpt class and a data display module in the form of a Typewriter class are constructed and deployed to the front end. When there is user input in the front end, the two modules will be triggered to execute, wherein the streaming data request module obtains streaming data from the server, and the data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at the set speed according to the dynamic speed control mechanism for word-by-word display. By introducing an instance class based on TypeScript, using character queue management and dynamic speed adjustment strategies, word-by-word display of streaming data is achieved, thereby improving the naturalness of data display and the user interaction experience. The present invention can significantly reduce the jamming phenomenon in the prior art, make the real-time data display more fluent, solve the problems of unnatural and incoherent display in the prior art, and is particularly suitable for scenes requiring high interactivity and high real-time performance.

[0028] Figure 1 This is a flow chart of a method for displaying data in a dialog interface provided by an embodiment of the present invention. Figure 1The execution subject may be a dialog interface data display system. The dialog interface data display method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the dialog interface data display system runs in the computer device. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0029] like Figure 1 As shown, the method includes the following steps.

[0030] S1, build a streaming data request module in the form of StreamGpt class and a data display module in the form of Typewriter class.

[0031] This embodiment first defines a Typewriter class and a StreamGpt class. The Typewriter class is used to display text data word by word, including a character queue, a dynamic speed control mechanism, and a character step-by-step output mechanism. The StreamGpt class is responsible for data communication with the server, for processing the reception and decoding of streaming data, and passing the decoded data to the Typewriter class.

[0032] S2, deploy the streaming data request module and data display module to the front-end framework.

[0033] In this embodiment, a modular design is adopted so that the Typewriter and StreamGpt classes can be independently packaged, which is convenient for integration into different front-end frameworks, especially applications based on Vue.js.

[0034] S3, the streaming data request module responds to user input, requests streaming data from the server and decodes it before passing it to the data display module.

[0035] In this embodiment, the streaming data request module is used to process the reception and decoding of streaming data. The StreamGpt class is responsible for data communication with the server and uses the fetch API to request streaming data. After receiving the streaming data from the server, the data is decoded step by step using the TextDecoder, and the decoded text is passed to the Typewriter class through the onPatch() callback function for word-by-word display.

[0036] S3.1, in response to the message entered by the user in the front-end application, triggers the stream() method to send a streaming data acquisition request to the server.

[0037] After the user enters a message in the front-end application, the stream() method of the StreamGpt class is triggered, which sends a request to the server to obtain real-time streaming data.

[0038] In this embodiment, a fetch API is used to request streaming data when communicating data with the server.

[0039] S3.2, read the streaming data fed back by the server in response to the streaming data acquisition request.

[0040] After the server responds, the StreamGpt class reads the response data step by step and passes the decoded data to the Typewriter class for word-by-word display.

[0041] S3.3, decode the streaming data and pass the decoded data to the data display module.

[0042] In this embodiment, after receiving the streaming data from the server, the data is decoded step by step using TextDecoder, and the decoded text is passed to the Typewriter class through the onPatch() callback function for word-by-word display.

[0043] This embodiment can respond to the user's input in the front-end application in real time through the streaming data request module, and immediately send a request to the server to obtain the latest streaming data. The instant feedback mechanism can enhance the interactivity between the user and the system and improve the smoothness of interaction. At the same time, the StreamGpt class is used to communicate efficiently with the server, and the request for streaming data is implemented through the fetch API to ensure the stability and reliability of data transmission. In addition, TextDecoder is used to gradually decode the data to improve the decoding efficiency and ensure the accuracy and integrity of the data.

[0044] S4, the data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

[0045] S4.1, build character queue.

[0046] The character queue is used to store text data to be displayed.

[0047] S4.2, use the add() method to split the string of decoded data and add the split characters one by one to the character queue.

[0048] In this embodiment, by constructing a character queue and using the add() method to add decoded characters to the queue one by one, the system can manage the text data to be displayed in an orderly manner. Combined with the dynamic speed control mechanism, the system can dynamically adjust the output speed according to the remaining number of character queues to ensure the smoothness and coherence of data display.

[0049] S4.3, pre-configure the mapping relationship between the number of remaining characters and the output speed, the more the number of remaining characters, the faster the output speed.

[0050] The dynamicSpeed() method in the Typewriter class dynamically adjusts the character output speed according to the number of remaining characters in the character queue. When the number of characters is large, the output speed is faster to improve efficiency; when the number of characters is small, the output speed will be reduced to ensure user experience.

[0051] When there are a large number of characters in the character queue, the system speeds up the data display process by increasing the output speed, effectively improving the display efficiency. When the number of characters decreases, reducing the output speed helps ensure that users can clearly read and understand the displayed content and avoid reading difficulties caused by too fast speed. This dynamic adjustment strategy not only optimizes resource utilization, but also ensures the accuracy and readability of data display.

[0052] S4.4, detect the current number of remaining characters in the character queue.

[0053] S4.5, based on the pre-configured mapping relationship, adjusting the character output speed according to the current number of remaining characters.

[0054] The design of the character queue mechanism and dynamic speed control mechanism enables the system to cope with data display requirements of different scales and complexities. Users can adjust the mapping relationship and configuration parameters as needed to adapt to different application scenarios and user preferences.

[0055] S4.6, extracting characters from the character queue according to the adjusted character output speed and displaying them word by word.

[0056] The dynamic speed control mechanism adjusts the output speed according to the number of characters in the character queue to ensure the smoothness of data display, and consumes the characters in the character queue word by word through the consume() method to achieve word-by-word display.

[0057] This embodiment consumes the characters in the character queue word by word through the consume() method, and the system can accurately control the display timing and speed of each character, thereby achieving a precise effect of word-by-word display.

[0058] This embodiment introduces a character queue mechanism and a dynamic speed control mechanism to achieve stable performance and reliable data transmission when processing large amounts of data or complex display requirements. It can effectively avoid display interruptions or errors caused by data congestion or processing delays, and improve the overall stability and reliability of the system.

[0059] A specific embodiment is provided below, including the following steps.

[0060] Step 1: TypeScript instantiation, instantiate the Typewriter class to prepare for the task of handling streaming data display and verbatim output.

[0061] Step 2: StreamGpt is instantiated and initialized together with the Typewriter class to receive streaming data from the server.

[0062] Step 3: Accept user input. The front-end application receives the data entered by the user, such as a message entered in a dialog box.

[0063] Step 4: Call the stream method. By calling the stream() method of the StreamGpt class, the user input is sent to the server and the streaming data receiving process is started.

[0064] Step 5: Receive streaming data from the server. The StreamGpt class communicates with the server and receives streaming data for subsequent display.

[0065] Step 6: The decoded data is displayed word by word. The StreamGpt class uses TextDecoder to gradually decode the received data, passes the decoded characters to the Typewriter class, and displays them word by word on the front-end interface.

[0066] An embodiment of a method for displaying data in a dialog interface is described in detail above. Based on the method for displaying data in a dialog interface described in the above embodiment, an embodiment of the present invention further provides a dialog interface data display system corresponding to the method.

[0067] Figure 2 This is a schematic block diagram of the structure of a dialog interface data display system provided by an embodiment of the present invention. In this embodiment, the dialog interface data display system can be divided into multiple functional modules according to the functions it performs. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory.

[0068] The dialog interface data display system of this embodiment includes a stream data request module in the form of a StreamGpt class and a data display module in the form of a Typewriter class. The stream data request module and the data display module are independently packaged.

[0069] The streaming data request module is used to respond to user input, request streaming data from the server and pass it to the data display module after decoding; The data display module is used to add the decoded data to the character queue according to the character queue mechanism, and extract characters from the character queue at a set speed according to the dynamic speed control mechanism for word-by-word display.

[0070] The conversation interface data display system of this embodiment is used to implement the aforementioned conversation interface data display method. Therefore, the specific implementation method of the system can be seen in the embodiment part of the conversation interface data display method in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, and will not be introduced in detail here.

[0071] In addition, since the conversation interface data display system of this embodiment is used to implement the aforementioned conversation interface data display method, its function corresponds to that of the aforementioned method and will not be described in detail here.

[0072] Figure 3 A schematic diagram of the structure of a terminal 300 provided in an embodiment of the present invention includes: a processor 310, a memory 320 and a communication unit 330. The processor 310 is used to implement the following steps when implementing the dialogue interface data display program stored in the memory 320: The streaming data request module responds to user input, requests streaming data from the server, decodes it, and passes it to the data display module; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

[0073] The terminal 300 includes a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the server shown in the figure does not constitute a limitation of the present invention, and it can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0074] The memory 320 can be used to store the execution instructions of the processor 310, and the memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can perform some or all of the steps in the following method embodiments.

[0075] The processor 310 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 310 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0076] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0077] The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0078] The computer storage medium stores a dialog interface data display program, and when the dialog interface data display program is executed by a processor, the following steps are implemented: The streaming data request module responds to user input, requests streaming data from the server, decodes it, and passes it to the data display module; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

[0079] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.

[0080] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0081] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0082] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0083] The above disclosure is only a preferred embodiment of the present invention, but the present invention is not limited thereto. Any non-creative changes that can be thought of by a person skilled in the art, as well as several improvements and modifications made without departing from the principle of the present invention, should fall within the protection scope of the present invention.

Claims

1. A method for displaying data in a dialogue interface, characterized in that: The following steps are involved: Construct a streaming data request module in the form of StreamGpt class and a data display module in the form of Typewriter class; Deploy the streaming data request module and data display module to the front-end framework; The streaming data request module responds to user input, requests streaming data from the server, decodes it, and passes it to the data display module; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

2. The method for displaying data in a dialogue interface according to claim 1, characterized in that: The streaming data request module responds to user input, requests streaming data from the server, decodes it and passes it to the data display module, which includes: In response to the message entered by the user in the front-end application, the stream() method is triggered to send a streaming data acquisition request to the server; Read the streaming data fed back by the server in response to the streaming data acquisition request; Decode the streaming data and pass the decoded data to the data presentation module.

3. The method for displaying data in a dialogue interface according to claim 2, characterized in that: Decode the streaming data and pass the decoded data to the data display module, including: Use the TextDecoder tool to decode streaming data; Pass the decoded data to the data display module through the onPatch() callback function.

4. The method for displaying data in a dialogue interface according to any one of claims 1 to 3, characterized in that: The data display module adds the decoded data to the character queue according to the character queue mechanism, which specifically includes the following steps: Build character queue; Use the add() method to split the string of decoded data and add the split characters to the character queue one by one.

5. The method for displaying data in a dialog interface according to claim 4, characterized in that: According to the dynamic speed control mechanism, characters are extracted from the character queue at the set speed for character display, including: Pre-configure the mapping relationship between the number of remaining characters and the output speed. The more characters remaining, the faster the output speed. Check the number of characters currently remaining in the character queue; Based on the pre-configured mapping relationship, the character output speed is adjusted according to the current number of remaining characters; Characters are extracted from the character queue according to the adjusted character output speed and displayed word by word.

6. The method for displaying data in a dialogue interface according to claim 5, characterized in that: Extract characters from the character queue and display them word by word, including: The consume() method consumes the characters in the character queue word by word to display them word by word.

7. A dialogue interface data display system, characterized in that: It includes a streaming data request module in the form of StreamGpt class and a data display module in the form of Typewriter class; The streaming data request module is used to respond to user input, request streaming data from the server and pass it to the data display module after decoding; The data display module is used to add the decoded data to the character queue according to the character queue mechanism, and extract characters from the character queue at a set speed according to the dynamic speed control mechanism for word-by-word display.

8. The dialog interface data display system according to claim 7, characterized in that: The stream data request module and the data display module are encapsulated independently.

9. A terminal, characterized in that: include: A memory, used for storing a dialog interface data display program; The processor is used to implement the following steps when executing the dialogue interface data display program: The streaming data request module responds to user input, requests streaming data from the server and passes it to the data display module after decoding; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.

10. A computer-readable storage medium, characterized in that: The readable storage medium stores a dialog interface data display program, and when the dialog interface data display program is executed by the processor, the following steps are implemented: The streaming data request module responds to user input, requests streaming data from the server and passes it to the data display module after decoding; The data display module adds the decoded data to the character queue according to the character queue mechanism, and extracts characters from the character queue at a set speed according to the dynamic speed control mechanism for character-by-character display.