Front-end rendering method, device and equipment of intelligent agent and storage medium

CN122963689APending Publication Date: 2026-10-23BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611071360.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0002]随着大语言模型和 AI 智能体(Agent)技术的快速发展,需要根据 Agent的思考过程、工具调用结果等渲染生成高频、动态变动的用户界面(UI,User Interface)内容形态,需要解决前端渲染场景下硬编码耦合度高、多端扩展性差的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963689A_ABST
    Figure CN122963689A_ABST
Patent Text Reader

Abstract

The present disclosure provides an agent front-end rendering method and device, equipment and storage medium, relates to the technical field of computers, in particular to the fields of artificial intelligence, front-end rendering and the like. The specific implementation scheme is: receiving structured frame data including macro instructions, the macro instructions being instructions that fuse the description of the execution intention and execution result of the agent with front-end user interface rendering instructions; parsing the structured frame data, extracting the macro instructions from the structured frame data; and performing dynamic rendering of the user interface according to the execution intention and execution result of the agent described by the macro instructions and the user interface rendering instructions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to the fields of artificial intelligence and front-end rendering. Background Technology

[0002] With the rapid development of large language models and AI agent technologies, there is a need to render high-frequency, dynamically changing user interface (UI) content based on the agent's thinking process and tool call results. This requires solving the problems of high hard-coding coupling and poor multi-terminal scalability in front-end rendering scenarios. Summary of the Invention

[0003] This disclosure provides a front-end rendering method, apparatus, device, and storage medium for an intelligent agent.

[0004] According to one aspect of this disclosure, a front-end rendering method for an intelligent agent is provided, applied to a front-end rendering engine, comprising: Receive structured frame data including macro instructions, which are instructions that combine the agent's execution intent and execution result description with front-end UI rendering instructions; Parse structured frame data and extract macro instructions from it; The execution intent and results of the agent described by the macro instructions are used to dynamically render the UI according to the UI rendering instructions.

[0005] According to another aspect of this disclosure, a front-end rendering apparatus for an intelligent agent is provided, applied to a front-end rendering engine, comprising: The receiving module is used to receive structured frame data including macro instructions. Macro instructions are instructions that combine the description of the agent's execution intention and execution result with the front-end UI rendering instructions. The parsing module is used to parse structured frame data and extract macro instructions from the structured frame data; The rendering module is used to dynamically render the UI based on the execution intent and results of the agent described by the macro instructions, according to the UI rendering instructions.

