Search

CN-122019695-A - Unified rendering method, device, equipment and storage medium

CN122019695ACN 122019695 ACN122019695 ACN 122019695ACN-122019695-A

Abstract

The invention provides a unified rendering method, a device, equipment and a storage medium, wherein the method is applied to a client and comprises the steps of receiving streaming data pushed by a server, analyzing text increment streams in the streaming data to obtain respective description tags in the text increment streams, extracting identifiers of the respective description tags, searching a bypass product list in the streaming data based on the identifiers of the respective description tags to obtain product meta-information matched with the respective description tags, inserting components or placeholders corresponding to the respective products in time sequence positions corresponding to the respective description tags in the text increment streams based on the product meta-information matched with the respective description tags to generate and output a single rendering sequence, and performing unified rendering based on the single rendering sequence. The invention provides a unified rendering mechanism for the alignment of the text in-text identification, the bypass list and the client, which realizes the strong consistent online presentation of the text increment and the multi-mode product and ensures smooth reading and continuous semantics.

Inventors

  • ZHAO YUNTAO
  • HUANG CHUAN
  • REN SIYU
  • LUO ZIHAN
  • HUANG DAN

Assignees

  • 吉旗(成都)科技有限公司

Dates

Publication Date
20260512
Application Date
20251204

Claims (10)

  1. 1. The unified rendering method is characterized by being applied to a client, and comprises the following steps: Receiving streaming data pushed by a server, wherein the streaming data comprises a text increment stream carrying at least one self-description tag and a bypass product list, the self-description tag is embedded in the text increment stream and comprises unique identifiers of corresponding products, and the bypass product list stores meta information of each product according to unique identifier indexes; Analyzing the text increment stream to obtain each self-description tag in the text increment stream and extracting the identification of each self-description tag; Searching in the bypass product list based on the identification of each self-description tag to obtain product meta-information matched with each self-description tag; And inserting components or placeholders corresponding to the products in the text increment stream at time sequence positions corresponding to the self-description labels based on the product meta-information matched with the self-description labels so as to generate and output a single rendering sequence, and uniformly rendering based on the single rendering sequence.
  2. 2. The unified rendering method of claim 1, wherein said parsing the text delta stream to obtain each self-describing tag in the text delta stream and extracting the identity of each self-describing tag comprises: Streaming caching is carried out on the received text increment; Detecting and extracting the complete self-description labels; The identity of each self-describing tag is determined based on the path end portion of the uniform resource locator URL or specified parameters in each self-describing tag.
  3. 3. The unified rendering method of claim 1, wherein the searching in the bypass product list based on the identification of each self-description tag to obtain the product meta information matched with each self-description tag comprises: For any self-description tag, inquiring in a locally maintained product meta-information mapping table according to the identifier of the self-description tag to obtain product meta-information corresponding to the identifier of the self-description tag, wherein the product meta-information mapping table is established and updated according to the received bypass product list; And determining the product meta-information corresponding to the identification of the self-description tag as the product meta-information matched with the self-description tag.
  4. 4. The unified rendering method of claim 1, wherein the inserting components or placeholders corresponding to each product in the text delta stream at timing positions corresponding to each self-describing tag based on the product meta-information matching each self-describing tag to generate and output a single rendering sequence, comprising: For each self-description tag, if the product meta information matched with the self-description tag indicates that the product is ready, generating an interaction component corresponding to the self-description tag according to the type and the resource address in the product meta information matched with the self-description tag and inserting the interaction component into a time sequence position corresponding to the self-description tag; if the product meta information matched with the self-description tag indicates that the product is not ready or the meta information is not monitored, inserting a placeholder in a time sequence position corresponding to the self-description tag; Integrating the text content of the text delta stream and the inserted components or placeholders into an ordered structure according to a parsing time sequence to generate the single rendering sequence; And under the condition that updating of the product meta-information matched with any self-description tag is monitored and the product is ready, replacing a placeholder corresponding to the product meta-information matched with the self-description tag in the single rendering sequence with an actual component.
  5. 5. The method according to any one of claims 1-4, further comprising: archiving the received text increment blocks based on the stream fragment identification corresponding to the text increment stream of the same message; The deduplication process is performed on text delta chunks having the same stream fragment identification.
  6. 6. The method according to claim 1, wherein the method further comprises: accumulating to generate plain text content for copying while receiving the text delta stream; under the condition that the self-description label is analyzed, generating a corresponding text occupation description according to the product type indicated by the matched product meta information in the bypass product list; and replacing the self-description tag by using the text occupation description, and inserting the text occupation description into a corresponding position of the plain text content.
  7. 7. A unified rendering device is characterized by being applied to a client, and comprises: The system comprises a data receiving module, a data processing module and a data processing module, wherein the data receiving module is used for receiving streaming data pushed by a server, the streaming data comprises a text increment stream carrying at least one self-description label and a bypass product list, the self-description label is embedded in the text increment stream and comprises unique identifiers of corresponding products, and the bypass product list stores meta information of each product according to the unique identifier index; The protocol analysis module is used for analyzing the text increment stream to obtain each self-description tag in the text increment stream and extracting the identification of each self-description tag; The data alignment module is used for searching in the bypass product list based on the identification of each self-description tag to obtain product meta-information matched with each self-description tag; And the rendering synthesis module is used for inserting components or placeholders corresponding to the products in the text increment stream at time sequence positions corresponding to the self-description labels based on the product meta-information matched with the self-description labels so as to generate and output a single rendering sequence, and uniformly rendering based on the single rendering sequence.
  8. 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the unified rendering method of any one of claims 1 to 6 when the computer program is executed by the processor.
  9. 9. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the unified rendering method according to any one of claims 1 to 6.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the unified rendering method of any one of claims 1 to 6.

