Method, device and equipment for generating interface codes based on large model

The method of generating interface code using large models solves the problem of low efficiency in traditional UI design systems, enabling the rapid and accurate generation of interface code that meets user needs, improving generation efficiency and consistency, and supporting user-specific design specifications and component libraries.

CN120973360APending Publication Date: 2025-11-18ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511016883.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing technologies, traditional UI design systems are inefficient and difficult to extend when generating interfaces. They cannot quickly generate interface code that meets the needs of various users. Furthermore, large language model interface code generation tools suffer from inconsistencies between user intent and generated results, lack of support for business design specifications, and insufficient compatibility with enterprise component libraries.

Method used

By acquiring user demand information, semantic parsing is performed using a large model to output design system information, theme information, and component information. The design system framework description document and target learning document are obtained by associating with the target system repository, and target theme, page framework, and components are generated. Finally, interface code that meets user needs is generated.

Benefits of technology

It enables the rapid and accurate generation of interface code that meets the needs of various users, improves generation efficiency, reduces user costs, ensures that the generated interface is consistent with user needs, and can effectively call and configure user-specific component libraries to meet actual business requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973360A_ABST
    Figure CN120973360A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method, device and equipment for generating interface codes based on a large model. In the embodiment of the invention, the method comprises the following steps: inputting obtained user demand information into a large model for semantic analysis, and outputting design system information, theme information, page frame information and component information; associating a target system warehouse according to the design system information, and obtaining a design system framework description document of the target system warehouse; according to the design system framework description document, the theme information, the page framework information and the component information, sequentially obtaining a plurality of target learning documents in a target system warehouse; generating a target theme, a target page frame and a plurality of target components according to the plurality of target learning documents; and generating an interface code according to the target theme, the target page frame and the plurality of target components. By means of the method, the interface codes meeting various user requirements can be rapidly and accurately generated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, more particularly, to a method, device and equipment for generating interface code based on large model. BACKGROUND

[0002] When facing diversified business scenarios, the traditional UI design system is inefficient and difficult to expand when generating interfaces due to the reliance on fixed templates and manual adjustments. With the rapid growth of mid-back-end product requirements, the demand for interfaces that meet various business scenarios continues to increase, and the efficiency of R&D personnel is limited, making it difficult to quickly generate a large number of interfaces.

[0003] In the prior art, a large language model (LLM) is used to generate interface code according to user natural language, and then an interface is generated through the interface code, which can improve the efficiency of interface generation. However, the large language model interface code generation tool can automatically generate interface code to some extent by calling a preset component library, but its functionality and applicability still have significant technical defects, including inconsistency between user intent and generated results, lack of support for business design specifications, and insufficient compatibility with enterprise component libraries, which cannot quickly and accurately generate interface code that meets various user needs.

[0004] In summary, how to quickly and accurately generate interface code that meets various user needs is a problem that needs to be solved. SUMMARY

[0005] Therefore, the embodiments of the present application provide a method, device and equipment for generating interface code based on a large model, which can quickly and accurately generate interface code that meets various user needs.

[0006] In a first aspect, the embodiments of the present application provide a method for generating interface code based on a large model, which includes: obtaining user demand information; inputting the user demand information into a large model for semantic analysis, and outputting design system information, theme information, page framework information and component information; associating a target system warehouse according to the design system information, and obtaining a design system framework description document of the target system warehouse; sequentially obtaining a plurality of target learning documents in the target system warehouse according to the design system framework description document, the theme information, the page framework information and the component information, wherein each target learning document is design rule description information of the pre-set theme information, page framework information and component information; generating a target theme, a target page framework and a plurality of target components according to the plurality of target learning documents; and generating interface code according to the target theme, the target page framework and the plurality of target components.

[0007] Optionally, the method further comprises: generating a target interface according to the interface code.

[0008] Optionally, the method further comprises: revising the interface code.

[0009] Optionally, the target learning documents in the target system repository are sequentially obtained according to the design system framework description document, the theme information, the page framework information and the component information, specifically comprising: obtaining a target learning document corresponding to the theme information according to the design system framework description document and the theme information; obtaining a target learning document corresponding to the page framework information according to the target theme and the page framework information; and obtaining a target learning document corresponding to the component information according to the component information for each function area of the target page framework.

