Method, system and storage medium for dynamically generating user interface based on LLM

By decomposing user intent into functional components and matching them with a pre-built interface layout template library, combined with a dynamic layout algorithm, the inconsistency and inefficiency problems in existing LLM-based user interface generation technologies are solved, achieving fast, stable interface generation and a consistent user experience.

CN122111416APending Publication Date: 2026-05-29NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
Filing Date
2025-12-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing LLM-based user interface generation technologies suffer from problems such as high requirements for model inference capabilities, inaccurate generated coordinates leading to component overlap or exceeding screen boundaries, high computational resource consumption, slow response, lack of consistency and predictability.

Method used

By decomposing user intent into functional components, matching the semantic attributes of functional components with a pre-built interface layout template library, and combining dynamic layout algorithms to generate user interfaces, the system ensures that important components are enlarged in the central area and secondary components are reasonably divided, thus generating a reasonable layout.

Benefits of technology

It improves the speed and stability of user interface generation, ensures interface consistency and predictability, reduces computing resource consumption, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111416A_ABST
    Figure CN122111416A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and provides a method and system for dynamically generating a user interface based on an LLM and a storage medium, wherein the method comprises the following steps: decomposing and mapping a user intention obtained into a plurality of function components; determining the semantic attributes of each function component according to a current use scenario; matching the semantic attributes of each function component with interface layout templates in a pre-constructed interface layout template library; if the matching is successful, generating a corresponding user interface according to the corresponding interface layout template in the interface layout template library; and if the matching is unsuccessful, processing the plurality of function components through a dynamic layout algorithm to generate a corresponding user interface. By using the application, the problems of layout confusion, low efficiency and poor consistency in the existing generation of user interfaces can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically, to a method, system, electronic device, and computer storage medium for dynamically generating user interfaces based on LLM. Background Technology

[0002] Currently, automotive intelligent cockpits are undergoing a paradigm shift from "function-driven" to "scenario and user-driven." Dynamic UI generation technology based on LLM (Local Management Model) is a core manifestation of this trend.

[0003] Currently, this type of intelligent automotive cockpit differs from traditional preset in-vehicle UIs. Preset UIs are limited by their static and uniform nature; all users experience the same homepage, app icon layout, and menu hierarchy. In contrast, the goal of LLM dynamic UI is to create an intelligent space that proactively understands, predicts, and adapts. It is no longer a passive tool but an intelligent agent with scene awareness and user understanding capabilities. This system can dynamically assemble and present the most relevant interfaces and functions based on real-time context.

[0004] The current implementation of LLM-based user interface (UI) generation is as follows: (1) Instruction input: The user issues an instruction; (2) LLM understanding and generation: The LLM first understands the instruction and then directly generates a piece of code (such as HTML / CSS, JavaScript, or code of a specific UI framework) or layout description for creating the UI; (3) Output the corresponding code; (4) Rendering execution: The system parses and executes the code and draws the corresponding component on the screen.

[0005] The above-mentioned user interface generation based on LLM presents the following technical challenges: First, LLM requires the direct generation of precise coordinates (x, y, width, height), demanding high model reasoning capabilities. An LLM practitioner must not only understand business logic but also be proficient in UI design principles (such as alignment, spacing, and color contrast) and the underlying implementation code.

[0006] Second: Layout and style illusion: The generated coordinates may cause components to overlap or exceed the screen boundaries; the styles such as colors and fonts may be seriously inconsistent with the system design specifications, which will ruin the consistency of user experience.

[0007] Third: Generating lengthy, low-level code consumes a lot of computing resources and time, resulting in slow response and failing to meet the high real-time requirements of the vehicle system. The layout needs to be recalculated every time, which is inefficient.

[0008] Fourth: Lack of consistency: The same instruction may produce UIs with drastically different layouts at different times (each time the style is different), lacking consistency and predictability.

[0009] Therefore, in order to solve the above problems, there is an urgent need to provide a new method for dynamically generating user interfaces based on LLM. Summary of the Invention