[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and The memory is communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method provided in any embodiment of this disclosure.

[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform a method provided according to any embodiment of this disclosure.

[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method provided according to any embodiment of this disclosure.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a schematic diagram of a distributed cluster processing scenario according to an embodiment of the present disclosure; Figure 2 This is a flowchart illustrating a front-end rendering method for an intelligent agent according to an embodiment of the present disclosure; Figure 3 This is a flowchart illustrating a front-end rendering method for another intelligent agent according to an embodiment of the present disclosure; Figure 4 This is a flowchart illustrating a front-end rendering method for another intelligent agent according to an embodiment of the present disclosure; Figure 5 This is a flowchart illustrating a front-end rendering method for another intelligent agent according to an embodiment of the present disclosure; Figure 6 This is a schematic diagram of an architecture where the logic layer and UI layer are separated in an application example according to an embodiment of this disclosure; Figure 7 This is a schematic diagram illustrating front-end rendering based on a logic layer and UI layer separation architecture in an application example according to an embodiment of this disclosure; Figure 8 This is a schematic diagram illustrating a compound operation based on macro instructions in an application example according to an embodiment of the present disclosure; Figure 9 This is a schematic diagram of the composition structure of the front-end rendering apparatus for an intelligent agent according to an embodiment of the present disclosure; Figure 10 This is a block diagram of an electronic device used to implement the front-end rendering method of the intelligent agent according to embodiments of the present disclosure. Detailed Implementation

[0011] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0012] In this document, the term "and / or" merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The term "at least one" in this document indicates any combination of at least two of a plurality of elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" in this document refer to and distinguish between multiple similar technical terms, not to restrict the order or to limit there to only two. For example, "first feature" and "second feature" refer to two categories / two features; the first feature can be one or more, and the second feature can also be one or more.

[0013] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0014] According to embodiments of this disclosure, Figure 1 This is a schematic diagram of a distributed cluster processing scenario according to an embodiment of the present disclosure. The distributed cluster system is an example of a cluster system, and the diagram exemplarily describes a front-end rendering method for intelligent agents that can be performed using this distributed cluster system. This disclosure is not limited to front-end rendering methods for intelligent agents on a single machine or multiple machines; using distributed processing can further improve the efficiency of the front-end rendering method for intelligent agents. Figure 1As shown, this distributed cluster system includes multiple nodes (such as server cluster 101, server 102, server cluster 103, server 104, and server 105; server 105 can also connect to electronic devices, such as mobile phone 1051 and desktop computer 1052). Multiple nodes, as well as multiple nodes and connected electronic devices, can jointly execute one or more front-end rendering tasks for intelligent agents. Optionally, the multiple nodes in this distributed cluster system can adopt a data parallel processing method, allowing multiple nodes to execute front-end rendering tasks for intelligent agents based on the same processing method. Furthermore, one or more processing logics from the processing method can be distributed across multiple nodes to collaboratively complete the front-end rendering tasks for intelligent agents.

[0015] According to embodiments of this disclosure, a front-end rendering method for an intelligent agent is provided. Figure 2 This is a flowchart illustrating a front-end rendering method for an intelligent agent according to an embodiment of the present disclosure. This method can be applied to a front-end rendering device for an intelligent agent. For example, the device can be deployed on a terminal, server, or other processing device in a single-machine, multi-machine, or cluster system to perform the front-end rendering task for the intelligent agent. The terminal can be a user equipment (UE), mobile device, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, the method can also be implemented by a processor calling computer-readable instructions stored in memory. Figure 2 As shown, this method is applied to Figure 1 In any node or electronic device in the cluster system shown, the following are included: S201. Receive structured frame data including macro instructions, where macro instructions are instructions that combine the description of the agent's execution intent and execution result with front-end UI rendering instructions.

[0016] In some examples, structured frame data is a data packet generated by the agent backend after completing one or more tool calls, inference steps, or task executions, and is packaged according to a predefined format. It contains macro instructions.

[0017] In some examples, the front-end rendering engine can receive the aforementioned structured frame data continuously pushed by the agent's back-end server (such as a server with GenFlow as its core) in real time through the Server-Sent Events (SSE) interface.

[0018] In some examples, macro instructions are composite instruction structures that can integrate the agent's intent description (such as the semantic information "the agent is generating a PPT file") and the actual execution result description (such as "the PPT has been generated, with a total of 12 pages") with the corresponding front-end UI rendering instructions (such as "show the preview in card form and provide a download button") together. By packaging and deeply integrating these three types of information together through the macro instruction, the front-end rendering engine can obtain the relevant information of the agent (the intent description and the actual execution result description) and the front-end UI rendering instructions presented by the UI with a single macro instruction. This eliminates the need for the front-end rendering engine to perform additional semantic parsing of the agent's relevant information and matching between the front-end UI rendering instructions, thereby reducing the communication complexity between the front-end business side and the back-end server side.

[0019] S202. Parse the structured frame data and extract macro instructions from the structured frame data.

[0020] In some examples, after receiving structured frame data, the front-end rendering engine can parse it field by field according to the predefined frame data format specification to identify the macro instruction fields carried in the structured frame data, filter out irrelevant information such as network checksum headers and redundant fields, and extract the macro instruction fields from the structured frame data for use in subsequent UI dynamic rendering processes.

[0021] S203. The execution intent and execution result of the agent described by the macro instruction are used to perform dynamic UI rendering according to the UI rendering instruction.

[0022] In some examples, the front-end rendering engine reads the agent's execution intent and execution result description, as well as the corresponding UI rendering instructions, from the extracted macro instructions. Then, according to the specific instructions of the UI rendering instructions, it presents the agent's execution intent and execution result on the UI in a dynamic and visual way. For example, it displays the agent's reasoning steps in the form of a dynamic text stream and presents the final execution result in the form of a result card, so that users can perceive the agent's working process and output content in real time.

[0023] Addressing the technical pain points of related technologies: using hard-coded semantic display of intelligent agents and front-end UI rendering results in high coupling between intelligent agents and front-end rendering UI components, making it impossible to meet the adaptation requirements of multiple platforms (such as PC, mobile H5, and native App). This technical pain point can only be solved by modifying the intelligent agent processing logic or the front-end UI rendering framework code. However, the front-end rendering engine still needs to independently perform semantic parsing of intelligent agents and front-end UI rendering, which brings additional system overhead and system design complexity. To address this technical pain point, this disclosure employs a macro instruction mechanism that integrates and encapsulates the agent's execution intent and results output from the agent's backend server with UI rendering instructions. This enables the frontend rendering engine to simultaneously drive semantic display and UI rendering using unified structured frame data. Furthermore, the UI rendering instructions output from the agent's backend server directly and dynamically control the frontend UI rendering. This macro instruction-based UI dynamic rendering achieves complete decoupling between the agent's thought process, tool call results (i.e., the logic layer), and the frontend UI rendering (i.e., the UI layer), supporting multi-terminal reuse (multiple terminals can use the same logic layer without modifying the frontend UI rendering framework code). Compared to the hard-coding of related technologies, the macro instruction mechanism of this disclosure is non-hard-coded, reducing the system design complexity of the frontend rendering engine. The macro instruction mechanism also enables efficient collaborative processing of the agent's execution process and UI dynamic rendering without additional system overhead, while simultaneously improving the real-time responsiveness of the frontend rendering.

[0024] It should be noted that the macro instruction mechanism enables efficient collaborative processing between the agent's execution process and dynamic UI rendering. It also eliminates data structure differences between the agent's backend server output and the frontend UI rendering. The structured frame data returned by the backend server can directly drive the UI components of the frontend rendering engine for dynamic rendering, ensuring direct alignment of the data structures of the agent's backend server and the frontend rendering engine. Furthermore, it eliminates format and display gaps between the agent's backend server output and the frontend UI rendering. The unified intent stream dynamic data frames output by the backend server can be directly displayed by the frontend rendering engine without secondary parsing, ensuring seamless integration of the data structures and display between the agent's backend server and the frontend rendering engine. Finally, it eliminates the additional conversion overhead between the agent's backend server output and the frontend UI rendering. The structured results output by the backend server maintain consistency in format with the UI view state required by the frontend rendering engine, ensuring that the structured results are displayed immediately upon output.

[0025] According to embodiments of this disclosure, a front-end rendering method for an intelligent agent is provided. Figure 3 This is a flowchart illustrating another front-end rendering method for an intelligent agent according to an embodiment of the present disclosure. This method can be applied to a front-end rendering device for an intelligent agent, such as... Figure 3As shown, this method is applied to Figure 1 In any node or electronic device in the cluster system shown, the following are included: S301. Parse the structured frame data and extract the type field from the structured frame data.

[0026] In some examples, the structured frame data carries not only macro directives but also a type field for adapting to different UI components. This type field is an identifier that identifies the type of UI component corresponding to the current macro directive. For example, different values ​​of this type field correspond to various intelligent agent tool types, such as PPT generation tools (UI rendering is PPT display), Excel generation tools (UI rendering is Excel display), video generation tools (UI rendering is video display), audio generation tools (UI rendering is audio display), image generation tools (UI rendering is image display), thought process display tools (UI rendering is thought process display), and text output tools (UI rendering is text display). When parsing the structured frame data, the front-end rendering engine simultaneously extracts the type field so that it can subsequently find and load the matching target UI component class based on this type field.

[0027] S302. Find the target UI component class corresponding to the type field in the component mapping table.

[0028] In some examples, the component map is a pre-maintained mapping table between type fields and UI component classes, recording the specific UI component class name or reference corresponding to each type field. The front-end rendering engine uses the extracted type fields as indexes to search the component map table to locate the target UI component class that matches that type field.

[0029] In some examples, the component mapping table is pre-configurable, meaning it exists as a non-hardware-coded component mapping table, not as hardware-coded in the relevant technology. The component mapping table is used to store the mapping relationship between type fields and UI component classes, and supports dynamic expansion (newly registered UI component classes and their corresponding type fields can be added at any time).

[0030] S303. Load the corresponding UI component based on the target UI component class.

[0031] In some examples, the front-end rendering engine dynamically instantiates and loads the corresponding UI component based on the target UI component class it finds, and injects the UI component into the current rendering context for subsequent dynamic UI rendering based on macro instructions.

[0032] By adopting the embodiments of this disclosure, a type field can be introduced into the structured frame data, and combined with the component mapping table, the dynamic lookup and loading of UI components can be realized. This enables the front-end rendering engine to automatically match and load the most suitable UI component according to the different execution scenarios and output types of the intelligent agent. This avoids the limitations of hard-coding the UI component type and improves the flexibility and dynamic scalability of front-end UI component adaptation. It also supports the rapid access of new types of UI components by extending the type field and the component mapping table without modifying the core rendering logic.

[0033] According to embodiments of this disclosure, a front-end rendering method for an intelligent agent is provided. Figure 4 This is a flowchart illustrating another front-end rendering method for an intelligent agent according to an embodiment of the present disclosure. This method can be applied to a front-end rendering device for an intelligent agent, such as... Figure 4 As shown, this method is applied to Figure 1 In any node or electronic device in the cluster system shown, the following are included: S401. Receive structured frame data including macro instructions, where macro instructions are instructions that combine the description of the agent's execution intent and execution result with front-end UI rendering instructions.

[0034] S402. Parse the structured frame data and extract macro instructions from the structured frame data.

[0035] S403. Parse the structured frame data and extract the type field from the structured frame data.

[0036] S404. Find the target UI component class corresponding to the type field in the component mapping table.

[0037] S405. Load the corresponding UI component based on the target UI component class.

[0038] S406. The execution intent and execution result of the agent described by the macro instruction are used to perform dynamic UI rendering based on UI rendering instructions and UI components.

[0039] In some examples, after loading the target UI component, the front-end rendering engine takes the agent's execution intent and execution result carried in the macro instruction as data input, and uses the UI rendering instruction as the basis for controlling the rendering behavior, driving the target UI component to present the agent's execution intent and execution result as dynamic visual content in the UI according to the rendering method specified by the UI rendering instruction. For example, if the UI rendering instruction indicates that the current rendering mode is "PPT", then the corresponding PPT will be driven to generate UI components that dynamically display the reasoning process description and execution result of the intelligent agent; if the UI rendering instruction indicates that the current rendering mode is "Excel", then the corresponding Excel will be driven to generate UI components that dynamically display the reasoning process description and execution result of the intelligent agent; if the UI rendering instruction indicates that the current rendering mode is "Video", then the corresponding video will be driven to generate UI components that dynamically display the reasoning process description and execution result of the intelligent agent; if the UI rendering instruction indicates that the current rendering mode is "Audio", then the corresponding audio will be driven to generate UI components that dynamically display the reasoning process description and execution result of the intelligent agent; if the UI rendering instruction indicates that the current rendering mode is "Image", then the corresponding image will be driven to generate UI components that dynamically display the reasoning process description and execution result of the intelligent agent; if the UI rendering instruction indicates that the current rendering mode is "Thinking Process", then the corresponding Thinking Process will be driven to generate UI components that dynamically display the reasoning process description and execution result of the intelligent agent; if the UI rendering instruction indicates that the current rendering mode is "Text", then the corresponding text will be driven to generate UI components that dynamically display the reasoning process description and execution result of the intelligent agent.

[0040] By employing the embodiments of this disclosure, the semantic data in macro instructions, UI rendering instructions, and dynamically loaded target UI components are collaboratively processed to jointly drive the dynamic UI rendering of the front-end rendering engine. This achieves decoupling and collaboration in three dimensions: the semantic content of the agent's execution result, the control of rendering behavior, and the presentation of specific UI components. As a result, the rendering result can accurately reflect the execution semantics of the agent and be presented in a UI form that is highly matched with the execution type. This significantly improves the accuracy of visualization of the agent's execution process and the richness of the user interface.

[0041] In one embodiment of this disclosure, the component mapping table is a pre-configured non-hardware coded structure that supports dynamic registration of the mapping relationship between the type field of a new UI component and the corresponding new UI component class at runtime.

[0042] In some examples, the component mapping table is implemented using a non-hard-coded, extensible configuration structure (such as a hash table, JSON configuration table, or registry center), rather than fixing the correspondence between UI component types and classes in the code using conditional statements (if-else or switch-case). This non-hard-coded structure of the component mapping table remains open during front-end rendering engine runtime, allowing external modules or plugins to dynamically write the type field identifier and corresponding UI component class of new UI components into the component mapping table at runtime via a standard registration interface. This enables real-time registration of new types of UI components without requiring application restarts or modifications to the core rendering code of the front-end rendering engine, allowing newly registered UI components to be correctly found and loaded in subsequent rendering processes.

[0043] By employing the embodiments of this disclosure, a non-hard-coded, dynamically extensible component mapping table can be used to support dynamic registration of new UI component types at runtime. This gives the front-end rendering engine a high degree of openness and extensibility. Developers or third-party plugins can extend new UI component types as needed without modifying the core rendering logic of the front-end rendering engine, thereby significantly reducing the access cost of new UI components and improving the front-end rendering engine's adaptability to intelligent agent capability iteration and rapid support for new rendering scenarios.

[0044] In one embodiment of this disclosure, the front-end rendering engine can adopt a structure that decouples the logic layer corresponding to the intelligent agent from the UI layer corresponding to front-end rendering. The logic layer corresponding to the intelligent agent includes at least two of the following: a tool abstraction manager, an event bus, an interceptor pipeline, a schedule queue, and a plugin system. The UI layer corresponding to front-end rendering is used to adapt to the UI layers of different terminals to support multi-terminal reuse using the same logic layer corresponding to the intelligent agent across at least two terminals, including PC, mobile, native app, and cloud storage.

[0045] In some examples, the front-end rendering engine adopts a two-layer architecture with decoupled logic layer corresponding to the aforementioned agent and UI layer corresponding to the aforementioned front-end rendering. The logic layer corresponding to the agent is responsible for carrying the agent's core operational logic, including tool invocation management, event dispatch, command interception, task scheduling, and plugin extension functions. It can consist of at least two functional modules from the tool abstraction manager, event bus, interceptor pipeline, schedule queue, and plugin system. Through the cooperation between these modules, they jointly support the complete lifecycle management of the agent's execution intent. The UI layer corresponding to the front-end rendering focuses on UI rendering implementation for specific terminals, providing adapted UI layer implementations for different terminals such as PC, mobile, and native App. All terminals' UI layers share the same set of execution logic from the logic layer, achieving "one set of logic, multiple terminals reuse" without requiring modification of the front-end rendering engine's core rendering logic for different terminals.

[0046] In some examples, the logic layer corresponding to the aforementioned agent and the UI layer corresponding to the aforementioned front-end rendering can communicate through a standardized interface protocol. The logic layer corresponding to the agent provides a unified data output interface for each terminal UI layer to subscribe to, while the UI layer corresponding to the front-end rendering transmits user interaction behavior to the logic layer corresponding to the agent through a standardized event reporting interface. This forms a clear boundary of responsibility between the logic layer corresponding to the agent and the UI layer corresponding to the front-end rendering, avoiding the problems caused by the coupling between UI rendering logic and agent business logic in related technologies. Related technologies can only be implemented by additionally modifying the UI rendering logic and / or agent business logic, which increases the complexity of system design.

[0047] The embodiments of this disclosure employ a two-layer architecture that decouples the logic layer corresponding to the intelligent agent from the UI layer corresponding to the front-end rendering. This completely decouples the core business logic of the intelligent agent from the UI rendering of each terminal, eliminating the problem of repeated implementation of the core business logic of the intelligent agent due to UI differences between different terminals in cross-platform development. This allows the logic layer corresponding to the intelligent agent to be developed once and reused on multiple platforms, thereby reducing the development and maintenance costs of multi-platform adaptation. Moreover, the responsibilities of the logic layer corresponding to the intelligent agent and the UI layer corresponding to the front-end rendering are clearly defined, improving the maintainability, testability, and modularity of the overall system, and providing a better architectural foundation for subsequent intelligent agent capability expansion and rapid access to new terminal types.

[0048] In one embodiment of this disclosure, the method further includes: encapsulating each type of intelligent agent capability into an independent tool object according to the tool abstraction manager, so that each tool object has a unified calling interface.

[0049] In some examples, the agent possesses multiple different types of capabilities, such as file reading and writing, network requesting, database querying, and code execution. The tool abstraction manager is responsible for encapsulating each type of agent capability into a separate tool object. Each tool object internally encapsulates the specific implementation logic of that capability while exposing a unified and standardized calling interface (such as a unified input parameter format, a unified return value structure, and a unified exception handling specification). When calling any type of agent tool capability, the caller (such as a planning queue or interceptor pipeline in the logic layer) can interact through the same unified calling interface without needing to know the specific implementation differences within each tool object.

[0050] By adopting the embodiments of this disclosure, various intelligent agent capabilities are encapsulated into independent tool objects with a unified calling interface through a tool abstraction manager. This achieves standardization and abstraction of various heterogeneous capabilities of intelligent agents at the calling level, so that the logic layer corresponding to the intelligent agent does not need to perform differentiated adaptation for each tool when scheduling different types of intelligent agent tools, reducing the coupling of tool calls. Moreover, each tool object is independently encapsulated and registered on demand. The access of new tools does not affect the operation of existing tools, improving the scalability of intelligent agent capabilities and the stability of the overall system.

[0051] In one embodiment of this disclosure, the method further includes: broadcasting the lifecycle and state changes of UI components to data subscribers according to the event bus, so as to support collaborative updates among multiple UI components.

[0052] In some examples, UI components can broadcast corresponding event notifications to all data subscribers that have subscribed to this type of event via the event bus at various stages of their lifecycle (such as creation, mounting, updating, and unmounting) and when their internal state changes (such as data loading completion or user interaction triggering a state switch). Data subscribers can be other UI components, logic layer modules, or state management modules. Upon receiving the event notification, each data subscriber independently executes the corresponding response logic based on the event content, thereby achieving a collaborative update mechanism where multiple UI components do not need to directly reference each other and collaborate decoupled through the event bus.

[0053] By adopting the embodiments of this disclosure, an event bus mechanism is introduced to broadcast the lifecycle and state changes of UI components to each data subscriber, thereby achieving loosely coupled collaborative updates between multiple UI components based on the "publish-subscribe" model. This avoids the strong dependencies caused by direct calls between UI components, ensuring the independence of each UI component. Moreover, the event bus mechanism supports one-to-many broadcast notifications, enabling a state change of one UI component to synchronously drive the linked updates of multiple UI-related components, improving the response efficiency and consistency of collaborative rendering of multiple UI components.

[0054] In one embodiment of this disclosure, the method further includes: sequentially executing multiple composite operations indicated in the macro instructions according to the interceptor pipeline, so as to dynamically adjust the interactive logic and UI component behavior of the front-end rendering at runtime.

[0055] In some examples, macros can contain multiple compound operations that need to be executed sequentially in a specific order, such as an ordered chain of operations like "permission verification → data preprocessing → pre-rendering transformation → rendering → post-rendering cleanup". The interceptor pipeline consists of a set of interceptor nodes arranged in a predetermined order. Each interceptor node is responsible for handling compound operations at a specific point in the pipeline. The execution flow of the macro passes through each interceptor node sequentially. Each interceptor node can dynamically adjust the interactive logic or UI component behavior in the current execution flow at runtime, such as injecting additional data transformation logic, dynamically modifying rendering parameters, or intercepting and replacing the behavior of specific UI components, thereby achieving flexible intervention and dynamic control over the front-end rendering process.

[0056] By employing the embodiments of this disclosure, multiple composite operations in macro instructions are arranged and executed in an orderly manner through an interceptor pipeline. It also supports dynamic adjustment of interaction logic and UI component behavior by each interceptor node at runtime, enabling the front-end rendering engine to have fine-grained control over complex rendering processes. Furthermore, through the pluggable design of the interceptors, developers can flexibly insert or remove specific processing logic in the rendering pipeline without modifying the core rendering logic, significantly improving the customizability and runtime adaptability of the front-end rendering engine.

[0057] In one embodiment of this disclosure, the method further includes: when a first agent tool in the planning queue is detected to have failed to execute, automatically skipping the first agent tool according to the planning queue, and continuing to execute other agent tools in the planning queue that are ordered after the first agent tool.

[0058] In some examples, the planning queue maintains the execution plan for multiple agent tools that the agent needs to call sequentially during the current task execution. Each agent tool is arranged in the planning queue according to a predetermined order and waits to be executed in sequence. When the queue scheduler detects that a certain agent tool (i.e., the first agent tool) fails during execution (e.g., the first agent tool timeout, the first agent tool returns an exception status code, the first agent tool's execution result does not meet expectations), the planning queue will not interrupt the overall task execution flow due to the failure of a single first agent tool. Instead, it automatically marks the first agent tool as skipped and continues to advance according to the predetermined order, executing other agent tools in the planning queue after the first agent tool in sequence, thus ensuring the continuity of the overall task execution flow.

[0059] In some examples, while automatically skipping the first agent tool, the failure information of the first agent tool can be recorded and broadcast to the UI layer via the event bus, so that the front-end rendering engine can promptly display the corresponding prompt information of the first agent tool's execution failure on the UI. This allows users to perceive the specific agent tool's execution abnormality in real time, rather than continuing to wait, thus avoiding the overall task from stalling and becoming unresponsive.

[0060] By adopting the embodiments of this disclosure, an automatic skip mechanism for the failure of a single agent tool is introduced into the planning queue, so that the execution process of the agent task can still maintain the continuous progress of the overall task even if a local agent tool call fails. This avoids the problem of the overall task being interrupted and the user waiting for no response due to the abnormal execution of a single agent tool. It significantly improves the robustness and fault tolerance of the front-end rendering engine in complex multi-tool execution scenarios and improves the user experience when a local abnormality occurs in the execution of the agent.

[0061] In one embodiment of this disclosure, the method further includes: registering the new intelligent agent tool in the form of a plug-in according to the plug-in system.

[0062] In some examples, the plugin system provides a standardized plugin registration and management mechanism for the front-end rendering engine. Developers or third-party modules can encapsulate the implementation logic of new intelligent agent tools according to the plugin specifications defined by the plugin system (such as a unified plugin entry format, tool description metadata structure, tool capability declaration interface, etc.) to form an independent plugin package. At runtime, by calling the standard registration interface provided by the plugin system, the new intelligent agent tools declared in the plugin package are registered to the tool object library of the tool abstract manager. This allows the new intelligent agent tools to be called on demand by the logic layer's planning queue or other scheduling modules after registration, without requiring any modification to the core code of the front-end rendering engine or a service restart.

[0063] By adopting the embodiments of this disclosure, the dynamic registration of new intelligent agent tools is supported in the form of plug-ins through a plug-in system, which enables the front-end rendering engine to have an open tool capability extension mechanism. Developers can independently develop and connect new intelligent agent tools in real time without modifying the core code of the front-end rendering engine, which greatly reduces the threshold and risk of intelligent agent capability extension. Moreover, the plug-in registration method supports the on-demand loading and independent unloading of new intelligent agent tool capabilities, which is conducive to the rational use of system resources and the modular management of intelligent agent tool capabilities, and provides a flexible and efficient extension foundation for the continuous iterative evolution of intelligent agent capabilities.

[0064] According to embodiments of this disclosure, a front-end rendering method for an intelligent agent is provided. Figure 5 This is a flowchart illustrating another front-end rendering method for an intelligent agent according to an embodiment of the present disclosure. This method can be applied to a front-end rendering device for an intelligent agent, such as... Figure 5 As shown, this method is applied to Figure 1 In any node or electronic device in the cluster system shown, the following are included: S501. Based on the tool abstract manager, each type of intelligent agent capability is encapsulated into an independent tool object so that each tool object has a unified calling interface.

[0065] In some examples, the agent possesses multiple different types of capabilities, such as file reading and writing, network requesting, database querying, and code execution. The tool abstraction manager is responsible for encapsulating each type of agent capability into a separate tool object. Each tool object internally encapsulates the specific implementation logic of that capability while exposing a unified and standardized calling interface (such as a unified input parameter format, a unified return value structure, and a unified exception handling specification). When calling any type of agent tool capability, the caller (such as a planning queue or interceptor pipeline in the logic layer) can interact through the same unified calling interface without needing to know the specific implementation differences within each tool object.

[0066] S502. Based on the event bus, broadcast the lifecycle and state changes of UI components to data subscribers to support collaborative updates between multiple UI components.

[0067] In some examples, UI components can broadcast corresponding event notifications to all data subscribers that have subscribed to this type of event via the event bus at various stages of their lifecycle (such as creation, mounting, updating, and unmounting) and when their internal state changes (such as data loading completion or user interaction triggering a state switch). Data subscribers can be other UI components, logic layer modules, or state management modules. Upon receiving the event notification, each data subscriber independently executes the corresponding response logic based on the event content, thereby achieving a collaborative update mechanism where multiple UI components do not need to directly reference each other and collaborate decoupled through the event bus.

[0068] S503. According to the interceptor pipeline, execute multiple compound operations indicated in the macro instructions in sequence to dynamically adjust the interactive logic and UI component behavior of the front-end rendering at runtime.

[0069] In some examples, macros can contain multiple compound operations that need to be executed sequentially in a specific order, such as an ordered chain of operations like "permission verification → data preprocessing → pre-rendering transformation → rendering → post-rendering cleanup". The interceptor pipeline consists of a set of interceptor nodes arranged in a predetermined order. Each interceptor node is responsible for handling compound operations at a specific point in the pipeline. The execution flow of the macro passes through each interceptor node sequentially. Each interceptor node can dynamically adjust the interactive logic or UI component behavior in the current execution flow at runtime, such as injecting additional data transformation logic, dynamically modifying rendering parameters, or intercepting and replacing the behavior of specific UI components, thereby achieving flexible intervention and dynamic control over the front-end rendering process.

[0070] S504. When the execution of the first agent tool in the planning queue is detected to have failed, the first agent tool is automatically skipped according to the planning queue, and other agent tools in the planning queue that are ordered after the first agent tool are executed.

[0071] In some examples, the planning queue maintains the execution plan for multiple agent tools that the agent needs to call sequentially during the current task execution. Each agent tool is arranged in the planning queue according to a predetermined order and waits to be executed in sequence. When the queue scheduler detects that a certain agent tool (i.e., the first agent tool) fails during execution (e.g., the first agent tool timeout, the first agent tool returns an exception status code, the first agent tool's execution result does not meet expectations), the planning queue will not interrupt the overall task execution flow due to the failure of a single first agent tool. Instead, it automatically marks the first agent tool as skipped and continues to advance according to the predetermined order, executing other agent tools in the planning queue after the first agent tool in sequence, thus ensuring the continuity of the overall task execution flow.

[0072] In some examples, while automatically skipping the first agent tool, the failure information of the first agent tool can be recorded and broadcast to the UI layer via the event bus, so that the front-end rendering engine can promptly display the corresponding prompt information of the first agent tool's execution failure on the UI. This allows users to perceive the specific agent tool's execution abnormality in real time, rather than continuing to wait, thus avoiding the overall task from stalling and becoming unresponsive.

[0073] S505. Based on the plug-in system, register the new intelligent agent tool in the form of a plug-in.

[0074] In some examples, the plugin system provides a standardized plugin registration and management mechanism for the front-end rendering engine. Developers or third-party modules can encapsulate the implementation logic of new intelligent agent tools according to the plugin specifications defined by the plugin system (such as a unified plugin entry format, tool description metadata structure, tool capability declaration interface, etc.) to form an independent plugin package. At runtime, by calling the standard registration interface provided by the plugin system, the new intelligent agent tools declared in the plugin package are registered to the tool object library of the tool abstract manager. This allows the new intelligent agent tools to be called on demand by the logic layer's planning queue or other scheduling modules after registration, without requiring any modification to the core code of the front-end rendering engine or a service restart.

[0075] By employing the embodiments of this disclosure, a tool abstraction manager, event bus, interceptor pipeline, schedule queue, and plugin system are integrated. By encapsulating each type of agent capability into an independent tool object and providing a unified calling interface, standardized management and decoupling of agent capabilities are achieved. Subsequent additions or replacements of tools do not require modification of the upper-layer calling logic, thus improving the flexibility and maintainability of tool integration. The event bus broadcasts the lifecycle and state changes of UI components to data subscribers, enabling loosely coupled collaborative updates among multiple UI components. A change in the state of any UI component automatically triggers responses from other related UI components, improving the real-time performance and interaction consistency of front-end rendering. The interceptor pipeline executes multiple compound operations in macro instructions sequentially, enabling dynamic adjustment of the front-end rendering interaction logic and UI at runtime. Component behavior allows developers to flexibly insert or modify interception logic (such as permission verification, data preprocessing, and exception fallback), enabling dynamic control over the front-end rendering process and enhancing the system's orchestration and dynamic adaptability. When the first agent tool in the planning queue fails, it is automatically skipped and subsequent agent tools in the planning queue are executed, avoiding interruption of the overall task flow due to single point of failure. The registration of new agent tools is performed through plugins, enabling dynamic loading and hot-swapping of new agent tools. New agent capabilities can be extended without modifying the core framework of the agent logic layer, reducing the system iteration threshold and enhancing the system's scalability.

[0076] The following provides an example of the front-end rendering method for the intelligent agent provided in the above-described embodiments.

[0077] Application example of this disclosure: Dynamic rendering of SSE data stream driven tool components. The intelligent agent's backend server (such as the GenFlow server) continuously pushes structured frame data through the SSE interface. Each frame carries a type field as a component routing key, and the frontend rendering engine dynamically mounts the corresponding UI components based on the type field. The structured frame data pushed through the SSE interface has the following format: { "type": "tool_ppt | tool_excel | tool_video | tool_audio | tool_image | thinking | text", "tool_id": "uuid", "is_end": false, "payload": { ...} / / Specific data for each tool } The natural language description of the above code is as follows: The agent's backend server pushes multiple types of output to the frontend rendering engine in real time using the defined structured frame data format. Upon receiving the structured frame data, the frontend rendering engine dynamically mounts the corresponding UI component based on the `type` field in the structured frame data and passes the payload to the UI component for rendering, thereby achieving real-time and accurate mapping between the agent's backend output and the frontend rendering display. The `type` field serves as the component routing key, determining which UI component renders the structured frame data. This `type` field includes, but is not limited to, output types such as: presentation tool (tool_ppt), table tool (tool_excel), video tool (tool_video), audio tool (tool_audio), image tool (tool_image), thought process tool (thinking), and text tool (text). "tool_id" serves as a unique identifier, used to associate multiple outputs of the same agent tool or agent task, facilitating tracking and management by the front-end rendering engine; "is_end" is a boolean value used to mark whether the output of the agent tool or agent task has ended, allowing the front-end rendering engine to determine whether to close the loading state or clean up temporary UI components; "payload" is an object type used to carry specific data content unique to each agent tool, and its structure changes dynamically depending on the type, for example, tool_image contains a Uniform Resource Locator (URL), tool_ppt contains slideshow data, etc.

[0078] Configure a non-hard-coded component mapping table in the front-end rendering engine, as shown below: type="tool_ppt" → <pptcomponent / > type="tool_excel" → <excelcomponent / > type="tool_video" → <videocomponent / > type="tool_audio" → <audiocomponent / > type="tool_image" → <imagecomponent / > type="thinking" → <thinkingcard / > type="text" → <textbubble / > In this application example, for a new agent type, you only need to define a new type field on the agent backend server side and configure a component mapping table with a non-hard-coded structure in the frontend rendering engine to add the corresponding new UI component for the new agent type. No framework code needs to be modified, which reduces the complexity of system design.

[0079] Application example of this disclosure: Architecture with separation of logic layer and UI layer Figure 6 This is a schematic diagram of an architecture where the logic layer and UI layer are separated in an application example according to an embodiment of this disclosure, such as... Figure 6 As shown, it includes: a UI layer 601 corresponding to front-end rendering, a logic layer 602 corresponding to the intelligent agent, and a structured frame data receiving layer 603. The UI layer 601, corresponding to front-end rendering, only transmits data and contains no logic. It is used to adapt the UI layer to different terminals to support multi-terminal reuse using the same logic layer corresponding to the intelligent agent across at least two of the following terminals: PC, mobile, native app, and cloud storage. The logic layer 602 corresponding to the intelligent agent includes at least two of the following: a tool abstraction manager, an event bus, an interceptor pipeline, a schedule queue, and a plugin system, and comprehensively executes the corresponding business logic. The structured frame data receiving layer 603 receives structured frame data, parses the frame type, and after an event is published, executes the intelligent agent tools and / or intelligent agent tasks sequentially according to the order in the schedule queue. If an execution failure occurs, it is skipped, and subsequent processing flows continue.

[0080] The tool abstraction manager encapsulates each agent's capabilities into an independent Tool object, including lifecycle hooks (onStart, triggered when the agent tool begins execution, used to create UI components, initialize dynamic loading, and generate a card placeholder; onUpdate, triggered when new data is added during agent tool execution, used to update progress, append content, refresh tables, and update previews; onEnd, triggered when the agent tool completes execution, used to close dynamic loading, display the final result, and show download / preview / confirm buttons; onError, triggered when the agent tool fails execution, used to display errors, allow retrying, and clean up abnormal states); the event bus decouples structured frame data, UI rendering, data layer event publishing, and UI layer subscription rendering in the SSE data stream; the interceptor pipeline executes risk control and commercial billing verification logic before structured frame data enters rendering; the plan queue manages the order and dependencies of multiple agents executing concurrently, preventing rendering race conditions; and the plugin system allows new Tools to register and integrate as plugins without modifying the framework code.

[0081] Figure 7 This is a schematic diagram illustrating front-end rendering based on a logic layer and UI layer separation architecture in an application example according to an embodiment of this disclosure, such as... Figure 7 As shown, it includes: S701: Receives structured frame data from the SSE data stream.

[0082] In some examples, a long SSE connection is established to listen for and receive real-time SSE data streams from the agent's backend server, thereby obtaining structured frame data from the SSE data stream.

[0083] S702. Parse the structured frame data and obtain the corresponding tool name (tool_name) based on the type field in the structured frame data.

[0084] In some examples, each frame of data in the received SSE data stream is decoded, the type field is extracted, and the type field is mapped to a specific tool name (such as tool_ppt, tool_excel, tool_video, etc.) to determine the subsequent processing logic.

[0085] S703 performs risk control verification and log recording on structured frame data through the interceptor pipeline.

[0086] S704. Through the event bus, the type data indicated by the type field extracted from the structured frame data is broadcast to the front-end UI components that have subscribed to the event, or is directly and precisely pushed to the front-end UI components that have subscribed to the event.

[0087] In some examples, the event bus can adopt a "plug-in" architecture, encapsulating functions such as PPT, video, and text as independent plug-ins and registering them on the event bus. A "planning queue" is used to manage the execution order of multi-turn dialogues or complex tasks, and a "failure skip" strategy is configured to avoid single points of failure and ensure the overall task flow remains uninterrupted.

[0088] S705-S708 loads different UI components, such as PPT components, video components, and text components, and dynamically renders them in the multi-terminal UI rendering layer.

[0089] Application example of this disclosure embodiment: Server intent pass-through driven by macro instructions The intelligent agent backend server supports the transmission of structured frame data (type=macro_instruction) including macro instructions in the SSE data stream. This is used to execute multiple compound operations defined in the macro instructions during front-end rendering (multiple UI actions, multiple component state changes, or adjustments to the organizational relationships between multiple components need to be completed when a macro instruction triggers front-end rendering, which constitutes multiple compound operations). The format of the structured frame data is as follows: { "type": "macro_instruction", "instructions": [ { "op": "replace_component", "target": "tool_ppt_v1", "new_type":"tool_ppt_v2"}, { "op": "scroll_to", "target": "latest_result"}, { "op": "show_toast", "message": "PPT generation complete"} ] } The corresponding natural language description for the above code is as follows: This structured frame data is used to execute multiple composite operations defined in the macro instructions during front-end rendering. Its format is a JSON object, including: a "type" field with a fixed value of "macro_instruction," used to identify that the structured frame data is a macro instruction type; the front-end rendering engine enters the macro instruction processing flow after receiving this structured frame data; and an "instructions" field as an array containing multiple sequentially executed instructions. Each instruction is an object containing the opcode "op" and its parameters, collectively defining the multiple UI actions, UI component state changes, or adjustments to the organizational relationships between UI components that need to be completed when a macro instruction is triggered. The three instructions in this structured frame data example are: "replace_component", which replaces the target component tool_ppt_v1 with the new component tool_ppt_v2, enabling dynamic upgrades or switching of UI components; "scroll_to", which scrolls the page to the target anchor point latest_result, making the latest result area visible; and "show_toast", which displays a Toast message saying "PPT generation is complete", to provide feedback to the user on the operation result.

[0090] After receiving the structured frame data including macro instructions, the front-end rendering engine sequentially executes multiple compound operations through the interceptor pipeline. It can execute these three instructions in the array order shown in the above structured frame data example, thereby completing multiple compound operations under a single macro instruction trigger. Based on macro instructions, the server can dynamically control the front-end rendering behavior and complete UI interaction logic and UI updates.

[0091] Figure 8 This is a schematic diagram illustrating a compound operation based on macro instructions in an application example according to an embodiment of this disclosure, such as... Figure 8 As shown, it includes: S801, Detected structured frame data "type = macro_instruction" containing macro instructions from the SSE data stream.

[0092] S802. The array "instructions[] array" of the "instructions" field is parsed by the macro instruction parser.

[0093] In some examples, the array "instructions[] array" of the "instructions" field is parsed to schedule the three instructions in the above structured frame data example: 1) "replace_component", which is used to replace the target component tool_ppt_v1 with the new component tool_ppt_v2 to realize the dynamic upgrade or switching of UI components; 2) "scroll_to", which is used to scroll the page to the target anchor latest_result to make the latest result area visible; 3) "show_toast", which is used to display a Toast message with the content "PPT generation has been completed".

