A user-intention-based ui protocol generation method

CN122933765APending Publication Date: 2026-10-16XIAOMAN ANDA (SICHUAN) MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611225782.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]针对现有技术的不足,本申请的目的在于提供一种基于用户意图的UI协议生成方法,解决了现有技术如果一次性传输完整配置数据会增加前端的数据解析复杂度,导致程序运行难度加大的问题

Benefits of technology

本发明通过统一结构化UI协议数据一次性携带数据描述层、布局描述层和行为描述层,前端逐层解析后即可直接渲染完整可操作界面,无需二次获取数据,同时,通过分层设计的数据描述层数据、布局描述层数据和行为描述层数据,配合内嵌增量更新指令,在保证完整交互能力的前提下,降低了前端解析复杂度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933765A_ABST
    Figure CN122933765A_ABST
Patent Text Reader

Abstract

The application provides a user-intention-based UI protocol generation method, and relates to the technical fields of human-computer interaction and artificial intelligence.The application first acquires user-intention data, combines context state data to calculate and generate task planning data, then performs protocol assembly processing based on current running state data and the task planning data to generate unified structured UI protocol data containing data description layer, layout description layer and behavior description layer.The application uses the unified structured UI protocol with three layers of data description layer data, layout description layer data and behavior description layer data, so that a single standard message can carry all interface elements and generate a complete interactive interface, and the layered structure can also reduce the difficulty of front-end analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of human-computer interaction and artificial intelligence technology, specifically relating to a UI protocol generation method based on user intent. Background Technology

[0002] User-friendly interface (UI) generation refers to the technology of automatically constructing graphical user interfaces with interactive components by parsing structured configurations or AI-generated rules. It encapsulates components such as text boxes, buttons, and tables, along with their layouts, styles, data bindings, validation rules, and behavioral logic, into declarative descriptions. Based on standards such as UISchema, it supports nested layouts, conditional visibility, and dynamic data source binding. The front-end rendering engine dynamically instantiates these into a directly usable interface, allowing users to perform operations such as data entry, querying, and modification, and triggering backend API calls to form a complete business loop.

[0003] When AI and front-end pages work together to generate an operable interface, the AI ​​usually sends a layout rule for the page sections to the front-end first. The front-end then builds the basic framework of the page according to the rule. The specific content to be displayed on the page is then retrieved separately by the front-end. The reason for this approach is that the layout style of the page is generally not changed frequently, which reduces the amount of data that is repeatedly transmitted. If the complete operation execution rules are put into the configuration data and transmitted together, although an operable interface can be generated at once, it may increase the complexity of data parsing on the front-end and make the program more difficult to run. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the purpose of this application is to provide a UI protocol generation method based on user intent, which solves the problem that transmitting complete configuration data at once in existing technologies increases the complexity of front-end data parsing and makes program operation more difficult.

[0005] Firstly, the objective of this invention can be achieved through the following technical solution: a UI protocol generation method based on user intent, comprising: Obtain user intent data; Task planning data is calculated based on user intent data and contextual state data; Based on the current running status data and task planning data, protocol assembly processing is performed to generate unified structured UI protocol data; The unified structured UI protocol data includes data description layer data, layout description layer data, and behavior description layer data.

[0006] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the layout description layer data is organized using a component tree structure, including component type identification data, component attribute parameters, and container nesting hierarchy relationship data.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the data description layer data includes data source definition data, data model schema data, and binding path expression data; The data description layer data establishes a data mapping association with the corresponding component nodes in the layout description layer data by binding path expression data.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the behavior description layer data contains at least one type of interactive behavior instruction data, the types of which include agent inference call instruction data, workflow scheduling instruction data, HTTP interface request instruction data, front-end local execution instruction data, page navigation instruction data, and component event triggering instruction data.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: embedding incremental update instruction data into the unified structured UI protocol data; The incremental update instruction data includes node operation type identifier data and target node location data. The node operation type identifier data corresponds to node addition, node deletion, node replacement, and node attribute update, respectively.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: sending the unified structured UI protocol data to the front end, whereby the front end performs layer-by-layer parsing and processing of the data description layer data, layout description layer data, and behavior description layer data, and outputs interface rendering data.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: after outputting the output interface rendering data, receiving unified interactive event protocol data returned by the front end; The unified interactive event protocol data is generated by converting the original interface interaction operation data through a unified format encoding. Update the current running status data according to the unified interactive event protocol data; Based on the updated current running status data, the protocol assembly process is performed to generate updated unified structured UI protocol data.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the unified structured UI protocol data adopts a standardized JSON message format, and the message header includes a protocol type field and a protocol version field.

