Streaming rendering method and device, storage medium and program product

By combining SSE streaming with HTTP requests, seamless integration and streaming rendering of external data are achieved, solving the problem of low efficiency in dynamic acquisition and integration of external data in existing technologies. This improves the real-time data update efficiency and response speed of streaming rendering and optimizes the user interaction experience.

CN121814747APending Publication Date: 2026-04-07BEIJING 58 INFORMATION TTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing streaming rendering solutions cannot efficiently acquire and integrate external data, resulting in low efficiency in real-time data updates and display, and making it difficult to cope with complex scenarios that rely on external data.

Method used

By combining SSE streaming with HTTP requests, leveraging the advantages of SSE long-connection streaming data real-time and continuous push, and relying on HTTP requests to achieve accurate, efficient, and dynamic retrieval and data integration from external data sources, the data is generated and embedded in the streaming data. Data blocks are then sorted and rendered according to the rendering strategy priority to ensure real-time updates of the front-end interface.

Benefits of technology

It significantly improves the efficiency and response speed of real-time data update and display in streaming rendering, reduces data display latency, meets the needs of real-time presentation of streaming data and dynamic supplementation of external data in complex scenarios, and optimizes the real-time interactive experience for users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121814747A_ABST
    Figure CN121814747A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a streaming rendering method and device, a storage medium and a program product. In the method, streaming data which is pushed by a server and contains multiple types of first data blocks can be obtained through SSE connection, an HTTP request is initiated to the server according to a request type and a request parameter which are indicated by a trigger identifier carried in the streaming data, and the server obtains a processing result from a corresponding external data source. Generating a second data block according to a processing result, and embedding the second data block into the streaming data to obtain target data containing a plurality of target data blocks; and determining a rendering strategy corresponding to each target data block, finishing sorting according to the priority of the type of the target data block, rendering the target data blocks one by one by adopting the corresponding rendering strategy, and updating a front-end interface of the terminal in real time according to a rendering result. Through the mode, efficient dynamic acquisition and integration of the external data in the streaming data transmission process are realized, the data real-time updating display efficiency based on the streaming data is improved, and the data display delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a streaming rendering method, device, storage medium, and program product. Background Technology

[0002] Streaming rendering refers to the gradual transmission and presentation of data to the user, avoiding long waiting times and enabling real-time interaction. This streaming rendering method has significant advantages in improving user experience, especially in scenarios requiring dynamically updated data, reducing latency and improving response speed. Although streaming rendering technology can push data in real time, in mainstream application scenarios such as intelligent chat responses, real-time data dashboards, and online collaborative editing, the core requirement of streaming rendering is not only the real-time and continuous presentation of data, but also the ability to dynamically acquire and integrate external data—for example, intelligent chat systems need to call external knowledge bases in real time to supplement response content, and real-time dashboards need to integrate multi-source heterogeneous dynamic data to improve display dimensions. The ability to efficiently acquire and integrate external data directly determines the efficiency of real-time data update and display, which is the key to the successful implementation of streaming rendering technology in complex scenarios.

[0003] However, existing streaming rendering solutions have inherent flaws, failing to efficiently acquire and integrate external data dynamically, resulting in low efficiency in real-time data updates and display, and making it difficult to cope with complex scenarios that rely on external data. Summary of the Invention

[0004] This application provides a streaming rendering method, device, storage medium, and program product to enable dynamic acquisition and integration of external data and improve the efficiency of real-time data update and display.

[0005] This application provides a streaming rendering method applicable to a terminal device. The terminal device establishes an SSE connection with a server. The method includes: acquiring streaming data pushed by the server based on the SSE connection, the streaming data containing multiple types of first data blocks; parsing the multiple types of first data blocks, and when a first data block containing an HTTP request trigger identifier is parsed, the trigger identifier is used to indicate the request type and request parameters of the HTTP request; initiating the HTTP request to the server based on the request parameters, so that the server can obtain the processing result of the HTTP request based on an external data source corresponding to the request type; generating a second data block according to the processing result, and embedding the second data block into the streaming data to obtain target data, the target data including multiple target data blocks; determining the rendering strategy corresponding to each of the multiple target data blocks, with different types of target data blocks corresponding to different rendering strategies; sorting the multiple types of target data blocks according to the priority corresponding to the type of each target data block, and rendering them sequentially using the rendering strategy corresponding to each target data block according to the sorting result, and updating the front-end interface on the terminal device in real time according to the rendering result.

[0006] Optionally, the request parameters carry connection details information, which is used to identify whether the HTTP connection is a single connection or multiple connections. Initiating the HTTP request to the server based on the request parameters includes: when the connection details indicate a single connection, establishing a transient HTTP connection with the server, the duration of which is a preset short-term threshold, and initiating the HTTP request to the server based on the transient HTTP connection; or, when the connection details indicate multiple connections, establishing a long-term HTTP connection with the server, the duration of which is a preset long-term threshold, and initiating the HTTP request to the server based on the long-term HTTP connection.

[0007] Optionally, generating a second data block based on the processing result and embedding the second data block into the streaming data to obtain target data includes: extracting type information of the first data block corresponding to the trigger identifier; encapsulating the processing result in a format consistent with the type information to obtain a second data block; generating an association identifier for the second data block, the association identifier being used to establish an association relationship between the second data block and the first data block corresponding to the trigger identifier; and embedding the second data block carrying the association identifier into an adjacent position of the first data block corresponding to the trigger identifier to obtain target data.

[0008] Optionally, determining the rendering strategy corresponding to each of the plurality of target data blocks includes: calling a multi-dimensional rendering model to determine the rendering strategy corresponding to each of the plurality of target data blocks; or, calling a mapping table of data types and rendering strategies, wherein the mapping table pre-stores the association between different data types and corresponding rendering strategies, and the rendering strategy includes rendering format, resource allocation ratio and loading logic; for each target data block, extracting its type information, and matching it in the mapping table based on the type information to determine the rendering strategy corresponding to each target data block.