[0094] S803. Perform the replacement component processing according to the "replace_component" instruction.

[0095] S804. Perform the scrolling to the target position (scroll_to) according to the "scroll_to" instruction.

[0096] S805. Execute the processing of the display prompt message (show_toast) according to the "show_toast" instruction.

[0097] S806: Execute each instruction in sequence and then update the UI state.

[0098] Application example of this disclosure: a unified software development kit (SDK) for a multi-terminal component library. To address the issue of multi-platform reuse across PC, mobile, native app, and cloud storage, a unified intelligent agent component SDK is adopted. Specifically, the logic layer corresponding to the intelligent agent is extracted into a platform-independent independent SDK package. Multiple terminals only need to implement the corresponding UI layer for front-end rendering, sharing the same set of state management and event handling logic for the same logic layer. For mobile terminals, further specific optimizations can be implemented, including: 1) SSE connection keep-alive during tab switching: When a user switches to another tab in a mobile browser or application, the original SSE data connection is kept intact to avoid interruption of real-time data flow due to foreground / background switching. This can be achieved by listening for page visibility change events and maintaining a heartbeat or pausing data processing in the background; 2) Automatic retry queue during network interruption: When the mobile terminal experiences a temporary network interruption (such as weak signal, switching between Wi-Fi / cellular networks), the connection is automatically detected as broken. SSE messages that were not successfully received during the interruption are temporarily stored in a local retry queue. After the network is restored, the SSE data connection is re-established in sequence, and unprocessed messages are retrieved from the queue for retry to ensure that data is not lost or duplicated.

