A front-end low-code automated programming method and system based on AI

Through the AI-based front-end low-code automation programming method, the AI ​​content generation tool and UI/UE tool are used for automated programming and optimization, solving the problem of difficult improvement of developers' productivity and code quality in the existing technology, and achieving efficient and intelligent code generation and release.

CN119065657BActive Publication Date: 2025-04-25JIANGXI MALI DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411555687.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-04-25
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve developer productivity and code quality, especially when facing complex and diverse customer needs.

Method used

Using AI-based front-end low-code automation programming method, we receive programming requirements and generate DSL pages through AI-generating content tools, combine UI tools and UE tools for visualization and interaction optimization, and automatically review and tuning the code, and finally merge the DSL code into the backbone and publish it.

Benefits of technology

Improve code programming efficiency and quality, reduce human errors through automated and intelligent programming processes, and regularly analyze code quality to determine whether AI-generated content tools need to be reconfigured and trained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065657B_ABST
    Figure CN119065657B_ABST
Patent Text Reader

Abstract

The present invention discloses an AI-based front-end low-code automated programming method and system, which relates to the technical field of programming systems. An AI-generated content tool receives requirements and generates a DSL page, automatically visualizes and interactively optimizes the generated DSL page through a UI tool and a UE tool, generates feedback based on the visualization and interactive optimization results, performs regression testing and further tuning on the DSL page, and the AI-generated content tool generates a final DSL page based on the tuning results, and automatically performs regression testing and analysis on the DSL code in the DSL page. After analyzing that the DSL code quality is qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch. The programming system effectively improves code programming efficiency and improves code quality through automated and intelligent code programming and automatic code review during the programming process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of programming systems, and in particular to a front-end low-code automated programming method and system based on AI. Background Art

[0002] With the rapid development of Internet technology, the requirements for enterprise informatization and digitalization are becoming increasingly higher. Digitalization is often accompanied by personalization, customization and diversified needs. Enterprises must respond agilely to adapt to increasingly complex customer needs, which urgently requires improving developer productivity and code quality.

[0003] Based on this, the present invention proposes an AI-based front-end low-code automated programming method and system, which effectively improves code programming efficiency and improves code quality through automated and intelligent code programming and automatic code review during the programming process. Summary of the invention

[0004] The purpose of the present invention is to provide an AI-based front-end low-code automated programming method and system to address the deficiencies in the background technology.

[0005] In order to achieve the above object, the present invention provides the following technical solution: a front-end low-code automated programming method based on AI, the programming method comprising the following steps:

[0006] The programming system describes the programming requirements in natural language and passes them to the AI ​​content generation tool. The AI ​​content generation tool receives the programming requirements and generates a DSL page. It uses the UI tool and UE tool to automatically visualize and interactively optimize the DSL page, and generates feedback based on the visualization and interactive optimization results.

[0007] After receiving the feedback, the programming system performs regression testing and tuning on the DSL page, and passes the tuning results to the AI ​​content generation tool again. The AI ​​content generation tool generates the final DSL page based on the tuning results, and automatically performs regression testing and analysis on the DSL code in the final DSL page. After the DSL code quality is analyzed to be qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch, and the generated final DSL code and documents are released. The final DSL code is interacted after version management;

[0008] The final DSL code is classified based on the tuning results and quality analysis results. After regularly analyzing the final DSL code information of all categories, it is determined whether the AI ​​content generation tool needs to be reconfigured and trained.

[0009] In a preferred embodiment, after receiving the feedback, the programming system performs regression testing and tuning on the DSL page, including the following steps:

[0010] Obtain the specification compliance rate, execution deviation and compatibility success rate of the code in the DSL page, and calculate the specification compliance rate, execution deviation and compatibility success rate to obtain the code coefficient;

[0011] Compare the obtained code coefficient with a preset coefficient threshold, where the coefficient threshold is used to evaluate whether the DSL code quality in the DSL page is qualified;

[0012] If the code coefficient is greater than or equal to the coefficient threshold, the DSL code quality in the DSL page is evaluated to be qualified. If the code coefficient is less than the coefficient threshold, the DSL code quality in the DSL page is evaluated to be unqualified and the DSL code needs to be readjusted.

[0013] In a preferred embodiment, the final DSL code is classified in combination with the tuning result and the quality analysis result, including the following steps:

[0014] The tuning results include tuning frequency and tuning duration. The tuning frequency is obtained by dividing the number of tuning times by the monitoring duration, and the tuning duration is directly obtained through the system log.

[0015] Normalize the tuning frequency and tuning duration so that their value ranges are mapped to [0, 1], obtain the normalized value of the tuning frequency and the normalized value of the tuning duration, and add the normalized value of the tuning frequency to the normalized value of the tuning duration to obtain the tuning coefficient.