[0009] Optionally, the multi-dimensional rendering model includes: a parameter collector, a scene feature extractor, a performance evaluator, a configuration parser, a type feature encoder, and a strategy fusion unit; calling the multi-dimensional rendering model to determine the rendering strategy corresponding to each of the multiple target data blocks includes: using the parameter collector to collect multi-dimensional input parameters, the multi-dimensional input parameters including: type information of the target data block, current application scenario type, priority of each target data block, hardware performance parameters of the terminal device, and user-defined configuration parameters; inputting the current application scenario type into the scene feature extractor, performing feature mapping through a preset scene feature dictionary to obtain a scene feature vector; and inputting the terminal device... The hardware performance parameters of the equipment are input into the performance evaluator to perform performance level classification and rendering adaptability evaluation, and obtain a performance feature vector; the user-defined configuration parameters are input into the configuration parser to parse and obtain standardized configuration feature parameters, and generate a configuration feature vector based on the configuration feature parameters; the type information of the target data block is input into the type feature encoder to perform type feature encoding, and obtain a type feature vector; the scene feature vector, performance feature vector, configuration feature vector, type feature vector and target data block priority are input into the policy fusion unit to perform feature weighted fusion based on the attention mechanism, and output the rendering strategy corresponding to each of the multiple target data blocks.

[0010] Optionally, according to the sorting result, each target data block is rendered sequentially using the rendering strategy corresponding to it, and the front-end interface on the terminal device is updated in real time according to the rendering result, including: sequentially calling the rendering strategy corresponding to each target data block according to the sorting result to complete the rendering of each target data block; during the rendering process, based on the incremental rendering mechanism, calculating the difference information between the rendering result of each rendered target data block and the current display state of the front-end interface, and performing partial updates to the front-end interface based on the difference information to achieve real-time refresh of the front-end interface.

[0011] This application also provides a streaming rendering method applicable to a server, wherein the server establishes an SSE connection with a terminal device. The method includes: pushing streaming data to the terminal device based on the SSE connection, the streaming data containing multiple types of first data blocks, and some of the first data blocks carrying a trigger identifier for indicating an HTTP request, the trigger identifier containing the request type and request parameters of the HTTP request; receiving an HTTP request initiated by the terminal device based on the trigger identifier; obtaining the processing result of the HTTP request based on an external data source corresponding to the request type of the HTTP request, and sending the processing result to the terminal device so that the terminal device can generate a second data block based on the processing result and embed it into the streaming data to obtain target data; and performing rendering and front-end interface updates based on the target data.

[0012] This application also provides an electronic device, including: a memory and a processor; wherein the memory is used to: store one or more computer instructions; and the processor is used to execute the one or more computer instructions to: perform the steps in the streaming rendering method.

[0013] This application also provides a computer-readable storage medium that, when a computer program is executed by a processor, enables the processor to implement the steps in the streaming rendering method.

[0014] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, enable the processor to implement the steps in the streaming rendering method.

[0015] In this embodiment, the organic combination of SSE streaming and HTTP (Hypertext Transfer Protocol) requests fully leverages the advantages of SSE long-connection streaming data real-time and continuous push, avoiding long user wait times. Simultaneously, relying on HTTP requests enables accurate and efficient dynamic retrieval and integration of external data sources. This addresses the technical shortcomings of single SSE streaming being unable to connect to external data and single HTTP requests lacking real-time streaming rendering. It achieves seamless integration of external data and deep collaboration between streaming data transmission and streaming rendering, significantly improving the efficiency and response speed of real-time data update and display in streaming rendering, effectively reducing data display latency, meeting the core requirements of real-time streaming data presentation and dynamic external data supplementation in complex scenarios, and significantly optimizing the user's real-time interactive experience. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic diagram of a streaming rendering method applied to a terminal device provided as an exemplary embodiment of this application; Figure 2 A schematic diagram of a streaming rendering method applied to a server, provided as an exemplary embodiment of this application; Figure 3 A schematic diagram of an electronic device provided for an exemplary embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.

[0019] With the rapid development of Internet technology, data interaction between terminal devices (such as smartphones, tablets, and laptops) and servers is becoming increasingly frequent. Streaming and rendering technology, which enables "rendering while transmitting," effectively improves the loading speed of the front-end interface and user experience, and is widely used in various Internet application scenarios (such as online documents, video bullet comments, and real-time information push).

[0020] While streaming rendering technology can push data in real time, in mainstream application scenarios such as intelligent chat responses, real-time data dashboards, and online collaborative editing, the core requirement of streaming rendering is not only the real-time and continuous presentation of data, but also the ability to dynamically acquire and integrate external data. For example, intelligent chat systems need to call external knowledge bases in real time to supplement response content, and real-time dashboards need to integrate multi-source heterogeneous dynamic data to improve display dimensions. The ability to efficiently acquire and integrate external data directly determines the efficiency of real-time data updates and is the key to the successful implementation of streaming rendering technology in complex scenarios. However, existing streaming rendering solutions have inherent defects, failing to efficiently acquire and integrate external data, resulting in low efficiency in real-time data updates and making it difficult to cope with complex scenarios that rely on external data.

[0021] To address the aforementioned technical issues, this application embodiment organically combines SSE streaming transmission with HTTP (Hypertext Transfer Protocol) requests. This fully leverages the advantages of SSE long-connection streaming data's real-time and continuous push capabilities, avoiding long user wait times. Simultaneously, it utilizes HTTP requests to achieve accurate, efficient, and dynamic retrieval and integration of external data sources. This solves the technical shortcomings of single SSE streaming transmission's inability to connect to external data and single HTTP requests' lack of real-time streaming rendering. It achieves seamless integration of external data and deep collaboration between streaming data transmission and streaming rendering, significantly improving the efficiency and response speed of real-time data updates in streaming rendering, effectively reducing data display latency, meeting the core requirements of real-time streaming data presentation and dynamic external data supplementation in complex scenarios, and significantly optimizing the user's real-time interactive experience.

[0022] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0023] Figure 1 This is a flowchart illustrating a streaming rendering method provided as an exemplary embodiment of this application. The streaming rendering method is applicable to terminal devices, and the terminal device establishes an SSE connection with the server. The terminal device can be any device such as a mobile phone or computer. The streaming rendering method may include the following steps: Step 11: Based on the SSE connection, obtain the streaming data pushed by the server. The streaming data may contain multiple types of first data blocks.

[0024] Step 12: Parse the first data blocks of various types. If a first data block containing an HTTP request trigger identifier is parsed, the trigger identifier is used to indicate the request type and request parameters of the HTTP request. Based on the request parameters, an HTTP request is sent to the server so that the server can obtain the processing result of the HTTP request based on the external data source corresponding to the request type.

[0025] Step 13: Generate a second data block based on the processing result, and embed the second data block into the streaming data to obtain the target data, which includes multiple target data blocks.