[0099] Application example of this disclosure embodiment: component state flag control mechanism The display status of UI component libraries (such as audio playback components and search components) can be controlled by flags (isEnd, is_running, is_error). Multiple status fields can be changed in batches within the same frame of data, as shown below: { "type": "tool_audio", "tool_id": "audio_001", "payload": { "isEnd": true, "is_playing": false, "audio_url": "https: / / ..." } } The corresponding natural language description for the above code is as follows: The structured frame data is pushed via the SSE interface to achieve batch control of the display state of target UI components (such as audio playback components). The frame type "type" field of this structured frame data indicates "tool_audio," and the target UI component is uniquely identified by the "tool_id" field. The "payload" field contains multiple status flags to support batch updates within the same frame. The "isEnd" field is a boolean value used to mark whether the audio playback component has finished playing or the task has ended; the "is_playing" field is a boolean value used to mark whether it is currently in a playback state; the "audio_url" string is used to provide the network address of the audio file for the front-end to load and play. After receiving the structured frame data, the front-end rendering engine locates the corresponding audio playback component based on the "type" field and updates the display state of the UI component (such as stopping playback, hiding the progress bar, showing the audio source, etc.) all at once according to the multiple status fields in the "payload" field, thereby achieving efficient batch state changes. The front-end business side does not need to be aware of the internal implementation of the UI component; it only needs to set flags according to the protocol to control the lifecycle of the UI component.