[0016] The classification index of the DSL code is obtained by weighted calculation of the tuning coefficient and the code coefficient. The expression is: , where is the classification index, is the code coefficient, is the tuning coefficient;

[0017] The obtained classification index is compared with the preset first index threshold and second index threshold. If the classification index is greater than or equal to the second index threshold, the DSL code is classified into Class I code. If the classification index is less than the second index threshold and the classification index is greater than or equal to the first index threshold, the DSL code is classified into Class II code. If the classification index is less than the first index threshold, the DSL code is classified into Class III code.

[0018] In a preferred embodiment, after regularly analyzing the final DSL code information of all categories, it is determined whether the AI ​​content generation tool needs to be reconfigured and trained, including the following steps:

[0019] Regularly obtain the number of DSL codes in the first code category, the number of DSL codes in the second code category, and the number of DSL codes in the third code category of the programming system;

[0020] The number of DSL codes in the first category of code is divided by the total number of codes to obtain the first category code ratio, the number of DSL codes in the second category of code is divided by the total number of codes to obtain the second category code ratio, and the number of DSL codes in the third category of code is divided by the total number of codes to obtain the third category code ratio;

[0021] Take 80% of the proportion of Category 1 codes plus 20% of the proportion of Category 2 codes, and then subtract the proportion of Category 3 codes to obtain the optimized value. If the optimized value is greater than or equal to the optimization threshold, it is judged that there is no need to reconfigure and train the AI ​​content generation tool. If the optimized value is less than the optimization threshold, it is judged that the AI ​​content generation tool needs to be reconfigured and trained.

[0022] In a preferred embodiment, merging the feature branch code or the repair branch code generated during the DSL code development process into the trunk branch and publishing the generated final DSL code and documents includes the following steps:

[0023] Pull the latest DSL code from the main branch, merge the feature branch or fix branch into the main branch, use the document generation tool to generate the latest DSL code document, submit and push the merged DSL code to the main branch of the remote repository;

[0024] Create a new version tag to identify the version released this time. After the final DSL code is deployed to the production environment, update the version log to record the changes and fixes of this release.

[0025] In a preferred embodiment, after receiving the feedback, the programming system performs regression testing and tuning on the DSL page, further comprising the following steps:

[0026] Collect specific issues and improvement suggestions from feedback reports generated by UI tools and UE tools, analyze feedback content and classify problem types, and update existing test cases or write new test cases based on the issues and improvement suggestions in the feedback;

[0027] Use automated testing tools to run updated test cases, covering all functions and interaction paths of DSL pages, record the execution results of each test case, including pass, fail, and exceptions, and summarize the test data and log files generated by automated testing;

[0028] After analyzing the test data, identify whether new problems are introduced during the optimization process or whether there are old problems that have not been solved, and classify the problems found in the regression test, including logical errors, performance problems, and UI problems;

[0029] Develop tuning plans for different types of problems, including code adjustments, performance optimization, and visual improvements. Further adjust and optimize the DSL page according to the tuning plan, run automated test cases again on the tuned DSL page, and verify whether all problems have been resolved.

[0030] In a preferred embodiment, the DSL page is automatically optimized for visualization and interaction using the UI tool and the UE tool, and feedback is generated according to the visualization and interaction optimization results, including the following steps:

[0031] The UI tool and UE tool load the DSL page generated by the AI-generated content tool, analyze the various components and their properties in the DSL page, including layout, style, and interactive elements, and apply preset styles and themes to the DSL page according to the design specifications and brand guidelines;

[0032] Visually beautify each component in the DSL page, including color, font, margin and alignment, add preset interactive behaviors and animation effects to the interactive elements in the DSL page, simulate operations, conduct usability testing, and adjust and optimize the interactive logic of the DSL page based on the test results.

[0033] An AI-based front-end low-code automated programming system, including a DSL page generation module, a test tuning module, a quality analysis module, and a classification judgment module:

[0034] DSL page generation module: The programming requirements are described in natural language and then passed to the AI ​​content generation tool. The AI ​​content generation tool receives the programming requirements and generates a DSL page.

[0035] Test and tuning module: Use UI tools and UE tools to automatically optimize the visualization and interaction of DSL pages, and generate feedback based on the visualization and interaction optimization results. After receiving the feedback, perform regression testing and tuning on the DSL pages.

[0036] Quality analysis module: Generates the final DSL page based on the tuning results through the AI ​​content generation tool, and automatically performs regression testing and analysis on the DSL code in the final DSL page. After the DSL code quality is analyzed to be qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch, and the generated final DSL code and documents are released. The final DSL code is interacted after version management;

[0037] Classification judgment module: Classifies the final DSL code based on the tuning results and quality analysis results, and regularly analyzes the final DSL code information of all categories to determine whether the AI ​​content generation tool needs to be reconfigured and trained.