[0026] Step 14: Determine the rendering strategy for each of the multiple target data blocks. Different types of target data blocks correspond to different rendering strategies.

[0027] Step 15: Sort the target data blocks of various types according to their priority, and render them in turn according to the sorting results using the rendering strategy corresponding to each target data block. Update the front-end interface on the terminal device in real time according to the rendering results.

[0028] In this embodiment, the type of the first data block includes, but is not limited to, at least one of the following: text data block, image resource identifier data block, external request trigger data block, and style configuration data block. Each first data block may carry a type identifier field to characterize its data type. Correspondingly, each first data block can be parsed according to a preset parsing rule to extract the request type and request parameters of the HTTP request indicated by the trigger identifier. The request type can be any type, such as a permission information query type or a log information write type. The request parameters may include, but are not limited to, at least one of the following: the interface address of the external data source, request header information, request body parameters, and timeout threshold.

[0029] Upon parsing a first data block containing an HTTP request trigger identifier, an HTTP request can be initiated to the server based on the request parameters. The server can then retrieve the processing result of the HTTP request from an external data source corresponding to the request type. This external data source can be a database, other servers, or an API (Application Programming Interface), etc., and this embodiment does not impose any restrictions. The external data source can perform arbitrary processing on the HTTP request, depending on the specific application scenario or the inherent function of the external data source; for example, the processing method can be reading, calculating, or modifying.

[0030] If the first data block parsed does not contain a trigger identifier, then the first data block is directly marked as a data block to be processed, and the process proceeds to the next step 14, which will not be elaborated here.

[0031] Different request types can correspond to different external data sources. Taking an online document collaboration platform scenario as an example, the permission information query type can correspond to the user permission management data source: this data source only provides data query services to the outside world. Terminal devices can obtain read-only data such as the current user's document editing permissions and the list of collaborating members through permission information query requests, which are used for rendering permission identifiers on the front-end interface.

[0032] The log information writing type corresponds to the collaborative operation log data source: This data source supports data writing. The terminal device submits operation log information such as comment content, operation time, and user ID to the collaborative operation log data source through a log information writing request. After the server calls the write interface of this data source to store the operation log information, it returns a "submission successful" processing result, and the front end renders the newly added comment in real time.

[0033] A second data block can be generated based on the processing result, and embedded into the streaming data to obtain the target data. The processing result can be format-converted. If the result is structured data (such as JSON or XML), it is converted to a preset structured format consistent with the first data block. If the result is unstructured data (such as binary image data), it is encoded, and a data type identifier and length field are added. Then, the second data block is generated based on the format-converted processing result. Optionally, the type identifier field of the second data block can be set to "external request result data block," and it can carry the same association identifier as the first data block containing the corresponding trigger identifier, used to represent the dependency relationship between the two. Subsequently, the second data block is embedded into the corresponding position in the streaming data to obtain the target data. Optionally, this corresponding position can be a subsequent adjacent position of the first data block containing the trigger identifier. The target data includes multiple target data blocks, which may include: the first data block that did not trigger an external request and the generated second data block.

[0034] After determining the rendering strategy for each target data block, the target data blocks of various types can be sorted according to their priority. Then, based on the sorting results, the rendering strategy corresponding to each target data block is applied sequentially, and the front-end interface on the terminal device is updated in real time based on the rendering results. Priority division rules can be preset, based on the impact of the target data block type on the user experience, dividing different types of target data blocks into multiple priority levels (such as highest priority, high priority, medium priority, and low priority). An example is given below: Highest priority: Data blocks related to user interaction controls (such as configuration data blocks corresponding to buttons, input boxes, drop-down menus, etc.). These data blocks directly affect user operations and should be rendered first. High priority: Core content data blocks (such as document body text data blocks, key data blocks returned from external requests). Medium priority: Auxiliary information data blocks (such as titles, subtitles, descriptive text, etc.). Low priority: Decorative data blocks (such as background images, image resource identifier data blocks corresponding to decorative icons).

[0035] The process involves extracting the type identifier for each target data block and determining its priority based on priority rules. Then, the target data blocks are sorted in descending order of priority. Following the sorting, the corresponding rendering strategy for each target data block is applied sequentially for rendering. Afterward, the front-end interface on the terminal device is updated in real-time based on the rendering results.

[0036] In this embodiment, by organically combining SSE streaming and HTTP requests, the advantages of real-time and continuous streaming data push via SSE long connections are fully utilized, avoiding long user wait times. Simultaneously, HTTP requests enable accurate and efficient dynamic retrieval and integration of external data sources. This addresses the technical shortcomings of single SSE streaming being unable to interface with external data and single HTTP requests lacking real-time streaming rendering. It achieves seamless integration of external data and deep collaboration between streaming data transmission and streaming rendering, significantly improving the efficiency and response speed of real-time data updates in streaming rendering, effectively reducing data display latency, and meeting the core requirements of real-time streaming data presentation and dynamic external data supplementation in complex scenarios. By parsing trigger markers in the streaming data, an HTTP request is proactively initiated to obtain the processing results from the external data source. The processing results are then used to generate a second data block embedded in the streaming data, achieving complete processing of streaming data dependent on external requests. This avoids rendering anomalies caused by incomplete data and ensures the integrity of the rendered content. Specifically, priority is assigned based on the type of the target data block, and the blocks are rendered sequentially according to priority, ensuring that key data blocks related to user interaction are displayed first, thus improving the user experience.

[0037] In some optional embodiments, in response to SSE connection events (such as application startup events or timed events), an SSE connection establishment request can be sent to the server via the HTTP protocol. The request carries the terminal device identifier, application identifier, streaming data reception configuration (such as data transmission format, fragment size threshold, etc.), and session identifier. The session identifier uniquely identifies the current interaction session between the terminal device and the server, facilitating the server to distinguish connection requests from different terminals and perform session-level permission control. After receiving the SSE connection establishment request, the server verifies the validity of the terminal device identifier and session identifier (e.g., verifying whether the terminal device is registered and whether the session identifier is valid). If the verification passes, the server returns a response message containing a connection success identifier to the terminal device, completing the establishment of the SSE long connection.

