Interactive interface generation method and system, computer equipment and medium

By unifying the processing of multi-protocol interaction requests and layered prompt word processing, combined with interface pattern definition instance generation and rendering output, the problems of insufficient protocol compatibility and natural language understanding in existing interface generation technologies are solved, thereby improving cross-platform compatibility and business response agility.

CN121704841APending Publication Date: 2026-03-20ZHEJIANG HUAYUN INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing interface generation technologies struggle to balance real-time performance and adaptability in highly dynamic, multi-terminal business scenarios. They suffer from weak protocol compatibility, insufficient understanding of natural language context, and inadequate dynamic interface adaptation capabilities, resulting in poor system scalability and interactive experience.

Method used

By unifying the processing of multi-protocol interaction requests, handling layered prompt words, generating interface mode definition instances, and coordinating the rendering output, we have achieved in-depth analysis of user intent and dynamic, standardized definition of interface structure, ensuring cross-platform compatibility and agile business response.

Benefits of technology

It improves the intelligence level of interface generation and system scalability, realizes end-to-end intelligent generation from natural language to interactive interface, and ensures adaptive presentation and protocol compatibility on multiple terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121704841A_ABST
    Figure CN121704841A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent interface generation, in particular to an interactive interface generation method and system, computer equipment and a medium. The method comprises the following steps: receiving a multi-protocol interaction request, and extracting natural language context information carried in the multi-protocol interaction request through a protocol processing layer; according to the natural language context information, executing cue word processing to generate interface generation trigger judgment; when the interface generation trigger judgment indicates that an interface needs to be generated, generating an interface mode definition instance based on the natural language context information and a preset cue word template; and according to the interface mode definition instance, generating an interactive interface through a rendering output device. In this way, the technical problem that in an existing interface generation technology based on natural languages, it is difficult to collaboratively optimize the interface dynamic adaptation capacity and the system expansibility is solved, and the intelligent level, cross-platform compatibility and service response agility of interface generation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent interface generation technology, and in particular to an interactive interface generation method, system, computer device, and medium. Background Technology

[0002] With the rapid development of artificial intelligence, natural language processing, and large-scale modeling technologies, human-computer interaction is gradually shifting towards a mainstream approach centered on "natural language plus intelligent interfaces." Users expect to obtain personalized, dynamically adapted user interfaces in real time through conversational and context-aware interactions, thereby significantly improving business efficiency and user experience. However, existing interface development and interaction solutions generally suffer from high technical barriers, significant response latency, limited scalability, and insufficient standardization, making it difficult to meet the actual needs of future intelligentization, automation, and multi-terminal integration.

[0003] In the field of interface generation and interaction technology, existing methods have achieved a certain foundation. Reference document 1 (application publication number CN119645406A) discloses an interface generation system based on a Large Language Model (LLM), which achieves code generation based on limited interface descriptions through the collaboration of multiple modules such as the user layer, data acquisition layer, and parameter processing layer. This system can automatically generate interface components using AI and combine them into complete interface code through templates, thus lowering the development threshold to some extent. However, this method is mainly aimed at static interface description scenarios, and its feature processing logic is more suitable for simple applications of preset templates, failing to fully consider the highly dynamic characteristics of natural language in complex business environments and the actual needs of multi-protocol integration. Specifically, existing technologies have two prominent problems: firstly, their ability to understand natural language context is limited, making it difficult to effectively handle semantic redundancy and intent drift in long-term dialogues, resulting in insufficient accuracy in interface generation; secondly, the lack of a unified protocol adaptation mechanism makes it difficult for interface components to dynamically adapt to data formats and interaction protocols of different platforms, limiting the feasibility of cross-system integration.

[0004] The aforementioned problems are intertwined, making it difficult for existing technologies to balance real-time interface generation and adaptability when dealing with highly dynamic and multi-platform business scenarios, and thus unable to support closed-loop management of complex human-computer interactions. Therefore, existing natural language-based interface generation technologies suffer from the technical challenge of synergistically optimizing interface dynamic adaptation capabilities and system scalability. Summary of the Invention

[0005] In view of the above-mentioned shortcomings or disadvantages, the present invention provides an interactive interface generation method, system, computer device and medium, which can solve the technical problem that the dynamic adaptation capability of the interface and the scalability of the system are difficult to optimize in a coordinated manner in the existing natural language-based interface generation technology.

[0006] This invention provides a method for generating an interactive interface, comprising: It receives multi-protocol interaction requests and extracts the natural language context information carried in the multi-protocol interaction requests through the protocol processing layer.

[0007] Based on natural language context information, prompt word processing is performed to generate interface generation trigger judgments, which are used to identify interface generation requirements based on user intent.

[0008] When the interface generation trigger indicates that an interface needs to be generated, an interface pattern definition instance is generated based on natural language context information and preset prompt word templates. The interface pattern definition instance is a standardized interface structure description used to define the layout structure and component types of the interface.

[0009] Based on the interface pattern definition instance, an interactive interface is generated through the render outputter.

[0010] According to a second aspect, the present invention provides an interactive interface generation system, comprising: The natural language extraction module is used to receive multi-protocol interaction requests and extract the natural language context information carried in the multi-protocol interaction requests through the protocol processing layer.

[0011] The trigger judgment generation module is used to perform prompt word processing based on natural language context information to generate interface generation trigger judgment. The interface generation trigger judgment is used to identify interface generation requirements based on user intent.

[0012] The interface instance generation module is used to generate an interface pattern definition instance based on natural language context information and preset prompt word templates when the interface generation triggers a judgment indicating that an interface needs to be generated. The interface pattern definition instance is a standardized interface structure description used to define the layout structure and component types of the interface.

[0013] The interactive interface generation module is used to generate an interactive interface by defining an instance based on the interface mode and using a renderer.

[0014] According to a third aspect, the present invention provides a computer device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform any of the interactive interface generation methods in the embodiments of the present invention.

[0015] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute any of the interactive interface generation methods in the embodiments of the present invention.

[0016] The present invention provides a method for generating an interactive interface, which is achieved through four core steps: receiving and extracting context from multi-protocol interaction requests, processing prompt words and generating trigger judgments, generating interface pattern definition instances, and rendering the interactive interface. Specifically, the method involves receiving multi-protocol interaction requests and extracting natural language context information through a protocol processing layer to achieve unified processing and intent information collection for interaction requests from different sources; processing prompt words based on the natural language context information to generate interface generation trigger judgments, which are used to intelligently identify interface generation requirements based on user intent; when the trigger judgment indicates that an interface needs to be generated, generating interface pattern definition instances based on the natural language context information and preset prompt word templates to produce standardized interface structure descriptions; and generating an interactive interface through a rendering outputter based on the interface pattern definition instances, ultimately outputting an interactive interface adapted to multiple platforms.

[0017] In this technical solution, the present invention addresses the problem of poor system scalability caused by weak protocol compatibility as described in the background art. It establishes a unified entry point to adapt to the Agent-to-Agent Protocol (A2A), Model Context Protocol (MCP), and Hypertext Transfer Protocol by receiving multi-protocol interaction requests and extracting context information from the protocol processing layer. This invention utilizes multiple communication protocols, including HTTP (Transfer Protocol), to address the shortcomings of existing solutions that struggle with cross-system integration due to protocol differences. To resolve the issue of fragmented interactive experiences caused by insufficient contextual understanding, it employs prompt word processing and interface generation trigger judgment to achieve deep analysis and accurate demand identification of user natural language intent, overcoming the limitations of existing technologies in accurately grasping user intent. To address the problem of insufficient dynamic interface adaptation leading to difficulty in responding to business changes, it generates standardized interface pattern definition instances, achieving dynamic and standardized definition of interface layout structure and component types, overcoming the rigidity of traditional template-based solutions and the lack of dynamic adaptation capabilities in low-code tools. To address the difficulty in coordinating system scalability and dynamic interface adaptation capabilities due to the combined effects of the above issues, it ultimately generates interactive interfaces based on standardized instances through a renderer, ensuring adaptive presentation and protocol compatibility of the generated results across multiple terminal devices. Therefore, the technical solution of this invention solves the technical problem of the difficulty in coordinating dynamic interface adaptation capabilities and system scalability in existing natural language-based interface generation technologies, improving the intelligence level, cross-platform compatibility, and agility of business response in interface generation. Attached Figure Description

[0018] Figure 1 This is a flowchart of an interactive interface generation method according to an embodiment of the present invention; Figure 2 This is a module architecture diagram of an interactive interface generation system according to another embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an interactive interface generation system according to an embodiment of the present invention; Figure 4 This is a block diagram of a computer device for implementing embodiments of the present invention. Detailed Implementation