[0100] According to embodiments of this disclosure, a front-end rendering apparatus for an intelligent agent is provided, which is applied to a front-end rendering engine. Figure 9 This is a schematic diagram of the composition structure of the front-end rendering device for an intelligent agent according to an embodiment of the present disclosure, such as... Figure 9As shown, the device includes: a receiving module 901, used to receive structured frame data including macro instructions, wherein the macro instructions are instructions that combine the description of the agent's execution intent and execution result with front-end UI rendering instructions; a parsing module 902, used to parse the structured frame data and extract the macro instructions from the structured frame data; and a rendering module 903, used to perform dynamic UI rendering based on the UI rendering instructions, using the execution intent and execution result of the agent described by the macro instructions.

[0101] In one implementation, the structured frame data also carries a type field for adapting to different UI components. The parsing module 902 is also used to parse the structured frame data, extract the type field from the structured frame data, look up the target UI component class corresponding to the type field in the component mapping table, and load the corresponding UI component according to the target UI component class.

[0102] In one implementation, the rendering module 903 is further configured to dynamically render the UI based on the execution intent and execution result of the agent described by the macro instruction, according to the UI rendering instruction and UI components.

[0103] In one implementation, the component mapping table is a pre-configured non-hardware coded structure that supports dynamic registration at runtime of the mapping relationship between the type field of a new UI component and the corresponding new UI component class.