[0038] To maintain the stability of the SSE connection and avoid connection interruptions due to network fluctuations or link idleness, the terminal device sends a heartbeat packet to the server at a preset period (e.g., every 30 seconds) after the SSE connection is established. The heartbeat packet carries the terminal device identifier and session identifier. After receiving the heartbeat packet, the server returns a response confirmation message. If the terminal device does not receive a response confirmation message from the server for a preset number of consecutive times (e.g., 3 times), it re-initiates an SSE connection establishment request to the server to ensure the continuity of the streaming data transmission link. Based on the establishment and maintenance of a stable SSE connection, the server splits the overall data to be transmitted into multiple first data blocks according to preset fragmentation rules and continuously pushes streaming data to the terminal device through the SSE connection.

[0039] In some optional embodiments, the request parameters may also carry connection details information, which can be used to explicitly identify whether the HTTP connection is a single connection or multiple connections (e.g., "once" represents a single connection, "multiple" represents multiple connections), and can be a preset identification field or identification number.

[0040] When initiating an HTTP request to the server based on request parameters, the connection details in the request parameters can be parsed first, and a corresponding HTTP connection can be established according to the different connection types: When the connection details indicate a single connection, the terminal device establishes a transient HTTP connection with the server. The duration of the transient HTTP connection is a preset short-term threshold (e.g., 30 seconds), which is only used to complete the initiation and response reception process of this HTTP request. The connection is automatically released after the process ends, which is suitable for one-time data acquisition scenarios (e.g., obtaining single-time permission verification data for the user's current document); When the connection details indicate multiple connections, the terminal device establishes a long-term HTTP connection with the server. The duration of the long-term HTTP connection is a preset long-term threshold (e.g., 180 seconds). Within the threshold range, the same type of HTTP request can be initiated multiple times based on this connection without re-establishing the connection, which is suitable for high-frequency data interaction scenarios (e.g., submitting collaborative comments multiple times during online document collaboration).

[0041] This approach, by clearly defining the connection type through connection details, avoids the drawbacks of using a single connection regardless of interaction frequency. Transient connections are released immediately after use, reducing the terminal and server resources occupied by idle connections; long-term connections can be reused, avoiding the resource consumption of repeatedly establishing connections during high-frequency requests. In one-off scenarios, there is no need to maintain long-term connections, reducing connection maintenance overhead; in high-frequency scenarios, connection reuse reduces connection establishment time, shortens the request-response chain, and improves the smoothness of user operations. Reasonable connection lifecycle management (automatic release of transient connections and time-limited reuse of long-term connections) reduces the persistence of invalid connections, lowers the network resource consumption of terminals and the connection management pressure on servers, and ensures the stable operation of streaming data transmission and rendering processes.

[0042] In some optional embodiments, when generating a second data block based on the processing result and embedding the second data block into streaming data to obtain target data, the type information of the first data block corresponding to the trigger identifier can be extracted. The type information can be determined based on the type identifier field of the first data block. The processing result is then encapsulated in a format consistent with the type information to obtain the second data block. An association identifier is generated for the second data block, which is used to establish the association between the second data block and the first data block corresponding to the trigger identifier.

[0043] The second data block carrying the association identifier is embedded into the adjacent position of the first data block corresponding to the trigger identifier to obtain the target data. The adjacent position can be either a subsequent adjacent position or a previous adjacent position; this embodiment does not impose any restrictions.

[0044] This application does not limit the specific implementation of "determining the rendering strategy corresponding to each of the multiple target data blocks".

[0045] In an exemplary embodiment, a pre-configured mapping table of data types and rendering strategies can be invoked. This mapping table stores the association between different data types and their corresponding rendering strategies. The rendering strategy includes at least the rendering format, resource allocation ratio, and loading logic, and can be flexibly configured according to the needs of streaming rendering to adapt to the rendering requirements of different types of target data blocks.

[0046] The following examples illustrate specific data block types, clearly defining the rendering strategy's rendering format, resource allocation ratio, and loading logic: Text data block: Corresponds to the direct rendering strategy, where the rendering format is the native insertion format of DOM (Document Object Model), and the text content is encapsulated according to the preset font, color, line height, and character spacing style specifications; the resource allocation ratio is ≤10% of terminal computing power resources and zero network resources; the loading logic is to extract the text content, insert the text content directly into the preset text container of the front-end interface through DOM operations, and apply the corresponding styles in real time to complete the rendering, without any delay waiting steps.

[0047] Image resource identifier data block: corresponds to lazy loading rendering strategy, where the rendering format is image placeholder + resource address mapping format, the placeholder adopts blank / skeleton screen format with the same size as the target image; the resource allocation ratio is ≤5% of terminal computing power resources, and network resources are occupied on demand and in time; the loading logic is to first load the image placeholder to complete the basic interface layout, and after the terminal device detects that the computing power is idle, the network bandwidth is sufficient, or the image resources are preloaded, the image resources are obtained from the server or local cache through the image resource identifier, and then the placeholder is automatically replaced to complete the final rendering.

[0048] External request result data blocks: The rendering strategy is matched according to the specific content type. If it is table data, a pagination rendering strategy is used, with a paginated table DOM structure format and data encapsulated according to a preset number of rows per page. The resource allocation ratio is ≤15% of terminal computing power, and network resources are used in batches according to pagination. The loading logic is to split the table data according to a preset pagination threshold, render and load page by page, and support front-end pagination switching interaction. If it is list data, a scrolling loading rendering strategy is used, with a scrolling list item DOM structure format and a unified list item layout style. The resource allocation ratio is ≤12% of terminal computing power, and network resources are used as needed triggered by scrolling. The loading logic is to render list data within the visible area, and automatically load and render the next batch of list data when the user scrolls the interface to a critical position.

[0049] Based on the aforementioned preset rendering strategy mapping table, the terminal device can traverse each target data block, determine the type information of the target data block according to the type identifier field of each target data block, and match it in the mapping table based on the type information to determine the rendering strategy corresponding to each target data block.

[0050] In another exemplary embodiment, a multi-dimensional rendering model can be invoked to determine the rendering strategy corresponding to each of the multiple target data blocks. The multi-dimensional rendering model may include: a parameter collector, a scene feature extractor, a performance evaluator, a configuration parser, a type feature encoder, and a strategy fusion unit.

[0051] Based on this, the multi-dimensional rendering model is invoked to determine the rendering strategy corresponding to each of the multiple target data blocks, which can be achieved based on the following steps R1-R6: Step R1: Collect multi-dimensional input parameters using a parameter collector. These multi-dimensional input parameters include: target data block type information, current application scenario type, priority of each target data block, hardware performance parameters of the terminal device, and user-defined configuration parameters.

[0052] The type information of the target data blocks can be identified by a type field (such as text or image). The current application scenario type can be any streaming rendering core scenario, such as online document collaboration, real-time information push, or video bullet comment interaction. The priority of each target data block refers to its level determined based on preset priority rules. The hardware performance parameters of the terminal device can include hardware operating status parameters such as processor real-time clock speed, remaining memory capacity, video memory size, real-time network bandwidth, and remaining battery power. User-defined configuration parameters can include personalized configuration items such as user-defined data saving mode, high-performance rendering mode, image loading quality, and font display preferences.

[0053] Step R2: Input the current application scenario type into the scenario feature extractor, and perform feature mapping through a preset scenario feature dictionary to obtain the scenario feature vector. The scenario feature dictionary pre-stores a one-to-one mapping relationship between various application scenarios and scenario feature vectors. For example, the online document collaboration scenario is mapped to the scenario feature vector corresponding to "high editing interaction requirements, high data real-time requirements, and medium resource consumption sensitivity," while the real-time information push scenario is mapped to the scenario feature vector corresponding to "high browsing smoothness requirements, text > image loading priority, and high resource consumption sensitivity."

[0054] Step R3: Input the hardware performance parameters of the terminal device into the performance evaluator, perform performance level classification and rendering adaptability evaluation, and obtain the performance feature vector.

[0055] Among them, the performance level classification is based on the preset hardware performance threshold standard, and the terminal device is divided into high performance level, medium performance level or low performance level.

[0056] Among them, rendering adaptability assessment: for the needs of streaming rendering, it evaluates the adaptability of each hardware parameter to different types of rendering tasks (such as the impact of video memory size on image rendering efficiency, network bandwidth on resource loading speed, and battery power on background rendering time), and generates an adaptability score; the performance evaluator can fuse the performance level and adaptability score to obtain a performance feature vector, which is used to characterize the rendering capacity of the terminal device.

[0057] Step R4: Input the user-defined configuration parameters into the configuration parser, which parses them to obtain standardized configuration feature parameters and generates a configuration feature vector based on these parameters. Specifically, non-standardized user-defined configuration parameters can be standardized to obtain configuration feature parameters in a unified format. For example, "data saving mode" is parsed as "resource loading priority: text priority, image compression ratio: high, auto-loading: disabled," and "high-performance rendering mode" is parsed as "resource loading priority: full loading, image compression ratio: low, animation effects: enabled." Then, based on the standardized configuration feature parameters, they are quantized and encoded into a fixed-dimensional configuration feature vector, enabling the model to accurately identify and incorporate user-specific needs into decision-making.

[0058] Step R5: Input the type information of the target data block into the type feature encoder for type feature encoding to obtain a type feature vector. Any standardized encoding method, such as one-hot encoding or label encoding, can be used to digitally encode different data block types, outputting a fixed-dimensional type feature vector. For example, the encoding rules are: text type → [1,0,0], image type → [0,1,0], external request result type → [0,0,1], achieving quantitative representation of data block types and clarifying the basic rendering attributes of different data blocks.

[0059] Step R6: Input the scene feature vector, performance feature vector, configuration feature vector, type feature vector and target data block priority into the strategy fusion unit, perform feature weighted fusion based on attention mechanism, and output the rendering strategy corresponding to each of the multiple target data blocks.

[0060] The strategy fusion unit can be configured with an attention mechanism. Based on preset base weights for each feature vector, it performs weighted fusion calculations on each feature vector to obtain a comprehensive decision feature for each target data block. The preset base weights for each feature vector can be dynamically adjusted according to the actual scenario; for example, increasing the weight of configuration feature vectors in a data-saving mode, or increasing the weight of performance feature vectors on low-performance terminals. Finally, based on the comprehensive decision feature, it can match and output the rendering strategy corresponding to each target data block from a preset rendering strategy library, thus completing the intelligent determination of the rendering strategy.

[0061] In this way, on the one hand, the modular collaborative design of multi-dimensional rendering models can more accurately match rendering strategies, and on the other hand, it can adapt to the differences of multiple scenarios and devices, improving rendering compatibility and stability.

[0062] In some optional embodiments, when rendering each target data block sequentially according to the sorting result using the rendering strategy corresponding to each target data block, and updating the front-end interface on the terminal device in real time based on the rendering result, it can be implemented in the following way: The rendering strategy for each target data block is invoked sequentially according to the sorting results to complete the rendering of each target data block. During the rendering process, based on an incremental rendering mechanism, the difference between the rendering result of each completed target data block and the current display state of the front-end interface is calculated, and the front-end interface is partially updated based on the difference information to achieve real-time refresh of the front-end interface. Specifically, the rendering strategy corresponding to each target data block can be invoked sequentially according to the sorting results. The rendering engine parses the original data of the target data block and completes operations such as data formatting, interface component instantiation, and style rendering according to the rule information in the configuration file corresponding to the rendering strategy, to obtain the rendering result of a single target data block. Optionally, an asynchronous rendering mechanism is adopted during the sequential rendering process. That is, after the current target data block starts rendering, it is not necessary to wait for it to be fully rendered before starting the rendering preparation work for the next target data block, thereby improving the overall rendering efficiency. At the same time, a status flag (such as "pending rendering", "rendering in progress", "rendering completed", "rendering failed") is set for the rendering process of each target data block to record the rendering progress in real time.

[0063] After each target data block is rendered, an incremental rendering mechanism is used to compare and analyze the rendered result with the current display state of the front-end interface to obtain difference information. Specifically, a snapshot of the DOM structure and data state of the current display state of the front-end interface is extracted first, and then the target DOM structure and target data state corresponding to the current rendering result are extracted. A tree structure comparison algorithm (such as the diff algorithm) is used to compare DOM structure differences node by node (including node additions, deletions, attribute modifications, and content changes), and a key-value pair matching method is used to compare data state differences (including data value updates, data type changes, and adjustments to data relationships). The diff algorithm is used to compare the differences between two data structures (such as tree structures and strings), efficiently identifying additions, deletions, and modifications between the source and target data structures, avoiding the inefficiency of full comparisons. Based on this, difference information can be obtained by integrating the DOM structure differences and data state differences, and the front-end interface can be partially updated based on this difference information to achieve real-time refresh of the front-end interface. The difference information includes: difference type, difference location, original value, and target value.

[0064] When performing partial updates to the front-end interface based on difference information, a partial update instruction can be generated according to the difference information. The partial update instruction may include at least one of the following: location information of the difference position, update operation type (such as adding a node, deleting a node, modifying node attributes, replacing node content, etc.), update data, and update order rules. Subsequently, the partial update instruction is sent to the front-end interface rendering engine. The rendering engine accurately locates the area in the front-end interface that needs to be updated based on the location information in the instruction, and performs the corresponding update operation only on that area, without re-rendering the entire front-end interface. After the update is completed, the DOM structure snapshot and data state snapshot of the front-end interface are updated in real time to provide a baseline state for the difference calculation of the next target data block. Simultaneously, if there is a target data block that fails to render, a retry rendering mechanism is triggered. If multiple retries still fail, a preset exception placeholder component is loaded, and a failure log is recorded.

[0065] In this way, on the one hand, rendering and updating efficiency can be improved, ensuring real-time responsiveness. By combining sequential rendering with asynchronous preparation, the overall rendering process is optimized. Incremental rendering mechanism only updates localized areas with differences, avoiding redundant operations of full rendering. This not only significantly improves the interface response speed but also ensures that the rendering results can be fed back to the front-end interface in real time. On the other hand, resource consumption is reduced, minimizing the ineffective consumption of terminal device computing and memory resources, providing hardware resource support for the real-time nature of rendering and updating, and adapting to complex application scenarios with multiple data blocks and large data volumes. On the other hand, user experience is optimized, avoiding interface flickering issues caused by full updates, ensuring real-time synchronous refresh and delay-free presentation of the front-end interface, and improving the user's visual and operational experience.

[0066] In some optional embodiments, after the terminal device completes the generation of the target data, it can continue to perform the following steps of multi-channel data pipeline initialization and parallel transmission of target data, specifically including the following sub-steps: Step H1: After the terminal device completes the generation of the target data, it immediately initializes the multi-channel data pipeline. The data pipeline establishes a collaborative communication link with the SSE connection between the terminal device and the server to ensure data transmission timing synchronization.

[0067] Step H2: Configure independent transmission channels within the multi-channel data pipeline that correspond one-to-one with the target data block type. The independent transmission channels include text transmission channels, numerical transmission channels, multimedia transmission channels, and structured data transmission channels.

[0068] Step H3: The terminal device identifies the type of multiple target data blocks and distributes each target data block to the corresponding independent transmission channel according to the identification result.

[0069] Step H4: Start parallel streaming transmission on each independent transmission channel. At the same time, configure a real-time update trigger in the data pipeline. The real-time update trigger monitors the status of each target data block in real time. When it detects that the target data block has content supplementation or correction, it immediately triggers the incremental update transmission of the corresponding independent transmission channel, transmitting only the updated part of the data instead of the complete data block.

[0070] Step H5: The data pipeline provides real-time feedback on the transmission status of each channel to the terminal device, ensuring that the terminal device can monitor the transmission progress of the target data in real time.

[0071] Based on steps H1-H5 above, by constructing a multi-channel intelligent streaming data transmission system that is deeply collaborative with SSE, the technical pain points of traditional terminal-server SSE single-channel transmission, such as congestion, disordered timing, delayed updates, resource waste, and uncontrollable transmission status, are solved. This achieves efficient, accurate, real-time, and controllable streaming transmission of target data, while providing highly reliable transmission data support for subsequent terminal streaming rendering.

[0072] The following examples illustrate how incorporating steps H1-H5 into the aforementioned embodiments yields the following solutions: Step K1: Based on the SSE connection, obtain the streaming data pushed by the server. The streaming data may contain multiple types of first data blocks.

[0073] Step K2: Parse the first data blocks of various types. If a first data block containing an HTTP request trigger identifier is parsed, the trigger identifier is used to indicate the request type and request parameters of the HTTP request. Based on the request parameters, an HTTP request is sent to the server so that the server can obtain the processing result of the HTTP request based on the external data source corresponding to the request type.

[0074] Step K3: Generate a second data block based on the processing result, and embed the second data block into the streaming data to obtain the target data, which includes multiple target data blocks.

[0075] Step K4 (corresponding to step H1): After the target data is generated, initialize the multi-channel data pipeline. Establish a collaborative communication link between the data pipeline and the SSE connection between the terminal device and the server to ensure data transmission timing synchronization.

[0076] Step K5 (corresponding to step H2): Configure independent transmission channels within the multi-channel data pipeline that correspond one-to-one with the target data block type. For example, the independent transmission channels may include text transmission channels, numerical transmission channels, multimedia transmission channels, and structured data transmission channels.

[0077] Step K6 (corresponding to step H3): Identify the types of multiple target data blocks and distribute each target data block to the corresponding independent transmission channel according to the type identification.

[0078] Step K7 (corresponding to step H4): Start parallel streaming transmission of each independent transmission channel, and configure real-time update triggers in the data pipeline. Use real-time update triggers to monitor the status of each target data block in real time. When it is detected that the target data block has content supplementation or correction, trigger incremental update transmission of the corresponding independent transmission channel. That is, only transmit the updated part of the data instead of the complete data block.

[0079] Step K8 (corresponding to step H5): The data pipeline provides real-time feedback on the transmission status of each independent transmission channel to the terminal device, ensuring that the terminal device can monitor the transmission progress of the target data in real time.

[0080] Step K9: Determine the rendering strategy for each of the multiple target data blocks. Different types of target data blocks correspond to different rendering strategies.

[0081] Step K10: Sort the target data blocks of various types according to their priority based on the type of each target data block, and render them in turn according to the sorting results using the rendering strategy corresponding to each target data block, and update the front-end interface on the terminal device in real time based on the rendering results.

[0082] Step K11 (Supplementary Incremental Update): If the real-time update trigger initiates an incremental update transmission, the terminal device receives the incremental data, updates the corresponding target data block locally, and re-executes the rendering logic of the data block in steps K9-K10 to refresh the front-end interface in real time.

[0083] In this way, based on the process of "streaming data acquisition - dynamic request completion - target data integration - transmission channel pre-preparation", it adapts to the characteristics of SSE long connection streaming transmission, realizes the combination of accurate acquisition, dynamic completion and transmission readiness of streaming data, and solves the pain points of traditional streaming data such as "single acquisition, incomplete information and no pre-planning for transmission", and provides a foundation for subsequent multi-channel data transmission and streaming rendering.

[0084] Based on the foregoing embodiments, this application also provides a streaming rendering method, applicable to servers, where the server and terminal device establish an SSE connection, such as... Figure 2 As shown, the method includes: Step 21: Based on the SSE connection, push streaming data to the terminal device. The streaming data contains multiple types of first data blocks, and some of the first data blocks carry a trigger identifier for indicating an HTTP request. The trigger identifier includes the request type and request parameters of the HTTP request.

[0085] Step 22: Receive the HTTP request initiated by the terminal device based on the trigger identifier.

[0086] Step 23: Based on the external data source corresponding to the request type of the HTTP request, obtain the processing result of the HTTP request, and send the processing result to the terminal device so that the terminal device can generate a second data block based on the processing result and embed streaming data to obtain the target data, and perform rendering and front-end interface update based on the target data.

[0087] The optional implementation methods and beneficial effects of this embodiment have been described in detail above, and can be continued here, so they will not be repeated.

[0088] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 11 to 15 can be device A; or the execution subject of steps 11 to 12 can be device A, and the execution subject of steps 13 to 15 can be device B; and so on.

[0089] Furthermore, some processes described in the above embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 12, 13, etc., are merely used to distinguish different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.

[0090] It should be noted that the terms "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.

[0091] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. This electronic device is applicable to the streaming rendering method provided in the foregoing embodiments, such as... Figure 3 As shown, the electronic device may include: a memory 301, a processor 302, and a communication component 303.

[0092] Memory 301 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0093] In some exemplary embodiments, processor 302, coupled to memory 301, is used to execute a computer program in memory 301 for: acquiring streaming data pushed by the server based on the SSE connection, the streaming data including multiple types of first data blocks; parsing the multiple types of first data blocks, wherein if a first data block containing an HTTP request trigger identifier is parsed, the trigger identifier indicates the request type and request parameters of the HTTP request, and an HTTP request is initiated to the server based on the request parameters, so that the server can obtain the processing result of the HTTP request based on an external data source corresponding to the request type; generating a second data block according to the processing result, and embedding the second data block into the streaming data to obtain target data, the target data including multiple target data blocks; determining the rendering strategy corresponding to each of the multiple target data blocks, with different types of target data blocks corresponding to different rendering strategies; sorting the multiple types of target data blocks according to the priority corresponding to the type of each target data block, and rendering them sequentially using the rendering strategy corresponding to each target data block according to the sorting result, and updating the front-end interface on the terminal device in real time according to the rendering result.