[0013] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the user intent data includes user input data or business request data.

[0014] Secondly, in order to achieve the above objectives, the present invention discloses a UI protocol generation system based on user intent, comprising: The intent acquisition module is used to acquire user intent data, which includes user input data or business request data. The task planning module is used to receive user intent data output by the intent acquisition module and generate task planning data by combining it with context state data. The protocol generation module is used to retrieve the current running status data, combine it with the task planning data output by the task planning module to perform protocol assembly processing, and generate unified structured UI protocol data; the unified structured UI protocol data includes data description layer data, layout description layer data, and behavior description layer data.

[0015] The beneficial effects of this application are: This invention uses a unified structured UI protocol to carry the data description layer, layout description layer, and behavior description layer all at once. The front end can directly render a complete and operable interface after parsing each layer, without the need to obtain data a second time. At the same time, by using the layered design of the data description layer, layout description layer, and behavior description layer, along with the embedded incremental update instructions, the complexity of front end parsing is reduced while ensuring complete interactive capabilities. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of the overall process of an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] Example 1: Reference Figure 1As shown, this invention proposes a UI protocol generation method based on user intent. This embodiment is specifically applied to the inventory management business scenario in the manufacturing industry. The specific process is as follows: This embodiment is built on a server-side intelligent agent runtime system and a client-side front-end runtime system. The two transmit standardized JSON-formatted unified structured UI protocol data packets through a WebSocket long connection link.

[0020] The server-side configuration includes an agent processing unit and a session state storage unit. The agent processing unit incorporates an intent parsing engine, a task planning engine, and a protocol assembly engine, which respectively handle intent standardization, task decomposition, and protocol assembly generation.

[0021] The intent parsing engine and task planning engine of the intelligent agent processing unit adopt a hybrid driven architecture of rule engine and large language model: basic intent classification, entity extraction and template matching are completed by the rule engine, which has three built-in intent classification systems: interface generation, data query and operation trigger. It extracts business entities such as warehouse and material categories through keyword matching and regular expression rules, and completes the initial matching of function points and interactive actions based on the preset component-interface mapping template. In complex semantic scenarios, the server-side large language model is called to perform completion reasoning. The model input data includes the original requirement, the current context state, the full component directory and interface directory. The output strictly follows the preset task planning JSON schema. The output results are checked for field integrity and format legality. If the check fails, a retry mechanism is triggered.

[0022] The session state storage unit is divided into a context storage area and a runtime state storage area. The context storage area persistently stores context state data, user permission scope, and information on loaded business modules. The runtime state storage area maintains current runtime state data in real time, including runtime temporary variables, component node mapping relationships, data source runtime status, and configuration data of user-accessible business resources.

[0023] The client-side front-end runtime system includes a built-in protocol parsing engine, a standard component library, a rendering engine, an event encoding unit, and a local state management unit. The standard component library pre-constructs common business components such as page containers, filter containers, dropdown selectors, data table components, and operation buttons. Each component has standardized attribute configuration items and event callback interfaces.

[0024] All transmitted message headers always include a protocol type field and a protocol version field, and also include an extended session unique identifier field for message type verification, version compatibility judgment, and session association matching.

[0025] Users input their natural language requirements in the front-end dialog input area: "Generate a raw material inventory warning panel to display materials that are below the safety stock level. Users can filter by warehouse and material category and click the button to generate a replenishment order."

[0026] The front-end collects the requirement text, along with the current session's unique identifier, user identity identifier, and current business module context information, and sends it to the server-side intent parsing engine via the communication link. The intent parsing engine performs format validation and session validity validation on the received data, extracts the valid requirement text, standardizes it to generate user intent data, and then outputs the generated user intent data to the task planning engine. The user intent data includes four items: the original requirement text, the session's unique identifier, the user identity identifier, and the business context.