[0038] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0039] 1. The present invention receives requirements and generates DSL pages through AI content generation tools, automatically visualizes and interactively optimizes the generated DSL pages through UI tools and UE tools, generates feedback based on the visualization and interactive optimization results, performs regression testing and further tuning on the DSL pages, and the AI ​​content generation tool generates the final DSL page based on the tuning results, and automatically performs regression testing and analysis on the DSL code in the DSL page. After analyzing that the DSL code quality is qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch. The programming system effectively improves code programming efficiency and code quality through automated and intelligent code programming and automatic code review during the programming process.

[0040] 2. The present invention classifies the generated DSL code by combining the tuning results and the quality analysis results, and regularly comprehensively analyzes all categories of DSL code information to determine whether the AI ​​content generation tool needs to be reconfigured and trained, and the judgment results are sent to the front-end development team. The programming system regularly analyzes the DSL code by combining the tuning results and the quality analysis results, and evaluates whether the performance of the AI ​​content generation tool meets the standards. When the performance of the AI ​​content generation tool does not meet the standards, the front-end development team is prompted to reconfigure and train the AI ​​content generation tool, further ensuring the accuracy and efficiency of DSL code generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0042] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Example 1: Please refer to Figure 1As shown, the present embodiment provides an AI-based front-end low-code automated programming method, the programming method comprising the following steps:

[0045] The programming system will use natural language to describe the needs of the product operation team and then pass it to the AI ​​generated content tool (AIGC). The AI ​​generated content tool is pre-configured and trained by the front-end development team. The AI ​​generated content tool receives the needs and generates a DSL page. It automatically performs visualization and interactive optimization on the generated DSL page through UI tools and UE tools, and generates feedback based on the visualization and interactive optimization results. After receiving the feedback, the programming system performs regression testing and further optimization on the DSL page, and passes the optimization results to the AI ​​generated content tool again. The AI ​​generated content tool generates the final DSL page based on the optimization results, and automatically performs regression testing and analysis on the DSL code in the DSL page After analyzing the DSL code quality and finding it qualified, the feature branch code or fix branch code generated during the DSL code development process is merged into the trunk branch (usually the main or master branch) and the generated final code and related documents are released. After version management, the final code is delivered to customers for use. This is a key step in the software development process. It ensures that all changes are integrated into the main code base to form a stable release version. The generated DSL code is classified based on the tuning results and quality analysis results. All categories of DSL code information are regularly analyzed to determine whether the AI ​​content generation tool needs to be reconfigured and trained, and the judgment results are sent to the front-end development team.

[0046] This application receives requirements and generates DSL pages through AI content generation tools, automatically optimizes the generated DSL pages visually and interactively through UI tools and UE tools, generates feedback based on the visualization and interactive optimization results, performs regression testing and further tuning on the DSL pages, and AI content generation tools generate the final DSL pages based on the tuning results, and automatically performs regression testing and analysis on the DSL code in the DSL pages. After analyzing that the DSL code quality is qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch. This programming system effectively improves code programming efficiency and code quality through automated and intelligent code programming and automatic code review during the programming process.

[0047] This application classifies the generated DSL code by combining the tuning results and quality analysis results, and regularly comprehensively analyzes all categories of DSL code information to determine whether the AI ​​content generation tool needs to be reconfigured and trained, and the judgment results are sent to the front-end development team. This programming system regularly analyzes the DSL code by combining the tuning results and quality analysis results, and evaluates whether the performance of the AI ​​content generation tool meets the standards. When the performance of the AI ​​content generation tool does not meet the standards, the front-end development team is prompted to reconfigure and train the AI ​​content generation tool to further ensure the accuracy and efficiency of DSL code generation.

[0048] Embodiment 2: The programming system uses natural language to describe the requirements of the product operation team and then passes it to the AI ​​content generation tool (AIGC). The AI ​​content generation tool is pre-configured and trained by the front-end development team. The AI ​​content generation tool receives the requirements and generates a DSL page, including the following steps:

[0049] The product operation team describes the requirements in natural language. These requirements may include details such as functional description, interface layout, user interaction, etc. The AI ​​generated content tool (AIGC) parses the natural language requirements and converts them into understandable structured data. This step usually includes natural language processing (NLP) technologies such as semantic analysis, entity recognition, and relationship extraction.

[0050] According to the parsed structured requirements, AIGC generates the corresponding domain-specific language (DSL) code. DSL code is a high-level abstraction of problems in a specific domain, which simplifies the expression of complex problems. The generated DSL code needs to be initially verified to ensure that it meets the requirements description. If necessary, optimization adjustments are made to ensure the usability and efficiency of the code, and the DSL code is converted into an actual front-end page. This includes generating HTML, CSS, JavaScript and other codes to form a complete page structure and style.