[0104] In one implementation, the front-end rendering engine adopts a structure that decouples the logic layer corresponding to the intelligent agent from the UI layer corresponding to the front-end rendering; the logic layer corresponding to the intelligent agent includes at least two of the following: a tool abstraction manager, an event bus, an interceptor pipeline, a schedule queue, and a plugin system; the UI layer corresponding to the front-end rendering is used to adapt to the UI layers of different terminals to support multi-terminal reuse of at least two terminals, including PC, mobile, and native App, using the same logic layer corresponding to the intelligent agent.

[0105] In one embodiment, the apparatus further includes: a first processing module, configured to encapsulate each type of agent capability into an independent tool object according to the tool abstraction manager, so that each tool object has a unified calling interface.

[0106] In one embodiment, the apparatus further includes a second processing module, configured to broadcast the lifecycle and state changes of UI components to data subscribers according to an event bus, so as to support collaborative updates among multiple UI components.

[0107] In one embodiment, the apparatus further includes a third processing module, configured to sequentially execute multiple composite operations indicated in the macro instructions according to the interceptor pipeline, so as to dynamically adjust the interactive logic and UI component behavior of the front-end rendering at runtime.

[0108] In one embodiment, the apparatus further includes a fourth processing module, configured to automatically skip the first agent tool in the planning queue and continue executing other agent tools in the planning queue that are ordered after the first agent tool when the execution of the first agent tool in the planning queue is detected to have failed.

