A method and system for building UI using artificial intelligence
Through sentiment analysis and satisfaction assessment combined with automated testing and machine learning algorithms, the problems of UI stability assessment and fault detection are solved, achieving high efficiency and user experience improvement in UI design and optimization.
Patent Information
- Application Number
- CN202410935549.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing technology cannot effectively evaluate and adjust the stability of the UI, resulting in low user feedback adjustment efficiency, inability to detect visual or functional abnormalities of the UI in a timely manner, and affecting the reliability and continuity of system operation.
It uses sentiment analysis and satisfaction assessment combined with automated testing and machine learning algorithms to identify potential faults by calculating performance evaluation indicators and comparing them with preset thresholds, and provides optimization suggestions and repair strategies to ensure the stability of the UI and user experience.
It improves the efficiency of UI design and optimization, ensures the reliability and continuity of system operation, reduces the time and cost of manual analysis and adjustment through automated processes, and improves user satisfaction and practicality.
Smart Images

Figure CN118466957B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of UI construction, and in particular to a method and system for constructing UI using artificial intelligence. Background Art
[0002] UI (user interface) construction refers to the creation and design of interfaces for users to interact with computer systems, applications or websites. The specific process of UI construction includes: Requirements analysis: Determine user needs: Understand the needs and expectations of target users through user surveys, interviews, questionnaires, etc.; Analyze functional requirements: According to user needs and product functions, determine the elements and interaction methods that the interface needs to contain; Interface design: Information architecture: Determine the organization and hierarchy of information to ensure that users can easily find the required information; Wireframe: Draw a sketch of the interface to determine the location and basic layout of each interface element. Visual design: Select visual elements such as colors, fonts, icons, etc., make high-fidelity prototypes, and show the final effect of the interface; Interaction design: Design the way users interact with the interface, including interactive elements such as buttons, forms, and menus; Determine interactive behaviors, such as clicking, sliding, dragging, etc., to ensure the convenience and consistency of user operations.
[0003] The existing application publication number is CN108089842A, and the technical solution pointed out in the document named A method and system for building UI using artificial intelligence includes: obtaining user UI requirements; analyzing the UI requirements based on a deep neural network algorithm, and converting the UI requirements into a UI requirements document to generate a standard requirements document; sending the standard requirements document to the user for confirmation; obtaining the user's confirmation instruction; automatically generating relevant scenes according to the standard requirements document and selecting the most matching components or assemblies from the component library through an algorithm to perform intelligent layout, intelligently set the animations and events of switching between each of the scenes; and sending the UI solution to the user. The present invention provides a method and system for building UI using artificial intelligence, which can analyze the modification requirements proposed by the user in natural voice, automatically modify, and improve the output results of artificial intelligence by continuously learning human design and improving and upgrading by itself, but the above solution cannot evaluate and adjust the stability of UI operation.
[0004] In combination with the above documents and existing technologies, after the preliminary design of the UI, corresponding adjustments need to be made based on user feedback. If more UIs are designed, user feedback issues under each UI need to be adjusted synchronously or in a predetermined order. Targeted priority adjustment operations cannot be performed, which affects the optimization efficiency to a certain extent. For some UIs with potential fault hazards, only observing from user feedback or current performance parameters cannot detect abnormal hidden dangers in time, which will greatly affect the reliability and sustainability of system operation in the future. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] In view of the deficiencies in the prior art, the present invention provides a method and system for building a UI using artificial intelligence. Through sentiment analysis and satisfaction evaluation, it can help identify and prioritize UI problems that most affect user experience, thereby improving overall user satisfaction and practicality. It provides a complete set of automated processes from feedback collection to optimization suggestion generation, greatly improving the efficiency of UI design and optimization. Automated testing can quickly discover visual or functional anomalies of the UI, trigger corresponding repair strategies, and then calculate the performance evaluation index I and compare it with the preset evaluation threshold Iol to achieve evaluation and early warning of UI stability, timely discover and handle potential fault hazards, ensure the reliability and continuity of system operation, and solve the problems raised in the background technology.
[0007] (II) Technical solution
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] A system for building a UI using artificial intelligence, comprising:
[0010] The layout style generation module, after uploading the UI design sketch, uses computer vision recognition technology to analyze the sketch content and generate the corresponding layout code;
[0011] User demand recommendation module, based on user needs and data analysis, recommends and generates corresponding UI components based on the layout code;
[0012] The feedback design adjustment module collects feedback data from users when using UI components, uses natural language processing and sentiment analysis technology to analyze the feedback data, and starts the pre-built rule engine based on the analysis results, combined with the satisfaction evaluation value generated based on the feedback data, to generate optimization suggestions.
[0013] The test assurance and maintenance module uses automated testing and machine learning algorithms to complete UI detection operations when releasing new functions or updating the UI. When an abnormality is detected in the UI, the repair strategy is triggered. When no abnormality is detected in the UI, the comparison and judgment strategy is triggered.
[0014] Furthermore, the process of generating the corresponding layout code is as follows:
[0015] Image analysis and element recognition: Perform image analysis on the uploaded UI design sketches and identify each UI element in the sketches. UI elements include buttons, text boxes, and image areas.
[0016] Layout generation: Based on the identified UI elements, the Flexbox algorithm is used to automatically generate the basic layout framework according to the layout rules and design principles of the design sketch;
[0017] CSS style generation: Generate corresponding CSS style codes for each identified UI element. These styles include color, font, border, shadow and alignment.
[0018] Responsive design: adjust the generated CSS styles according to the different resolutions and screen sizes of the devices;
[0019] Output generated code: Output the generated layout code and corresponding CSS style code.
[0020] Furthermore, user requirements include input data structure and display requirements;
[0021] The process of generating corresponding UI components after data analysis is as follows:
[0022] Data parsing and understanding: Parse the input data structure, understand the meaning of each field, and use natural language processing technology to understand the needs described by the user;
[0023] UI component recommendation model: Model training: Use the pre-trained recommendation model to recommend corresponding UI components based on user needs and data structure, and the recommendation model is trained based on several UI design patterns and user interaction data; Feature matching: Map the display requirements and data structure to the feature space of the recommendation model, perform feature matching, and recommend component combinations;
[0024] Automatically generate UI components: Component combination: Based on the recommendation results, combine and generate the required UI components; Code generation: Generate the corresponding HTML, CSS and JavaScript codes to integrate each component into a complete display page.
[0025] Furthermore, the feedback data includes user feedback comments, rating data and behavior data, and the rating data is the user's feedback rating on the UI component, the feedback rating is 1 to 10 points, and the behavior data includes click-through rate and dwell time.
[0026] Furthermore, natural language processing technology is used to perform text analysis on the feedback comments in the feedback data, extract keywords, and use sentiment analysis algorithms to perform sentiment polarity analysis on the feedback comments. After combining the keywords, users' dissatisfaction with UI elements is identified.
[0027] Furthermore, based on the feedback data, the process of generating the satisfaction evaluation value is as follows:
[0028] Extract the rating data and behavior data from the feedback data, pre-process the evaluation scores and behavior data, build a linear regression model, and calculate the satisfaction evaluation value. The formula is as follows:
[0029]
[0030] In the formula, represents the satisfaction evaluation value, They represent model parameters in turn, which are obtained through data learning, and the value range of the model parameters is: , , ,
[0031] , , .
[0032] Furthermore, the optimization suggestion prompts are generated as follows: identifying the user's dissatisfaction with the UI elements, providing optimization suggestions to address the dissatisfaction points, determining the priority of adjusting the UI component according to the size of the satisfaction evaluation value, and the execution of the optimization suggestion is positively correlated with the priority.
[0033] Furthermore, the process of using automated testing to detect the UI is as follows:
[0034] Visual regression testing: Use automated tools to capture and compare screenshots of the UI to detect any visual changes that indicate anomalies.
[0035] Functional testing: Test whether each function of the UI works normally under normal operation. Normal operation includes input verification and button clicks. Abnormal operation indicates an exception.
[0036] Furthermore, after the automated test, the machine learning algorithm is used to continue the detection operation of the UI. The machine learning algorithm is an AI algorithm that monitors the performance data of the UI and generates a performance evaluation index I by combining the score values obtained after monitoring the interaction of N users with the new UI.
[0037] The process of generating performance evaluation index I is as follows:
[0038] S301, using AI to continuously detect the performance data of the UI, collect the performance data of the same operation simulated within a preset number of times T, including the loading time, response time and resource consumption value, and the resource consumption value represents the CPU usage rate, and then calculate the performance coefficient based on the normalized performance data;
[0039] S302, by monitoring the score values obtained after N users interact with the new UI, and combining the performance coefficient, a performance evaluation index I is generated, and the formula based on it is as follows:
[0040]
[0041]
[0042] In formula (1), Indicates the performance coefficient. The larger the performance coefficient, the more stable the current UI performance. i=1, 2, ..., T, i indicates the number of each time. represents the performance estimation coefficient under the same operation of the ith simulation, It means the average value of each performance estimation coefficient obtained under the same simulation operation within T. It represents the rating data obtained after the u-th user interacts with the new UI, u=1, 2, ..., N, u represents the number of each user, and the preset proportional coefficient is: ;
[0043] In formula (2), Indicates the loading time. Indicates the response time. Indicates resource consumption value, weight coefficient: , , ,and ;
[0044] After the automated test realizes the detection of the UI, if an abnormal result appears, it means that there is an abnormality in the UI, and the repair strategy triggered is: re-debug and repair the current UI according to the abnormal result;
[0045] If no abnormal results appear in the UI after the automated test, it means that there is no abnormality in the UI, and the triggered comparison and judgment strategy is: compare the performance evaluation index I with the preset evaluation threshold Iol. When the performance evaluation index I exceeds the evaluation threshold Iol, no response action is taken; when the performance evaluation index I does not exceed the evaluation threshold Iol, a warning signal is issued and a repair strategy is executed.
[0046] A method for building a UI using artificial intelligence, comprising the following steps:
[0047] S1. After uploading the UI design sketch, use computer vision recognition technology to analyze the sketch content and generate the corresponding layout code;
[0048] S2. According to user needs and after data analysis, generate corresponding UI components based on the layout code;
[0049] S3. Collect feedback data from users when using UI components, use natural language processing and sentiment analysis technology to analyze the feedback data, start the pre-built rule engine based on the analysis results, and generate optimization suggestions based on the satisfaction evaluation value generated based on the feedback data;
[0050] S4. When releasing new functions or updating the UI, use automated testing and machine learning algorithms to complete the UI detection operation. When an abnormality is detected in the UI, the repair strategy is triggered. When no abnormality is detected in the UI, the comparison and judgment strategy is triggered.
[0051] (III) Beneficial effects
[0052] The present invention provides a method and system for building a UI using artificial intelligence, which has the following beneficial effects:
[0053] 1. It effectively combines computer vision, natural language processing and data analysis technologies to realize the automatic generation of UI interface code from UI design sketches to final UI interface codes, greatly improving the efficiency and quality of UI design, while ensuring the consistency of the generated interface on different devices and good responsive design;
[0054] 2. Based on accurate satisfaction evaluation and dissatisfaction point identification, it can generate data-driven optimization suggestions, which helps the design team to make orderly and targeted UI improvements, improve design quality and user experience. At the same time, through sentiment analysis and satisfaction evaluation, it can help identify and prioritize UI issues that most affect user experience, thereby improving overall user satisfaction and practicality. It provides a complete set of automated processes from feedback collection to optimization suggestion generation, greatly improving the efficiency of UI design and optimization, and reducing the time and cost of manual analysis and adjustment;
[0055] 3. Automated testing can quickly detect visual or functional anomalies in the UI, trigger corresponding repair strategies, and then evaluate and warn of UI stability by calculating the performance evaluation index I and comparing it with the preset evaluation threshold Iol, so as to timely discover and handle potential fault hazards and ensure the reliability and continuity of system operation. By combining automated tools and machine learning algorithms, the efficiency and accuracy of UI testing are greatly improved, manual intervention and error rates are reduced, and the overall development and release process is optimized. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a schematic diagram of the module structure of a system for building a UI using artificial intelligence according to the present invention;
[0057] Figure 2 The figure is a schematic diagram of the overall steps of a method for building a UI using artificial intelligence according to the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0059] Example 1: Please refer to Figure 1 ,This embodiment provides a system for building a UI using artificial intelligence;
[0060] The design and development concept of the system is as follows:
[0061] This embodiment designs a system for building a UI using artificial intelligence. The artificial intelligence technology is used in the system. Based on the existing method of building a UI, innovative technical solutions are added to make the built system more stable and able to make adaptive adjustments according to the application of different scenarios, thereby reflecting the flexibility of its system design.
[0062] The specific R&D program orientation is as follows:
[0063] Use machine learning and computer vision technology to analyze the UI sketches or reference styles provided by designers, automatically generate UI layout and style codes, and then continue to recommend or automatically generate the best UI components based on user needs and data-driven analysis, and then perform preliminary operations to monitor the application's operating environment and user behavior in real time, dynamically adjust the UI to adapt to different device sizes, resolutions, and interaction methods, and analyze user feedback and behavior data through natural language processing and sentiment analysis technology to optimize UI design and functionality. Before the application is released, the system simulates user operations through automated scripts, collects and analyzes UI response data, and detects potential performance bottlenecks or abnormal behaviors, thereby ensuring the stability and reliability of the system.
[0064] The functional modules of the system are designed as follows:
[0065] The system that uses artificial intelligence to build UI includes a layout style generation module, a user demand recommendation module, a feedback design adjustment module, and a test assurance maintenance module, which run in sequence. The first two functional modules are used as design guides, and the latter two functional modules are used as the system design core, so that a flexible and stable AI-driven UI construction system can be built to cope with demand changes and challenges in different scenarios;
[0066] The layout style generation module, after uploading the UI design sketch, uses computer vision recognition technology to analyze the sketch content and generate the corresponding layout code;
[0067] Among them, the UI design sketch is designed in advance by the designer;
[0068] The process of generating the corresponding layout code is as follows:
[0069] Image analysis and element identification:
[0070] Perform image analysis on the uploaded UI design sketch to identify the various UI elements in the sketch, including but not limited to buttons, text boxes, and image areas. This step uses object detection or semantic segmentation algorithms in computer vision technology to distinguish different elements in the image.
[0071] Layout generation:
[0072] Based on the identified UI elements, the basic layout framework is automatically generated according to the layout rules and design principles (such as alignment and spacing) of the design sketch; this process involves the algorithm to properly arrange and organize the identified UI elements to match the overall layout style of the design;
[0073] In layout generation, the algorithms mentioned can use Flexbox algorithm and automatic flow algorithm, which can be selected according to actual needs. When flexible layout is required, the system may use Flexbox (Flexible Box Layout) algorithm, which can dynamically adjust the position, size and order of elements according to the size and content of elements to adapt to different screen sizes and layout requirements; for flow layout, the system will arrange elements one by one in the order of document flow according to the size and layout requirements of elements. This algorithm is usually suitable for simple document structures or scenarios that require responsive design;
[0074] CSS style generation:
[0075] For each identified UI element, the system generates the corresponding CSS style code. These styles include but are not limited to properties such as color, font, border, shadow, and alignment. They are adjusted and generated according to the visual design requirements of each element in the sketch.
[0076] Responsive design considerations:
[0077] When generating CSS styles, the system takes into account the needs of responsive design. Depending on the different resolutions and screen sizes of the devices, the system may adjust the generated CSS styles to ensure that the UI presentation on different devices can adapt well and maintain consistency;
[0078] Output the generated code:
[0079] Finally, the system outputs the generated layout code (such as HTML structure) and corresponding CSS style code to the development team or designer. These codes can be directly used to develop and implement the UI interface of the design sketch, reducing the workload of manual writing and adjusting the layout.
[0080] Through the above process, the system uses computer vision technology to analyze the sketch and generate responsive layout and CSS style codes that meet the design requirements, thereby improving the efficiency and accuracy of UI design while ensuring the consistency and visual quality of the generated UI.
[0081] User demand recommendation module, based on user needs and data analysis, recommends and generates corresponding UI components based on the layout code;
[0082] Among them, user requirements include input data structure and display requirements;
[0083] Input data structure: User-uploaded product data, including product images, prices, descriptions, and inventory status. This data is usually provided in the form of JSON, CSV, or database.
[0084] Display requirements: The user describes how they want to display the products on the page, such as whether pagination is needed, whether user reviews are needed, and whether filtering and sorting functions are needed;
[0085] The process of generating corresponding UI components after data analysis is as follows:
[0086] Data analysis and understanding:
[0087] The system parses the input data structure, understands the meaning of each field, and uses natural language processing (NLP) technology to understand the needs described by the user; for example, the fields contained in the data structure may include: {"name": "product name", "image": "product image URL", "price": "product price", "description": "product description"}; the user's needs description may be: display product images, prices and purchase buttons, and provide paging function;
[0088] Recommended model for UI components:
[0089] Model training: Use pre-trained recommendation models to recommend the best UI components based on user needs and data structures. These models can be trained based on a large amount of UI design patterns and user interaction data. Feature matching: Map display requirements and data structures to the feature space of the recommendation model, perform feature matching, and recommend the most appropriate component combination. For example, the system can match a "product card component" containing product images, prices, and purchase buttons, as well as a "paging component" to implement paging display.
[0090] User interaction data refers to all data generated when users interact with the UI;
[0091] In this embodiment, the UI component is the UI;
[0092] Automatically generate UI components:
[0093] Component combination: Based on the recommendation results, the system generates the required UI components. Each component has a standardized interface and style, which can be customized according to specific needs. Code generation: The system generates the corresponding HTML, CSS and JavaScript codes to integrate each component into a complete product display page.
[0094] The specific implementation steps and examples are as follows:
[0095] S101, data analysis and demand understanding:
[0096] User uploaded data: `[{"name":"Laptop","image":"laptop.jpg","price":"1000$","description":"High-performance laptop"}, ...]`; User requirement description: Display product images, prices and purchase buttons, and provide paging function;
[0097] S102, Recommended components:
[0098] The system identifies the following UI components: Product card component: displays information about a single product; Pagination component: supports pagination display of multiple products;
[0099] S103. Generate code example:
[0100] HTML code:
[0101]
[0102]
[0103] <h2> Laptop< / h2>
[0104] $1000
[0105] <button> Buy Now< / button>
[0106]
[0107]
[0108] <!-- Pagination controls -->
[0109] ;
[0110] CSS code:
[0111] .product-card {
[0112] border: 1px solid #ddd;
[0113] padding: 10px;
[0114] margin: 10px;
[0115] width: 200px;
[0116] }
[0117] .product - card img {
[0118] max - width: 100%;
[0119] }
[0120] .product - card h2 {
[0121] font - size: 1.5em;
[0122] }
[0123] .product - card p {
[0124] color: #f00;
[0125] }
[0126] .pagination {
[0127] text - align: center;
[0128] margin - top: 20px;
[0129] }
[0130] JavaScript code (pagination function):
[0131] const productsPerPage = 10;
[0132] let currentPage = 1;
[0133] function renderProducts(products) {
[0134] const startIndex = (currentPage - 1) * productsPerPage;
[0135] const endIndex = startIndex + productsPerPage;
[0136] const paginatedProducts = products.slice(startIndex, endIndex);
[0137] const container = document.getElementById('product-container');
[0138] container.innerHTML = '';
[0139] paginatedProducts.forEach(product =>{
[0140] const productCard = document.createElement('div');
[0141] productCard.className = 'product-card';
[0142] productCard.innerHTML = `
[0143]
[0144] <h2> ${product.name}< / h2>
[0145] ${product.price}
[0146] <button> Buy Now< / button>
[0147] `;
[0148] container.appendChild(productCard);
[0149] });
[0150] }
[0151] function setupPagination(products) {
[0152] Const paginationControls = document.querySelector('.pagination');
[0153] const totalPages = Math.ceil(products.length / productsPerPage);
[0154] paginationControls.innerHTML = '';
[0155] for (let i = 1; i<= totalPages; i++) {
[0156] const pageButton = document.createElement('button');
[0157] pageButton.innerText = i;
[0158] pageButton.addEventListener('click', () =>{
[0159] currentPage = i;
[0160] renderProducts(products);
[0161] });
[0162] paginationControls.appendChild(pageButton);
[0163] }
[0164] }
[0165] document.addEventListener('DOMContentLoaded', () =>{
[0166] const products = [...]; / / product data
[0167] renderProducts(products);
[0168] setupPagination(products);
[0169] });
[0170] Through these steps, the system can automatically generate the best UI components including product images, prices and purchase buttons according to user needs and data structure, thereby achieving efficient product display page generation.
[0171] By adopting the above technical solutions, computer vision, natural language processing and data analysis technologies are effectively combined to realize the automatic generation of UI design sketches to final UI interface codes, which greatly improves the efficiency and quality of UI design. At the same time, it ensures the consistency of the generated interface on different devices and good responsive design.
[0172] The feedback design adjustment module collects feedback data from users when using UI components, uses natural language processing and sentiment analysis technology to analyze the feedback data, and starts the pre-built rule engine based on the analysis results, combined with the satisfaction evaluation value generated based on the feedback data, to generate optimization suggestions.
[0173] Among them, feedback data includes user feedback comments, rating data and behavior data;
[0174] Use natural language processing (NLP) technology to perform text analysis on feedback comments in the feedback data, extract keywords, and use sentiment analysis algorithms to perform sentiment polarity analysis on feedback comments. After combining keywords, identify users' dissatisfaction with UI elements;
[0175] The sentiment analysis algorithm is implemented through a machine learning model and is divided into the following steps:
[0176] S201, data preprocessing: first, preprocess the feedback comments, including word segmentation, stop word removal, and word form restoration, to convert the comment text in the feedback comments into a format that can be processed by the machine learning model;
[0177] S202, Feature Extraction: Extract features from the preprocessed text. These features may include Bagof Words, TF-IDF (Term Frequency-Inverse Document Frequency) and Word Embeddings.
[0178] S203. Training sentiment classification model: Use a training dataset with labeled sentiment (usually a collection of sentiment-labeled reviews) to train a machine learning model, such as support vector machine (SVM), naive Bayes, or deep learning models such as recurrent neural network (RNN) or Transformer model; the goal of model training is to predict sentiment polarity (e.g., positive, negative, or neutral) based on the review text;
[0179] S204, sentiment polarity prediction: predicting new comments from users, and predicting the sentiment polarity of the comments based on the trained model;
[0180] S205, identifying the UI elements of dissatisfaction: once the sentiment of the review is predicted to be negative, the specific content of the review can be further analyzed to identify the specific parts of the UI elements that the user is dissatisfied with, which can be achieved by analyzing the keywords, phrases or context in the review;
[0181] For example, the comments may mention keywords or expressions such as "inconvenient operation", "confusing interface design", "slow loading speed", etc., which can indicate which UI elements may have problems;
[0182] In summary, sentiment analysis predicts the sentiment polarity of user comments by training models, and then identifies the specific expressions and problem points of user dissatisfaction with UI elements based on the specific content and context of the comments;
[0183] The process of generating satisfaction evaluation values based on feedback data is as follows:
[0184] Extract the rating data and behavior data from the feedback data, and the behavior data includes click-through rate and dwell time. The rating data is the user's feedback rating on the UI component, and the feedback rating is 1 to 10 points. The higher the score, the better the satisfaction. Preprocess the evaluation score and behavior data, build a linear regression model, and calculate the satisfaction evaluation value. The formula is as follows:
[0185]
[0186] In the formula, Indicates the satisfaction evaluation value, The model parameters represented by need to be learned through data, and the value range of the model parameters is: , , , , , ;
[0187] It should be noted that during the data preparation, the feedback score is 1 to 10 points, the click rate is a ratio between 0 and 1, and the unit of the dwell time is seconds. The linear regression model is designed and built, taking into account the nonlinear characteristics and interaction terms, so as to obtain the above formula. In the actual training process, the model parameters obtained are as follows: =0.5, =0.5, =1, =0.01, =0.05, = 0.001; the evaluation scores and behavioral data were preprocessed to normalize to remove data units;
[0188] After applying the model, given a user's data: feedback score of 4, click-through rate of 0.1, and stay time of 300 seconds, substitute these values into our model formula to calculate the satisfaction evaluation value: =6.43; In this example, the satisfaction evaluation value is calculated as 6.43, which is obtained by considering the direct effects of rating, click rate and dwell time, as well as the square of the rating and the interactive effects of click rate and dwell time. In this way, the model does not rely solely on the weighting of a single variable, but is able to express the complex interactions between variables;
[0189] For model parameters For:
[0190] Obtain model parameters through data learning The process is as follows:
[0191] Data collection and preparation: Ensure that there are enough data points, including ratings, click-through rates, dwell time, and actual satisfaction evaluation values for each sample (if possible). These data need to be cleaned and preprocessed, including handling missing values and outliers, and performing appropriate transformations (such as standardization or normalization).
[0192] Feature engineering: Based on your model design, create the required features: original features: rating, click-through rate and dwell time; non-linear features: square of rating; interactive features: product of click-through rate and dwell time;
[0193] Model construction: Use a linear regression model to fit the data. The linear regression model can be expressed as: ;
[0194] Parameter estimation: Least squares method: This is the most common method in linear regression, which finds the optimal w coefficient by minimizing the sum of squares of the differences between the predicted and actual values; this calculation can be easily implemented using libraries such as Python's scikit-learn or R's linear model function;
[0195] Model estimation: Use statistical indicators such as mean squared error (MSE) or R² to evaluate the performance of the model; the generalization ability of the model can be tested by holding out (dividing the data into training and test sets), cross-validation, etc.
[0196] Iterative optimization: Based on the results of model evaluation, return to the feature engineering stage to adjust features as needed, or adjust other settings in the model (such as adding or removing features) to improve model performance;
[0197] Through these steps, you can effectively learn the parameters of the model and use these parameters to predict the satisfaction evaluation value of new data;
[0198] Generate optimization suggestions:
[0199] Identify user dissatisfaction points with UI elements, provide optimization suggestions to the design team to deal with the dissatisfaction points, determine the priority of adjusting the UI component based on the satisfaction evaluation value, and the execution of optimization suggestions is positively correlated with the priority; for example: if the dissatisfaction point is the button position, the corresponding optimization suggestion is: adjust the button position; if the dissatisfaction point is the color matching, the corresponding optimization suggestion is: change the color matching, and the straight line optimization suggestions are all changed to the position that meets the user's requirements to improve user satisfaction and experience quality.
[0200] By adopting the above technical solutions, based on accurate satisfaction evaluation and dissatisfaction identification, data-driven optimization suggestions can be generated, which will help the design team to make orderly and targeted UI improvements, improve design quality and user experience. At the same time, through sentiment analysis and satisfaction evaluation, it can help identify and prioritize UI issues that most affect user experience, thereby improving overall user satisfaction and practicality. It provides a complete set of automated processes from feedback collection to optimization suggestion generation, greatly improving the efficiency of UI design and optimization, and reducing the time and cost of manual analysis and adjustment.
[0201] The test assurance maintenance module uses automated testing and machine learning algorithms to complete the UI detection operation when releasing new functions or updating the UI. When an abnormality is detected in the UI, the repair strategy is triggered. When no abnormality is detected in the UI, the comparison judgment strategy is triggered.
[0202] Among them, the process of using automated testing to detect the UI is as follows:
[0203] Visual regression testing:
[0204] Use automated tools to capture and compare screenshots of your UI to detect any visual changes or anomalies; automated tools here include:
[0205] [Applitools Eyes](https: / / applitools.com / ): provides visual AI technology that can automatically capture and compare UI changes;
[0206] [BackstopJS](https: / / github.com / garris / BackstopJS): Open source visual regression testing tool that supports automated screenshots and comparisons;
[0207] Example process: 1. Screenshot capture: The tool automatically captures screenshots of the UI page when the test case is executed; 2. Image comparison: Use the difference detection algorithm to compare the old and new screenshots and mark the visual changes; 3. Report generation: Generate a report showing the specific differences and change locations;
[0208] Functional testing:
[0209] Ensure that new features or updated UIs work properly under various user operations, including but not limited to input validation and button clicks; these tests are usually based on the following carriers: Test cases: define specific functional operation steps and expected results; Automated testing framework: automated tools and frameworks for executing test cases; the tools used are:
[0210] [Selenium](https: / / www.selenium.dev / ): supports browser-side automated testing to verify UI functions and interactions; we will not list them here;
[0211] Carrier basis: 1. User requirements and specifications: Based on UI design documents and functional specifications, write test cases to verify whether each function works as expected; 2. Scenario coverage: Test various user operation scenarios, such as button clicks, form submissions, and data validation; 3. Boundary conditions: Test abnormal situations and boundary conditions to ensure the stability of functions under various inputs and states;
[0212] Compatibility testing can also be included:
[0213] Verify the display and interactivity of the UI on different browsers, operating systems, and devices;
[0214] Based on the browser and device support matrix, use the BrowserStack tool to perform cross-platform testing; the main basis for compatibility testing is: target platform: operating systems (such as Windows, macOS, Linux), browsers (such as Chrome, Firefox, Safari) and devices (such as desktop, mobile devices) that need to be supported; responsive design: ensure that the UI displays consistently on different screen sizes and resolutions;
[0215] After the automated test, the machine learning algorithm is used to continue the UI detection operation. The machine learning algorithm is AI, which monitors the performance data of the UI and combines the score values obtained after monitoring N users interacting with the new UI to generate a performance evaluation index I that reflects the overall performance stability of the current UI.
[0216] It should be noted that if any visual changes are detected in the functional test after the visual regression test, it indicates an anomaly. After the functional test, it verifies whether the various functions of the UI are functioning properly. If they are not functioning properly, it indicates an anomaly.
[0217] The process of generating performance evaluation index I is as follows:
[0218] S301, using AI to continuously detect UI performance data, collect performance data under the same operation simulated within a preset number of times T, including loading time, response time and resource consumption value, the resource consumption value represents CPU usage, and then calculate the performance coefficient based on the normalized performance data;
[0219] S302, by monitoring the score values obtained after N users interact with the new UI, and combining the performance coefficient, a performance evaluation index I is generated, and the formula based on it is as follows:
[0220]
[0221]
[0222] In formula (1), Indicates the performance coefficient. The larger the performance coefficient, the more stable the current UI performance. i=1, 2, ..., T, i indicates the number of each time. represents the performance estimation coefficient under the same operation of the ith simulation, It means the average value of each performance estimation coefficient obtained under the same simulation operation within T. It represents the rating data obtained after the u-th user interacts with the new UI, u=1, 2, ..., N, u represents the number of each user, and the preset proportional coefficient is: ;
[0223] In formula (2), Indicates the loading time. Indicates the response time. Indicates resource consumption value, weight coefficient: , , ,and ;
[0224] After the automated test realizes the detection of the UI, if the UI has abnormal results after the automated test, it means that the UI is abnormal, and the triggered repair strategy is: re-debug and repair the current UI according to the abnormal results. If the UI does not have abnormal results after the automated test, it means that the UI is not abnormal, and the triggered comparison judgment strategy is:
[0225] The performance evaluation index I is compared with the preset evaluation threshold Iol. When the performance evaluation index I exceeds the evaluation threshold Iol, it indicates that there is no hidden fault and the system does not respond. When the performance evaluation index I does not exceed the evaluation threshold Iol, it indicates that the current UI has a hidden fault, an early warning signal is issued, and a repair strategy is executed. It should be noted that the evaluation threshold Iol is set according to historical data and is used to define whether the performance evaluation index I exceeds the corresponding range. It will not be elaborated here.
[0226] By adopting the above technical solutions, automated testing can quickly discover visual or functional anomalies of the UI, trigger corresponding repair strategies, and then calculate the performance evaluation index I and compare it with the preset evaluation threshold Iol to evaluate and warn of UI stability, timely discover and handle potential fault hazards, and ensure the reliability and continuity of system operation. By combining automated tools and machine learning algorithms, the efficiency and accuracy of UI testing are greatly improved, manual intervention and error rates are reduced, and the overall development and release process is optimized.
[0227] Example 2: Please refer to Figure 2 Based on Example 1, this embodiment also provides a method for building a UI using artificial intelligence, including the following specific steps:
[0228] S1. After uploading the UI design sketch, use computer vision recognition technology to analyze the sketch content and generate the corresponding layout code;
[0229] S2. According to user needs and after data analysis, generate corresponding UI components based on the layout code;
[0230] S3. Collect feedback data from users when using UI components, use natural language processing and sentiment analysis technology to analyze the feedback data, start the pre-built rule engine based on the analysis results, and generate optimization suggestions based on the satisfaction evaluation value generated based on the feedback data;
[0231] S4. When releasing new functions or updating the UI, use automated testing and machine learning algorithms to complete the UI detection operation. When an abnormality is detected in the UI, the repair strategy is triggered. When no abnormality is detected in the UI, the comparison and judgment strategy is triggered.
[0232] In the application, the several formulas involved are all calculated by removing the dimensions and taking their numerical values. The formula is a formula obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The formula is set by technical personnel in this field according to actual conditions.
[0233] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in electronic hardware, or in 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.
[0234] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0235] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the 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.
Claims
1. A system for building a UI using artificial intelligence, characterized in that: The system includes: The layout style generation module, after uploading the UI design sketch, uses computer vision recognition technology to analyze the sketch content and generate the corresponding layout code; User demand recommendation module, based on user needs and data analysis, recommends and generates corresponding UI components based on the layout code; The feedback design adjustment module collects feedback data from users when using UI components, uses natural language processing and sentiment analysis technology to analyze the feedback data, and starts the pre-built rule engine based on the analysis results, combined with the satisfaction evaluation value generated based on the feedback data, to generate optimization suggestions. Feedback data includes user feedback comments, rating data and behavior data. The rating data is the user's feedback rating on UI components, with a feedback rating of 1 to 10 points. The behavior data includes click-through rate and dwell time. Natural language processing technology is used to perform text analysis on the feedback comments in the feedback data, extract keywords, and use sentiment analysis algorithms to perform sentiment polarity analysis on the feedback comments. After combining keywords, the user's dissatisfaction with UI elements is identified. Based on the feedback data, the process of generating a satisfaction evaluation value is as follows: Extract the rating data and behavior data from the feedback data, pre-process the evaluation scores and behavior data, build a linear regression model, and calculate the satisfaction evaluation value. The formula is as follows: In the formula, Indicates the satisfaction evaluation value, They represent model parameters in turn, which are obtained through data learning, and the value range of the model parameters is: , , , , , ; Generate optimization suggestions: identify the user's dissatisfaction with UI elements, provide optimization suggestions to address the dissatisfaction points, determine the priority of adjusting the UI component based on the satisfaction evaluation value, and the execution of optimization suggestions is positively correlated with the priority; The test assurance and maintenance module uses automated testing and machine learning algorithms to complete UI detection operations when releasing new functions or updating the UI. When an abnormality is detected in the UI, the repair strategy is triggered. When no abnormality is detected in the UI, the comparison and judgment strategy is triggered.
2. A system for constructing a UI using artificial intelligence according to claim 1, characterized in that: The process of generating the corresponding layout code is as follows: Image analysis and element recognition: Perform image analysis on the uploaded UI design sketches and identify each UI element in the sketches. UI elements include buttons, text boxes, and image areas. Layout generation: Based on the identified UI elements, the Flexbox algorithm is used to automatically generate the basic layout framework according to the layout rules and design principles of the design sketch; CSS style generation: Generate corresponding CSS style codes for each identified UI element. These styles include color, font, border, shadow and alignment. Responsive design: adjust the generated CSS styles according to the different resolutions and screen sizes of the devices; Output generated code: Output the generated layout code and corresponding CSS style code.
3. A system for constructing a UI using artificial intelligence according to claim 2, characterized in that: User requirements include input data structure and display requirements; The process of generating corresponding UI components after data analysis is as follows: Data parsing and understanding: Parse the input data structure, understand the meaning of each field, and use natural language processing technology to understand the needs described by the user; UI component recommendation model: Model training: Use a pre-trained recommendation model to recommend corresponding UI components based on user needs and data structure, and the recommendation model is trained based on several UI design patterns and user interaction data; Feature matching: Map the display requirements and data structure to the feature space of the recommendation model, perform feature matching, and recommend component combinations; Automatically generate UI components: Component combination: Based on the recommendation results, combine and generate the required UI components; Code generation: Generate the corresponding HTML, CSS and JavaScript codes to integrate each component into a complete display page.
4. A system for constructing a UI using artificial intelligence according to claim 3, characterized in that: The process of using automated testing to detect UI is as follows: Visual regression testing: Use automated tools to capture and compare screenshots of the UI to detect any visual changes that indicate anomalies. Functional testing: Test whether each function of the UI works normally under normal operation. Normal operation includes input verification and button clicks. Abnormal operation indicates an exception.
5. A system for constructing a UI using artificial intelligence according to claim 4, characterized in that: After the automated test, the machine learning algorithm is used to continue the UI detection operation. The machine learning algorithm is an AI algorithm that monitors the performance data of the UI and generates a performance evaluation index I by combining the score values obtained after monitoring N users interacting with the new UI. The process of generating performance evaluation index I is as follows: S301, using AI to continuously detect the performance data of the UI, collect the performance data of the same operation simulated within a preset number of times T, including the loading time, response time and resource consumption value, and the resource consumption value represents the CPU usage rate, and then calculate the performance coefficient based on the normalized performance data; S302, by monitoring the score values obtained after N users interact with the new UI, and combining the performance coefficient, a performance evaluation index I is generated, and the formula based on it is as follows: In formula (1), Indicates the performance coefficient. The larger the performance coefficient, the more stable the current UI performance. i=1, 2, ..., T, i indicates the number of each time. represents the performance estimation coefficient under the same operation of the ith simulation, It means the average value of each performance estimation coefficient obtained under the same simulation operation within T. It represents the rating data obtained after the u-th user interacts with the new UI, u=1, 2, ..., N, u represents the number of each user, and the preset proportional coefficient is: ; In formula (2), Indicates the loading time. Indicates the response time. Indicates resource consumption value, weight coefficient: , , ,and ; After the automated test realizes the detection of the UI, if an abnormal result appears, it means that there is an abnormality in the UI, and the repair strategy triggered is: re-debug and repair the current UI according to the abnormal result; If no abnormal result appears in the UI after the automated test, it means that there is no abnormality in the UI, and the triggered comparison and judgment strategy is: compare the performance evaluation index I with the preset evaluation threshold Iol. When the performance evaluation index I exceeds the evaluation threshold Iol, no response action is taken; When the performance evaluation index I does not exceed the evaluation threshold Iol, an early warning signal is issued and a repair strategy is executed.
6. A method for constructing a UI using artificial intelligence, using the system described in any one of claims 1 to 5, characterized in that: The steps include: S1. After uploading the UI design sketch, use computer vision recognition technology to analyze the sketch content and generate the corresponding layout code; S2. According to user needs and after data analysis, generate corresponding UI components based on the layout code; S3. Collect feedback data from users when using UI components, use natural language processing and sentiment analysis technology to analyze the feedback data, start the pre-built rule engine based on the analysis results, and generate optimization suggestions based on the satisfaction evaluation value generated based on the feedback data; Feedback data includes user feedback comments, rating data, and behavior data. The rating data is the user's feedback rating on the UI component, with the feedback rating ranging from 1 to 10 points. The behavior data includes click-through rate and dwell time. Natural language processing technology is used to perform text analysis on the feedback comments in the feedback data, extract keywords, and use sentiment analysis algorithms to perform sentiment polarity analysis on the feedback comments. After combining keywords, users’ dissatisfaction with UI elements is identified. Based on the feedback data, the process of generating satisfaction evaluation values is as follows: Extract the rating data and behavior data from the feedback data, pre-process the evaluation scores and behavior data, build a linear regression model, and calculate the satisfaction evaluation value. The formula is as follows: In the formula, Indicates the satisfaction evaluation value, They represent model parameters in turn, which are obtained through data learning, and the value range of the model parameters is: , , , , , ; Generate optimization suggestions: identify the user's dissatisfaction with UI elements, provide optimization suggestions to address the dissatisfaction points, determine the priority of adjusting the UI component based on the satisfaction evaluation value, and the execution of optimization suggestions is positively correlated with the priority; S4. When releasing new functions or updating the UI, use automated testing and machine learning algorithms to complete the UI detection operation. When an abnormality is detected in the UI, the repair strategy is triggered. When no abnormality is detected in the UI, the comparison and judgment strategy is triggered.