[0094] Optionally, the request parameters carry connection details information, which is used to identify whether the HTTP connection is a single connection or multiple connections. When the processor 302 initiates the HTTP request to the server based on the request parameters, it is specifically used to: when the connection details information indicates a single connection, establish a transient HTTP connection with the server, the duration of the transient HTTP connection being a preset short-term threshold, and initiate the HTTP request to the server based on the transient HTTP connection; or, when the connection details information indicates multiple connections, establish a long-term HTTP connection with the server, the duration of the long-term HTTP connection being a preset long-term threshold, and initiate the HTTP request to the server based on the long-term HTTP connection.

[0095] Optionally, when the processor 302 generates a second data block based on the processing result and embeds the second data block into the streaming data to obtain the target data, it specifically performs the following steps: extracting the type information of the first data block corresponding to the trigger identifier; encapsulating the processing result in a format consistent with the type information to obtain the second data block; generating an association identifier for the second data block, the association identifier being used to establish an association relationship between the second data block and the first data block corresponding to the trigger identifier; and embedding the second data block carrying the association identifier into an adjacent position of the first data block corresponding to the trigger identifier to obtain the target data.

[0096] Optionally, when the processor 302 determines the rendering strategy corresponding to each of the plurality of target data blocks, it is specifically used to: call a multi-dimensional rendering model to determine the rendering strategy corresponding to each of the plurality of target data blocks; or, call a mapping table of data types and rendering strategies, wherein the mapping table pre-stores the association between different data types and corresponding rendering strategies, and the rendering strategy includes rendering format, resource allocation ratio and loading logic; for each target data block, extract its type information, and match it in the mapping table based on the type information to determine the rendering strategy corresponding to each target data block.