[0010] This invention provides a method, system, and storage medium for dynamically generating user interfaces based on LLM, which can solve the problems of chaotic layout, low efficiency, and poor consistency in existing user interface generation.

[0011] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, embodiments of the present invention provide a method for dynamically generating a user interface based on LLM, applied to an electronic device, comprising: The acquired user intent is decomposed and mapped into several functional components; Determine the semantic attributes of each functional component based on the current usage scenario; Based on the semantic attributes of each functional component, it is matched with the interface layout template in the pre-built interface layout template library; If a match is successful, the corresponding user interface is generated based on the corresponding interface layout template in the interface layout template library. If a match is not found, a dynamic layout algorithm is used to process each functional component and generate the corresponding user interface.

[0012] In addition, an optional approach is that the semantic attributes of the functional components include: component type, component identifier, component location information, and size; The component type determines whether the functional component is an important functional component or a secondary functional component.

[0013] Alternatively, the pre-built interface layout template library may include several interface layout templates, which are constructed based on different layout information; wherein, The layout information includes the number of important functional components, the number of secondary functional components, the theme, canvas attributes, and background color.

[0014] In addition, an alternative approach is to match the semantic attributes of each functional component with a pre-built interface layout template library, including: Based on the semantic attributes of several functional components, determine the number of important functional components and the number of secondary functional components of the user intent; The number of important and secondary functional components of the user intent is matched with the number of important and secondary functional components in the interface layout template. If the user's intent matches the number of both major and minor functional components in the interface layout template, then the match is successful.

[0015] In addition, an optional approach is that the matching of each functional component with a pre-built interface layout template library based on its semantic attributes further includes: If the number of important functional components of the user intent is the same as the number of important functional components of the interface layout template, and the number of minor functional components of the user intent is greater than the number of minor functional components of the interface layout template, then a flow template is used as the adapted interface layout template.

[0016] Alternatively, the step of processing each functional component using a dynamic layout algorithm to generate a corresponding user interface includes: Select all the important functional components from a set of functional components; The size of the important functional components is increased by 20% of a preset size and placed in the central area; Calculate the area of ​​the remaining region; The remaining region is recursively divided based on the number of the secondary functional components, the size of each secondary functional component, and the area of ​​the remaining region; The secondary functional components are placed sequentially into the corresponding areas after the division, and the final interface layout is output.

[0017] Alternatively, the user interface generated by the dynamic layout algorithm can be saved to the interface layout template library.

[0018] Secondly, embodiments of the present invention provide a system for dynamically generating user interfaces based on LLM, comprising: The functional component acquisition unit is used to decompose the acquired user intent and map it into several functional components; The semantic attribute determination unit is used to determine the semantic attributes of each functional component based on the current usage scenario. The template matching unit is used to match each functional component with a pre-built interface layout template library based on the semantic attributes of each component. The user interface generation unit is used to generate a corresponding user interface based on the corresponding interface layout template in the interface layout template library if a match is successful. The dynamic layout algorithm unit is used to process each functional component and generate the corresponding user interface if a match is not found.

[0019] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the above-described method for dynamically generating a user interface based on LLM.

[0020] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform a method for dynamically generating a user interface based on LLM as described in any of the first aspects.

[0021] According to the method, system, and storage medium for dynamically generating user interfaces based on LLM of the present invention, different interface layout templates are designed according to the different numbers of important functional components and secondary important components, and an interface layout template library is pre-built. When the LLM dynamically generates the user interface (UI), the important functional components and secondary important components obtained according to the user's intention are matched with the pre-built interface layout templates. If no match is found, a reasonable interface layout is formulated by using a dynamic layout algorithm, combined with the interface size and the size of each function.