[0051] The AI ​​content generation tool is pre-configured and trained by the front-end development team, including the following steps:

[0052] Collect hundreds of similar natural language descriptions and corresponding DSL code examples.

[0053] Organize the HTML, CSS, and JavaScript code of the actual front-end page.

[0054] The natural language description and DSL code are annotated to form training data pairs.

[0055] Standardize data formats and remove noise and outliers.

[0056] The GPT model was selected for natural language processing and code generation.

[0057] Design the model structure to enable it to process natural language inputs and generate corresponding DSL code.

[0058] Train the model using the preprocessed data and optimize the model parameters.

[0059] Evaluate the model performance using the validation set and adjust the model structure and parameters.

[0060] Deploy the trained model and provide an API interface for the front-end development team to call.

[0061] Integrate the AI-generated content tool into the front-end development toolchain and provide an IDE plugin or a low-code development platform.

[0062] The AI-generated content tool (AIGC) parses natural language requirements and converts them into understandable structured data. This step typically includes natural language processing (NLP) techniques such as semantic analysis, entity recognition, and relation extraction, including the following steps:

[0063] Perform preliminary processing on the input natural language for subsequent analysis. This step typically includes:

[0064] Tokenization: Split the text into words or phrases.

[0065] Stop word removal: Remove words that are irrelevant to semantic analysis, such as "de", "le", "zai", etc.

[0066] Lemmatization: Convert words to their base forms, such as changing "running" to "run".

[0067] Punctuation handling: Process punctuation marks, keeping or removing them according to specific requirements.

[0068] Understand the semantics of the natural language text. This step includes:

[0069] Word vectorization: Convert words or phrases into vector representations (such as Word2Vec, GloVe, or BERT) for machine processing.

[0070] Syntactic analysis: Analyze the grammatical structure of the sentence and identify grammatical components such as the subject, predicate, and object.

[0071] Semantic role labeling: Determine the semantic roles of the various components in the sentence, such as actions, objects, time, etc.

[0072] Identify the key entities (such as person names, place names, organization names, etc.) in the natural language text:

[0073] Named entity recognition (NER): Identify and classify the named entities in the text.

[0074] Custom Entity Recognition: Identify domain-specific custom entities such as technical terms, product names, etc.

[0075] Identify and extract relationships between entities:

[0076] Dependency parsing: Determine the dependencies between words in a sentence and identify actions and related objects.

[0077] Relationship classification: Based on dependency relationships, determine the relationship type between entities, such as "belongs to", "contains", "depends on", etc.

[0078] Understanding intent or purpose in natural language text:

[0079] Intent classification: Classify user intent, such as inquiries, requests, instructions, etc.

[0080] Slot filling: Extract specific parameters or variables in the intent, such as time, location, quantity, etc.

[0081] Convert the parsed information into a structured data format, usually JSON or XML:

[0082] Mapping natural language to DSL: Based on the parsing results, natural language requirements are mapped to domain specific language (DSL) code.

[0083] Generate structured data: Generate structured data that describes the requirements for subsequent processing and page generation.

[0084] The generated DSL page is automatically visualized and interactively optimized through UI tools and UE tools, and feedback is generated based on the visualization and interactive optimization results, including the following steps:

[0085] Load DSL page: The UI and UE tools load the DSL page generated by AIGC.

[0086] Parse page structure: Analyze each component in the page and its properties, including layout, style, and interactive elements.

[0087] Apply preset styles: Apply preset styles and themes to DSL pages according to design specifications and brand guidelines.

[0088] Component beautification: Visually beautify each component in the page, including color, font, margin, and alignment.

[0089] Responsive design: Ensure that the page displays consistently across different devices and screen sizes, and make necessary adjustments.

[0090] Add interactive behaviors: Add preset interactive behaviors and animation effects to interactive elements on the page (such as buttons and input boxes).

[0091] Usability testing: Simulate user operations and conduct usability testing to ensure that all interactive behaviors meet user expectations.

[0092] Interaction logic adjustment: Make necessary adjustments and optimizations to the interaction logic based on the test results.

[0093] Consistency check: Check whether the visual and interactive designs of various parts of the page are consistent, including style consistency, component consistency, etc.

[0094] Fix inconsistencies: Find and fix visual and interactive inconsistencies in your pages.

[0095] Visual regression testing: Compare the page screenshots before and after optimization to ensure that the visual optimization has not introduced new problems.

[0096] Functional regression testing: Perform functional testing on the optimized pages to ensure that all functions are functioning properly.

[0097] Record optimization results: Record the specific results and improvements of visual and interactive optimization.

[0098] Generate Report: Automatically generate a detailed feedback report, including the comparison before and after optimization, problems found, solutions, and further improvement suggestions.