[0010] Optionally, the target theme, the target page framework and the plurality of target components are generated according to the plurality of target learning documents, specifically comprising: generating the target theme according to the target learning document corresponding to the theme information; generating the target page framework according to the target learning document corresponding to the page framework information; and generating a plurality of target components according to the target learning document corresponding to the component information.

[0011] Optionally, the generation process of the design system information comprises: obtaining a design structure diagram of a target system repository; inputting the design structure diagram into a large model to output the design system framework description document, wherein the design system framework description document is a natural language description of the design structure diagram.

[0012] Optionally, the generation process of the target learning document in the target system repository comprises: obtaining type requirements, description requirements and format requirements for generating the target learning document; inputting the type requirements, the description requirements, the format requirements and the design system framework description document into a large model to output a plurality of target learning documents.

[0013] Optionally, the method further comprises: setting a generation process of the interface code; and training the large model according to the generation process.

[0014] In a second aspect, an apparatus for generating interface code based on a large model is provided. The apparatus includes an obtaining unit configured to obtain user demand information; an analyzing unit configured to input the user demand information into a large model for semantic analysis, and output design system information, theme information, page framework information, and component information; the obtaining unit is further configured to associate a target system repository according to the design system information, and obtain a design system framework description document of the target system repository; the obtaining unit is further configured to obtain a plurality of target learning documents in the target system repository in sequence according to the design system framework description document, the theme information, the page framework information, and the component information; and a generating unit configured to generate a target theme, a target page framework, and a plurality of target components according to the plurality of target learning documents, wherein each of the target learning documents is design rule description information of the theme information, the page framework information, and the component information that are pre-set; and the generating unit is further configured to generate interface code according to the target theme, the target page framework, and the plurality of target components.

[0015] Optionally, the generating unit is further configured to generate a target interface according to the interface code.

[0016] Optionally, the apparatus further includes a correcting unit configured to correct the interface code.

[0017] Optionally, the obtaining unit is specifically configured to obtain a target learning document corresponding to the theme information according to the design system framework description document and the theme information; obtain a target learning document corresponding to the page framework information according to the target theme and the page framework information; and obtain a target learning document corresponding to the component information according to the component information for each functional area of the target page framework.

[0018] Optionally, the generating unit is specifically configured to generate the target theme according to the target learning document corresponding to the theme information; generate the target page framework according to the target learning document corresponding to the page framework information; and generate a plurality of target components according to the target learning document corresponding to the component information.

[0019] Optionally, a generation process of the design system information includes that the obtaining unit is further configured to obtain a design structure diagram of a target system repository; and the generating unit is further configured to input the design structure diagram into a large model, and output the design system framework description document, wherein the design system framework description document is a description in a natural language form of the design structure diagram.

[0020] Optionally, the generation process of the target learning document in the target system warehouse comprises that the acquisition unit is further configured to acquire type requirements, description requirements and format requirements for generating the target learning document; and the generation unit is further configured to input the type requirements, the description requirements, the format requirements and the design system framework description document into a large model, and output a plurality of the target learning documents.

[0021] Optionally, the apparatus further comprises a setting unit configured to set a generation process of the interface code; and a training unit configured to train the large model according to the generation process.

[0022] In a third aspect, an electronic device is provided, which includes a memory and a processor, the memory being configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to the first aspect or any possible implementation of the first aspect.

[0023] In a fourth aspect, a computer readable storage medium is provided, which stores computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method according to the first aspect or any possible implementation of the first aspect.

[0024] In the embodiments of the present application, the user demand information is acquired, the user demand information is input into a large model for semantic analysis, and design system information, theme information, page framework information and component information are output; the target system warehouse is associated according to the design system information, and a design system framework description document of the target system warehouse is acquired; a plurality of target learning documents in the target system warehouse are acquired in sequence according to the design system framework description document, the theme information, the page framework information and the component information, wherein each target learning document is design rule description information of the pre-set theme information, page framework information and component information; a target theme, a target page framework and a plurality of target components are generated according to the plurality of target learning documents; and interface code is generated according to the target theme, the target page framework and the plurality of target components. Through the above method, interface code meeting various user demands can be quickly and accurately generated. BRIEF DESCRIPTION OF DRAWINGS

[0025] The above and other objects, features and advantages of the present application will become more apparent from the following description of embodiments of the present application, taken in conjunction with the accompanying drawings, in which:

[0026] Figure 1 is a method flowchart for generating design system information in the embodiments of the present application;

[0027] Figure 2is a design structure diagram of a target system warehouse in an embodiment of the present application;

[0028] Figure 3 is a method flowchart for generating a target learning document in an embodiment of the present application;

[0029] Figure 4 is a method flowchart for training a large model in an embodiment of the present application;

[0030] Figure 5 is a method flowchart for generating interface code based on a large model in an embodiment of the present application;

[0031] Figure 6 is a method flowchart for generating interface code based on a large model in another embodiment of the present application;

[0032] Figure 7 is a device schematic diagram for generating interface code based on a large model in an embodiment of the present application;

[0033] Figure 8 is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The present application is described below based on embodiments, but the present application is not limited to only these embodiments. In the following detailed description of the present application, some specific details are described in detail. The present application can also be fully understood without the description of these details by those skilled in the art. In order to avoid confusion of the essence of the present application, well-known methods, processes, flows, elements and circuits are not described in detail.

[0035] In addition, those of ordinary skill in the art should understand that the drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0036] Unless the context clearly requires otherwise, throughout the description and the claims of this application, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is to say, in the sense of "including, but not limited to".

[0037] In the description of the present application, it should be understood that the terms "first", "second", etc. are only for the purpose of description and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise stated, the meaning of "multiple" is two or more.

[0038] In the prior art, the LLM interface code generation tool includes readdy.ai, v0, etc., which first generates interface code according to the user's natural language, and then generates the interface through the interface code, which can improve the generation efficiency of the interface. However, the large language model interface code generation tool can automatically generate interface code by calling a preset component library to a certain extent, but its function and applicability still have significant technical defects, including inconsistency between user intent and generated results, lack of support for business design specifications, and insufficient compatibility with enterprise component libraries. Among them, the inconsistency between the user intent and the generated results of the above indicates that there is a significant gap between the interface code generated by the LLM and the actual needs of the user. The user needs to provide accurate and detailed interface descriptions and adjust through multiple rounds of interaction to obtain a more ideal generated result, which not only increases the user's use cost, but also reduces the generation efficiency and user experience. The lack of support for business design specifications above indicates that existing tools only support using default themes or component libraries, and cannot flexibly preset enterprise-specific theme tokens or follow specific design specifications, resulting in a deviation between the generated interface in visual style, functionality and user experience and business requirements, making it difficult to be directly applied to actual R&D processes, affecting its practicality and generalizability in enterprise internal. The insufficient compatibility with enterprise component libraries above indicates that existing generation tools are limited to general component libraries or model default components and cannot effectively call and correctly configure enterprise-specific component libraries. The above limitations make the generated interface code unable to meet the functional requirements of existing business systems, resulting in the generated results remaining in the trial stage and being difficult to achieve large-scale application in actual business scenarios. Therefore, how to quickly and accurately generate interface code that meets the needs of multiple users is a problem that needs to be solved.

[0039] In the embodiments of the present application, the large language model LLM can also be referred to as a large model or a large language model, etc. The large language model is a deep learning model based on a transformer architecture, which can process and generate natural language text, is usually trained on a large amount of text data, has the ability to understand and generate language, and is widely used in dialogue systems, text generation and other natural language processing tasks.

[0040] In the embodiments of the present application, the large language model can be applied to different design systems to generate different interface codes that meet the requirements of each design system. First, the design structure diagram of the design system and the description of the functional requirements of the design system are obtained, so that the large language model can directly call a unified design specification and independently understand, coordinate and implement based on the description, and then generate different interface codes based on different design systems.

[0041] In one possible implementation, the method for generating a design system framework description document comprises the following steps: Figure 1As shown, it comprises the following:

[0042] Step S101, acquire the design structure diagram of the target system warehouse.

[0043] Specifically, different target system warehouses have different design structure diagrams, wherein the target system warehouse can also be referred to as a design system, and the design system is a structured design specification system for designing different UI interfaces.