[0027] The task planning engine retrieves context state data from the context storage area, combines it with received user intent data, performs intent recognition and task decomposition, and calculates and generates structured task planning data. Structured task planning data includes five components: One of the objectives is to generate an interactive inventory alert interface that includes filtering, data display, and replenishment triggering functions. The second is the data acquisition rule, which is to call the inventory warning query interface to obtain data. The interface input parameters include warehouse code and material category code, and the returned fields include material code, material name, current inventory quantity, safety stock threshold, and inventory shortage quantity. The third is the interface component composition scheme, that is, the interface is divided from top to bottom into a top statistics area, a filtering area, a data display area, and an operation area, with each area matching a corresponding functional component; The fourth is the interactive action configuration scheme, namely, refreshing the data table component when the filter conditions change, triggering the generation of the replenishment form when the operation button is clicked, and jumping to the material details page when the table row is clicked; Fifthly, there is the protocol output specification, which is a unified structured UI protocol with three layers: output data, layout, and behavior.

[0028] The protocol assembly engine retrieves the current running status data from the running status storage area, including the list of user-accessible warehouses, the list of material categories, the catalog of available components, and the initial values ​​of runtime variables. Combined with structured task planning data, it executes the protocol assembly process in the order of data description layer, layout description layer, and behavior description layer to generate complete unified structured UI protocol data.

[0029] The unified structured UI protocol data adopts a standardized JSON message format. The message header sets a protocol type field, a protocol version field, and a session unique identifier field. The message body consists of three independent data description layers, a layout description layer, and a behavior description layer.

[0030] The data description layer contains data source definition data, data model schema data, and binding path expression data.

[0031] The data source is defined as the data registration and inventory early warning data source. It is configured with a unique data source code, data acquisition method (HTTP interface), interface request address, request method, and input parameter association rules. The input parameters are respectively associated with the warehouse code variable and the material category code variable in the runtime variables.

[0032] The data model schema defines the field rules for the inventory warning data set, configuring the field name, data type, and value constraints for each field. Specifically, this includes the string type for material code, the string type for material name, the numeric type for current inventory quantity, the numeric type for safety stock threshold, and the numeric type for inventory shortage quantity.

[0033] The binding path expression data sets a unified path reference rule for each data field. The data description layer data establishes a data mapping relationship with the corresponding component nodes in the layout description layer data through the binding path expression data. The component properties in the layout description layer establish a mapping relationship with the corresponding data fields through this path reference rule. When the data changes, the display content of the corresponding component is updated synchronously.

[0034] This solution retains the HTTP interface data retrieval mechanism and uses a unified structured UI protocol to carry the interface structure, interaction configuration, and data source definition all at once. After the front end has finished parsing, it does not need to retrieve the interface structure and interaction configuration again. Business data is automatically retrieved by the front end according to the data source definition, which can reduce the overhead of repeated transmission.

[0035] The layout description layer is organized in a tree structure, with the page root container as the top-level node, nesting child containers and functional components at each level. Each node forms a complete component tree through parent-child relationships. Each component node is configured with a unique node code, component type identifier, and component attribute parameters, and carries container nesting hierarchy data through parent-child node relationships.

[0036] The specific component tree structure is as follows: the top-level node is the page root container, and the page title attribute is configured as "Raw Material Inventory Warning Panel".

[0037] The root container's child nodes are, in order: the top statistics container, the filter container, the data table component, and the operation bar container. The top statistics container contains two types of statistical value components: total inventory material categories and shortage material categories. These are used to display core inventory early warning indicators. The statistical values ​​are calculated locally based on the inventory early warning data set. The filter container is configured to be arranged horizontally, and its child nodes include warehouse drop-down selection components and material category drop-down selection components. The warehouse drop-down selection component's option list is a list of warehouses accessible to the user, with a default value of "all". The material category drop-down selection component's option list is a list of all material categories, with a default value of "all".

[0038] The data table component is configured with column configuration items corresponding to material code, material name, current inventory quantity, safety stock threshold, and inventory shortage quantity, respectively. The data source attribute of the data table component is associated with the inventory warning data set in the data description layer through a bound path expression. The operation bar container is configured with right alignment, and its child nodes contain a replenishment generation button component, with the button display text configured as "Generate Replenishment Order".