Description

Unified rendering method, device, equipment and storage medium Technical Field The present invention relates to the field of man-machine interaction technologies, and in particular, to a unified rendering method, apparatus, device, and storage medium. Background The existing stream dialogue system is mainly oriented to text increment output, multi-mode products such as charts, file downloading, audio/voice synthesis and the like are often returned through independent channels, and common problems include misplacement of time sequence of the text and the product, contextual cleavage and difficult associated understanding of users. Therefore, there is a need to provide an effective solution for implementing unified presentation of asynchronous multimodal products and text delta on the same time axis without disrupting text fluency. Disclosure of Invention Aiming at the defects existing in the prior art, the invention provides a unified rendering method, a device, equipment and a storage medium, provides a unified rendering mechanism of 'text internal identification, bypass list and client alignment', realizes strong consistent online presentation of text increment and multi-mode products, and ensures smooth reading and continuous semantics. The invention provides a unified rendering method which is applied to a client, and comprises the following steps: Receiving streaming data pushed by a server, wherein the streaming data comprises a text increment stream carrying at least one self-description tag and a bypass product list, the self-description tag is embedded in the text increment stream and comprises unique identifiers of corresponding products, and the bypass product list stores meta information of each product according to unique identifier indexes; Analyzing the text increment stream to obtain each self-description tag in the text increment stream and extracting the identification of each self-description tag; Searching in the bypass product list based on the identification of each self-description tag to obtain product meta-information matched with each self-description tag; And inserting components or placeholders corresponding to the products in the text increment stream at time sequence positions corresponding to the self-description labels based on the product meta-information matched with the self-description labels so as to generate and output a single rendering sequence, and uniformly rendering based on the single rendering sequence. According to the unified rendering method provided by the invention, the parsing of the text increment stream is performed to obtain each self-description tag in the text increment stream and extract the identification of each self-description tag, and the method comprises the following steps: Streaming caching is carried out on the received text increment; Detecting and extracting the complete self-description labels; The identity of each self-describing tag is determined based on the path end portion of the uniform resource locator URL or specified parameters in each self-describing tag. According to the unified rendering method provided by the invention, the product meta-information matched with each self-description tag is obtained by searching in the bypass product list based on the identification of each self-description tag, and the method comprises the following steps: For any self-description tag, inquiring in a locally maintained product meta-information mapping table according to the identifier of the self-description tag to obtain product meta-information corresponding to the identifier of the self-description tag, wherein the product meta-information mapping table is established and updated according to the received bypass product list; And determining the product meta-information corresponding to the identification of the self-description tag as the product meta-information matched with the self-description tag. According to the unified rendering method provided by the invention, based on the meta information of the products matched with each self-description tag, components or placeholders corresponding to each product are inserted at time sequence positions corresponding to each self-description tag in the text increment stream so as to generate and output a single rendering sequence, and the method comprises the following steps: For each self-description tag, if the product meta information matched with the self-description tag indicates that the product is ready, generating an interaction component corresponding to the self-description tag according to the type and the resource address in the product meta information matched with the self-description tag and inserting the interaction component into a time sequence position corresponding to the self-description tag; if the product meta information matched with the self-description tag indicates that the product is not ready or the meta information is not monitored, inserting a placeholder in a time