[0109] In one embodiment, the apparatus further includes a fifth processing module for performing the registration of a new intelligent agent tool in the form of a plug-in, according to a plug-in system.

[0110] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0111] The acquisition, storage, and application of any type of information, such as user personal information, involved in the technical solutions disclosed herein comply with relevant laws and regulations and do not violate public order and good morals.

[0112] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0113] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0114] like Figure 10 As shown, device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1002 or a computer program loaded into random access memory (RAM) 1003 from storage unit 1008. The RAM 1003 may also store various programs and data required for the operation of device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0115] Multiple components in device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of monitors, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0116] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as the agent front-end rendering method. For example, in some embodiments, the agent front-end rendering method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the agent front-end rendering method described above can be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the agent's front-end rendering method by any other suitable means (e.g., by means of firmware).

[0117] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0119] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0120] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0121] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0122] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0123] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0124] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A front-end rendering method for an intelligent agent, applied to a front-end rendering engine, comprising: Receive structured frame data including macro instructions, wherein the macro instructions are instructions that combine the description of the agent's execution intention and execution result with front-end user interface (UI) rendering instructions; Parse the structured frame data and extract the macro instructions from the structured frame data; The execution intent and execution result of the agent described by the macro instruction are used to perform dynamic UI rendering according to the UI rendering instruction.