[0039] The behavior description layer contains several interactive behavior instructions. Each instruction is configured with four items: target object type, triggering event, behavior type, and execution content. The target object type is used to distinguish between component nodes and data sources. Data sources are set with independent encoding. The behavior parser routes to the corresponding component instance or data source manager based on the target object type.

[0040] The first instruction targets the warehouse dropdown selection component, triggers a value change event, executes locally on the front end, updates the warehouse code value in the local runtime variable, and triggers the inventory alert data source to reload data.

[0041] The second instruction targets the material category dropdown selection component, triggers a value change event, executes locally on the front end, updates the material category code value in the local runtime variable, and triggers the inventory alert data source to reload data.

[0042] The third instruction targets the data table component, triggers the component loading completion event, the behavior type is an HTTP interface request, and the execution content is to call the inventory warning query interface, obtain initial data, and populate it into the data table component.

[0043] The fourth instruction targets the database replenishment button component, triggers a click event, acts as an agent inference call, and encapsulates the current runtime variables and selected data in the table into event data, which is then sent to the server agent to trigger a new round of protocol generation.

[0044] The fifth instruction targets a row node in the data table component, is triggered by a row click event, is a page navigation behavior, and executes a jump to the details page of the corresponding material, carrying the material code parameter.

[0045] The sixth instruction targets the inventory warning data source, triggers the data loading completion event, uses a component event trigger as the behavior type, and executes the action of updating the values ​​of the statistical value component at the top of the page.

[0046] Incremental update instruction data is embedded in the unified structured UI protocol data. The incremental update instruction includes node operation type identifier, target node location data, and node change content data.

[0047] The node operation type identifiers correspond to four categories: node addition, node deletion, node replacement, and node attribute update. The target node location data is matched and located using the component's unique node code. When only partial changes occur to the interface, the protocol assembly engine generates unified structured UI protocol data that embeds incremental update instruction data. The front end only performs the corresponding operation on the target node and does not need to parse the full protocol.

[0048] The front-end protocol parsing engine receives unified structured UI protocol data, first verifies the protocol type and version number in the message header, and then performs layered parsing and rendering after the verification is successful.

[0049] The first step is to parse the data description layer: register all data sources in the local state management unit, initialize runtime variables, establish data validation rules based on the data model schema, parse the binding path expression, and establish reactive mapping relationships.

[0050] The second step is to parse the layout description layer: starting from the root container node, the component tree is traversed in a depth-first manner. Based on the component type identifier of each node, the corresponding component instance is matched from the standard component library. The node attribute parameters are assigned to the component instance to complete the actual value mapping of the binding path expression. The components are mounted to the page DOM nodes in sequence according to the nesting level of the component tree to form a complete interface structure.

[0051] The third step is to parse the behavior description layer: traverse all interactive behavior instructions, first determine the route direction based on the target object type, and locate the corresponding component instance by encoding the target node when the target object type is a component node; when the target object type is a data source, locate the corresponding data source manager by encoding the data source independently, bind the triggered event and the execution content into an event listener function, and attach it to the corresponding component instance.

[0052] After all three layers of parsing are completed, the rendering engine finishes drawing all interface elements and generates an interactive raw material inventory warning interface.

[0053] Users can select components from the warehouse dropdown menu and switch the value from "All" to "Raw Material Warehouse No. 1".

[0054] The front-end event encoding unit captures the value change event of the component, i.e., the original operation data of the interface interaction, extracts the changed value, and generates unified interaction event protocol data through unified format encoding conversion. The header of this data message includes a protocol type field, a protocol version field, and a session unique identifier field, while the message body includes the target node code, event type, and event payload parameters, and is sent to the server through the communication link. This embodiment adopts a server-side unified state control mechanism. After the front-end captures the event, it only performs a return operation and does not actively update local runtime variables or actively trigger the data source reload.

[0055] The server receives unified interactive event protocol data, parses the event payload content, and updates the value of the warehouse code variable in the current running status data.

[0056] The protocol assembly engine determined that this change only involved adjusting the data source parameters of the data table component and did not require modification to the interface layout structure. Therefore, it generated unified structured UI protocol data embedding incremental update command data. In the incremental update command data, the node operation type is "update node attribute," the target node is the data table component, and the update content is the query parameters of the data source.