[0022] Understandably, the system described in the second aspect, the electronic device described in the third aspect, and the computer storage medium described in the fourth aspect are all used to execute the corresponding method in the first aspect provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding method provided above, and will not be repeated here. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart of a method for dynamically generating a user interface based on LLM according to an embodiment of the present invention; Figure 2 This is a system logic structure block diagram of a user interface dynamically generated based on LLM according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the logic structure of an electronic device according to an embodiment of the present invention.

[0025] In all the accompanying drawings, the same reference numerals indicate similar or corresponding features or functions. Detailed Implementation

[0026] In the following description, numerous specific details are set forth for illustrative purposes and to provide a thorough understanding of one or more embodiments. However, it will be apparent that these embodiments may also be implemented without these specific details.

[0027] The embodiments of this invention can be applied to electronic devices such as computer systems / servers, which can operate with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations suitable for use with electronic devices such as computer systems / servers include, but are not limited to: personal computer systems, server computer systems, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0028] Electronic devices such as computer systems / servers can be described in the general context of computer-executable instructions (such as program modules) executed by the computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers and other electronic devices can be implemented in distributed cloud computing environments, where tasks are performed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0029] In this invention, it is important to explain that LLM (Large Language Model) refers to a deep learning model trained on a large amount of text data, enabling it to generate natural language text or understand the meaning of language text. These models can provide in-depth knowledge and language production on various topics by training on massive datasets. The core idea is to learn the patterns and structures of natural language through large-scale unsupervised training, simulating human language cognition and generation processes to a certain extent. LLMs perform exceptionally well in various application scenarios, capable of performing not only simple language tasks such as spell checking and grammar correction, but also complex tasks such as text summarization, machine translation, sentiment analysis, dialogue generation, and content recommendation. Through pre-training on large-scale datasets, large language models acquire powerful general modeling and generalization capabilities. Large language models have achieved great success in fields such as natural language processing and are gradually being applied in finance, healthcare, education, and automotive industries. In this invention, the LLM is applied to the intelligent cockpit of an automobile.

[0030] User Interface (UI) is the medium through which a system and users interact and exchange information. It converts information from its internal form to a form that humans can understand. A user interface is software designed to facilitate interaction and communication between the user and hardware. Its purpose is to enable users to operate the hardware conveniently and efficiently to achieve two-way interaction and complete the tasks they wish to accomplish with the help of the hardware. The definition of a user interface is broad, encompassing human-computer interaction and graphical user interfaces. User interfaces exist in any field involving information exchange between humans and machines.

[0031] In the following description, numerous specific details are set forth for illustrative purposes and to provide a thorough understanding of one or more embodiments. However, it will be apparent that these embodiments may also be implemented without these specific details.

[0032] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present invention.

[0033] This invention provides a method for dynamically generating user interfaces based on LLM (Liquidity Management System). (See reference...) Figure 1 The diagram shown is a flowchart illustrating a method for dynamically generating a user interface based on LLM, as provided in an embodiment of the present invention. This method can be executed by a device, which can be implemented in software and / or hardware.

[0034] In this embodiment, the method for dynamically generating user interfaces based on LLM includes: S1: Decompose the acquired user intent and map it into several functional components; S2: Determine the semantic attributes of each functional component based on the current usage scenario; S3: Match each functional component with a pre-built interface layout template from the interface layout template library based on the semantic attributes of each component. S4: If the match is successful, the corresponding user interface is generated according to the corresponding interface layout template in the interface layout template library; S5: If a match is not found, the corresponding user interface is generated by processing several functional components through a dynamic layout algorithm.

[0035] In this invention, a pre-built interface layout template library is constructed. The various interface layout templates in this library are designed according to different numbers of important and secondary functional components. When the LLM dynamically generates the user interface (UI), the important and secondary functional components requested by the user are matched against the pre-built interface layout templates. If no match is found, a dynamic layout algorithm is used, taking into account the interface size and the size of each function, to determine a reasonable interface layout. In S1 and S2, when a user enters the car's smart cockpit, the LLM (Local Management Module) can obtain the user's intent based on the current location and time. For example, if the current time is 5:30 PM and the location is an office building, the LLM will retrieve the user's intent based on the current time and location and historical records. User intent mainly includes using navigation, listening to music, traffic radio, or news broadcasts, etc. Based on the user intent, navigation components, music components, broadcast components, etc., are derived.