[0099] Feedback integration: Integrate the generated feedback reports back to the front-end development team and AIGC system.

[0100] Iterative improvement: Based on the feedback report, further adjust and optimize the DSL page and enter the next round of iteration.

[0101] Simulate user operations, conduct usability testing, and adjust and optimize the interaction logic of the DSL page based on the test results, including the following steps:

[0102] Set up the test environment:

[0103] Select Selenium as the automated testing tool and configure the test browser and device simulator.

[0104] Design test cases:

[0105] User operation path example: Open the registration page -> enter user name -> enter password -> enter email address -> click the register button.

[0106] Write test cases: define the specific details and expected results of each step.

[0107] Execute the test case:

[0108] Run the Selenium script to simulate the user's operations on the registration page and record the execution results of each step.

[0109] Analyze the test results:

[0110] Summarize the test data generated by Selenium and analyze which steps failed or were abnormal.

[0111] Identified the issue of "no response after clicking the registration button".

[0112] Adjust and optimize interaction logic:

[0113] Classification problem: interaction logic error.

[0114] Develop an optimization plan: Check the event binding logic of the registration button to ensure that the corresponding background request can be triggered after clicking.

[0115] Implementation optimization: Fix the event binding logic to ensure that the form can be submitted correctly after clicking the registration button.

[0116] Iterative testing and optimization:

[0117] Rerun the Selenium test case to verify the optimized interaction logic.

[0118] Recorded new test results and found that the "click the registration button" function is normal after optimization.

[0119] Generate optimization report:

[0120] Record the detailed process of each test and optimization and generate a complete optimization report.

[0121] The report content includes problem description (registration button is unresponsive), solution (fix event binding logic), optimization effect (function is normal) and follow-up suggestions (further test other interaction paths).

[0122] After receiving the feedback, the programming system performs regression testing and further tuning on the DSL page, including the following steps:

[0123] Collect feedback: Collect specific issues and improvement suggestions from feedback reports generated by UI and UE tools.

[0124] Analyze feedback content: Analyze the feedback content and classify the problem types, such as functional errors, unsmooth interactions, visual inconsistencies, etc.

[0125] Update test cases: Update existing test cases or write new test cases based on issues and improvement suggestions in the feedback.

[0126] Set up the test environment: Make sure the test environment is consistent with the production environment and prepare the latest DSL page version.

[0127] Run automated tests: Use automated testing tools (such as Selenium, Cypress) to run updated test cases to cover all key functions and interaction paths of the page.

[0128] Obtain the specification compliance rate, execution deviation, and compatibility success rate of the code in the DSL page;

[0129] The code coefficient is obtained by comprehensively calculating the specification compliance rate, execution deviation and compatibility success rate. The expression is: , where is the code coefficient, is the standard compliance rate, For compatible success rate, To implement the deviation, , , are the proportional coefficients of specification compliance rate, compatibility success rate, and execution deviation, respectively, and , , All are greater than 0;

[0130] The calculation logic of the specification compliance rate is: the number of violations of the code style specification is divided by the total number of code lines to obtain the code violation rate, and the specification compliance rate is obtained by subtracting the code violation rate from 1. The larger the specification compliance rate, the higher the quality of the DSL page code.

[0131] The calculation logic of execution deviation is: divide the total code execution time by the total number of times the code is executed to obtain the actual execution time, and subtract the standard execution time from the actual execution time to obtain the execution deviation. The smaller the execution deviation, the higher the quality of the DSL page code.

[0132] The calculation logic of the compatibility success rate is: obtain the compatibility success rate by dividing the number of compatible codes on different platforms by the total number of tested platforms. The larger the compatibility success rate, the higher the compatibility of the DSL page code, that is, the higher the quality of the DSL page code.

[0133] The larger the code coefficient, the higher the quality of the code in the DSL page. The obtained code coefficient is compared with the preset coefficient threshold. The coefficient threshold is used to evaluate whether the code quality in the DSL page is qualified. If the code coefficient is greater than or equal to the coefficient threshold, the code quality in the DSL page is evaluated to be qualified. If the code coefficient is less than the coefficient threshold, the code quality in the DSL page is evaluated to be unqualified.

[0134] Aggregate test data: Aggregate test data and log files generated by automated tests.

[0135] Identify regression issues: Analyze test data to identify whether the optimization process has introduced new issues or whether there are old issues that have not been resolved.

[0136] Problem classification: Classify the problems found in regression testing, such as logic errors, performance issues, UI issues, etc.

[0137] Develop tuning plans: Develop specific tuning plans for different types of problems, including code adjustments, performance optimization, visual improvements, etc.

[0138] Implementation tuning: Further adjust and optimize the DSL page according to the tuning plan.

[0139] Retest: Run the automated test cases again on the tuned DSL page to verify whether all issues have been resolved.