[0019] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details 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 the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0020] During the research and development of this invention, the inventors, through extensive experiments and data analysis, revealed the inherent connection between traditional interface development methods and intelligent requirements: traditional interface development methods not only suffer from technical bottlenecks such as high technical barriers and slow response speeds, but also suffer from severely limited system scalability due to poor protocol compatibility. Based on this relationship, the inventors innovatively proposed this technical solution, which utilizes a unified processing mechanism for multi-protocol interaction requests, employs layered prompt word processing technology, and combines standardized interface definition methods to achieve end-to-end intelligent generation from natural language to an interactive interface, embodying the core concept of a three-in-one approach of "protocol adaptation - intent understanding - dynamic generation".

[0021] Specifically, through comparative experiments, the invention team discovered three common technical problems with traditional interface generation solutions: first, protocol heterogeneity leads to high system integration costs; second, insufficient depth of natural language understanding results in low accuracy of intent recognition; and third, the disconnect between interface generation and business requirements leads to insufficient adaptability. These technical deficiencies make it difficult to balance interface development efficiency and quality. However, the four-layer technical architecture proposed in this invention (protocol processing layer, prompt word processing layer, instance generation layer, and rendering output layer) can improve the intelligence level and system compatibility of interface generation, achieving a paradigm shift from "static code development" to "dynamic intelligent generation."

[0022] Therefore, this invention provides an interactive interface generation method according to the first aspect, which can be applied to a natural language user interface generation system (hereinafter referred to as the "system"). This system can run on a cloud platform or local server environment via Application Programming Interface (API) calls or protocol endpoints to dynamically generate interactive interfaces. Specifically, this system can be deployed in various hardware environments, including but not limited to: cloud servers, local servers, personal computer devices, mobile devices, and smart glasses devices. This flexible deployment architecture allows the system to meet both high concurrency and elastic scaling requirements, while also adapting to multi-protocol integration and multi-terminal rendering scenarios. In terms of its operational mechanism, the system achieves an end-to-end generation process from natural language context information to standardized interface definitions and then to interactive interfaces through modular collaborative work of the protocol processing layer, prompt word processing layer, instance generation layer, and rendering output layer.

[0023] like Figure 1 As shown, the method may include: Step S110: Receive a multi-protocol interaction request and extract the natural language context information carried in the multi-protocol interaction request through the protocol processing layer.

[0024] Among them, multi-protocol interaction requests refer to standardized data requests from different communication protocols (such as Automated Agent Protocol A2A, Model Context Protocol MCP, and Hypertext Transfer Protocol HTTP), which are used to trigger the interface generation process; the protocol processing layer includes functional modules in the system architecture responsible for protocol adaptation and context extraction, which process heterogeneous protocols through a unified interface; natural language context information refers to structured information containing semantic content such as user intent, dialogue history, and business data, which is used to drive interface generation decisions.

[0025] Specifically, the system can receive requests from different agents through a unified transport layer interface (such as A2A, MCP, or HTTP). This transport layer is responsible for multi-protocol adaptation (e.g., adapting to different agent communication protocols) and extracting a structured natural language context from the request payload. Generally, this context not only includes the user's current intent but also encompasses session history, business data entities, etc., providing complete semantic input for subsequent interface generation decisions.

[0026] Furthermore, since the core of this step is the standardization of heterogeneous input by the protocol adapter, the exemplary interaction process between this standardization and the Large Language Model (LLM) can be as follows: An LLM-driven agent sends an interaction request via a supported specific communication protocol. The payload of this request is a structured message object, which not only contains the user's natural language query "Please show me this month's sales trend chart," but also structurally carries the current session identifier (session_id) and optional business data parameters (such as {"time_range":"2024-07"}). The protocol adapter parses the protocol message, extracts the valid information from the payload, and integrates it with the dialogue history to output a standardized natural language context information structure. This process ensures that requests from different sources (such as A2A, MCP, HTTP) can be uniformly interpreted into the semantic context that drives the interface generation.

[0027] Step S120: Based on the natural language context information, perform prompt word processing to generate an interface generation trigger judgment. The interface generation trigger judgment is used to identify the interface generation requirements based on user intent.

[0028] Among them, prompt word processing refers to the process of analyzing and transforming natural language context through a hierarchical prompt word system (including system-level prompt words and instance-generated prompt words); interface generation trigger judgment is the binary decision result output by the system based on predefined rules (such as keyword matching and data structure analysis) or after collaborative analysis with LLM (0 indicates that no interface generation is required, and 1 indicates that an interface generation is required); interface generation requirements refer to the interface rendering requirements implicit in the user's operation intention, such as data display, form input, or chart visualization requirements.

[0029] Specifically, the system can analyze the keywords (such as "display", "generate", "table" etc.) and data structures (such as whether there is mappable JSON data) in the context information through the trigger judgment unit in the prompt word processing module, and generate the trigger judgment result by combining the system-level prompt word rule base.

[0030] For example, the system combines standardized natural language context information with predefined system prompts to construct a structured prompt. For instance, the prompt sent to the LLM might be: "Analyze the following user request and context to determine if a graphical user interface is explicitly required. Answer only 'yes' or 'no'. Request: 'Please show me this month's sales trend chart.' Context: {historical intent: 'data query', existing data fields: ['date', 'revenue']}." After analysis by a large language model (such as Gemini), the system outputs the judgment result "yes". The system's triggering judgment unit converts this result into a binary decision "1" (i.e., an interface needs to be generated). After this decision is triggered, the system activates the instance generation prompt, preparing for the subsequent generation of specific, declarative component descriptions. This demonstrates how an API interface drives the LLM to achieve accurate interface generation intent recognition.

[0031] Step S130: When the interface generation trigger judgment indicates that an interface needs to be generated, an interface pattern definition instance is generated based on natural language context information and preset prompt word templates. The interface pattern definition instance is a standardized interface structure description used to define the layout structure and component types of the interface.

[0032] The preset prompt templates refer to a predefined text template library used to guide component selection, layout generation, and attribute configuration. The interface pattern definition instance is a declarative JSON structure description conforming to the proprietary interface pattern definition schema specification of this invention, possessing hierarchical relationships (e.g., a five-area layout model supporting multi-level nesting). It can be used to define the nesting structure of the five-area layout model (header, bottom, left, right, and main area) and component types (such as forms, cards, and charts). The layout structure refers to the spatial arrangement rules of interface elements, supporting dynamic nesting to adapt to complex scenarios. The component type refers to reusable interface element categories, such as table components (for data display) and form components (for data input). In other words, the interface pattern definition instance can also be used to define the component types, attributes, data binding relationships, and hierarchical layout structures used by the interface. The interface pattern definition instance itself can be in pure data format and does not contain executable code. Component types originate from a predefined, approved component catalog, ensuring design safety.

[0033] Specifically, the system can use an instance generation unit to map contextual information into standardized instances, combining component selection rules (such as "structured data matching table components") and layout recommendation logic (such as "single data focus using main area full-screen layout") from the prompt word template. Alternatively, the instance generation unit can construct a generation prompt word containing detailed constraints and call the LLM. This prompt word will constrain the LLM to strictly adhere to the schema specification defined in this invention, outputting a streaming JSON description. Based on the natural language context and component directory, the LLM progressively generates or populates description fragments, ultimately forming a complete instance with a clearly hierarchical interface pattern definition. This instance can be directly parsed by renderers from different front-ends.

[0034] For example, after determining that an interface needs to be generated, the system calls the LLM to generate an instance of the interface schema definition that conforms to the schema specification. The system will construct a generation prompt containing detailed constraints, such as: "You are a UI generation agent. Please generate a JSON description that conforms to the interface schema definition schema of this invention according to the requirements: use a line chart to display sales trends, with the X-axis representing dates and the Y-axis representing sales revenue, and legend filtering must be supported; please strictly use the declarative description format in the following component catalogs, and output a declarative, hierarchical JSON structure." Based on this prompt, the LLM outputs a streaming JSON description fragment. For example, the LLM can first generate a description of the chart container's structure, and then gradually fill in data bindings and configuration properties, ultimately forming a complete declarative description.

[0035] Step S140: Define an instance based on the interface mode and generate an interactive interface through the renderer.

[0036] The render outputter, or client-side renderer, is a core system module responsible for converting declarative interface pattern definition instances into native, interactive UI components for the target platform. An interactive interface refers to a graphical interface that supports user operations (such as clicking and input) and responds to business logic in real time. This interactive interface is rendered by the client using its own native components, ensuring consistency in performance and experience. Examples include HTML (Hypertext Markup Language) components embedded in web pages or native views on mobile devices.