[0036] Based on the current application scenario, time, and location, navigation is the most important function. Therefore, the navigation component is set as the primary functional component, while the music and broadcast components are secondary functional components.

[0037] It should be noted that the semantic attributes of the functional components include: component type, component identifier, component location information, and size; the component type determines whether the functional component is an important functional component or a secondary functional component; that is, based on the component type of the semantic attributes in each component, it is determined which of all components are important functional components and which are secondary functional components.

[0038] Additionally, the size and position of this component are set according to its type. Specifically, if it is an important functional component, it is placed in the center and its size is set to be larger; if it is a secondary functional component, it is placed in the peripheral area and its size is set to be relatively smaller. This setting is to highlight the important functional components, making them more convenient and eye-catching to use.

[0039] In S3 and S4, the pre-built interface layout template library includes several interface layout templates, which are constructed based on different layout information. The layout information includes the number of important functional components, the number of secondary functional components, the theme, canvas attributes, and background color. The interface layout template library contains several interface layout templates with different layouts, primarily those with varying numbers of important and secondary functional components, for use during subsequent matching.

[0040] In an embodiment of the present invention, the step of matching each functional component with an interface layout template in a pre-built interface layout template library based on the semantic attributes of each component includes: S31: Determine the number of important functional components and the number of secondary functional components of the user intent based on the semantic attributes of several functional components; S32: Match the number of important and secondary functional components of the user intent with the number of important and secondary functional components in the interface layout template; S33: If the user intent matches the number of important functional components and the number of secondary functional components in the interface layout template, then the match is successful.

[0041] Steps S31 to S33 involve precise matching based on the number of components. Furthermore, if the number of components is inconsistent, a fuzzy matching method is used. Specifically, matching each functional component with a pre-built interface layout template library based on its semantic attributes further includes: if the number of important functional components of the user intent matches the number of important functional components of the interface layout template, and the number of secondary functional components of the user intent is greater than the number of secondary functional components of the interface layout template, then a flow template is used as the adapted interface layout template. It should be noted that, unlike general templates where the number of important and secondary components must match, flow templates can match a consistent number of important components, with the number of secondary components falling within a certain range.

[0042] In other words, the number of important functional components determined based on user intent is the same as the number of important functional components in the interface layout templates in the interface layout template library. However, the total number of components in the user intent is greater than the total number of components in the interface layout templates. In this case, a fuzzy matching method is adopted, and a flow template is used to match the user intent. That is, the flow template is used as the adapted interface layout template to generate the user interface.

[0043] In S5, in an embodiment of the present invention, if the functional component generated by the user intent fails to match the interface layout template in the interface layout template library through both of the above two methods: exact matching (module type and quantity are completely consistent) and fuzzy matching, then a dynamic layout algorithm is used to process the functional component generated by the user intent. Therefore, when there is no suitable template for matching, the dynamic layout algorithm is invoked. Specifically, the process of generating a corresponding user interface by processing each functional component using the dynamic layout algorithm includes: S51: Select all the important functional components from a number of functional components; S52: Enlarge the size of the important functional component by a preset size of 20% and place it in the central area; S53: Calculate the area of ​​the remaining region; S54: Recursively divide the remaining region according to the number of the secondary functional components, the size of each secondary functional component, and the area of ​​the remaining region; S55: Place the secondary functional components sequentially into the corresponding areas after the division, and output the final interface layout.

[0044] In this embodiment of the invention, unlike traditional recursive partitioning, which is a linear division that places the first component (the important functional component) in a corner, this invention first reserves an enlarged central area for the important functional component, and then recursively partitions the remaining space for other functional components, ensuring overall layout coordination. Finally, each functional component is injected into the template area to generate the final UI code.