[0097] Optionally, the multi-dimensional rendering model includes: a parameter collector, a scene feature extractor, a performance evaluator, a configuration parser, a type feature encoder, and a strategy fusion unit; when the processor 302 calls the multi-dimensional rendering model to determine the rendering strategy corresponding to each of the multiple target data blocks, it is specifically used to: collect multi-dimensional input parameters using the parameter collector, the multi-dimensional input parameters including: type information of the target data block, current application scenario type, priority of each target data block, hardware performance parameters of the terminal device, and user-defined configuration parameters; input the current application scenario type into the scene feature extractor, perform feature mapping through a preset scene feature dictionary, and obtain a scene feature vector; The hardware performance parameters of the terminal device are input into the performance evaluator for performance level classification and rendering adaptability evaluation to obtain a performance feature vector. The user-defined configuration parameters are input into the configuration parser to obtain standardized configuration feature parameters, and a configuration feature vector is generated based on the configuration feature parameters. The type information of the target data block is input into the type feature encoder for type feature encoding to obtain a type feature vector. The scene feature vector, performance feature vector, configuration feature vector, type feature vector, and target data block priority are input into the policy fusion unit for attention-based feature weighted fusion to output the rendering strategy corresponding to each of the multiple target data blocks.

[0098] Optionally, when the processor 302 renders each target data block sequentially using the rendering strategy corresponding to each target data block according to the sorting result, and updates the front-end interface on the terminal device in real time according to the rendering result, it is specifically used to: sequentially call the rendering strategy corresponding to each target data block according to the sorting result to complete the rendering of each target data block; during the rendering process, based on the incremental rendering mechanism, calculate the difference information between the rendering result of each rendered target data block and the current display state of the front-end interface, and perform partial updates to the front-end interface based on the difference information to achieve real-time refresh of the front-end interface.