[0037] Specifically, the system can parse the UI pattern definition instance through the rendering engine, generate a Document Object Model (DOM) structure, and then make responsive adjustments based on device parameters (such as screen resolution) through the terminal adapter, finally outputting embeddable code (such as HTML fragments or URL links); where URL (UniformResource Locator) refers to a Uniform Resource Locator. In other words, the renderer outputter (such as the Flutter renderer) receives the UI pattern definition instance (JSON), and instantiates the corresponding fully native UI components or custom elements according to the component types and properties declared therein. Generally, the renderer of interactive interfaces will also bind specific implementation logic or backend contracts to the interactive events declared in the description. Furthermore, because the interface description is declarative and framework-independent, the same instance can achieve consistent rendering effects on renderers of different platforms, and supports progressive rendering to improve the user experience.

[0038] In other embodiments, interactive interface generation can be based on, for example... Figure 2 The interactive interface generation system shown is used to execute: Taking an online document collaborative editing scenario as an example, a user sends a natural language request via an enterprise communication tool: "Please create a shared form for reviewing project plans, which needs to be editable and commentable online." This request is first encapsulated as a Hypertext Transfer Protocol (HTTP) request and sent to the system's protocol processing layer through the system's Transport Layer interface. This layer receives this multi-protocol interaction request, identifies it through the protocol adapter (identifying it as an HTTP protocol), and converts it into an internal standard request format. The context extraction module then parses out the structured natural language context information, including the core intent "create shared form," the business entity "project plan," and the functional requirement "online editing and commenting." Subsequently, this context information is passed to the prompt word processing module. This module constructs a structured prompt based on this context and drives the Large Language Model (LLM) for intent recognition through an API interface. For example, the prompt sent to the LLM is: "Determine whether the following user request requires the generation of an interactive interface that supports multi-user collaboration. Request: 'Please create a shared form for reviewing project plans, which needs to be editable and commentable online.' Context: {Collaboration keywords: 'shared', core components: 'form', functional requirements: ['edit', 'comment']}. Please answer only 'yes' or 'no'." After analysis, the LLM returns a "yes" judgment. The trigger judgment unit analyzes the context based on the LLM's analysis results and confirms that the interface generation service needs to be triggered. Then, the system constructs detailed instance generation prompts and calls the LLM to generate a declarative interface description. The instance prompt generation unit combines the instance generation prompts and outputs specific component selection instructions, such as "Select the online form component and enable the real-time collaborative editing and commenting plugin." This prompt strictly constrains the LLM to output according to the predefined, approved component catalog and the self-built, hierarchical schema specification of this invention. Next, the LLM starts generating interface schema definition instances under the system's drive, and the schema generator (i.e., the interface schema definition instance generator) begins to work. Based on the "shared collaboration" layout requirement, the LLM (Learning Model) generation unit determines to adopt a five-area layout model (a multi-level nested structure including header, footer, left, right, and main areas). The main area is used to host the table, and the right area displays the comment panel. The component selection unit, according to the above instructions, matches the "online table component" from the predefined component library. The large language model, referring to the schema definition of the 'online table component' in the component directory, declares the component in the generated interface schema definition instance and configures its attributes. The configuration unit sets exclusive attribute parameters for this component, such as {"collaborative":true,"commenting":true,"versioning":true}.The action binding unit configures an application API call action for the "Save" button, mapping it to the backend document save interface. Simultaneously, the large language model declares a unified abstract action for the "Save" button, for example: The description `{"actionType":"SAVE","endpoint":" / api / save"}` does not contain specific implementation code, thus achieving design safety. Next, the process enters the render outputter, which converts the declarations in the UI pattern definition instance into native, interactive UI components native to the LLM platform. Then, the terminal adapter responsively adjusts the DOM structure of the UI component based on the screen characteristics of the requesting device (e.g., a personal computer), such as optimizing column width and row height. The event binder binds the previously configured API call actions in the UI pattern definition instance to the click event of the "Save" button, converting them into specific front-end function calls. The signature generation module adds a short-term (e.g., valid for 10 minutes) verification signature to the final generated embeddable component code or HTML (Hypertext Markup Language) code snippet. Finally, with streaming support, the renderer of the interactive interface can use a progressive rendering strategy, gradually presenting the interface skeleton, loading data, and finally displaying the complete interface. The rendering engine integrates all parts and outputs an interactive interface access Uniform Resource Locator (URL) containing the signed code snippet. Finally, the action contract and front-end execution adaptation module ensure that various actions defined in the interface (such as clicking save to trigger API calls) can be correctly converted into standardized front-end execution instructions. Ultimately, a specific client-side renderer UI runtime module loads and executes the interface code in the user's browser, presenting a fully functional online collaborative table editing interface. Users can edit cell content in real time and post comments in the right panel, fully realizing end-to-end intelligent generation from natural language requirements to an interactive interface.

[0039] Therefore, according to the above implementation method, the system achieves its functionality through four core steps: receiving multi-protocol interaction requests and extracting context, processing prompt words and generating trigger judgments, generating interface pattern definition instances, and rendering interactive interfaces. Specifically, receiving multi-protocol interaction requests and extracting natural language context information through the protocol processing layer enables unified processing and intent information collection of interaction requests from different sources; processing prompt words based on the natural language context information to generate interface generation trigger judgments, which intelligently identify interface generation requirements based on user intent; when the trigger judgment indicates that an interface needs to be generated, generating interface pattern definition instances based on the natural language context information and preset prompt word templates, which produces standardized interface structure descriptions; and generating interactive interfaces through the rendering outputter based on the interface pattern definition instances, ultimately outputting interactive interfaces adapted to multiple platforms.

[0040] Specifically, in this implementation, to address the problem of poor system scalability caused by weak protocol compatibility as described in the background technology, a unified entry point is established by receiving multi-protocol interaction requests and extracting context information by the protocol processing layer. This allows for adaptation to various communication protocols such as Automation to Agent (A2A), Model Context Protocol (MCP), and Hypertext Transfer Protocol (HTTP), thus solving the deficiency of existing solutions in achieving cross-system integration due to protocol differences. To address the problem of fragmented interactive experience caused by insufficient depth of context understanding, in-depth analysis and accurate demand identification of user natural language intent are achieved by executing prompt word processing and generating interface generation trigger judgments, overcoming the limitation of existing technologies in accurately grasping user intent. To address the problem of insufficient dynamic interface adaptation capabilities leading to difficulty in responding to business changes, standardized interface pattern definition instances are generated, enabling dynamic and standardized definition of interface layout structure and component types. This solves the drawbacks of rigid traditional templated solutions and the lack of dynamic adaptation capabilities in low-code tools. Finally, to address the problem of difficulty in coordinating and optimizing system scalability and dynamic interface adaptation capabilities due to the superposition of the above problems, an interactive interface is generated based on standardized instances by the renderer, ensuring adaptive presentation and protocol compatibility of the generated results on multiple terminal devices. Therefore, the technical solution of the present invention solves the technical problem that the dynamic adaptation capability of the interface and the scalability of the system are difficult to optimize in coordination in the existing natural language-based interface generation technology, and improves the intelligence level, cross-platform compatibility and business response agility of interface generation.

[0041] In some embodiments, the protocol processing layer is configured with a protocol adaptation interface and a context extraction module; it receives multi-protocol interaction requests and extracts the natural language context information carried in the multi-protocol interaction requests through a preset protocol processing layer, including: The protocol adapter interface receives interaction requests from multiple communication protocols, including the Automated Proxy Protocol, Model Context Protocol, and Hypertext Transfer Protocol.

[0042] Among them, the protocol adaptation interface is a functional component in the protocol processing layer responsible for uniformly receiving and initially parsing heterogeneous protocol requests. It achieves multi-protocol compatibility by listening to preset ports or endpoints (such as port 80 of HTTP or dedicated sockets of MCP). Multi-source communication protocols refer to the various communication standards supported by the system, including but not limited to the Automated Agent Protocol (A2A) for communication between intelligent agents, the Model Context Protocol (MCP) for the integration of large language models with external resources, and the Hypertext Transfer Protocol (HTTP) for Web service interaction.

[0043] Specifically, the system can monitor input requests in real time through a protocol dispatcher (which can be seen as a concrete implementation of the network listening module) and dynamically route them to the corresponding processing logic based on the protocol type (such as through the Content-Type field in the HTTP header or the protocol identifier of the MCP). For example, the system deploys a protocol adaptation interface on a cloud server to listen for HTTP requests (such as POST requests to the / api / interface endpoint) and receives a JSON-formatted request body (approximately 2KB in size, or kilobytes) with the content {"query":"Generate customer management interface","session_id":"12345"}.

[0044] The protocol adaptation interface converts interactive requests from multiple communication protocols into an internal standard request format.