[0044] For example, assume that the design structure diagram is as shown in Figure 2 As shown, it is divided into a system layer, a domain layer, an entity layer, and an attribute layer; wherein the design system 201 includes a theme (Theme) 202 and a component (Component) 203; the theme 202 includes a design token (Global Token) 204 and a page framework (Page Framework) 205; the design token 204 includes a token list (Token List) 206 and a token document (Token Doc) 207; the page framework 205 includes a layout specification (LayoutSpec) 208 and a page document (PageDoc) 209; the component 203 includes code (code) 210 and a component document (Component Doc) 211; the code 210 includes an application programming interface (Application Programming Interface, API) 212; the component document 211 includes an interface description (APIDesc) 213 and an interface call plan (APICall Plan) 214; the design system 201 belongs to the system layer; the theme 202 and the component 203 belong to the domain layer; the design token 204, the page framework 205, the code 210, and the component document 211 belong to the entity layer; the token list 206, the token document 207, the layout specification 208, the page document 208, the application programming interface 212, the interface description 213, and the interface call plan 214 belong to the attribute layer; the above Figure 2 This is only an example, and the specific design structure diagram is related to the design system, and is determined according to actual conditions.

[0045] In one possible implementation, the theme can also be referred to as a global style, and the design token can also be referred to as a design token system, which is not limited by the embodiments of the application, and is determined according to actual conditions.

[0046] Step S102, input the design structure diagram into a large model, and output a design system framework description document.

[0047] Specifically, the design system framework description document is a description in natural language form of the design structure diagram.

[0048] In one possible implementation, the aforementioned Figure 2 The design structure diagram is input into the large model, and the design system framework description document is output, specifically: "The core modules of the design system framework include two core areas: Theme (global style) and Component (component): 1. Theme (global style): The theme area includes the global Design Token (design token system) and Page Framework (page framework), which are used to unify the interface style and specifications. (1) The Global Token (design token system) is responsible for defining global design variables, including Token List (token list) and Token Doc (token document). Token List includes basic design elements such as color, layout, corners, lines, size, and shadow. Token Doc is used to describe the definition, applicable scenarios and inapplicable scenarios of each Token, which is convenient for AI to understand and call. (2) Page Framework (page framework) includes Layout Spec (layout specification) and Page Doc (page document). Layout Spec defines page structure specifications such as cards, layout, and spacing. Page Doc records design specifications and rules of conduct, guiding AI to generate page structures that conform to the specifications. 2. Component (component): The component area includes Code (code implementation) and Component The Doc (component documentation) is used to standardize the calling and configuration of components. (1) Code (code implementation) defines the interaction and style specifications of components such as Props, Events, Slots, and CSS through APIs (interfaces), reducing the complexity of calling components. (2) The Component Doc contains APIDesc (API description) and API Call Plan (API calling scheme). APIDesc describes in detail the API name, type, default value, description, and application scenarios of each type. API Call Plan provides component definition, calling steps, and detailed settings to guide AI to automatically and systematically call components. "This is only an example illustration."

[0049] In a possible implementation, the global style refers to a set of interface overall visual styles defined in a design system, which is composed of a global design token system and a page framework system; the design token system refers to a dimension for uniformly controlling quantification of visual language in a page and a corresponding quantification value in the design system; the page framework refers to a predefined page layout form in the design system; the API refers to a functional interface definition of a component; the component document refers to a standardized calling description file of the component; the token document refers to a detailed specification document of the global token; the page document refers to a specification specification document of the page framework; the API description refers to a detailed calling specification document of the component API; and the API calling scheme refers to a calling step and configuration example document of the component API.

[0050] In a possible implementation, a method for generating a description of a functional requirement of the design system (which can also be referred to as a target learning document in a target system warehouse) includes the following steps. Figure 3

[0051] In step S301, a type requirement, a description requirement, and a format requirement for generating the target learning document are obtained.