[0140] Confirm the repair effect: Ensure that the optimized page functions normally, interacts smoothly, and is visually consistent.

[0141] Record the tuning process: Record each regression test and tuning process in detail, including the problems found, solutions, and final results.

[0142] Generate final report: Generate a complete tuning report that includes all found issues, solutions, optimization effects, and follow-up recommendations.

[0143] The tuning results are passed to the AI ​​content generation tool again. The AI ​​content generation tool generates the final DSL page based on the tuning results and automatically performs regression testing and analysis on the DSL code in the DSL page, including the following steps:

[0144] Aggregate test data: Aggregate test data and log files generated by automated tests.

[0145] Identify remaining issues: Analyze the test data to identify if there are any unresolved issues or new issues.

[0146] Problem classification: Classify the problems found in regression testing, such as logic errors, performance issues, UI issues, etc.

[0147] Develop further optimization plans: Develop specific optimization plans for different types of problems.

[0148] Implementation optimization: Further adjust and optimize the DSL code according to the optimization plan.

[0149] Retest: Run the automated test cases again on the final generated DSL page to ensure that all issues have been resolved.

[0150] Confirm page quality: Confirm that the functionality, performance, and user experience of the final DSL page meet the expected standards.

[0151] Record the optimization process: Record the process of each regression test and optimization in detail, including the problems found, solutions and final results.

[0152] Generate Final Report: Generate a complete final report including all issues found, solutions, optimization effects and follow-up recommendations.

[0153] Use automated testing tools (such as Selenium, Cypress) to run regression test cases, covering all functions and interaction paths of the page, and record the execution results of each test case, including pass, fail, and exceptions.

[0154] After the DSL code quality is analyzed and qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch (usually the main or master branch) and the generated final code and related documents are released. After the final code is version managed, it is delivered to the customer for use, including the following steps:

[0155] Confirm code quality: Make sure the code in the feature branch or fix branch has passed all quality checks, including unit testing, integration testing, and code review.

[0156] Update the main branch: Make sure the local main branch is consistent with the main branch in the remote repository, and pull the latest code from the main branch.

[0157] Merge feature branch or fix branch: Merge the feature branch or fix branch into the trunk branch and resolve merge conflicts (if any).

[0158] Regression testing: Run regression tests to ensure that the merged code does not introduce new errors.

[0159] Generate code documentation: Use documentation generation tools to generate the latest code documentation.

[0160] Submit and push code: Submit and push the merged code to the trunk branch of the remote repository.

[0161] Create a version tag: Create a new version tag to identify the version being released.

[0162] Deploy code: Deploy the final code to the production environment to ensure the normal operation of the system.

[0163] Deliver code and documentation: Deliver the final code and related documentation to the customer to ensure that the customer can use and maintain the system correctly.

[0164] Update version log: Update version log to record the major changes and fixes of this release.

[0165] The generated DSL code is classified based on the tuning results and quality analysis results, including the following steps:

[0166] The tuning results include tuning frequency and tuning duration. The tuning frequency is obtained by dividing the number of tuning times by the monitoring duration, and the tuning duration is directly obtained through the system log. The greater the tuning frequency of the DSL code during the tuning process, the more times the DSL code is tuned during the monitoring period, which is more likely to cause redundancy or pseudo-code in the DSL code, thereby reducing the quality of the DSL code. The greater the tuning duration, the longer the tuning time of the DSL code, which may increase the redundancy of the DSL code and complicate the dependency relationship, thereby reducing the quality of the DSL code.

[0167] Normalize the tuning frequency and tuning duration so that their value ranges are mapped to [0, 1], obtain the normalized value of the tuning frequency and the normalized value of the tuning duration, and add the normalized value of the tuning frequency to the normalized value of the tuning duration to obtain the tuning coefficient.

[0168] The classification index of the DSL code is obtained by weighted calculation of the tuning coefficient and the code coefficient. The expression is: , where is the classification index, is the code coefficient, is the tuning coefficient;

[0169] The larger the classification index is, the better the overall quality of the DSL code is. The obtained classification index is compared with the preset first index threshold and the second index threshold. If the classification index is greater than or equal to the second index threshold, the DSL code is classified as a first-class code, indicating the best quality. If the classification index is less than the second index threshold and the classification index is greater than or equal to the first index threshold, the DSL code is classified as a second-class code, indicating medium quality. If the classification index is less than the first index threshold, the DSL code is classified as a third-class code, indicating poor quality.

[0170] Regularly analyze all categories of DSL code information to determine whether the AI ​​content generation tool needs to be reconfigured and trained. The judgment results are sent to the front-end development team, including the following steps:

[0171] Regularly obtain the number of DSL codes in the first code category, the number of DSL codes in the second code category, and the number of DSL codes in the third code category of the programming system;