[0045] The internal standard request format is a unified data structure (such as a JSONSchema-based specification) defined within the system to eliminate protocol differences and ensure consistency of subsequent processing modules. The conversion process includes mapping protocol-specific fields (such as converting HTTP header information into standard metadata), standardizing data formats (such as converting XML to JSON), and unifying encoding (such as converting character sets to UTF-8). XML (eXtensible Markup Language) is a markup language standard used for storing and transmitting structured data.

[0046] Specifically, the system can use a protocol conversion engine to parse the various components of the original request (such as parsing the URL parameters and body of the HTTP request), extract key fields, and reassemble them into an internal standard object (containing fields such as protocol_type, request_data, and timestamp). For example, the system converts the above HTTP request into a JSON object in an internal standard format: {"protocol":"HTTP","data":{"query":"Generate customer management interface","session_id":"12345"},"timestamp":1720000000}, with a file size of approximately 1.5KB.

[0047] The natural language context information is extracted from the converted internal standard request format using the context extraction module.

[0048] The context extraction module is a sub-module in the protocol processing layer specifically used for semantic parsing and context construction. It extracts user intent and dialogue history association information from structured data through natural language processing technologies (such as named entity recognition or intent classification). Natural language context information refers to the refined semantic content, including user query text, business parameters (such as time range and filtering conditions), and session state (such as multi-turn dialogue identifiers).

[0049] Specifically, the system can analyze the data field in internal standard objects through a context parser to identify keywords (such as "generate" and "interface"), extract entities (such as "customer management"), and associate them with historical sessions (by querying the database using the session_id to obtain the context). For example, the system extracts structured natural language context information from the transformed request: {"intent":"interface generation","entities":["customer management"],"history":["preceding query: display customer list"]}, which serves as a key input to drive subsequent prompt word processing.

[0050] Therefore, according to the above implementation method, the system can efficiently process heterogeneous protocol requests, and through standardized conversion and context extraction, ensure the accuracy of natural language interaction and system compatibility, providing a reliable input basis for interface generation.

[0051] In some embodiments, the prompt word processing is configured with a prompt word hierarchy unit, a trigger judgment unit, and an instance prompt word generation unit; based on natural language context information, prompt word processing is performed to generate an interface generation trigger judgment, including: System-level prompts and instance-generated prompts are generated through a hierarchical unit of prompts.

[0052] The prompt word layering unit is the core component of the prompt word processing module. It is responsible for generating two types of structured prompt words according to different application scenarios: system-level prompt words (System Prompt) are used to define the triggering conditions and boundary rules for interface generation, while instance-generated prompt words are used to guide the selection and configuration strategies of specific interface components. System-level prompt words typically contain instructions and rules that guide the LLM to determine intent, while instance-generated prompt words contain strict constraints on the output format and references to the component catalog.

[0053] Specifically, the system can load a predefined prompt word template library through a template engine, dynamically populate template variables based on the semantic features of natural language context information, and generate an executable prompt word instruction set. For example, for the natural language query "display user activity statistics for the last 30 days", the system constructs a system-level prompt word to be sent to the LLM: "Analyze the user request. If the user explicitly requests data visualization, answer 'yes'; otherwise, answer 'no'. Request: 'Display user activity statistics for the last 30 days'." Simultaneously, it prepares an instance-generated prompt word template: "Please generate a JSON description that conforms to the interface pattern definition schema specification of this invention according to the following requirements. This description should support a hierarchical structure and follow a predefined component directory. For example, the requirement is: use the Chart component, type line..."

[0054] The trigger judgment unit analyzes the natural language context information based on system-level prompt words to determine whether the interface generation service needs to be triggered.

[0055] The trigger judgment unit is an integrated module responsible for constructing and analyzing requests, calling the LLM's API, and parsing its returned results. Its core decision-making relies on the LLM's understanding and reasoning capabilities regarding prompts. By combining user intent, contextual features, and system rules, it outputs a binary judgment result (0 / 1). The LLM's output (such as 'yes' / 'no') is then converted into an internal trigger signal.

[0056] Specifically, the system can concatenate natural language context with system-level prompts to construct a complete prompt, which is then sent to the large language model via API. The system then parses the text returned by the model to determine the trigger state. For example, the system sends the query "Create a new customer contact form" and its context to the LLM for analysis. The LLM infers based on the system prompts and returns a judgment of "Yes". The trigger judgment unit receives this result, parses it, and converts it into a trigger signal, outputting a result of 1.

[0057] When it is determined that the interface generation service needs to be triggered, the instance prompt word generation unit generates component selection instructions based on the instance prompt words and natural language context information.

[0058] The component selection instruction is a structured data object containing a component type identifier, attribute configuration parameters, and layout constraints. It is used to precisely guide the generation process of the interface pattern definition instance. The instruction format adopts the JSON Schema specification and includes the required fields component_type (component type), props (property set), and constraints (constraints).

[0059] Specifically, the system can use a prompt assembly engine to combine instance generation prompt templates, specific user requirements, and available component constraint information to form the final generation instruction sent to the LLM. Furthermore, the system can integrate instance generation prompts and natural language context information through an instance prompt generation unit to construct a complete request driving the LLM to generate interface schema definition instances. This request is a structured prompt, the core of which is to constrain the LLM to strictly adhere to the schema specifications defined in this invention and the predefined component catalog to output declarative UI descriptions. The prompt defines the output format, available component types, and their attribute ranges, ensuring the structural security and controllability of the generated content.

[0060] By integrating component selection instructions and layout recommendation rules through the trigger judgment unit, the interface generation trigger judgment is generated.

[0061] The layout recommendation rules are a set of heuristic rules based on information architecture theory, including but not limited to: single content focus rules (full-screen layout of the main area), dual information structure rules (main area + sidebar layout), and complex workflow rules (five-area nested layout). The integration process adopts a rule priority mechanism, prioritizing the matching of specific rules for particular scenarios (such as data table → main area layout, form + description → main area + right sidebar layout).

[0062] Specifically, the system can perform multi-rule matching through a rule engine, calculate the adaptability score of each layout scheme, and select the highest-scoring scheme as the final judgment criterion. Alternatively, the system can integrate the interface generation trigger judgment (yes / no) with the instance generation instruction (if generation is required), and pass it to the downstream interface pattern definition instance generation process. The integrated output is a structured decision object that not only contains a boolean flag indicating whether interface generation should proceed, but also, when the flag is true, carries key instructions and constraints for driving the large language model to generate specific interface descriptions. This ensures the coherence and consistency of the process from intent recognition to UI description generation. Furthermore, the system can encapsulate the trigger judgment result and the assembled instance generation prompt in an internal message object and pass it to subsequent instance generation modules.

[0063] For example, for the requirement of "product editing form with historical version comparison", the system matches the specific rule "form + comparison → main area + right sidebar layout", and the generated interface triggers the judgment: {"requireUI":true,"layout":"main+right","components":["Form","Table"]}.

[0064] Therefore, according to the above implementation method, the system can achieve accurate conversion from natural language intent to interface generation decisions through a hierarchical prompt word processing mechanism, effectively improving the accuracy of interface trigger judgment and the rationality of component selection. This design, through the synergistic effect of rules and models, ensures processing efficiency for common scenarios while adapting to complex semantic scenarios through machine learning, providing a reliable decision-making basis for subsequent interface generation.

[0065] In some embodiments, the interface pattern definition instance is configured with a layout generation unit, a component selection unit, an attribute configuration unit, an action binding unit, and an instance generation unit; when the interface generation trigger indicates that an interface needs to be generated, an interface pattern definition instance is generated based on natural language context information and a preset prompt word template, including: The layout generation unit determines the interface layout structure based on the layout requirements in the natural language context information. The interface layout structure is a five-region layout model that supports multi-level nesting.

[0066] The layout generation unit is a functional component within the instance generation module responsible for parsing spatial arrangement intentions in natural language and outputting standardized layout descriptions. It uses a rule engine to match layout keywords (such as "full-screen," "sidebar," and "dashboard") and data structure complexity (e.g., multi-region layouts are recommended when the number of fields exceeds 10) to generate a nested configuration of a five-region layout model (including a header, footer, left, right, and main region). Layout requirements refer to the implicit interface element organization requirements in the user query, such as a single content focus, parallel display of multiple information items, or a workflow-oriented hierarchical structure. Alternatively, the system will explicitly specify the available layout models and their semantics in the prompts given to the LLM. The LLM is guided to select and describe a suitable layout structure based on these requirements; its output is declarative and does not contain specific style code.