[0052] ​Specifically, the type requirements include: "1. Global style: Token: [brief definition description]. Usually used for [application scenarios], achieve [visual / experience effect], give users [perception / emotion] experience. 2. Page framework: Layout: [structure / layout definition]. Usually used for [certain content organization purposes], create [space relationship] effect, give users [navigation / understanding] experience. 3. Component: API: [function / property definition]. Usually used to achieve [specific interaction / display requirements], give users [operation experience / information acquisition] experience. Usage scenarios: used for [general scenarios], recommended for [suitable functions], not recommended for [unsuitable functions]." The description of each type dimension has its own emphasis while maintaining similar structure. The description requirements include: "1. Style: concise expression, accurate expression, ensure concise and concise, not abstract and sensory language, easy for LLM to understand and learn; Do not use abstract, self-created, and directly understandable language; 2. Structure: ensure consistent structure of each attribute description, especially "definition", "achieve effect", and "not recommended" parts; 4. Range: each "type" needs to be described, not just the default value or one of them; Each "type" description needs to be displayed in line; Accurate description, accurate, with limited range, consistent with actual situation. 5. Example: "Usage scenarios" should not repeat the content in "description"; And the usage scenarios also need to describe each type, such as 'primary': used for key operations such as submitting forms, saving data, and querying; Not recommended for reverse operations such as deletion and withdrawal that require user caution; 6. Usage scenarios: need to be specific to functional scenarios, and may appear case function examples, such as "used for interfaces with limited space, such as filtering areas, toolbars, or pop-up windows"; Do not use abstract descriptions, such as "used for most standard form layouts" need to be changed to "used for most standard form layouts, such as registration, questionnaire". The format requirements include: "use Markdown format that is easy for Artificial Intelligence (AI) to read, and the description aligns with the naming of the design system's own code structure"; This is only an example.

[0053] In step S302, the type requirements, the description requirements, the format requirements, and the design system framework description document are input into the large model, and a plurality of target learning documents are output.

[0054] Each of the target learning documents is design rule description information of pre-set theme information, page framework information, and component information.

[0055] For example, the design rule description information of the theme information (i.e., global style) is shown in Table 1 as follows:

[0056] Table 1

[0057]

[0058]

[0059] In the above table 1, “-**Design Specification**:-**none**: For elements that require a square and serious feel, such as data tables, code editors, etc. -**small**: For elements that require subtle rounded corners, such as small components, table cells, small buttons, etc. -**medium**: The system default rounded corner value, used for regular components such as cards, standard buttons, input boxes, etc. -**large**: For elements that require clear visual separation, such as modals, large containers, featured cards, etc. -**pill**: For elements that require a completely round or capsule shape, such as labels, status indicators, toggle switches, etc.” The target learning document corresponding to the theme information generated by the large model.

[0060] For example, the specific example of the design rule description information of the page framework information is shown in Table 2 as follows:

[0061] Table 2

[0062]

[0063]

[0064] In the above table 2, “-**Design Specification**:-**row1(8)**: When the page width is 1280, display 8 elements per row -**min(1)**: When the page width is less than 1280, display at least 1 element per row -**max(12)**: When the page width is greater than 1280, display at most 12 elements per row.” The target learning document corresponding to the page framework information generated by the large model.

[0065] For example, the specific example of the design rule description information of the component information is shown in Table 3 as follows:

[0066] Table 3

[0067]

[0068]

[0069] In the above table 3, the Button component API description is the target learning document corresponding to the component information generated by the large model.

[0070] The above table 1, table 2 and table 3 are only exemplary descriptions, and the specific target learning document is generated according to the actual situation, and the present application does not limit it.

[0071] In a possible implementation, the above Figure 1 and Figure 3 The design system framework description document and the target learning document of the design system are generated respectively, and on this basis, a large model in an agent can call an interface code generation process of the design system pre-set in the agent to generate interface code; the pre-set interface code generation process is built into the large model, and specifically as shown in Figure 4 , the following is included:

[0072] Step S401, setting the generation process of the interface code.

[0073] Specifically, the production process set is as follows: associated design system, user demand analysis, associated theme package, layout selection, component calling, component configuration, icon and material configuration, interface code and interface generation, specification proofreading; wherein, the associated design system is used to establish the connection between the large model in the agent and the target system warehouse; the user demand analysis is used to analyze the functional requirements input by the user, determine theme information, page framework information and component information, etc.; the associated theme package is used to obtain the target learning document corresponding to the theme information according to the theme information determined by the user demand analysis; the layout selection is used to obtain the target learning document corresponding to the page framework information according to the page framework information determined by the user demand analysis, and select the page layout; the component calling is used to determine the target learning document corresponding to the component information according to the component information; the component configuration is used to configure API attributes and Token parameters, establish logical association between components, and realize page function filling; the icon and material configuration is used to identify the key positions of ICON and materials in the interface, select appropriate icons combined with semantic requirements, configure related Token parameters, and ensure that the interface semantic expression is accurate and consistent; the specification proofreading is used to check the function implementation and Token use specification of the generated interface; if parts that do not meet the specification or requirements are found, backtracking to the corresponding step for correction. The production process is determined according to actual conditions, and the embodiments of the present application do not limit it.