[0045] Furthermore, in embodiments of the present invention, the user interface generated by the dynamic layout algorithm is saved to the interface layout template library for future use.

[0046] In summary, the method for dynamically generating user interfaces based on LLM provided by this invention has the following beneficial effects: (1) The present invention generates semantic attributes of functional components (such as the number of functional components, whether they are important components, and the location information of the components) based on user intent, thereby avoiding the direct generation of coordinates; (2) A pre-built interface layout template library with several interface layout templates is used to ensure that the interface layout structure is reasonable and visually appealing. (3) Match the semantic attributes of the functional components with the interface layout templates in the interface layout template library. In most cases, the templates can be matched directly, thereby improving the generation speed and stability of the user interface. (4) Template matching can ensure that user interfaces with the same layout may be generated at different times, thus ensuring consistency and maintainability.

[0047] like Figure 2 The diagram shown is a block diagram of the system for dynamically generating user interfaces based on LLM according to the present invention.

[0048] The LLM-based dynamic user interface generation system 100 described in this invention can be installed in an electronic device. Depending on the functions implemented, the LLM-based dynamic user interface generation system may include: a functional component acquisition unit 110, a semantic attribute determination unit 120, a template matching unit 130, a user interface generation unit 140, and a dynamic layout algorithm unit 150. The units described in this invention can also be called modules, which mainly refer to a series of computer program segments that can be executed by the processor of an electronic device and can perform fixed functions, stored in the memory of the electronic device.

[0049] In this embodiment, the functions of each module / unit are as follows: The functional component acquisition unit 110 is used to decompose the acquired user intent and map it into several functional components; The semantic attribute determination unit 120 is used to determine the semantic attributes of each functional component based on the current usage scenario; Template matching unit 130 is used to match each functional component with an interface layout template in a pre-built interface layout template library based on the semantic attributes of each component. The user interface generation unit 140 is used to generate a corresponding user interface based on the corresponding interface layout template in the interface layout template library if a match is successful. The dynamic layout algorithm unit 150 is used to process each functional component and generate the corresponding user interface if a match is not found.

[0050] Specifically, the semantic attribute determination unit: the semantic attributes of the functional component include: component type, component identifier, component location information, and size; the component type is used to determine whether the functional component is an important functional component or a secondary functional component.

[0051] Template matching unit and user interface generation unit: Matching each functional component with a pre-built interface layout template library based on its semantic attributes includes: Based on the semantic attributes of several functional components, determine the number of important functional components and the number of secondary functional components of the user intent; The number of important and secondary functional components of the user intent is matched with the number of important and secondary functional components in the interface layout template. If the user's intent matches the number of both major and minor functional components in the interface layout template, then the match is successful.

[0052] Furthermore, the matching of each functional component with a pre-built interface layout template library based on its semantic attributes also includes: If the number of important functional components of the user intent is the same as the number of important functional components of the interface layout template, and the number of minor functional components of the user intent is greater than the number of minor functional components of the interface layout template, then a flow template is used as the adapted interface layout template.

[0053] Dynamic layout algorithm unit: The step of processing each functional component using a dynamic layout algorithm to generate a corresponding user interface includes: Select all the important functional components from a set of functional components; The size of the important functional components is increased by 20% of a preset size and placed in the central area; Calculate the area of ​​the remaining region; The remaining region is recursively divided based on the number of the secondary functional components, the size of each secondary functional component, and the area of ​​the remaining region; The secondary functional components are placed sequentially into the corresponding areas after the division, and the final interface layout is output.

[0054] It should be noted that the above embodiments of the system for dynamically generating user interfaces based on LLM and the embodiments of the method for dynamically generating user interfaces based on LLM can be used for reference, and will not be elaborated further here.

[0055] Figure 3 This is a schematic diagram of the electronic device that implements the LLM-based system for dynamically generating user interfaces according to the present invention.