2. The method according to claim 1, wherein the structured frame data further carries a type field for adapting to different UI components, and the method further includes: Parse the structured frame data and extract the type field from the structured frame data; Find the target UI component class corresponding to the type field in the component mapping table; Load the corresponding UI component based on the target UI component class.

3. The method according to claim 2, wherein, The step of dynamically rendering the UI based on the UI rendering instructions, using the execution intent and execution result of the agent described by the macro instructions, further includes: The execution intent and execution result of the agent described by the macro instruction are used to perform dynamic UI rendering based on the UI rendering instruction and the UI component.

4. The method according to claim 3, wherein, The component mapping table is a pre-configured non-hardware coded structure that supports dynamic registration of the mapping relationship between the type field of a new UI component and the corresponding new UI component class at runtime.

5. The method according to any one of claims 2-4, wherein, The front-end rendering engine adopts a structure that decouples the logic layer corresponding to the intelligent agent from the UI layer corresponding to the front-end rendering. The logical layer corresponding to the intelligent agent includes at least two of the following: tool abstraction manager, event bus, interceptor pipeline, schedule queue, and plugin system; The UI layer corresponding to the front-end rendering is used to adapt the UI layer of different terminals to support multi-terminal reuse of at least two terminals, including PC, mobile, native App, and cloud storage, using the logic layer corresponding to the same intelligent agent.

6. The method according to claim 5, further comprising: According to the tool abstract manager, each type of intelligent agent capability is encapsulated into an independent tool object, so that each tool object has a unified calling interface.

7. The method according to claim 5, further comprising: Based on the event bus, the lifecycle and state changes of UI components are broadcast to data subscribers to support collaborative updates among multiple UI components.

8. The method according to claim 5, further comprising: According to the interceptor pipeline, multiple compound operations indicated in the macro instructions are executed sequentially to dynamically adjust the interactive logic and UI component behavior of the front-end rendering at runtime.

9. The method according to claim 5, further comprising: When the execution of the first agent tool in the planning queue is detected to have failed, the first agent tool is automatically skipped according to the planning queue, and other agent tools in the planning queue that are ordered after the first agent tool are executed.

10. The method according to claim 5, further comprising: According to the plugin system, the registration of new intelligent agent tools is performed in the form of plugins.

11. A front-end rendering device for an intelligent agent, applied to a front-end rendering engine, comprising: The receiving module is used to receive structured frame data including macro instructions, wherein the macro instructions are instructions that combine the description of the agent's execution intention and execution result with the front-end user interface (UI) rendering instructions. The parsing module is used to parse the structured frame data and extract the macro instructions from the structured frame data; The rendering module is used to dynamically render the UI based on the execution intent and execution result of the agent described by the macro instruction, according to the UI rendering instruction.

12. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-10.

13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-10.

14. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-10.