[0074] Step S402, training the large model according to the generation process.

[0075] Specifically, the generation process is internalized to the large model in the agent, so that the large model can automatically generate interface code in steps when generating interface code.

[0076] In the embodiments of the present application, after completing the training of the large model, a method for generating interface code based on the large model is proposed, and specifically as shown in Figure 5 , the method comprises:

[0077] Step S501, obtain user demand information.

[0078] Specifically, the user inputs the user demand information to the screen interface of the intelligent agent, and the large model in the intelligent agent obtains the user demand information, which represents the functional requirements of the user when constructing the interface.

[0079] Step S502, input the user demand information into the large model for semantic analysis, and output design system information, theme information, page framework information and component information.

[0080] Specifically, the intelligent agent understands and semantically analyzes the functional requirements input by the user, and extracts the functional points and structural information required by the interface.

[0081] Step S503, associate the target system warehouse according to the design system information, and obtain the design system framework description document of the target system warehouse.

[0082] Specifically, the design system is multiple, and according to the design system information, the target system warehouse corresponding to the target system can be determined in multiple design systems, and the design system framework description document of the target system is obtained.

[0083] Step S504, according to the design system framework description document, the theme information, the page framework information and the component information, the multiple target learning documents in the target system warehouse are obtained in turn.

[0084] Each of the target learning documents is the design rule description information of the pre-set theme information, page framework information and component information.

[0085] Specifically, the target learning document corresponding to the theme information is obtained according to the design system framework description document and the theme information; the target learning document corresponding to the page framework information is obtained according to the target theme and the page framework information; for each functional area of the target page framework, the target learning document corresponding to the component information is obtained according to the component information.

[0086] Step S505, generate a target theme, a target page framework and multiple target components according to the multiple target learning documents.

[0087] Specifically, the target theme is generated according to the target learning document corresponding to the theme information; the target page framework is generated according to the target learning document corresponding to the page framework information; and multiple target components are generated according to the target learning document corresponding to the component information.

[0088] In a possible implementation, the intelligent agent first learns the target learning document corresponding to the theme information, generates a target theme, and then further calls a design token system in the design system to obtain global design tokens such as color, layout, and size, to ensure uniformity of the interface style; then learns the target learning document corresponding to the page framework information, generates a target page framework, that is, a page layout; and finally, for each functional block in the page layout, requests the target system warehouse for the target learning document corresponding to the component information, learns the functions and attributes of available components, selects appropriate components according to requirements, and the intelligent agent calls the API of the selected components to obtain the specific implementation interface and parameter description of the components.

[0089] Step S506, generating interface code according to the target theme, the target page framework, and the plurality of target components.

[0090] In a possible implementation, the intelligent agent automatically generates interface code that meets the specifications and returns the generation result to the screen interface of the intelligent agent for display to the user; if the interface code does not meet the specifications, the interface code is corrected.

[0091] In the embodiment of the application, after the step S506, other methods are further included, specifically as shown in Figure 6 as shown, including:

[0092] Step S507, generating a target interface according to the interface code.

[0093] Specifically, the target interface is a UI interface that meets the functional requirements of the user.

[0094] Through the above embodiment, the functional requirements of the design system are converted into understandable description documents by the large language model, and the requirements are no longer expressed by code logic, but by a more natural and concise language; the large language model can more accurately understand and reason the user's intention based on the pre-set design specifications, so that the matching degree of the generated result and the user's intention is significantly improved, and the user's use cost is reduced; the user can input and pre-set specific design specifications (for example, brand color, font style, etc.) according to the user's business requirements, and the design specifications are integrated into the design system framework description document and called during generation, avoiding the dependence on a general component library or a default theme; the generated interface code can flexibly support the user-specific theme Token and design specifications, ensuring that the generated interface is consistent with the user's product specifications; the framework of the design system is split, there is no restriction on the material content, and the components can be flexibly added or deleted, and the use rules of the user's own component library can be described, so that the generated interface code can effectively call the user-specific component library and correctly configure the functions and styles of the components, meeting the functional requirements of the user.

[0095] In the embodiment of the present application, an apparatus for generating interface code based on a large model is provided, as shown in the specification, specifically comprising: an acquisition unit 701, an analysis unit 702, and a generation unit 703. Figure 7