[0172] The number of DSL codes in the first category of code is divided by the total number of codes to obtain the first category code ratio, the number of DSL codes in the second category of code is divided by the total number of codes to obtain the second category code ratio, and the number of DSL codes in the third category of code is divided by the total number of codes to obtain the third category code ratio;

[0173] Take 80% of the proportion of Category 1 codes plus 20% of the proportion of Category 2 codes, and then subtract the proportion of Category 3 codes to obtain the optimized value. If the optimized value is greater than or equal to the optimization threshold, it is judged that there is no need to reconfigure and train the AI ​​content generation tool. If the optimized value is less than the optimization threshold, it is judged that the AI ​​content generation tool needs to be reconfigured and trained.

[0174] Embodiment 3: The AI-based front-end low-code automated programming system described in this embodiment includes a DSL page generation module, a test tuning module, a quality analysis module, and a classification judgment module:

[0175] DSL page generation module: The requirements of the product operation team are described in natural language and then passed to the AI ​​content generation tool (AIGC). The AI ​​content generation tool is pre-configured and trained by the front-end development team. The AI ​​content generation tool receives the requirements and generates DSL pages, which are then sent to the test and tuning module.

[0176] Test and tuning module: automatically optimizes the generated DSL page visually and interactively through UI tools and UE tools, and generates feedback based on the visualization and interactive optimization results. After receiving the feedback, regression testing and further tuning are performed on the DSL page, and the tuning results are passed to the quality analysis module and classification judgment module;

[0177] Quality analysis module: Use AI content generation tools to generate the final DSL page based on the tuning results, and automatically perform regression testing and analysis on the DSL code in the DSL page. After the DSL code quality is analyzed to be qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch (usually the main or master branch) and the generated final code and related documents are released. After the final code is version managed, it is delivered to the customer for use. This is a key step in the software development process to ensure that all changes are integrated into the main code base to form a stable release version. The quality analysis results are sent to the classification judgment module;

[0178] Classification judgment module: Classify the generated DSL code based on the tuning results and quality analysis results, and regularly comprehensively analyze all categories of DSL code information to determine whether the AI ​​content generation tool needs to be reconfigured and trained. The judgment results are sent to the front-end development team.

[0179] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0180] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0181] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0182] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0183] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A front-end low-code automated programming method based on AI, characterized by: The programming method comprises the following steps: The programming system describes the programming requirements in natural language and passes them to the AI ​​content generation tool. The AI ​​content generation tool receives the programming requirements and generates a DSL page. It uses the UI tool and UE tool to automatically visualize and interactively optimize the DSL page, and generates feedback based on the visualization and interactive optimization results. After receiving the feedback, the programming system performs regression testing and tuning on the DSL page, and passes the tuning results to the AI ​​content generation tool again. The AI ​​content generation tool generates the final DSL page based on the tuning results, and automatically performs regression testing and analysis on the DSL code in the final DSL page. After the DSL code quality is analyzed to be qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch, and the generated final DSL code and documents are released. The final DSL code is interacted after version management; The final DSL code is classified based on the tuning results and quality analysis results. After regularly analyzing the final DSL code information of all categories, it is determined whether the AI ​​content generation tool needs to be reconfigured and trained; After receiving the feedback, the programming system performs regression testing and tuning on the DSL page, including the following steps: Obtain the specification compliance rate, execution deviation and compatibility success rate of the code in the DSL page, and calculate the specification compliance rate, execution deviation and compatibility success rate to obtain the code coefficient; Compare the obtained code coefficient with a preset coefficient threshold, where the coefficient threshold is used to evaluate whether the DSL code quality in the DSL page is qualified; If the code coefficient is greater than or equal to the coefficient threshold, the DSL code quality in the DSL page is evaluated to be qualified. If the code coefficient is less than the coefficient threshold, the DSL code quality in the DSL page is evaluated to be unqualified and the DSL code needs to be readjusted.

2. According to claim 1, a front-end low-code automated programming method based on AI is characterized in that: The final DSL code is classified based on the tuning results and quality analysis results, including the following steps: The tuning results include tuning frequency and tuning duration. The tuning frequency is obtained by dividing the number of tuning times by the monitoring duration, and the tuning duration is directly obtained through the system log. Normalize the tuning frequency and tuning duration so that their value ranges are mapped to [0, 1], obtain the normalized value of the tuning frequency and the normalized value of the tuning duration, and add the normalized value of the tuning frequency to the normalized value of the tuning duration to obtain the tuning coefficient. The classification index of the DSL code is obtained by weighted calculation of the tuning coefficient and the code coefficient. The expression is: , where is the classification index, is the code coefficient, is the tuning coefficient; The obtained classification index is compared with the preset first index threshold and second index threshold. If the classification index is greater than or equal to the second index threshold, the DSL code is classified into Class I code. If the classification index is less than the second index threshold and the classification index is greater than or equal to the first index threshold, the DSL code is classified into Class II code. If the classification index is less than the first index threshold, the DSL code is classified into Class III code.

