The invention discloses an AI question and answer streaming
content word-by-word rendering method based on dual-
state control, particularly relates to the technical field of
artificial intelligence question and answer front-end streaming rendering, and aims to solve the problem that existing webpage
artificial intelligence question and answer lacks dual-
state control capability in a streaming pushing scene. The page rearrangement frequency and the memory occupation cannot be stably controlled while the word-by-word rendering continuity is ensured, and the problems of content loss, lagging and out-of-control security filtering are easy to occur when multiple
questions and answers are concurrent. The method comprises the following steps: generating a
record identifier for each question and answer at a front end, constructing a dual-
state management and control object comprising a thinking state container, an answer state container, a buffer area and word-by-word rendering
rhythm parameters, and executing field-based complete set analysis, half-
package splicing, content unit merging and timed driving word-by-word rendering on event segments of a
server; therefore, the question and answer content sequence can still be kept consistent in a long-connection streaming return and multi-round concurrent scene, text presentation is continuous and smooth, and content loss, repeated rendering and page
jitter are reduced.