[0096] The acquisition unit 701 is configured to acquire user demand information; the analysis unit 702 is configured to input the user demand information into a large model for semantic analysis, and output design system information, theme information, page framework information, and component information; the acquisition unit 701 is further configured to associate a target system warehouse according to the design system information, and acquire a design system framework description document of the target system warehouse; the acquisition unit 701 is further configured to acquire a plurality of target learning documents in the target system warehouse in sequence according to the design system framework description document, the theme information, the page framework information, and the component information; the generation unit 703 is configured to generate a target theme, a target page framework, and a plurality of target components according to the plurality of target learning documents, wherein each target learning document is design rule description information of the theme information, the page framework information, and the component information; and the generation unit 703 is further configured to generate an interface code according to the target theme, the target page framework, and the plurality of target components.

[0097] Further, the generation unit is further configured to generate a target interface according to the interface code.

[0098] Further, the apparatus further comprises a correction unit configured to correct the interface code.

[0099] Further, the acquisition unit is specifically configured to acquire a target learning document corresponding to the theme information according to the design system framework description document and the theme information; acquire a target learning document corresponding to the page framework information according to the target theme and the page framework information; and acquire a target learning document corresponding to the component information according to the component information for each functional area of the target page framework.

[0100] Further, the generation unit is specifically configured to generate the target theme according to the target learning document corresponding to the theme information; generate the target page framework according to the target learning document corresponding to the page framework information; and generate a plurality of target components according to the target learning document corresponding to the component information.

[0101] Further, the generation process of the design system information comprises: the acquisition unit is further configured to acquire a design structure diagram of a target system warehouse; and the generation unit is further configured to input the design structure diagram into a large model, and output the design system framework description document, wherein the design system framework description document is a description in a natural language form of the design structure diagram.​

[0102] Furthermore, the process of generating target learning documents in the target system repository includes: the acquisition unit is further configured to: acquire the type requirements, description requirements, and format requirements for generating the target learning documents; the generation unit is further configured to: input the type requirements, description requirements, format requirements, and the design system framework description document into the large model, and output multiple target learning documents.

[0103] Furthermore, the device further includes: a setting unit for setting the generation process of the interface code; and a training unit for training the large model according to the generation process.

[0104] Figure 8 This is a schematic diagram of the structure of the electronic device described in an embodiment of the present invention. Figure 8 As shown, it includes a general computer hardware architecture, which includes at least a processor 801 and a memory 802. The processor 801 and the memory 802 are connected via a bus 803. The memory 802 is adapted to store instructions or programs executable by the processor 801. The processor 801 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 801 executes the instructions stored in the memory 802 to perform the method flow of the embodiments of the present invention as described above, thereby realizing data processing and control of other devices. The bus 803 connects the above-mentioned components together, and also connects the above-mentioned components to a display controller 804, a display device, and an input / output (I / O) device 805. The input / output (I / O) device 805 can be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 805 is connected to the system via an input / output (I / O) controller 806.

[0105] The instructions stored in memory 802 are executed by at least one processor 801 to achieve the following: acquiring user requirement information; inputting the user requirement information into a large model for semantic parsing, and outputting design system information, theme information, page framework information, and component information; associating the design system information with a target system repository and acquiring the design system framework description document of the target system repository; sequentially acquiring multiple target learning documents in the target system repository based on the design system framework description document, the theme information, the page framework information, and the component information, wherein each target learning document is a pre-set design rule description information for the theme information, the page framework information, and the component information; generating a target theme, a target page framework, and multiple target components based on the multiple target learning documents; and generating interface code based on the target theme, the target page framework, and the multiple target components.

[0106] In particular, the electronic device includes one or more processors 801 and a memory 802, Figure 8 Taking one processor 801 as an example. The processor 801 and the memory 802 can be connected by a bus or other means, Figure 8 Taking the bus connection as an example. The memory 802 as a kind of non-volatile computer readable storage medium, it can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 801 executes the various functions of the device and data processing by running the non-volatile software programs, instructions and modules stored in the memory 802, that is, realizes the method for determining the interface code generated based on the large model.