[0067] Specifically, the system can extract layout indicators from natural language using semantic parsing algorithms (such as "display" corresponding to the main area dominating the layout, and "contrast" corresponding to the left and right column layout), and dynamically adjust the layout priority by combining historical interaction data (such as user preference settings). Alternatively, when constructing the generation prompts for the LLM, the system will embed layout selection rules, such as "when the requirement is 'full-screen display,' use the main area and set the fullScreen property to true."

[0068] For example, when the system parses the query "requires full-screen display of the real-time sales dashboard", the layout generation unit outputs a five-area layout configuration: the main area occupies 100% (full screen), other areas are hidden, and the nesting level is 1. Alternatively, for the query "requires full-screen display of the real-time sales dashboard", the LLM will declare a main area occupying all the space in the JSON description outputting the interface pattern definition schema specification of this invention.

[0069] The component selection unit generates component selection rules based on instances in the prompt words, and matches the corresponding interface component types from the predefined component library.

[0070] The component selection unit is the decision-making component in the instance generation module responsible for component type mapping. It achieves accurate matching through a rule base (such as a keyword-component mapping table: table → Table component, chart → Chart component) and machine learning models (such as recommendation algorithms based on component usage frequency). The predefined component library refers to the system's built-in collection of reusable interface elements, including but not limited to table components (for structured data display), form components (for data input), and card components (for information summary display). The component selection rule is a set of heuristic conditions, such as "when the data is a list of key-value pairs and the number of fields is greater than 5, table components are matched first".

[0071] Specifically, the system can calculate the similarity score between the natural language context and component features (e.g., using a cosine similarity algorithm), select the component type with the highest score, and verify the compatibility of the component with the layout (e.g., a table component needs to adapt to the width of the main area). Alternatively, the system can constrain the LLM in the generated prompts, causing the LLM to generate component selection rules and a predefined, approved component catalog based on the instance, declaring the corresponding UI component type, its unique identifier (ID), and its hierarchy in the layout. The component catalog is a list of available secure components (e.g., TextField, Button, DataTable) provided to the LLM by the system. The LLM's role is to select appropriate component types from this catalog according to user needs and construct the parent-child hierarchy of components in JSON according to the schema specifications defined in this invention.

[0072] For example, for the query "Generate a list of customer information", the component selection cell matches a table component from the library (similarity score 0.95) and configures basic attributes (such as sortable and paginated). Alternatively, for the "Generate a list of customer information" requirement, the description in the LLM output will include a DataTable component declaration, defining its included columns through the children field.

[0073] Set the corresponding component-specific attribute parameters for the selected interface component type using the attribute configuration unit.

[0074] Among them, the attribute configuration unit is the configuration component in the instance generation module responsible for refining the component's functionality. It sets the component's behavior parameters through attribute templates (such as the page size and sorting switch of the table component) and user intent inference (such as "editable" corresponding to enabling inline editing function); the component-specific attribute parameters refer to the key-value pair collection that determines the component's interactive behavior and style, such as the pageSize (page size) and sortable (sortability) of the table component, and the requiredFields (list of required fields) of the form component.

[0075] Specifically, the system can use natural language processing (NLP) to identify attribute keywords (e.g., "pagination" maps to `pageSize`, "search" maps to `filterable`), and combine this with default value rules (e.g., the default page size is 20 rows) to generate attribute configuration objects. Alternatively, the system can guide the LLM to set corresponding component-specific attribute parameters for the selected UI component type. These attributes exist in the component's declaration as key-value pairs. The component-specific attribute parameters determine the component's specific behavior and performance; for example, `textFieldType` for `TextField` (short text / long text) and `sortable` for `DataTable` (whether it is sortable). The LLM populates the values ​​of these attributes based on natural language descriptions (e.g., "sortable table").

[0076] For example, for a table component, the property configuration hive sets the parameters: {"pageSize":20,"sortable":true,"filterable":true}, with a file size of approximately 1KB (kilobytes). Alternatively, for the requirement of a "paginated table", LLM will set properties such as "pagination": {"enabled": true} in the declaration of the DataTable component.

[0077] Configure a unified abstract action model for UI components through the action binding unit. The unified abstract action model is used to map user interaction events to standardized execution protocols.

[0078] Among them, the action binding unit is a functional component in the instance generation module responsible for binding interactive logic. It bridges user operations to backend services through event-action mapping tables (such as click event → jump link, submit event → API call) and protocol adapters (such as HTTP request encapsulation). The unified abstract action model is a standardized description format that includes action type (such as link action or API call action), target address (such as URL or endpoint) and parameter mapping rules (such as the conversion of form fields to request body).

[0079] Specifically, the system can parse the operational intent in natural language (such as "save to database after submission"), match predefined action templates, and generate action configurations containing validation rules (such as parameter NOT NULL checks). Alternatively, the system can guide the LLM to declare a unified abstract action model for UI components. This unified abstract action model, part of the schema specification, describes "what to do" (e.g., submitForm), rather than "how to do it." The specific implementation contract is bound by the client renderer. The task of the large language model is to associate the correct action type and necessary parameters in the component description.

[0080] For example, bind a unified abstract action model to a form component: the action type is API call, the target address is " / api / save", the method is POST, and the parameter mapping is as follows: .

[0081] Alternatively, for a form, the action attribute of the submit button in the description generated by the LLM might be declared as {"type":"SUBMIT","dataSource":"formData"}.

[0082] The instance generation unit integrates the five-region layout model, interface component types, component-specific attribute parameters, and unified abstract action model to generate interface pattern definition instances.

[0083] The instance generation unit is the core aggregation component in the instance generation module. It is responsible for serializing the scattered configuration elements into standardized JSON Schema format instances to ensure the integrity and scalability of the data structure. The integration process includes syntax validation (such as verifying the compatibility between component attributes and layout), dependency resolution (such as action binding depending on the existence of the component), and serialization output.

[0084] Specifically, the system can use a template engine to merge layout, component, attribute, and action configurations into a single JSON object and inject metadata (such as version number and timestamp). Alternatively, the system can use an LLM to integrate the declarations of the above layout, component, attribute, and action, outputting a complete, schema-compliant UI pattern definition instance. Then, the large language model, according to the schema rules, outputs the decisions from the previous steps as a structured JSON object.

[0085] Therefore, according to the above implementation method, the system can generate standardized interface pattern definition instances through modular collaboration, ensuring a high degree of consistency in interface structure, component functions and interaction logic, and improving the accuracy and maintainability of interface generation.

[0086] In some embodiments, the render outputter is configured with a rendering engine, a terminal adapter, an event binder, and a signature generation module; based on an instance of the interface mode definition, the render outputter generates an interactive interface, including: The rendering engine parses the five-area layout model and interface component types in the interface mode definition instance to generate the corresponding document object model structure.

[0087] The rendering engine is the core processing component in the renderer output, responsible for converting standardized interface descriptions (such as JSON-formatted interface pattern definition instances) into a browser-parsable Document Object Model (DOM) tree structure. The DOM structure is an in-memory hierarchical representation of nodes used for programmatic manipulation of interface elements; its node types include element nodes (such as div, table), text nodes, and attribute nodes. The five-region layout model refers to a standardized partitioning scheme for interface layout, including a header region, footer region, left region, right region, and main region, supporting unlimited nesting to adapt to complex scenarios.

[0088] Specifically, the system can traverse the JSON structure of the interface mode definition instance using a DOM parsing algorithm (such as depth-first traversal), create corresponding DOM nodes according to the five-region layout model (such as creating div elements for each region), and set initial attributes (such as id, class) and styles (such as width, height).

[0089] For example, the system parses an instance of an interface pattern definition (JSON format, file size approximately 5KB, or kilobytes), in which the five-area layout model specifies that the main area occupies 70%. The rendering engine generates the DOM structure: creating a root div node (id="root"), which contains 5 child div nodes (corresponding to header, footer, left, right, and main respectively), and setting CSS styles (width: 70%) for the main node; where CSS (Cascading Style Sheets) refers to a style sheet language used to describe the presentation style of HTML (Hypertext Markup Language) or XML (Extensible Markup Language) documents.

[0090] The terminal adapter performs responsive layout adjustments to the document object model structure based on device type parameters, including personal computer devices, mobile devices, and smart glasses devices.

[0091] The terminal adapter is a functional module in the renderer responsible for multi-terminal adaptation. It dynamically adjusts the DOM structure using responsive design rules to adapt to the screen characteristics (such as resolution and pixel density) and interaction methods (such as touch and mouse) of different devices. Responsive layout adjustment refers to modifying the layout attributes of DOM nodes (such as flex layout and grid layout) based on device parameters (such as screen width and orientation) to ensure optimal display of the interface on different devices. The device type parameter is a system-defined device classification standard: personal computer devices refer to devices with a screen width greater than 1200 pixels; mobile devices refer to devices with a screen width between 375 and 768 pixels; and smart glasses devices refer to devices with a screen width less than 375 pixels that support voice input.