3. According to claim 2, a front-end low-code automated programming method based on AI is characterized in that: After regularly analyzing the final DSL code information of all categories, determine whether the AI ​​content generation tool needs to be reconfigured and trained, including the following steps: Regularly obtain the number of DSL codes in the first code category, the number of DSL codes in the second code category, and the number of DSL codes in the third code category of the programming system; The number of DSL codes in the first category of code is divided by the total number of codes to obtain the first category code ratio, the number of DSL codes in the second category of code is divided by the total number of codes to obtain the second category code ratio, and the number of DSL codes in the third category of code is divided by the total number of codes to obtain the third category code ratio; Take 80% of the proportion of Category 1 codes plus 20% of the proportion of Category 2 codes, and then subtract the proportion of Category 3 codes to obtain the optimized value. If the optimized value is greater than or equal to the optimization threshold, it is judged that there is no need to reconfigure and train the AI ​​content generation tool. If the optimized value is less than the optimization threshold, it is judged that the AI ​​content generation tool needs to be reconfigured and trained.

4. According to the AI-based front-end low-code automated programming method of claim 1, it is characterized by: Merge the feature branch code or fix branch code generated during the DSL code development process into the main branch, and publish the generated final DSL code and documents, including the following steps: Pull the latest DSL code from the main branch, merge the feature branch or fix branch into the main branch, use the document generation tool to generate the latest DSL code document, submit and push the merged DSL code to the main branch of the remote repository; Create a new version tag to identify the version released this time. After the final DSL code is deployed to the production environment, update the version log to record the changes and fixes of this release.

5. According to claim 4, a front-end low-code automated programming method based on AI is characterized in that: After receiving the feedback, the programming system performs regression testing and tuning on the DSL page, which also includes the following steps: Collect specific issues and improvement suggestions from feedback reports generated by UI tools and UE tools, analyze feedback content and classify problem types, and update existing test cases or write new test cases based on the issues and improvement suggestions in the feedback; Use automated testing tools to run updated test cases, covering all functions and interaction paths of DSL pages, record the execution results of each test case, including pass, fail, and exceptions, and summarize the test data and log files generated by automated testing; After analyzing the test data, identify whether new problems are introduced during the optimization process or whether there are old problems that have not been solved, and classify the problems found in the regression test, including logical errors, performance problems, and UI problems; Develop tuning plans for different types of problems, including code adjustments, performance optimization, and visual improvements. Further adjust and optimize the DSL page according to the tuning plan, run automated test cases again on the tuned DSL page, and verify whether all problems have been resolved.

6. According to claim 5, a front-end low-code automated programming method based on AI is characterized in that: The UI tool and the UE tool are used to automatically optimize the visualization and interaction of the DSL page, and feedback is generated based on the visualization and interaction optimization results, including the following steps: The UI tool and UE tool load the DSL page generated by the AI-generated content tool, analyze the various components and their properties in the DSL page, including layout, style, and interactive elements, and apply preset styles and themes to the DSL page according to the design specifications and brand guidelines; Visually beautify each component in the DSL page, including color, font, margin and alignment, add preset interactive behaviors and animation effects to the interactive elements in the DSL page, simulate operations, conduct usability testing, and adjust and optimize the interactive logic of the DSL page based on the test results.

7. A front-end low-code automated programming system based on AI, used to implement the programming method according to any one of claims 1 to 6, characterized in that: Including DSL page generation module, test tuning module, quality analysis module, classification judgment module: DSL page generation module: The programming requirements are described in natural language and then passed to the AI ​​content generation tool. The AI ​​content generation tool receives the programming requirements and generates a DSL page. Test and tuning module: Use UI tools and UE tools to automatically optimize the visualization and interaction of DSL pages, and generate feedback based on the visualization and interaction optimization results. After receiving the feedback, perform regression testing and tuning on the DSL pages. Quality analysis module: Generates the final DSL page based on the tuning results through the AI ​​content generation tool, and automatically performs regression testing and analysis on the DSL code in the final DSL page. After the DSL code quality is analyzed to be qualified, the feature branch code or repair branch code generated during the DSL code development process is merged into the trunk branch, and the generated final DSL code and documents are released. The final DSL code is interacted after version management; Classification judgment module: Classifies the final DSL code based on the tuning results and quality analysis results, and regularly analyzes the final DSL code information of all categories to determine whether the AI ​​content generation tool needs to be reconfigured and trained.

Citation Information

Patent Citations

  • An automatic software system quality inspection and rapid iteration method

    CN109684215A

  • Front-end code generation method and device and computer equipment

    CN113805871A