[0099] This application also provides a computer-readable storage medium that, when executed by a processor, enables the processor to implement the steps in the streaming rendering method.

[0100] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, enable the processor to implement the steps in the streaming rendering method.

[0101] In this embodiment, the organic combination of SSE streaming and HTTP (Hypertext Transfer Protocol) requests fully leverages the advantages of SSE long-connection streaming data real-time and continuous push, avoiding long user wait times. Simultaneously, relying on HTTP requests enables accurate and efficient dynamic retrieval and integration of external data sources. This addresses the technical shortcomings of single SSE streaming being unable to connect to external data and single HTTP requests lacking real-time streaming rendering. It achieves seamless integration of external data and deep collaboration between streaming data transmission and streaming rendering, significantly improving the efficiency and response speed of real-time data update and display in streaming rendering, effectively reducing data display latency, meeting the core requirements of real-time streaming data presentation and dynamic external data supplementation in complex scenarios, and significantly optimizing the user's real-time interactive experience.

[0102] Furthermore, such as Figure 3 As shown, the electronic device also includes other components such as a display 304, a power supply component 305, and an audio component 306. Figure 3 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 3 The components shown.

[0103] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device 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 storage, flash memory, magnetic disk, or optical disk.

[0104] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0105] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0106] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.

[0107] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0108] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.

