Code conversion method and system based on artificial intelligence large model
By using a large AI model-based code conversion method, and leveraging a three-layer key matching template and the longest prefix backtracking rule, the problem of low efficiency and error-proneness in manual code conversion is solved. This achieves efficient and standardized code generation, supports multiple technology stacks, and improves code quality and system applicability.
Patent Information
- Application Number
- CN202511298313.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2026-01-23
AI Technical Summary
In existing technologies, relying on manual conversion of design drafts, screenshots, or videos into code suffers from low efficiency, error-proneness, poor maintainability, and low reusability. Furthermore, code conversion technologies based on large-scale artificial intelligence models suffer from issues such as code generation confusion across different technology stacks and the large workload of repeatedly writing similar prompts.
The code conversion method based on a large AI model is adopted. It accurately matches templates through a three-layer key system of technology stack, page type, and design semantics. Standardized prompt words are stored in the template using JS key-value pairs. The longest prefix backtracking rule is used to match similar scenario templates. Combined with a placeholder mechanism and an enterprise VI priority rule engine, code that conforms to the target framework specification is generated.
It enables efficient and accurate conversion of visual materials into usable code, avoids code generation obfuscation, ensures code conformity to standards, reduces repetitive writing work, improves development efficiency and code quality, supports multiple technology stacks, and has good scalability and maintainability.
Smart Images