[0057] After receiving the unified structured UI protocol data containing the embedded incremental update instruction data, the front end parses and extracts the incremental update instruction data, locates the data table component through the target node encoding, updates the query parameters of the data source and re-initiates the data request, only refreshing the data content within the data table component, while the rest of the page structure remains unchanged, thus completing a partial refresh.

[0058] When a user clicks the "Generate Database" button, the front-end generates unified interactive event protocol data according to the same rules and sends it back to the server. Upon receiving the event, the server-side agent re-executes intent parsing and task planning. The protocol assembly engine generates updated unified structured UI protocol data, including the database replenishment form structure, and sends it to the front-end. After parsing this unified structured UI protocol data, the front-end appends and renders the database replenishment form area at the bottom of the current page, achieving dynamic expansion of the interface.

[0059] By repeating the above interaction, feedback, and update process, continuous dynamic updates of the interface and gradual advancement of business processes can be achieved.

[0060] In the description of this specification, the references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0061] The foregoing has shown and described the basic principles, main features, and advantages of this application. Those skilled in the art should understand that this application is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this application. Various changes and modifications can be made to this application without departing from the spirit and scope thereof, and all such changes and modifications fall within the scope of the claims of this application.

Claims

1. A UI protocol generation method based on user intent, characterized in that, include: Obtain user intent data; Task planning data is generated based on user intent data and contextual state data. Based on the current running status data and task planning data, protocol assembly processing is performed to generate unified structured UI protocol data; The unified structured UI protocol data includes data description layer data, layout description layer data, and behavior description layer data.

2. The UI protocol generation method based on user intent according to claim 1, characterized in that, The layout description layer data is organized using a component tree structure, including component type identification data, component attribute parameters, and container nesting hierarchy data.

3. The UI protocol generation method based on user intent according to claim 2, characterized in that, The data description layer includes data source definition data, data model schema data, and binding path expression data. The data description layer data establishes a data mapping association with the corresponding component nodes in the layout description layer data by binding path expression data.

4. The UI protocol generation method based on user intent according to claim 1, characterized in that, The behavior description layer data includes at least one type of interactive behavior instruction data. The types of interactive behavior instruction data include agent inference call instruction data, workflow scheduling instruction data, HTTP interface request instruction data, front-end local execution instruction data, page navigation instruction data, and component event triggering instruction data.

5. The UI protocol generation method based on user intent according to claim 4, characterized in that, Incremental update instruction data is embedded in the unified structured UI protocol data; The incremental update instruction data includes node operation type identifier data and target node location data. The node operation type identifier data corresponds to node addition, node deletion, node replacement, and node attribute update, respectively.

6. The UI protocol generation method based on user intent according to claim 1, characterized in that, The unified structured UI protocol data is sent to the front end, which then performs layer-by-layer parsing and processing of the data description layer, layout description layer, and behavior description layer data to output the interface rendering data.

7. The UI protocol generation method based on user intent according to claim 6, characterized in that, After outputting the rendered data of the output interface, receive the unified interactive event protocol data returned by the front end; The unified interactive event protocol data is generated by encoding and converting the original interface interaction operation data in a unified format. Update the current running status data according to the unified interactive event protocol data; Based on the updated current running status data, the protocol assembly process is performed to generate updated unified structured UI protocol data.

8. The UI protocol generation method based on user intent according to claim 1, characterized in that, The unified structured UI protocol data adopts a standardized JSON message format, and the message header includes a protocol type field and a protocol version field.

9. The UI protocol generation method based on user intent according to claim 1, characterized in that, The user intent data includes user input data or business request data.

10. A UI protocol generation system based on user intent, characterized in that, include: The intent acquisition module is used to acquire user intent data, which includes user input data or business request data. The task planning module is used to receive user intent data output by the intent acquisition module and generate task planning data by combining it with context state data. The protocol generation module is used to retrieve the current running status data, combine it with the task planning data output by the task planning module, perform protocol assembly processing, and generate unified structured UI protocol data. The unified structured UI protocol data includes data description layer data, layout description layer data, and behavior description layer data.