[0107] The memory 802 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application program required by a function; the data storage area can store an option list and the like. In addition, the memory 802 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some embodiments, the memory 802 can optionally include a memory disposed remotely with respect to the processor 801, which can be connected to the external device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0108] One or more modules are stored in the memory 802, and when executed by one or more processors 801, the method for generating interface code based on a large model in any method embodiment described above is executed.

[0109] As those skilled in the art will appreciate, various aspects of the present embodiments can be implemented as a system, method or computer program product. Therefore, various aspects of the present embodiments can take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.) or an embodiment combining software and hardware aspects that can all generally be referred to herein as a "circuit", "module" or "system". Furthermore, various aspects of the present embodiments can take the form of a computer program product implemented in one or more computer readable media having computer readable program code embodied thereon.

[0110] Any combination of one or more computer readable medium can be utilized. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0111] A computer readable signal medium can include a propagated digital signal, with computer readable program code embodied in the propagated digital signal. Such a propagated signal can take a variety of forms including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0112] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0113] Computer program code for carrying out operations for aspects of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0114] The flowchart illustrations and / or block diagrams in the above described methods, devices (systems) and computer program products according to embodiments of the present application illustrate the various aspects of the embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0115] These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks.

[0116] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions executed on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0117] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0118] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal. The user refuses to process personal information other than the necessary information required for basic functions, which does not affect the user to use the basic functions.

Claims

1. A method for generating interface code based on a large model, characterized in that, The method includes: Obtain user demand information; The user requirement information is input into the large model for semantic parsing, and the output includes design system information, theme information, page framework information, and component information. Based on the design system information, associate with the target system repository and obtain the design system framework description document of the target system repository; According to the design system framework description document, the topic information, the page framework information and the component information, multiple target learning documents in the target system repository are obtained sequentially, wherein each target learning document is a pre-set design rule description information of the topic information, the page framework information and the component information; Generate a target theme, a target page framework, and multiple target components based on the multiple target learning documents; Interface code is generated based on the target theme, the target page framework, and multiple target components.

2. The method according to claim 1, characterized in that, The method further includes: Generate the target interface based on the interface code.

3. The method according to claim 1, characterized in that, The method further includes: The interface code has been corrected.

4. The method according to claim 1, characterized in that, The step of sequentially obtaining multiple target learning documents from the target system repository based on the design system framework description document, the topic information, the page framework information, and the component information specifically includes: Based on the design system framework description document and the topic information, obtain the target learning document corresponding to the topic information; Based on the target topic and the page frame information, obtain the target learning document corresponding to the page frame information; For each functional area of ​​the target page framework, the target learning document corresponding to the component information is obtained based on the component information.

5. The method according to claim 4, characterized in that, The step of generating a target topic, a target page framework, and multiple target components based on the multiple target learning documents specifically includes: The target topic is generated based on the target learning document corresponding to the topic information; Generate the target page framework based on the target learning document corresponding to the page framework information; Multiple target components are generated based on the target learning document corresponding to the component information.

6. The method according to claim 1, characterized in that, The process of generating the design system framework description document includes: Obtain the design structure diagram of the target system warehouse; The design structure diagram is input into the large model, and the design system framework description document is output, wherein the design system framework description document is a natural language description of the design structure diagram.

7. The method according to claim 6, characterized in that, The process of generating target learning documents in the target system repository includes: Obtain the type requirements, description requirements, and format requirements for generating the target learning document; The type requirements, description requirements, format requirements, and design system framework description document are input into the large model, and multiple target learning documents are output.

8. The method according to claim 1, characterized in that, The method further includes: Configure the process for generating the interface code; The large model is trained according to the generation process described above.

9. An apparatus for generating interface code based on a large model, characterized in that, The device includes: The acquisition unit is used to acquire user demand information; The parsing unit is used to input the user requirement information into the large model for semantic parsing and output design system information, theme information, page framework information and component information; The acquisition unit is further configured to: associate the target system repository with the design system information, and acquire the design system framework description document of the target system repository; The acquisition unit is further configured to: sequentially acquire multiple target learning documents in the target system repository according to the design system framework description document, the topic information, the page framework information and the component information; The generation unit is used to generate a target theme, a target page framework, and multiple target components based on the multiple target learning documents, wherein each target learning document is a pre-set design rule description information for the theme information, the page framework information, and the component information; The generation unit is further configured to: generate interface code based on the target theme, the target page framework, and multiple target components.

10. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.