Figure CN121387247A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of software development and artificial intelligence deep integration, and particularly relates to a code conversion method and system based on an artificial intelligence large model. BACKGROUND
[0002] Currently, the work of converting design drafts, screenshots or videos into code mainly relies on manual work. Developers need to analyze the layout, style, interaction and other details in the visual material in detail, and then use Hyper Text Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript and other programming languages to write code to achieve the design effect. Relying on manual work to complete code conversion has problems such as low efficiency, easy to make mistakes, poor maintainability and low reusability.
[0003] With the development of artificial intelligence large models (AI), code conversion technology based on artificial intelligence large models has been applied, which can solve the problem of relying on manual work to complete code conversion. However, the current code conversion technology based on artificial intelligence large models has the problem of code generation confusion of different technology stacks, which leads to the output code often not meeting the target framework specification, and the workload of repeatedly writing similar prompt words is large, so that the use of artificial intelligence large model code conversion technology is limited. SUMMARY
[0004] In order to solve the above problems, the present application provides a code conversion method and system based on an artificial intelligence large model. On the basis of replacing manual work to complete code conversion, the present application precisely matches templates through three layers of keys of technology stack-page type-design semantics, avoids the code generation confusion of different technology stacks, can ensure that the output code meets the target framework specification, stores standardized prompt words through JS key-value pair templates, reduces the workload of repeatedly writing similar prompt words through the placeholder mechanism to support dynamic parameter injection, and improves the code generation availability of edge scenarios through the longest prefix backtracking rule to match approximate scenario templates.
[0005] In order to achieve the above purpose, the present application is implemented through the following technical solutions: In a first aspect, the present application provides a code conversion method based on an artificial intelligence large model, comprising: obtaining a visual material, and selecting an expected code generation technology stack from a preset list; According to the selected code generation technology stack, the corresponding prompt word is selected from the pre-configured system prompt word library; the prompt word library is stored in the form of JS key-value pair data template, and placeholders are used in the template; the template is matched according to the three-layer key of technology stack-page type-design semantics, and if there is no completely matched key, the longest prefix rule is used to backtrack upwards; According to the visual material and the selected system prompt word, the code is generated by using an artificial intelligence large model.
[0006] Further, the visual material at least includes one or more of design drafts, screenshots and website videos.
[0007] Further, the placeholders at least include enterprise VI color value table, design semantic label and technology stack default specification; when the design semantic label conflicts with the technology stack default specification, a rule engine with enterprise VI priority is triggered.
[0008] Further, according to the technology stack and the visual material, three-layer decision is entered in turn: the technology stack layer: directly reuse the code technology stack selected by the user; the page type layer: divide the screenshot / video into Dashboard, topology graph, form entry, monitoring large screen, login / permission, log list, report chart and general list by using a lightweight visual classification model as a second-level index; the design semantic layer: perform secondary inference on the same screenshot to extract the front-end design semantic label.
[0009] Further, meaningless block nesting is replaced by semantic labels; key interactive elements are automatically added with data test identifiers; all cascading style sheets are scanned to establish a value-variable mapping table; repeated color values, font sizes and spacings are extracted into cascading style sheet variables and written to the root user, and all reference locations are rewritten.
[0010] Further, based on the importance scoring model of the BERT fine-tuning, annotations related to page structure, state management and business constants are retained, and pure visual description annotations are deleted; a hash algorithm is used to identify repeated UI fragments to automatically generate reusable components.
[0011] In a second aspect, the present application also provides a code conversion system based on an artificial intelligence large model, comprising: A data acquisition module configured to obtain visual material and select an expected code generation technology stack from a pre-set list; A matching module configured to select a corresponding prompt word from a pre-configured system prompt word library according to the selected code generation technology stack; the prompt word library is stored in the form of JS key-value pair data template, and placeholders are used in the template; the template is matched according to the three-layer key of technology stack-page type-design semantics, and if there is no completely matched key, the longest prefix rule is used to backtrack upwards; The code conversion module is configured to generate code by using an artificial intelligence large model according to the visual material and the selected system prompt word.
[0012] In a third aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the program, when executed by a processor, implements the steps of the code conversion method based on an artificial intelligence large model according to the first aspect.
[0013] In a fourth aspect, the present application also provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor, when executing the program, implements the steps of the code conversion method based on an artificial intelligence large model according to the first aspect.
[0014] In a fifth aspect, the present application also provides a computer program product, which comprises a computer program, and the computer program, when executed by a processor, implements the steps of the code conversion method based on an artificial intelligence large model according to the first aspect.
[0015] Compared with the prior art, the present application has the following beneficial effects: 1、The present application first acquires visual material, and selects an expected code generation technology stack from a preset list; then, according to the selected code generation technology stack, corresponding prompt words are selected from a pre-configured system prompt word library; the prompt word library is stored in the form of a JS key-value pair data template, and placeholders are used in the template; the template is matched according to a three-layer key of technology stack-page type-design semantic, and if there is no completely matched key, the longest prefix rule is used for backtracking; finally, according to the visual material and the selected system prompt word, code is generated by using an artificial intelligence large model; on the basis of replacing manual code conversion, the template is accurately matched according to the three-layer key of technology stack-page type-design semantic, the code generation confusion problem of different technology stacks is avoided, the output code can meet the target framework specification, the standardized prompt words are stored in the form of a JS key-value pair template, the placeholder mechanism supports dynamic parameter injection, and the workload of repeatedly writing similar prompt words is reduced; meanwhile, the longest prefix backtracking rule can match approximate scene templates, and the code generation usability of edge scenes is improved.
[0016] 2、The present application supplements a three-layer prompt word decision engine and an assembling algorithm of technology stack-page type-design semantic in the backend processing link, upgrades static prompt words to combinable templates with placeholders, and automatically resolves conflicts such as color values and breakpoints by a rule engine giving priority to enterprise VI; meanwhile, a lightweight checker is newly added to intercept specification errors and rewrite at most twice after the output of the main model; in the post-processing stage, the original simple “decommenting” is expanded into a whole-link quality improvement process through semantic DOM, CSS variableization, intelligent comment grading and component automatic isolation.
[0017] 3、The application can realize efficient development, automatically convert various visual materials into code using artificial intelligence multi-modal large model, greatly shorten the development cycle, significantly improve the development efficiency. Guarantee the quality of the code, the AI model generates code according to the unified specification and requirements, avoids errors and inconsistencies that may occur when manually writing code, improves the quality and maintainability of the code. Realize multi-technology stack support, support multiple common technology stacks, users can choose flexibly according to project requirements, improve the universality and applicability of the system. Good scalability: new system prompt words can be added and new AI models can be supported to easily expand the functions and supported technology stacks of the system to adapt to changing development needs. Experimental video support, new experimental support for converting website video records into functional prototypes is added, providing developers with more possibilities and innovation space. BRIEF DESCRIPTION OF DRAWINGS
[0018] The drawings accompanying this specification form a part of this specification. The illustrative embodiments described in this specification and their implementations are provided to explain the present embodiments and not to limit the present embodiments in any way.
[0019] Figure 1 The system overall architecture diagram of the embodiment 1 of the present application. DETAILED DESCRIPTION
[0020] The present application will be further described below in conjunction with the drawings and embodiments.
[0021] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise indicated, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.
[0022] Relying on manual design, screenshots or videos to complete code conversion work has the problems of low efficiency, easy to make mistakes, poor maintainability and low reusability. Specifically: manual code writing requires a lot of time and effort, especially for complex design or video containing interaction, the development cycle will be significantly prolonged, and the efficiency is low. Human error is inevitable, such as mismatched styles, disordered layout, and incorrect interaction function implementation, which need to be repeatedly debugged and modified, and are prone to errors. Because the code style and quality written by humans are uneven, the maintainability of the code is poor, and it will face great difficulties in modifying and expanding functions in the later period, and the maintainability is poor; low reusability, for repeated elements or components, it is difficult to achieve efficient reuse when manually writing code, increasing the development cost.
[0023] To solve at least one of the above problems, the present application provides a code conversion method based on artificial intelligence large model, which aims to realize efficient and accurate conversion of screenshots, design drafts and website video records into directly usable code with the help of advanced artificial intelligence technology. The method includes user interaction, request delivery, backend processing, result feedback and result display. Optionally, user interaction: the user uploads screenshots, design drafts or website video records on the front-end interface, and selects the desired code generation technology stack from the preset list, such as HTML + Tailwind, React + Tailwind, etc. Request delivery: the front-end sends the user-uploaded materials and selected technology stack information to the back-end after encapsulation. Backend processing: after receiving the request, the back-end selects the corresponding prompt words from the pre-configured system prompt word library according to the user-selected technology stack. These prompt words clearly specify the specific requirements and specifications for code generation, such as libraries used, code format, element repetition rules, etc. Then, the materials and system prompts are used as input to call the appropriate AI model for code generation. Result feedback: after the AI model completes code generation, the back-end performs preliminary processing and verification on the generated code, and then returns the result to the front-end. Result display: after receiving the code returned by the back-end, the front-end displays it to the user in a clear and intuitive manner, allowing the user to view the code and perform subsequent development operations.
[0024] The method effectively solves the problems of low efficiency, error-prone, poor maintainability and low reusability in the prior art when manually converting screenshots, design drafts and videos into code. It can quickly and accurately convert various visual materials into usable code while supporting multiple common technology stacks. The method of the present application, as well as the corresponding system for executing the method, mainly includes a front-end part, a back-end part and a post-processing part, specifically: S1, front-end setting: The front-end uses React / Vite to build a modern user interface, providing users with convenient and friendly interaction experience. The main functions include: S1.1, material upload: supports uploading of design drafts, screenshots and website video records in multiple formats, making it easy for users to input different types of visual materials.
[0025] S1.2, technology stack selection: provides a rich selection of common technology stacks for users to choose from, including HTML + Tailwind, HTML + CSS, React + Tailwind, Vue + Tailwind, Bootstrap, Ionic + Tailwind and SVG, etc., to meet the development needs of different users.
[0026] S1.3, Prompt word template assembly algorithm: Optionally, the prompt word library is stored in the form of a JS key-value data (JavaScript Object Notation, JavaScript, JSON) template, and placeholders such as {{color_primary}}, {{breakpoint_list}}, and {{import_statement}} are used inside the template.
[0027] At runtime, the system matches the template according to the three-layer key. If there is no completely matching key, it will backtrack upwards according to the "longest prefix" rule to ensure the least manual backup. The "longest prefix" core process is as follows: when the system uses a three-layer key like A / B / C and cannot find a completely matching template, the matching will not fail immediately, but will automatically truncate the key from the back to the front, and backtrack upwards in the order of A / B→A, and prefer to select the longest prefix (i.e. A / B) that has a corresponding template to provide services; This process aims to maximize the reuse of defined, more general parent templates. Only when all levels of prefixes are not configured, the system will finally enable a global default backup template, thereby ensuring service stability while greatly reducing the cost of manual maintenance for special cases.
[0028] Placeholder filling sources: including enterprise VI (Visual Identity) color value table (CSS variable), design semantic label (such as dark theme automatically injecting dark token), technical stack default specification (such as Tailwind's breakpoints), etc.
[0029] After assembly, the final prompt is generated, and the AI artificial intelligence model inference is entered.
[0030] S1.4, Set configuration: Users can configure API keys, backend addresses, and other key information in the front-end settings interface to ensure normal operation of the system.
[0031] S1.5, Result display: The generated code returned by the backend is displayed to the user in the form of a code editor, and code preview and download functions are provided to facilitate users to view and use the code.
[0032] S2, Backend settings: Optionally, the backend uses FastAPI to build a high-performance service architecture, mainly responsible for receiving front-end requests, calling AI models for code generation, and returning processing results. The specific process is as follows: S2.1 Information Configuration: Obtain various necessary API keys from environment variables, such as OpenAI API Key, Anthropic API Key, etc., while configuring debugging and production-related parameters, such as whether to simulate AI responses, whether to turn on debugging mode, etc.
[0033] S2.2 Request Reception: The FastAPI service of the backend listens to the requests sent by the front end, and parses the material and technology stack information in the request.
[0034] S2.3 Accurate Assembly of Prompt Words (Three-tier Decision Engine): After receiving the "technology stack + visual material", the backend enters the following three-tier decision in turn: Technology Stack Layer: Directly reuse the code technology stack explicitly selected by the user (such as React + Tailwind, Vue3 + Ant-Design-Vue, HTML + Tailwind, etc.).
[0035] Page Type Layer: Divide the screenshot / video into Dashboard, Topology, Form Entry, Monitoring Large Screen, Login / Permission, Log List, Report Chart, and General List, which are the second-level indexes, through a lightweight visual classification model (MobileNet-V3 fine-tuning, parameter quantity <5M).
[0036] Design Semantic Layer: Perform secondary inference on the same screenshot to extract 20 front-end design semantic tags (dark / light theme, card layout, left / right split column, top navigation, side folding menu, main button color, font hierarchy, etc.).
[0037] Combine the three layers of information into a unique key, such as react-tailwind_dashboard_dark-sideMenu-blue, to locate the prompt word template.
[0038] S2.4 AI Model Invocation: Input the material and system prompt words into the corresponding AI model for code generation. Supported AI models include Claude Sonnet3.7, GPT-4o, etc. to meet the code generation needs in different scenarios. If the simulation AI response is configured, return the pre-set simulation code result.
[0039] S2.5 Code Processing: Post-process the code generated by the AI model, such as extracting valid HTML content, removing unnecessary tags and comments, etc., to improve the quality and readability of the code.
[0040] S2.6 Conflict Resolution: When the design semantic tags conflict with the default specifications of the selected technology stack (such as dark theme vs. Ant-Design-Vue default light color), trigger the rule engine.
[0041] Rule engine priority: Enterprise VI specification > design semantic label > tech stack default.
[0042] Rule engine expressed in Drools, rule example: When the system detects that the user interface meets the following two conditions at the same time: the semantic label explicitly requires the dark theme to be enabled (for example, marked as dark); the default theme setting of the current system stack is light mode, for example, marked as light); The system will automatically perform the theme override operation: inject a specific CSS variable (such as --antd-theme: dark) into the interface, forcing the theme to switch to dark mode.
[0043] If the conflict cannot be resolved, log and prompt the user for secondary confirmation or manual adjustment.
[0044] S2.7, result return: encapsulate the processed code into a standard response format and return it to the front end.
[0045] 2.3, post-processing settings: 2.3.1, semantic DOM labeling: Run HTML AST traversal, replace meaningless block nesting with <section> / <header> / <main> / <aside>Etc semantic tags.
[0046] Automatically add data test marks for key interactive elements for easy automated testing.
[0047] 2.3.2, style deduplication and variableization: PostCSS plugins scan all Cascading Style Sheets (CSS) to create a "value -> variable" mapping table; Repeated color values, font sizes, and spacing are extracted into CSS variables written to the root user root, and all reference locations are written back; The average removal rate of redundant styles is 25-40%.
[0048] 2.3.3, intelligent annotation grading: An importance scoring model based on BERT (Bidirectional Encoder Representation from Transformers) fine-tuning (1.5M parameters) is used: annotations related to page structure, state management, and business constants are retained; pure visual description annotations are deleted; high-importance annotations are folded into <!--region-->… <!--endregion--> which can be expanded / folded with one key in the IDE.
[0049] 2.3.4, component automatic extraction: using AST diff+hash algorithm to identify repeated UI fragments, automatically generating <cardstat / > <layoutsidebar / > Reusable components such as etc; components are pushed to the enterprise private NPM repository for other projects to reference.
[0050] The invention adds a "technology stack-page type-design semantics" three-layer prompt word decision engine and assembly algorithm in the backend processing link, upgrades static prompt words to composable templates with placeholders, and automatically resolves color value, breakpoint, etc. conflicts with the enterprise VI priority rules engine; At the same time, a lightweight checker is added to intercept specification errors immediately after the main model output and rewrite at most twice; In the post-processing stage, through semantic DOM, CSS variableization, intelligent annotation grading, and component automatic extraction, the original simple "de-annotation" is expanded into a full-link quality improvement process.
[0051] By the present application, efficient development can be realized, various visual materials can be automatically converted into code by using artificial intelligence multi-modal large model, the development cycle is greatly shortened, and the development efficiency is significantly improved. The code quality is guaranteed, the AI model generates code according to unified specifications and requirements, avoids errors and inconsistencies that may occur when manually writing code, and improves the quality and maintainability of the code. Multi-technology stack support is realized, the system supports multiple common technology stacks, users can flexibly choose according to project requirements, and the universality and applicability of the system are improved. Good scalability: new system prompt words can be added and new AI models can be supported, so that the functions and supported technology stacks of the system can be easily expanded to adapt to changing development requirements. Experimental video support is added, which provides more possibilities and innovation space for developers.
[0052] Embodiment 1 This embodiment provides a code conversion method based on an artificial intelligence large model, specifically, a screenshot code conversion using an HTML + Tailwind technology stack. It includes: user uploads a screenshot of a background management system; the system identifies "technology stack = HTML + Tailwind, page type = Dashboard, design semantics = light-topNav-blue"; assembles prompt words: injects Tailwind breakpoints, enterprise blue variables, and chart references; the main model generates code; the small parameter quantity verifier discovers inline style, triggering rewriting; post-processing: extracts CSS variables -- color-brand: #0066cc, semantic tags <main> 、 <aside>The user can directly access the grid digital permission platform without the need for secondary style adjustment.
[0053] The user uploads a 30s monitoring large-screen demonstration video; three-layer decision keys: react-tailwind_dashboard_dark-sideMenu-red; AI generates a React page; post-processing finds four repeated "alarm card" fragments, which are automatically extracted as <alarmcard / > Components; components are published to the enterprise private warehouse @grid-ui / alarm-card, version number 1.0.0; users can preview the large-screen page that meets the enterprise specifications and directly git clone for further development.
[0054] Through AI automatic code generation, the efficiency of web development is greatly improved, and the generated code meets the Tailwind specification, with good maintainability and scalability.
[0055] Embodiment 2 The embodiment provides a code conversion method based on an artificial intelligence large model, specifically, a video code conversion is performed using a React+Tailwind technology stack, including: a user uploads a website video record on a front-end interface, and selects a React+Tailwind technology stack. The front end sends the video record and the technology stack information to the back end. After receiving the request, the back end selects REACT_TAILWIND_CLAUDE_SYSTEM_PROMPT as a system prompt word, and calls an AI model to generate code.
[0056] The embodiment can convert the video record uploaded by the user into a single-page application code built using React and Tailwind, and the user can further develop and extend on this basis to quickly realize the function of the application.
[0057] Through the embodiment, the generated code utilizes the component-based development idea of React, combined with the style library of Tailwind, to improve the reusability and maintainability of the code, while shortening the development cycle and reducing the development cost.
[0058] Embodiment 2 The embodiment provides a code conversion system based on an artificial intelligence large model, including: The data acquisition module is configured to: acquire visual materials, and select an expected code generation technology stack from a preset list; The matching module is configured to: select corresponding prompt words from a pre-configured system prompt word library according to the selected code generation technology stack; the prompt word library is stored in the form of a JS key-value pair data template, and placeholders are used in the template; the template is matched according to a three-layer key of technology stack-page type-design semantic, and if there is no completely matched key, the longest prefix rule is used to backtrack upwards; The code conversion module is configured to: generate code by using an artificial intelligence large model according to the visual material and the selected system prompt word.
[0059] The working method of the system is the same as the code conversion method based on the artificial intelligence large model of embodiment 1, and will not be repeated here.
[0060] Embodiment 3 The embodiment provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the steps of the code conversion method based on the artificial intelligence large model in embodiment 1.
[0061] Embodiment 4 The embodiment provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor realizes the steps of the code conversion method based on the artificial intelligence large model in embodiment 1 when executing the program.
[0062] Embodiment 5 The embodiment provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to realize the steps of the code conversion method based on the artificial intelligence large model in embodiment 1.
[0063] The above only describes the preferred embodiments of the embodiment and is not used to limit the embodiment. For those skilled in the art, the embodiment can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment should be included in the protection scope of the embodiment.< / aside> < / main> < / aside> < / main> < / header> < / section>
Claims
1. A transcoding method based on a large-scale artificial intelligence model, characterized in that, include: Acquire visual materials and select the desired code generation technology stack from a preset list; Based on the selected code generation technology stack, the corresponding prompt words are selected from the pre-configured system prompt word library; the prompt word library is stored in the form of JS key-value pair data template, and placeholders are used in the template; the three-layer key matching template is based on technology stack-page type-design semantics. If there is no completely matching key, the longest prefix rule is used to backtrack upwards. Based on visual materials and selected system prompts, code is generated using a large artificial intelligence model.
2. The transcoding method based on a large artificial intelligence model as described in claim 1, characterized in that, The visual materials include at least one or more of the following: design drafts, screenshots, and website videos.
3. The code-to-code method based on a large artificial intelligence model as described in claim 1, characterized in that, Placeholders include at least the corporate VI color value table, design semantic tags, and the default specifications of the technology stack; when the design semantic tags conflict with the default specifications of the technology stack, the rule engine that prioritizes the corporate VI is triggered.
4. The transcoding method based on a large artificial intelligence model as described in claim 1, characterized in that, Based on the technology stack and visual materials, the decision-making process proceeds in three layers: Technology stack layer: directly reuse the code technology stack explicitly selected by the user; Page type layer: use a lightweight visual classification model to divide screenshots / videos into Dashboard, topology map, form entry, monitoring dashboard, login / permission, log list, report chart and general list as a second-level index; Design semantic layer: perform secondary reasoning on the same screenshot to extract front-end design semantic tags.
5. The transcoding method based on a large artificial intelligence model as described in claim 1, characterized in that, Replace meaningless nested blocks with semantic tags; automatically add data test identifiers to key interactive elements; scan all cascading style sheets and establish a value-to-variable mapping table; extract repeated color values, font sizes, and spacing into cascading style sheet variables, write them to the root user, and write them back to all reference locations.
6. The transcoding method based on a large artificial intelligence model as described in claim 5, characterized in that, The importance scoring model is fine-tuned based on BERT. Annotations related to page structure, state management, and business constants are retained, while purely visual descriptive annotations are deleted. A hash algorithm is used to identify duplicate UI fragments and automatically generate reusable components.
7. A transcoding system based on a large-scale artificial intelligence model, characterized in that, include: The data acquisition module is configured to: acquire visual materials and select the desired code generation technology stack from a preset list; The matching module is configured to: select corresponding prompt words from a pre-configured system prompt word library based on the selected code generation technology stack; the prompt word library is stored in the form of JS key-value pair data templates, with placeholders used in the templates; match the templates according to a three-layer key matching template based on the technology stack, page type, and design semantics; if no completely matching key exists, backtrack upwards according to the longest prefix rule. The code conversion module is configured to generate code using a large artificial intelligence model based on visual materials and selected system prompts.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the transcoding method based on a large artificial intelligence model as described in any one of claims 1-6.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the program, it implements the steps of the transcoding method based on a large artificial intelligence model as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the transcoding method based on a large artificial intelligence model as described in any one of claims 1-6.