[0092] Specifically, the system can dynamically calculate using CSS Media Queries and JavaScript to apply different layout rules based on device type parameters (such as vertically stacking the five-region layout on mobile devices). For example, for mobile devices (screen width 375 pixels), the terminal adapter adjusts the five-region layout in the DOM structure to the full width of the main region (width: 100%), and collapses the side regions into drop-down menus to ensure operability on small screens.

[0093] The rendering engine converts the adjusted document object model structure into embeddable code snippets.

[0094] Embeddable code snippets refer to standardized code blocks that can be independently inserted into external web pages or applications, such as HTML snippets, iframe src URLs, or web components; the conversion process includes serializing the DOM structure into an HTML string and injecting the necessary CSS styles and JavaScript logic.

[0095] Specifically, the system can use the DOM serialization API (such as the element's outerHTML property) to convert the adjusted DOM nodes into HTML code and apply inline styles (such as... <style>标签)或脚本(如事件处理函数)。例如,渲染引擎输出一个可嵌入代码片段:HTML格式,文件大小约8KB,包含完整的五区域布局(如...)和表格组件代码,可直接通过document.write()方法嵌入宿主页面。

[0096] 通过事件绑定器为界面组件绑定统一抽象动作模型,建立用户交互事件与标准化执行协议之间的映射关系。

[0097] 其中,事件绑定器是渲染输出器中负责添加交互逻辑的组件,通过事件监听机制(如,一种用于在DOM元素上注册事件处理程序的标准应用程序编程接口的方法)将用户操作(如点击、提交)映射到预定义动作;统一抽象动作模型是一种标准化描述格式,定义动作类型(如链接动作或API调用动作)、目标地址和参数映射规则。映射关系是指事件类型(如click、submit)与动作执行逻辑的绑定对应表。

[0098] 具体而言,系统可以遍历界面组件中的可交互元素(如按钮、表单),为每个元素绑定事件处理函数,该函数根据统一抽象动作模型调用相应协议(如发送HTTP请求)。例如,为表单的提交按钮绑定点击事件,当用户点击时,事件绑定器触发API调用动作:向目标地址" / api / submit”发送POST请求,载荷为表单数据(JSON格式),并处理响应结果。

[0099] 通过签名生成模块为可嵌入代码片段添加短期验证签名。

[0100] 其中,签名生成模块是渲染输出器中负责安全验证的功能单元,通过加密算法(如HMAC-SHA256)生成基于时间戳和秘密密钥的数字签名,防止代码片段被篡改或未授权访问;短期验证签名是指有效期有限的签名(如10分钟),通过时间戳(timestamp)和签名值(signature)参数实现临时性控制。

[0101] 具体而言,系统可以为可嵌入代码片段生成唯一标识符(如UUID),结合当前时间戳(Unix时间格式)和系统密钥计算签名哈希值,并将签名参数附加到代码片段或URL中;其中,UUID(Universally Unique Identifier,通用唯一识别码)是一个128位(16字节)的数字标识符标准,用于在分布式计算环境中唯一标识信息实。例如,签名生成模块为HTML片段生成签名URL:,签名有效期为10分钟,过期后需重新生成。

[0102] 通过渲染引擎集成签名后的可嵌入代码片段,生成可交互界面。

[0103] 其中,集成过程是指将签名后的代码片段组合成最终可交付的界面产品,如生成完整HTML页面、返回可嵌入URL或输出为Web组件;可交互界面是指用户可直接操作(如点击、输入)并实时响应业务逻辑的可视化界面。

[0104] 具体而言,系统可以将签名后的代码片段封装成iframe的src属性(如<iframesrc="签名URL">)或直接输出为独立HTML文档,并在界面加载时验证签名有效性。例如,渲染引擎生成一个可交互界面:HTML页面大小约12KB,内容为嵌入签名URL的,该界面支持在浏览器中直接渲染和交互。

[0105] 因此,根据上述实施方式,系统能够通过模块化渲染流程生成安全、可适配多终端的可交互界面,有效提升界面生成的可靠性、兼容性和用户体验。该设计确保了从标准化实例到最终界面的高效转换,同时通过签名机制增强了系统的安全性。

[0106] 在一些实施例中,终端适配器配置有设备能力检测单元、响应式规则单元和能力降级单元;通过终端适配器根据设备类型参数对文档对象模型结构执行响应式布局调整,包括:通过设备能力检测单元获取设备类型参数中的屏幕特性参数和输入方式参数。

[0107] 其中,设备能力检测单元是终端适配器中负责采集终端设备硬件和软件特性的功能模块,通过用户代理字符串解析、屏幕对象接口查询和设备能力应用程序编程接口(API)获取技术指标;屏幕特性参数是指描述显示设备物理属性的数据集合,包括屏幕分辨率(如1920×1080像素)、像素密度(如每英寸401个像素点)和色彩深度(如24位真彩色);输入方式参数是指设备支持的人机交互方式,包括触控输入(支持最多10点触控)、鼠标输入(支持滚轮事件)和语音输入(支持语音识别准确率95%)。

[0108] 具体而言,系统可以通过navigator.userAgent(导航器用户代理)接口获取设备类型,通过screen(屏幕)对象获取屏幕尺寸,通过触摸事件检测支持情况。例如,系统检测到一台移动设备,屏幕特性参数为:分辨率1080×2340像素,像素密度每英寸409个像素点;输入方式参数为:支持10点触控和语音输入。

[0109] 通过响应式规则单元根据屏幕特性参数调整文档对象模型结构的区域比例和组件尺寸。

[0110] 其中,响应式规则单元是终端适配器中执行自适应布局计算的核心组件,通过断点规则库(如移动端断点768像素、平板端断点1024像素)和流体网格算法(如基于百分比的比例计算)实现动态布局适配;区域比例调整是指根据屏幕宽度重新计算五区域布局模型中各区域的尺寸分配(如主区域从70%调整为90%);组件尺寸调整是指根据可用空间缩放界面元素(如表格列宽自适应、字体大小等比缩放)。

[0111] 具体而言,系统可以通过CSS媒体查询(@media)结合JavaScript(一种脚本编程语言)动态计算,应用不同的样式规则(如移动端将五区域布局垂直堆叠)。例如,检测到屏幕宽度为375像素(移动设备)时,响应式规则单元将文档对象模型结构调整为:主区域宽度100%,侧边区域转换为可折叠菜单,表格组件改为滚动视图,基础字体大小从16像素调整为14像素。

[0112] 通过能力降级单元根据输入方式参数对界面组件的交互功能进行适配处理。

[0113] 其中,能力降级单元是终端适配器中负责功能优化的组件,通过特性检测和渐进增强策略,在保持核心功能的前提下对高级功能进行适当简化;交互功能适配是指根据设备输入能力调整界面组件的操作方式(如触控设备增大点击热区、语音设备增加语音指令支持)。降级策略包括:功能隐藏(如智能眼镜隐藏鼠标悬停效果)、操作替代(如语音设备用按钮替代键盘快捷键)和界面重构(如将多级菜单合并为平面列表)。

[0114] 具体而言,系统可以通过特性检测判断设备支持情况,动态加载对应的交互模块(如触控设备加载手势库,语音设备加载语音识别库)。例如,针对智能眼镜设备(屏幕宽度300像素,支持语音输入),能力降级单元进行以下适配:将鼠标悬停提示改为点击显示,将键盘快捷键替换为语音指令"下一步”,将多列表格重构为单列卡片流布局,确保在小屏幕和语音主导交互下的可用性。

[0115] 因此,根据上述实施方式,系统能够通过多层级的适配策略,实现界面在不同终端设备上的最优呈现和交互体验,提升了界面的可访问性和用户体验一致性。该设计方案确保了从大型桌面设备到便携移动设备再到可穿戴设备的全场景覆盖,体现了系统强大的跨平台适配能力。

[0116] 在一些实施例中,统一抽象动作模型配置有动作类型解析单元、链接动作配置单元、应用程序编程接口动作配置单元、映射关系建立单元和验证单元;通过事件绑定器为界面组件绑定统一抽象动作模型,建立用户交互事件与标准化执行协议之间的映射关系,包括:通过动作类型解析单元识别界面组件对应的统一抽象动作模型类型。

[0117] 其中,动作类型解析单元是统一抽象动作模型中的分类决策组件,通过组件特征分析(如组件类型、数据结构和交互模式)和规则匹配(如表单组件优先匹配API调用动作,导航组件优先匹配链接动作)确定适用的动作类型;动作类型包括链接动作(用于页面跳转或资源访问)和应用程序编程接口调用动作(用于数据提交或服务调用)。统一抽象动作模型的结构还可以包含动作类型、目标标识与参数映射等声明式字段;渲染输出器,即客户端渲染器通过事件绑定器解析此模型并绑定具体实现,客户端渲染器可以通过解析界面模式定义实例中为组件定义的动作描述,识别其声明的统一抽象动作模型类型。其中,动作类型是预先在Schema中定义的标准枚举(如NAVIGATE,API_CALL,SHOW_MODAL)。可交互界面的渲染器通过读取组件声明中的action或onClick等字段来获知动作意图,而非在运行时进行决策。

[0118] 具体而言,系统可以通过机器学习分类器(如支持向量机模型)分析组件属性特征向量,结合预定义的组件-动作映射表(如按钮组件可能对应链接动作或API调用动作)进行综合评分,选择最高分类型。或者,渲染器可以直接解析组件属性中的动作类型字段,该字段值在由LLM生成界面模式定义实例时已被确定。例如,系统分析一个"提交”按钮组件,动作类型解析单元根据其关联的表单数据和点击行为特征,识别为API调用动作类型,置信度得分0.92。或者,在一个表单组件的声明中,其提交按钮的action字段值为{"type”:"API_CALL”}。事件绑定器据此识别该组件需要绑定API调用逻辑。

[0119] 通过链接动作配置单元为识别为链接动作的界面组件设置目标链接地址和打开方式参数。

[0120] 其中,链接动作配置单元是统一抽象动作模型中专门负责配置跳转行为的子模块,通过链接模板库(如根据业务类型预定义常用URL模式)和动态参数替换(如将当前页面ID插入链接)生成具体地址;目标链接地址是指跳转目的地的统一资源定位器(URL),打开方式参数包括当前窗口打开(self)和新窗口打开(blank)两种模式。接着,对于类型为NAVIGATE(链接)的动作,渲染器从动作描述中读取目标链接地址和打开方式参数。其中,目标链接地址()和打开方式(target,如‘self’或‘blank’)是动作描述对象中的静态属性。这是一个声明,具体的跳转逻辑由渲染器根据当前应用的路由系统实现。渲染器可以提取动作描述中的和target字段,并调用前端路由框架(如Vue Router、React Router)的相应方法来实现跳转,或将target属性直接设置给一个标签。

[0121] 具体而言,系统可以解析组件关联的业务数据(如页面ID、资源类型),结合路由配置表生成完整URL,并根据设备类型(如移动设备优先新窗口打开)设置打开方式。例如,为"查看详情”按钮配置链接动作:目标地址设置为"https: / / example.com / details?id=123",打开方式参数为"_blank"(新窗口),链接长度约50字节。或者,为"查看详情”按钮声明的动作为:{"type”:"NAVIGATE”,"url”:" / details / 123”,"target”:"_self”}。事件绑定器会为此按钮创建一个回调函数,该函数内部调用router.push(‘ / details / 123’)。

[0122] 通过应用程序编程接口动作配置单元为识别为应用程序编程接口调用动作的界面组件设置接口地址、请求方法和载荷映射规则。

[0123] 其中,应用程序编程接口动作配置单元是统一抽象动作模型中负责服务调用配置的功能组件,通过接口注册中心(存储可用API端点信息)和映射规则引擎(定义界面数据到API参数的转换逻辑)实现精准配置;接口地址是指后端服务的统一资源定位器(URL)端点,请求方法包括GET(获取)、POST(提交)、PUT(更新)、PATCH(部分更新)和DELETE(删除)方法;载荷映射规则规定了界面数据与API请求体之间的字段对应关系(如表单字段"userName"映射为API载荷的"username")。或者,对于类型为API_CALL的动作,渲染器从动作描述中读取接口地址、请求方法和载荷映射规则。接口地址(endpoint)、请求方法(method)和载荷映射规则(dataMapping)均以数据形式声明。渲染器需将其转换为一次真实的网络请求。映射规则定义了如何从界面状态(如表单数据、当前行数据)中提取并构造请求参数。

[0124] 具体而言,系统可以通过注解解析(如解析组件上的API注解)或规则匹配(如字段名相似度匹配)自动生成映射规则,并验证接口的可达性。或者,渲染器可以根据dataMapping规则,从指定的数据源(如通过组件id关联的表单模型或当前行数据对象)收集数据,然后使用标准的HTTP客户端(如fetch、axios)发起请求。例如,为表单组件的提交动作配置API调用:接口地址"https: / / api.example.com / user",请求方法POST,载荷映射规则。或者,为表单提交声明的API调用动作为:{"type”:"API_CALL”,"endpoint”:" / api / user”,"method”:"POST”,"dataMapping”:{"formData”:"$”}}。事件绑定器生成的函数会序列化表单数据,并向 / api / user发送POST请求。

[0125] 通过映射关系建立单元将用户交互事件与配置完成的统一抽象动作模型进行绑定。

[0126] 其中,映射关系建立单元是统一抽象动作模型中的事件-动作关联组件,通过事件监听器注册机制(如)和回调函数封装实现用户操作到动作执行的桥接;绑定过程包括事件类型识别(如click、change、submit)、动作模型实例化(如创建具体的链接跳转函数或API调用函数)和执行上下文传递(如当前页面参数、用户身份信息)。换而言之,映射关系建立单元还可以是事件绑定器中负责生成并挂载事件处理器的部分。绑定过程是:根据组件声明中的事件名(如onClick),创建一个对应的JavaScript函数,该函数封装了动作描述所对应的具体业务逻辑(跳转或API调用),并将此函数注册为DOM事件监听器或框架生命周期钩子。

[0127] 具体而言,系统可以通过事件委托机制在组件容器层级统一监听事件,根据事件目标匹配对应的动作模型,并注入执行所需的环境变量。或者,渲染器在实例化组件时,会遍历其所有声明的事件属性,为每个事件创建对应的处理函数并绑定。例如,为表格的"删除”按钮建立映射关系:当点击事件(click)触发时,执行绑定好的API调用动作(DELETE方法请求" / api / delete?id=xxx"),并传递当前行数据作为上下文。或者,为一个按钮的click事件建立绑定:当在界面模式定义实例中该按钮的onClick属性指向一个API_CALL动作描述时,渲染器会创建一个匿名函数,在该函数中执行上述步骤三的请求逻辑,并将其设置为按钮的onclick处理器。

[0128] 通过验证单元对绑定后的映射关系进行语法校验和参数完整性检查。

[0129] 其中,验证单元是统一抽象动作模型中的质量保障组件,通过静态分析(如接口地址格式验证)和动态检测(如依赖参数存在性检查)确保映射关系的可执行性;语法校验包括URL格式验证、请求方法兼容性检查、载荷格式合规性验证;参数完整性检查确保动作执行所需的必填参数(如API调用的身份认证令牌、链接的目标ID)均已正确配置。换而言之,验证单元还可以是保障动作描述合法性的组件,可在Schema生成后(服务端)或渲染器解析前(客户端)运行。其校验对象是静态的动作描述数据,而非运行时的函数。

[0130] 具体而言,系统可以通过规则引擎执行多层级验证:基础格式校验(如URL符合RFC标准)、业务逻辑校验(如接口需要认证时必须包含token参数)、运行时依赖校验(如跳转目标页面是否存在)。或者,系统可以通过JSON Schema验证器对界面模式定义实例中的动作描述部分进行校验,确保其符合预定义的动作模型Schema。例如,验证单元检测到一个API调用动作的接口地址缺少协议头(如"api.example.com”缺少"https: / / ”),自动修正为完整URL;同时检查发现载荷映射中缺少必填字段"userId”,生成验证错误并阻止绑定完成。或者,验证单元检测到一个API调用动作描述中缺少method字段,或endpoint字段的值不是一个有效的URL格式,则会在界面生成流程的早期抛出错误,防止生成无效的界面描述。

[0131] 因此,根据上述实施方式,系统能够通过标准化的动作模型配置和严格的验证机制,确保用户交互事件到后端服务的准确映射,提升界面交互的可靠性和安全性。该设计方案实现了从界面操作到业务逻辑的无缝衔接,同时通过自动化校验降低了配置错误的风险。

[0132] 图3是本发明一实施例的可交互界面生成系统的结构框图。

[0133] 如图3所示,该可交互界面生成系统,包括:自然语言提取模块210,用于接收多协议交互请求,并通过协议处理层提取多协议交互请求中携带的自然语言上下文信息。

[0134] 触发判断生成模块220,用于根据自然语言上下文信息,执行提示词处理以生成界面生成触发判断,界面生成触发判断用于基于用户意图识别界面生成需求。

[0135] 界面实例生成模块230,用于当界面生成触发判断指示需要生成界面时,基于自然语言上下文信息及预设的提示词模板,生成界面模式定义实例,界面模式定义实例是用于定义界面的布局结构及组件类型的标准化界面结构描述。

[0136] 交互界面生成模块240,用于根据界面模式定义实例,通过渲染输出器生成可交互界面。

[0137] 本发明实施例的装置的各模块、子模块的具体功能和示例的描述,可以参见上述方法实施例中对应步骤的相关描述,在此不再赘述。

[0138] 根据本发明的实施例,本发明的上述方法可以应用到一种计算机设备和一种可读存储介质中。

[0139] 图4示出了可以用来实施本发明的实施例的示例计算机设备600的示意性框图。计算机设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机和其他适合的计算机。计算机设备还可以表示各种形式的移动装置,诸如,个人数字助理、蜂窝电话、智能电话、可穿戴设备和其他类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和 / 或者要求的本发明的实现。

[0140] 如图4所示,计算机设备600包括计算单元601,其可以根据存储在只读存储器(ROM)602中的计算机程序或者从存储单元608加载到随机访问存储器(RAM)603中的计算机程序,来执行各种适当的动作和处理。在RAM603中,还可存储计算机设备600操作所需的各种程序和数据。计算单元601、ROM602以及RAM603通过总线604彼此相连。输入 / 输出(I / O)接口605也连接至总线604。

[0141] 计算机设备600中的多个部件连接至I / O接口605,包括:输入单元606,例如键盘、鼠标等;输出单元607,例如各种类型的显示器、扬声器等;存储单元608,例如磁盘、光盘等;以及通信单元609,例如网卡、调制解调器、无线通信收发机等。通信单元609允许计算机设备600通过诸如因特网的计算机网络和 / 或各种电信网络与其他设备交换信息 / 数据。

[0142] 计算单元601可以是各种具有处理和计算能力的通用和 / 或专用处理组件。计算单元601的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元601执行上文所描述的各个方法和处理,例如一种可交互界面生成方法。例如,在一些实施例中,一种可交互界面生成方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元608。在一些实施例中,计算机程序的部分或者全部可以经由ROM602和 / 或通信单元609而被载入和 / 或安装到计算机设备600上。当计算机程序加载到RAM603并由计算单元601执行时,可以执行上文描述的一种可交互界面生成方法的一个或多个步骤。备选地,在其他实施例中,计算单元601可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行一种可交互界面生成方法。

[0143] 本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和 / 或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和 / 或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。

[0144] 用于实施本发明的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和 / 或框图中所规定的功能 / 操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。

[0145] 在本发明的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。

[0146] 为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入、或者触觉输入)来接收来自用户的输入。

[0147] 可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。

[0148] 计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。

[0149] 应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明公开的技术方案所期望的结果,本文在此不进行限制。

[0150] 上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明的原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。< / style>

Claims

1. A method for generating an interactive interface, characterized in that, include: Receive multi-protocol interaction requests and extract the natural language context information carried in the multi-protocol interaction requests through the protocol processing layer; Based on the natural language context information, prompt word processing is performed to generate an interface generation trigger judgment, which is used to identify interface generation requirements based on user intent. When the interface generation trigger judgment indicates that an interface needs to be generated, an interface pattern definition instance is generated based on the natural language context information and the preset prompt word template. The interface pattern definition instance is a standardized interface structure description used to define the layout structure and component types of the interface. Based on the interface pattern definition instance, an interactive interface is generated through the renderer outputter.

2. The method according to claim 1, characterized in that, The protocol processing layer is configured with a protocol adaptation interface and a context extraction module; The process of receiving a multi-protocol interaction request and extracting the natural language context information carried in the multi-protocol interaction request through a preset protocol processing layer includes: The protocol adaptation interface receives interaction requests from multiple source communication protocols, including automated proxy protocol, model context protocol and hypertext transfer protocol. The protocol adaptation interface converts the interactive requests of the multi-source communication protocol into an internal standard request format. The natural language context information is extracted from the converted internal standard request format by the context extraction module.

3. The method according to claim 1, characterized in that, The prompt word processing configuration includes a prompt word hierarchical unit, a trigger judgment unit, and an instance prompt word generation unit; The step of performing prompt word processing based on the natural language context information to generate an interface generation trigger judgment includes: System-level prompts and instance-generated prompts are generated through the aforementioned prompt word hierarchical unit; The triggering judgment unit analyzes the natural language context information based on the system-level prompt words to determine whether it is necessary to trigger the interface generation service. When it is determined that the interface generation service needs to be triggered, the instance prompt word generation unit generates a component selection instruction based on the instance and the natural language context information. The trigger judgment unit integrates the component selection instructions and layout recommendation rules to generate the interface generation trigger judgment.

4. The method according to claim 1, characterized in that, The interface pattern definition instance is configured with a layout generation unit, a component selection unit, an attribute configuration unit, an action binding unit, and an instance generation unit; when the interface generation trigger indicates that an interface needs to be generated, an interface pattern definition instance is generated based on the natural language context information and a preset prompt word template, including: The layout generation unit determines the interface layout structure based on the layout requirements in the natural language context information. The interface layout structure is a five-region layout model that supports multi-level nesting. The component selection unit generates component selection rules in the prompt words based on the instance, and matches the corresponding interface component type from the predefined component library; The attribute configuration unit sets the corresponding component-specific attribute parameters for the selected interface component type. The action binding unit configures a unified abstract action model for the interface components. The unified abstract action model is used to map user interaction events to a standardized execution protocol. The instance generation unit integrates the five-region layout model, interface component type, component-specific attribute parameters, and unified abstract action model to generate the interface mode definition instance.

5. The method according to claim 4, characterized in that, The render outputter is configured with a rendering engine, a terminal adapter, an event binder, and a signature generation module; the step of generating an interactive interface through the render outputter based on the interface mode definition instance includes: The rendering engine parses the five-area layout model and interface component types in the interface mode definition instance to generate the corresponding document object model structure. The terminal adapter performs responsive layout adjustments on the document object model structure based on device type parameters, including personal computer devices, mobile devices, and smart glasses devices. The rendering engine converts the adjusted document object model structure into embeddable code snippets. The event binder binds a unified abstract action model to the interface components, establishing a mapping relationship between user interaction events and standardized execution protocols; The signature generation module adds a short-term verification signature to the embeddable code snippet. The interactive interface is generated by integrating the signed embeddable code snippets into the rendering engine.

6. The method according to claim 5, characterized in that, The terminal adapter is configured with a device capability detection unit, a responsive rule unit, and a capability degradation unit; the step of performing responsive layout adjustments on the document object model structure based on device type parameters through the terminal adapter includes: The device capability detection unit obtains the screen characteristic parameters and input method parameters from the device type parameters. The responsive rule unit adjusts the region proportions and component sizes of the document object model structure based on screen characteristic parameters; The capability degradation unit adapts the interactive functions of the interface components according to the input method parameters.

7. The method according to claim 6, characterized in that, The unified abstract action model is configured with an action type parsing unit, a link action configuration unit, an application programming interface action configuration unit, a mapping relationship establishment unit, and a verification unit. The step of binding a unified abstract action model to UI components through the event binder, and establishing a mapping relationship between user interaction events and standardized execution protocols, includes: The unified abstract action model type corresponding to the interface component is identified by the action type parsing unit; The link action configuration unit sets the target link address and opening method parameters for UI components identified as link actions; The API Action Configuration Unit sets the interface address, request method, and payload mapping rules for UI components that are identified as API call actions; The mapping relationship establishes a unit to bind user interaction events with the configured unified abstract action model; The validation unit performs syntax verification and parameter integrity checks on the bound mapping relationship.

8. An interactive interface generation system, characterized in that, include: The natural language extraction module is used to receive multi-protocol interaction requests and extract the natural language context information carried in the multi-protocol interaction requests through the protocol processing layer. The trigger judgment generation module is used to perform prompt word processing based on the natural language context information to generate an interface generation trigger judgment. The interface generation trigger judgment is used to identify interface generation requirements based on user intent. The interface instance generation module is used to generate an interface pattern definition instance based on the natural language context information and the preset prompt word template when the interface generation triggers the judgment indication that an interface needs to be generated. The interface pattern definition instance is a standardized interface structure description used to define the layout structure and component types of the interface. The interactive interface generation module is used to generate an interactive interface through a renderer based on an instance defined by the interface mode.

9. A computer device, characterized in that, include: At least one processor; and a memory that is communicatively connected to the at least one processor; 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 of any one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, Computer instructions are used to cause a computer to perform the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Interface generation system based on large language model LLM

    CN119645406A

Cited By

  • A declarative ui automation cross-platform translation method

    CN122331956A

  • A declarative ui automation cross-platform translation method

    CN122331956B