[0056] like Figure 3 As shown, the electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as an LLM-based dynamically generated user interface program 12.

[0057] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 can include both internal and external storage units of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a cloud-vehicle integrated service dynamic configuration program, but also to temporarily store data that has been output or will be output.

[0058] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., dynamic configuration programs for cloud-vehicle integrated services) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0059] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0060] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0061] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0062] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0063] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0064] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0065] The memory 11 in the electronic device 1 stores a program 12 for dynamically generating user interfaces based on LLM, which is a combination of multiple instructions. When run in the processor 10, it can realize the method of dynamically generating user interfaces based on LLM.

[0066] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0067] In the several embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for dynamically generating user interfaces based on LLM, applied to electronic devices, characterized in that, include: The acquired user intent is decomposed and mapped into several functional components; Determine the semantic attributes of each functional component based on the current usage scenario; Based on the semantic attributes of each functional component, it is matched with the interface layout template in the pre-built interface layout template library; If a match is successful, the corresponding user interface is generated based on the corresponding interface layout template in the interface layout template library. If a match is not found, a dynamic layout algorithm is used to process several functional components to generate the corresponding user interface.

2. The method for dynamically generating user interfaces based on LLM according to claim 1, characterized in that, The semantic attributes of the functional components include: component type, component identifier, component location information, and size; The component type determines whether the functional component is an important functional component or a secondary functional component.

3. The method for dynamically generating user interfaces based on LLM according to claim 2, characterized in that, The pre-built interface layout template library includes several interface layout templates, which are constructed based on different layout information; wherein, The layout information includes the number of important functional components, the number of secondary functional components, the theme, canvas attributes, and background color.

4. The method for dynamically generating user interfaces based on LLM according to claim 3, characterized in that, The matching of each functional component with a pre-built interface layout template library based on its semantic attributes includes: Based on the semantic attributes of several functional components, determine the number of important functional components and the number of secondary functional components of the user intent; The number of important and secondary functional components of the user intent is matched with the number of important and secondary functional components in the interface layout template. If the user's intent matches the number of both major and minor functional components in the interface layout template, then the match is successful.

5. The method for dynamically generating user interfaces based on LLM according to claim 4, characterized in that, The matching of each functional component with a pre-built interface layout template library based on its semantic attributes also includes: If the number of important functional components of the user intent is the same as the number of important functional components of the interface layout template, and the number of minor functional components of the user intent is greater than the number of minor functional components of the interface layout template, then a flow template is used as the adapted interface layout template.

6. The method for dynamically generating user interfaces based on LLM according to claim 4, characterized in that, The process of generating a corresponding user interface by processing each functional component using a dynamic layout algorithm includes: Select all the important functional components from a set of functional components; The size of the important functional components is increased by 20% of a preset size and placed in the central area; Calculate the area of ​​the remaining region; The remaining region is recursively divided based on the number of the secondary functional components, the size of each secondary functional component, and the area of ​​the remaining region; The secondary functional components are placed sequentially into the corresponding areas after the division, and the final interface layout is output.

7. The method for dynamically generating user interfaces based on LLM according to claim 6, characterized in that, The user interface generated by the dynamic layout algorithm is saved to the interface layout template library.

8. A system for dynamically generating user interfaces based on LLM, characterized in that, include: The functional component acquisition unit is used to decompose the acquired user intent and map it into several functional components; The semantic attribute determination unit is used to determine the semantic attributes of each functional component based on the current usage scenario. The template matching unit is used to match each functional component with a pre-built interface layout template library based on the semantic attributes of each component. The user interface generation unit is used to generate a corresponding user interface based on the corresponding interface layout template in the interface layout template library if a match is successful. The dynamic layout algorithm unit is used to process each functional component and generate the corresponding user interface if a match is not found.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steps of the method for dynamically generating a user interface based on LLM as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method of dynamically generating a user interface based on LLM as described in any one of claims 1-7.