[0109] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0111] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0112] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.

[0113] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0114] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0115] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0116] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A streaming rendering method, characterized in that, Applicable to terminal devices, wherein the terminal devices have established an SSE connection with the server, the method includes: Based on the SSE connection, the streaming data pushed by the server is obtained, and the streaming data may contain multiple types of first data blocks; The first data blocks of the various types are parsed. When a first data block containing an HTTP request trigger identifier is parsed, the trigger identifier is used to indicate the request type and request parameters of the HTTP request. Based on the request parameters, the HTTP request is initiated to the server so that the server can obtain the processing result of the HTTP request based on the external data source corresponding to the request type. A second data block is generated based on the processing result, and the second data block is embedded into the streaming data to obtain target data, wherein the target data includes: multiple target data blocks; Determine the rendering strategy corresponding to each of the multiple target data blocks, with different rendering strategies corresponding to different types of target data blocks; Based on the priority corresponding to the type of each target data block, the target data blocks of the various types are sorted, and according to the sorting result, the rendering strategy corresponding to each target data block is used to render them in turn, and the front-end interface on the terminal device is updated in real time according to the rendering result.

2. The method according to claim 1, characterized in that, The request parameters carry connection details information, which is used to identify whether the HTTP connection is a single connection or multiple connections. The HTTP request is initiated to the server based on the request parameters, including: When the connection details indicate a single connection, a transient HTTP connection is established with the server. The duration of the transient HTTP connection is a preset short-term threshold. Based on this transient HTTP connection, the HTTP request is initiated to the server; or... When the connection details information indicates multiple connections, a long-term HTTP connection is established with the server. The duration of the long-term HTTP connection is a preset long-term threshold. Based on the long-term HTTP connection, the HTTP request is initiated to the server.

3. The method according to claim 1, characterized in that, A second data block is generated based on the processing result, and the second data block is embedded into the streaming data to obtain the target data, including: Extract the type information of the first data block corresponding to the trigger identifier; encapsulate the processing result in a format consistent with the type information to obtain the second data block; Generate an association identifier for the second data block, the association identifier being used to establish an association between the second data block and the first data block corresponding to the trigger identifier; The second data block carrying the association identifier is embedded into the adjacent position of the first data block corresponding to the trigger identifier to obtain the target data.

4. The method according to any one of claims 1-3, characterized in that, Determining the rendering strategy corresponding to each of the plurality of target data blocks includes: Invoke the multi-dimensional rendering model to determine the rendering strategy corresponding to each of the multiple target data blocks; or... Call the mapping table of data types and rendering strategies. The mapping table pre-stores the association between different data types and corresponding rendering strategies. The rendering strategy includes rendering format, resource allocation ratio and loading logic. For each target data block, its type information is extracted, and the type information is matched in the mapping table to determine the rendering strategy corresponding to each target data block.

5. The method according to claim 4, characterized in that, The multi-dimensional rendering model includes: a parameter collector, a scene feature extractor, a performance evaluator, a configuration parser, a type feature encoder, and a policy fusion unit; Invoke the multi-dimensional rendering model to determine the rendering strategy corresponding to each of the multiple target data blocks, including: The parameter collector collects multi-dimensional input parameters, including: target data block type information, current application scenario type, priority of each target data block, hardware performance parameters of the terminal device, and user-defined configuration parameters. The current application scenario type is input into the scenario feature extractor, and the scenario feature vector is obtained by feature mapping through a preset scenario feature dictionary. The hardware performance parameters of the terminal device are input into the performance evaluator to perform performance level classification and rendering adaptability evaluation, and to obtain a performance feature vector. The user-defined configuration parameters are input into the configuration parser, which parses them to obtain standardized configuration feature parameters and generates a configuration feature vector based on the configuration feature parameters. The type information of the target data block is input into the type feature encoder for type feature encoding to obtain a type feature vector; The scene feature vector, performance feature vector, configuration feature vector, type feature vector, and target data block priority are input into the policy fusion unit to perform feature weighted fusion based on the attention mechanism, and the rendering strategy corresponding to each of the multiple target data blocks is output.

6. The method according to claim 1, characterized in that, According to the sorting results, each target data block is rendered sequentially using the rendering strategy corresponding to it, and the front-end interface on the terminal device is updated in real time based on the rendering results, including: According to the sorting result, the rendering strategy corresponding to each target data block is called in sequence to complete the rendering of each target data block; during the rendering process, based on the incremental rendering mechanism, the difference information between the rendering result of each rendered target data block and the current display state of the front-end interface is calculated, and the front-end interface is partially updated based on the difference information to achieve real-time refresh of the front-end interface.

7. A streaming rendering method, characterized in that, Applicable to a server, wherein the server establishes an SSE connection with a terminal device, the method includes: Based on the SSE connection, streaming data is pushed to the terminal device. The streaming data includes multiple types of first data blocks, and some of the first data blocks carry a trigger identifier for indicating an HTTP request. The trigger identifier includes the request type and request parameters of the HTTP request. Receive the HTTP request initiated by the terminal device based on the trigger identifier; Based on an external data source corresponding to the request type of the HTTP request, the processing result of the HTTP request is obtained and sent to the terminal device, so that the terminal device can generate a second data block and embed streaming data to obtain target data, and perform rendering and front-end interface updates based on the target data.

8. An electronic device, characterized in that, include: A memory and a processor; wherein the memory is configured to: store one or more computer instructions; and the processor is configured to execute the one or more computer instructions to: perform the steps of the method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of the method according to any one of claims 1-7.

10. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1-7.