User interface generation method and device, computer equipment and storage medium

By inputting interface parameters in the application to generate a user interface, the problem of lack of personalization and fun in the prior art user interface is solved, which improves the user viscosity of the application and saves costs.

CN120020702APending Publication Date: 2025-05-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311550312.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

In the prior art, the user interface lacks personalization and fun, resulting in a low user viscosity of the application.

Method used

By providing a user interface generation method and device, a user is allowed to enter interface parameters in an application to generate a user interface matching these parameters. The method includes displaying a generation interface, obtaining interface parameters, and generating a matching user interface.

Benefits of technology

It realizes the personalization and fun of the user interface, improves the user viscosity of the application, saves labor costs, and improves the efficiency of generating the user interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020702A_ABST
    Figure CN120020702A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a user interface generation method and device, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps that in response to a generation instruction in an application, a generation interface is displayed, and the generation instruction is used for indicating generation of a user interface for the application; interface parameters input in the generated interface are obtained, wherein the interface parameters are used for describing conditions needing to be met by the generated user interface; and generating a first user interface matched with the interface parameters. The function of generating the user interface is provided in the application, personalization of the user interface is achieved, the user interface is not limited to a user interface made by a designer any more, the interestingness of the user interface is enhanced, and therefore the user viscosity of the application is improved. And a designer does not need to make many different user interfaces, so that the labor cost is saved, and the efficiency of generating the user interface is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of computer technologies, and particularly to a method and apparatus for generating a user interface, a computer device, and a storage medium. Background Art

[0002] With the development of computer technologies and the emergence of various applications, users have increasingly paid attention to the display effects of user interfaces in applications. How to generate a user interface that meets requirements has become the focus of attention.

[0003] A user interface is usually made by a professional designer and then added to an application, and then the application is released to users. The users can then run the application to display the user interface.

[0004] However, for different users, the user interfaces made by designers are the same, lacking in interest, resulting in a relatively low user viscosity of the application. Summary of the Invention

[0005] Embodiments of the present application provide a method and apparatus for generating a user interface, a computer device, and a storage medium, which achieve the personalization of the user interface, enhance the interest of the user interface, thereby improving the user viscosity of the application. And it saves labor costs and improves the efficiency of generating the user interface. The technical solutions are as follows:

[0006] On the one hand, a method for generating a user interface is provided. The method includes:

[0007] In response to a generation instruction in an application, display a generation interface, where the generation instruction is used to indicate generating a user interface for the application;

[0008] Obtain interface parameters input in the generation interface, where the interface parameters are used to describe the conditions that the generated user interface needs to meet;

[0009] Generate a first user interface that matches the interface parameters.

[0010] On the other hand, a device for generating a user interface is provided. The device includes:

[0011] A display module, configured to display a generation interface in response to a generation instruction in an application, where the generation instruction is used to indicate generating a user interface for the application;

[0012] An obtaining module, configured to obtain interface parameters input in the generation interface, where the interface parameters are used to describe the conditions that the generated user interface needs to meet;

[0013] A generation module, configured to generate a first user interface that matches the interface parameters.

[0014] Optionally, the display module includes:

[0015] A display unit, configured to display a first interface image corresponding to a second user interface and a parameter input interface in the generation interface in response to the generation instruction in the application;

[0016] Wherein, the second user interface is the user interface currently used by the application, and the parameter input interface is used to input the interface parameters.

[0017] Optionally, the display unit is further configured to replace the first interface image corresponding to the second user interface with a second interface image corresponding to the first user interface.

[0018] Optionally, the acquisition module includes:

[0019] A first acquisition unit, configured to acquire a positive keyword input in a first input field of the generation interface, where the positive keyword is a keyword associated with the generated user interface.

[0020] Optionally, the acquisition module further includes at least one of the following:

[0021] A second acquisition unit, configured to acquire a negative keyword input in a second input field of the generation interface, where the negative keyword is a keyword not associated with the generated user interface;

[0022] A third acquisition unit, configured to acquire a relevance corresponding to the position of a slider block in a scroll bar of the generation interface, where the relevance is the relevance between the generated user interface and the positive keyword.

[0023] Optionally, a user interface generation control is displayed in the application, and the display module is configured to display the generation interface in response to a trigger operation on the user interface generation control.

[0024] Optionally, the display module is further configured to display a user interface leaderboard, where the user interface leaderboard includes a target number of user interfaces, and each user interface in the user interface leaderboard is generated by a computer device running the application.

[0025] Optionally, the generation module includes:

[0026] An image generation unit, configured to generate a second interface image based on a first interface image corresponding to a second user interface and the interface parameters through a first image generation model;

[0027] An interface generation unit, configured to generate the first user interface corresponding to the second interface image;

[0028] Among them, the second user interface is the user interface currently used by the application.

[0029] Optionally, the first image generation model includes a first encoding sub-model and a decoding sub-model. The image generation unit is configured to:

[0030] Encode the first interface image to obtain image features;

[0031] Encode the interface parameters to obtain text features;

[0032] Encode the text features and the image features through the first encoding sub-model to obtain encoded features;

[0033] Decode the encoded features through the decoding sub-model to obtain the second interface image.

[0034] Optionally, the first image generation model further includes a second encoding sub-model and a convolutional sub-model. The image generation unit is further configured to:

[0035] Encode a third interface image to obtain conditional features. The third interface image includes partial image information of the first interface image, and the conditional features are used to indicate that the second interface image generated by the first image generation model needs to include the image information;

[0036] Encode the conditional features and the image features through the second encoding sub-model to obtain first conditional features, and perform a convolution operation on the first conditional features through the convolutional sub-model to obtain second conditional features;

[0037] The image generation unit is configured to:

[0038] Decode the encoded features and the second conditional features through the decoding sub-model to obtain the second interface image.

[0039] Optionally, the first encoding sub-model includes n first encoding blocks, where n is an integer greater than 1;

[0040] The image generation unit is configured to:

[0041] Encode the text features and the image features through the 1st first encoding block to obtain the 1st encoded features;

[0042] Encoding the text feature and the (x - 1)-th encoded feature through the x-th first encoding block to obtain the x-th encoded feature, until encoding the text feature and the (n - 1)-th encoded feature through the n-th first encoding block to obtain the n-th encoded feature, where x is an integer greater than 1 and less than n.

[0043] Optionally, the second encoding sub-model includes n second encoding blocks, the convolutional sub-model includes n convolutional layers, and the image generation unit is configured to:

[0044] Perform a convolution operation on the conditional feature, and fuse the conditional feature obtained after the convolution operation with the image feature to obtain a fused feature;

[0045] Encode the text feature and the fused feature through the first second encoding block to obtain the first conditional feature of the first one;

[0046] Encode the text feature and the (y - 1)-th first conditional feature through the y-th second encoding block to obtain the y-th first conditional feature, until encoding the text feature and the (n - 1)-th first conditional feature through the n-th second encoding block to obtain the n-th first conditional feature, where y is an integer greater than 1 and less than n;

[0047] Perform convolution operations on the n first conditional features respectively through the n convolutional layers to obtain n second conditional features.

[0048] Optionally, the decoding sub-model includes n decoding blocks, and the image generation unit is configured to:

[0049] Decode the text feature, the n-th encoded feature, and the first second conditional feature through the first decoding block to obtain the first decoded feature;

[0050] Decode the text feature, the (n + 1 - z)-th encoded feature, and the z-th second conditional feature through the z-th decoding block to obtain the z-th decoded feature, until decoding the text feature, the first decoded feature, and the n-th second conditional feature through the n-th decoding block to obtain the n-th decoded feature, where z is an integer greater than 1 and less than n;

[0051] Generate the second interface image based on the n-th decoded feature.

[0052] Optionally, the process of obtaining the third interface image includes at least one of the following:

[0053] Obtain a line image of the first interface image, where the line image includes lines in the first interface image;

[0054] Obtain a depth image of the first interface image, where the depth image includes the depth at each position in the first interface image;

[0055] Obtain a color image of the first interface image, where the color image includes the main color of each region in the first interface image.

[0056] Optionally, the device further includes a training module, and the training module is used for:

[0057] Train a second image generation model, where the second image generation model includes the first encoding sub-model and the decoding sub-model;

[0058] When the second image generation model meets the training end condition, copy the first encoding sub-model to obtain the second encoding sub-model;

[0059] Add the second encoding sub-model and the convolutional sub-model to the second image generation model to obtain the first image generation model;

[0060] Train the first image generation model while keeping the model parameters of the first encoding sub-model unchanged until the first image generation model meets the training end condition.

[0061] Optionally, the training module is used for:

[0062] Train the second image generation model based on a first model;

[0063] Train the first image generation model based on at least one of a second model, a third model, or a fourth model;

[0064] The first model includes at least one image, text keywords corresponding to the at least one image, and diffusion information, the second model includes at least one line image, text keywords corresponding to the at least one line image, and diffusion information, the third model includes at least one depth image, text keywords corresponding to the at least one depth image, and diffusion information, and the fourth model includes at least one color image, text keywords corresponding to the at least one color image, and diffusion information;

[0065] Wherein, the diffusion information corresponding to any image includes a noise image obtained by adding noise to the image and the noise.

[0066] On the other hand, a computer device is provided. The computer device includes a processor and a memory. At least one computer program is stored in the memory and is loaded and executed by the processor to implement the operations performed by the user interface generation method as described in the above aspect.

[0067] On the other hand, a computer-readable storage medium is provided. At least one computer program is stored in the computer-readable storage medium and is loaded and executed by a processor to implement the operations performed by the user interface generation method as described in the above aspect.

[0068] On the other hand, a computer program product is provided, including a computer program that is loaded and executed by a processor to implement the operations performed by the user interface generation method as described in the above aspect.

[0069] The solution of the embodiments of the present application provides a function of generating a user interface in an application. When the computer device runs the application, a user interface matching the interface parameters can be generated based on the input interface parameters, realizing the personalization of the user interface, no longer being limited to using the user interfaces made by designers, enhancing the interest of the user interface, and thus improving the user stickiness of the application. And there is no need for designers to make a lot of different user interfaces, saving labor costs and improving the efficiency of generating user interfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0071] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0072] Figure 2 is a flowchart of a user interface generation method provided by an embodiment of the present application;

[0073] Figure 3 is a flowchart of another user interface generation method provided by an embodiment of the present application;

[0074] Figure 4 is a schematic diagram of an interface generated by an embodiment of the present application;

[0075] Figure 5 is a schematic diagram of another interface generated by an embodiment of the present application;

[0076] Figure 6 It is a schematic diagram of another generated interface provided by an embodiment of the present application;

[0077] Figure 7 It is a schematic diagram of another generated interface provided by an embodiment of the present application;

[0078] Figure 8 It is a flowchart of another user interface generation method provided by an embodiment of the present application;

[0079] Figure 9 It is a schematic diagram of a first image generation model provided by an embodiment of the present application;

[0080] Figure 10 It is a schematic diagram of another first image generation model provided by an embodiment of the present application;

[0081] Figure 11 It is a flowchart of another user interface generation method provided by an embodiment of the present application;

[0082] Figure 12 It is a schematic diagram of a line image provided by an embodiment of the present application;

[0083] Figure 13 It is a schematic diagram of a depth image provided by an embodiment of the present application;

[0084] Figure 14 It is a schematic diagram of another first image generation model provided by an embodiment of the present application;

[0085] Figure 15 It is a schematic diagram of the processing process of an image in a first model provided by an embodiment of the present application;

[0086] Figure 16 It is a schematic diagram of different images generated based on the same line image provided by an embodiment of the present application;

[0087] Figure 17 It is a schematic diagram of different images generated based on the same depth image provided by an embodiment of the present application;

[0088] Figure 18 It is a schematic diagram of different images generated based on the same color image provided by an embodiment of the present application;

[0089] Figure 19 It is a schematic diagram of the operation process of generating a first user interface provided by an embodiment of the present application;

[0090] Figure 20 It is a schematic diagram of the structure of a user interface generation device provided by an embodiment of the present application;

[0091] Figure 21 It is a schematic structural diagram of another user interface generation device provided by an embodiment of the present application;

[0092] Figure 22 It is a schematic structural diagram of a terminal provided by an embodiment of the present application;

[0093] Figure 23 It is a schematic structural diagram of a server provided by an embodiment of the present application. Specific embodiments

[0094] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0095] It can be understood that the terms "first", "second", etc. used in the present application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the present application, the first interface image may be referred to as the second interface image, and similarly, the second interface image may be referred to as the first interface image.

[0096] Among them, at least two means two or more. For example, at least two interface images may be two interface images, three interface images, or any integer greater than or equal to two such as three interface images. Each refers to each of at least two. For example, each interface image refers to each of the at least two interface images. If the at least two interface images are 3 interface images, then each interface image refers to each of the 3 interface images.

[0097] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) involved in the present application are all fully authorized by users or relevant parties, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions.

[0098] Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable machines to have the functions of perception, reasoning, and decision-making.

[0099] Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, the pre-trained model, also known as the large model or the foundation model, can be widely applied to downstream tasks in various major directions of artificial intelligence after fine-tuning. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, autonomous driving, and intelligent transportation.

[0100] Computer Vision Technology (CV) is a science that studies how to enable machines to "see". Further speaking, it refers to machine vision that uses cameras and computers to replace human eyes to identify and measure targets, and further performs graphic processing to make the computer-processed images more suitable for human eyes to observe or be transmitted to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies and attempts to build artificial intelligence systems that can obtain information from images or multi-dimensional data. Large model technology has brought important changes to the development of computer vision technology. Pretrained models in the field of vision such as Swin-Transformer (a neural network model), ViT (Vision Transformer, a vision Transformer model), V-MOE (Vision Mixture of Experts, a vision-mixed expert model), and MAE (Masked Auto Encoders) can be quickly and widely applied to downstream specific tasks after fine-tuning. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, Optical Character Recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, etc. It also includes common biometric recognition technologies such as face recognition and fingerprint recognition.

[0101] Machine Learning (ML) is an interdisciplinary field that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning from demonstration. Pretrained models are the latest development results of deep learning, integrating the above technologies.

[0102] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in multiple fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless, autonomous driving, drones, digital twins, virtual humans, robots, artificial intelligence-generated content (AIGC), conversational interaction, smart healthcare, smart customer service, game AI, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0103] A pre-training model (PTM), also known as a foundation model or a large model, refers to a deep neural network (DNN) with a large number of parameters. It is trained on a large amount of unlabeled data, and the function approximation ability of the large-parameter DNN is used to enable the PTM to extract common features from the data. Through techniques such as fine-tuning, parameter-efficient fine-tuning (PEFT), and prompt-tuning, it is applicable to downstream tasks. Therefore, the pre-training model can achieve ideal results in few-shot or zero-shot scenarios. PTMs can be classified into language models, vision models, speech models, multi-modal models, etc. according to the data modalities they process. Among them, multi-modal models refer to models that establish feature representations of two or more data modalities. The pre-training model is an important tool for outputting artificial intelligence-generated content and can also be used as a general interface connecting multiple specific task models.

[0104] The solution provided in the embodiments of this application relates to technologies such as computer vision in artificial intelligence, and will be specifically described through the following embodiments:

[0105] First, the following explanations are given for the terms involved in the embodiments of this application:

[0106] CLIP (Contrastive Language-Image Pre-Training) encoder: A pre-training model that compares text with images, whose function is to connect text with images. In the embodiments of this application, the text encoding function of CLIP is mainly applied to convert text into text features so that the text features can be input into the model for image generation.

[0107] Text features: A string of digital codes used to describe information such as the nature, attributes, and structure of text. Since computer devices cannot recognize text, text is converted into text features, which computer devices can recognize and based on which subsequent image generation processes can be carried out.

[0108] Image features: A string of digital codes used to describe information such as the size, color distribution, contour, texture, etc. of an image. Since computer devices cannot recognize images, the image is converted into image features, and computer devices can recognize image recognition and perform subsequent image generation processes based on the image features.

[0109] VAE (Variational Auto Encoder): A generative model based on probabilistic encoding, including an encoder and a decoder. The encoder is used to convert an image into image features in the latent space, and the decoder is used to convert the image features in the latent space into a pixel image.

[0110] DDPM (Diffusion Probabilistic Models): A generative model based on diffusion models that generates data by diffusing in a high-dimensional space, can simulate complex probability distributions, and can dynamically change the model structure during training to better fit the data.

[0111] Predicted noise: During the process of removing noise from an image, starting from random noise, the DDPM algorithm is used to determine the noise image, and the image obtained by removing the noise image from the original image is the generated new image.

[0112] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Refer to Figure 1 , this implementation environment includes: a terminal 101 and a server 102, and the terminal 101 and the server 102 are connected through a wireless or wired network.

[0113] The terminal 101 runs an application, and the server 102 is associated with the application to provide data services for the application. The application can be various types such as an instant messaging application, a game application, or a resource recommendation application, and the embodiments of the present application do not limit this.

[0114] Considering that if designers produce the user interface of the application, it will result in the same user interface seen by different users, lacking interest. Therefore, the embodiments of the present application add a function of customizing the user interface in the application. That is, after the terminal 101 runs the application, the user can trigger a generation instruction in the application and input interface parameters to generate a user interface that matches the interface parameters, rather than being limited to using the user interface produced by the designer. Then, different users can generate personalized user interfaces respectively when using the terminal 101 to run the application, without the need to use the same user interface.

[0115] The user interface generation method provided by the embodiments of this application is used in a computer device. Optionally, the computer device is the terminal 101 or the server 102.

[0116] In a possible implementation, the computer device is the terminal 101, and the terminal 101 generates a user interface through an application.

[0117] Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, etc., but is not limited thereto. The embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, etc.

[0118] In another possible implementation, the computer device includes the terminal 101 and the server 102. After the terminal 101 runs the application, the user triggers a generation instruction in the application and inputs interface parameters. The terminal 101 uploads the interface parameters to the server 102. The server 102 generates a user interface and returns it to the terminal 101, and the terminal 101 can then display the user interface through the application.

[0119] Optionally, the server is an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0120] In a possible implementation, the computer program involved in the embodiments of this application can be deployed to be executed on a computer device, or on multiple computer devices located at one place, or on multiple computer devices distributed at multiple places and interconnected through a communication network. The multiple computer devices distributed at multiple places and interconnected through a communication network can form a blockchain system.

[0121] In a possible implementation, the computer device used to generate a user interface in the embodiments of this application is a node in a blockchain system. The node can store the generated user interface in the blockchain, and then the node or other device corresponding nodes in the blockchain can query the user interface by accessing the blockchain.

[0122] The user interface generation method provided by the embodiments of this application can be applied to various scenarios where an application runs.

[0123] For example, in a game scenario, the designer of a game application creates a user interface file that specifies the style of the in-game user interface in the game application and adds the user interface file to the game application, and then publishes the game application. After a player downloads and installs the application, the player can play the in-game match through the application, and the user interface displayed in the in-game match is the user interface created by the designer. However, the player can also use the method provided in the embodiments of the present application to generate a personalized user interface in the application. Then, when the player plays the in-game match through the application, the user interface displayed in the in-game match is the user-defined user interface, which is a highly personalized and customized experience for the player. The player can use their creativity to create various user interfaces.

[0124] Figure 2 It is a flowchart of a user interface generation method provided by the embodiments of the present application, which is executed by a computer device. Refer to Figure 2 , and the method includes:

[0125] 201. The computer device displays a generation interface in response to a generation instruction in the application.

[0126] The embodiments of the present application are applied in the case where a computer device runs an application. The user of the computer device is the user of the application. The user triggers a generation instruction in the application. The generation instruction is used to indicate generating a user interface (UI) for the application. The generation interface is used for the user to set parameters required for generating the user interface.

[0127] The generation instruction can be generated through any operation in the application. In a possible implementation, a user interface generation control is displayed in the application. The user interface generation control is used to indicate generating a user interface for the application. The generation instruction is generated through a trigger operation on the user interface generation control. Then, the computer device displays a generation interface in response to the trigger operation on the user interface generation control.

[0128] Among them, the trigger operation is a click operation, a double-click operation, etc. The user interface generation control is located on the main interface of the application or on other interfaces of the application. The embodiments of the present application do not make any limitations in this regard.

[0129] 202. The computer device obtains the interface parameters input in the generation interface.

[0130] Among them, the interface parameters are used to describe the conditions that the generated user interface needs to meet. Users can, based on their own needs, input their interface parameters in the generation interface, so as to generate a user interface that matches the interface parameters. For different users, the input interface parameters are different, and the generated user interfaces are also different, thus realizing the personalization of the user interface. In addition, even if the input interface parameters are the same, the computer device can generate different user interfaces based on the same interface parameters.

[0131] 203. The computer device generates a first user interface that matches the interface parameters.

[0132] For the convenience of distinction, in the embodiments of the present application, the user interface generated this time that matches the interface parameters is referred to as the first user interface. And the steps of the embodiments of the present application can be executed multiple times, so as to generate multiple user interfaces.

[0133] Optionally, after the computer device generates the first user interface, close the generation interface. When the generation instruction is detected again, re-execute steps 201-203 to generate a new user interface. Or, when the computer device generates the first user interface and does not close the generation interface, the interface parameters can be re-entered in the generation interface, so as to generate a user interface that matches the new interface parameters. Or, when the computer device generates the first user interface and does not close the generation interface, the originally input interface parameters can be kept unchanged, and the regeneration control in the generation interface is triggered, so as to generate another user interface that matches the interface parameters.

[0134] In the embodiments of the present application, there is a user interface file in the application. The user interface file is used to represent the style of the user interface, such as the shape, color, size of the display elements, the layout and spacing of multiple display elements, etc. During the operation of the application, based on this user interface file for display, a visual user interface can be displayed. Then, the computer device generates a user interface that matches the interface parameters, which means that the computer device generates a user interface file that matches the interface parameters, so as to ensure that a user interface that matches the interface parameters can be displayed based on the user interface file during the subsequent operation of the application. Among them, the user interface file is in the PNG (Portable Network Graphics) format or other formats, and the embodiments of the present application do not limit this.

[0135] Optionally, different user interface files are respectively set for different functions in the application, and the user interface generation method provided in the embodiments of the present application can be applied to any function.

[0136] For example, the application is a game application. The game application is provided with a gameplay function and a non-gameplay function. The game application's in-game user interface file is used to represent the style of the user interface during the game, and the out-of-game user interface file is used to represent the style of the user interface outside the game, such as the main interface of the game application, the account information display interface of the game application, etc. The style of the in-game user interface has a greater impact on the user's game operations, while the style of the out-of-game user interface has little impact on the user's game operations. Therefore, the function of customizing the user interface can be enabled for the gameplay function, and the function of customizing the user interface can be disabled for the non-gameplay function. In this case, the generation instruction in the embodiments of the present application is used to instruct to generate a user interface file for the gameplay function of the application, and the computer device will generate an in-game user interface file that matches the interface parameters and keep the original out-of-game user interface file unchanged.

[0137] Optionally, the computer device is a terminal. The terminal generates a user interface file by executing steps 201-203, and then the terminal makes the user interface file effective. Subsequently, during the operation of the application, the user interface can be displayed based on the user interface file. For example, when the terminal generates multiple user interface files, the last generated user interface file can be defaultly made effective, or the user can select any one of the multiple user interface files to be made effective.

[0138] In a possible implementation manner, after the terminal generates a user interface file, the user interface file is uploaded to the server through the application, and the server stores the account logged in by the terminal and the user interface file.

[0139] Optionally, the computer device includes a terminal and a server. After the terminal runs the application, the user triggers a generation instruction in the application and inputs interface parameters. The terminal uploads the interface parameters to the server. The server generates a user interface file that matches the interface parameters and returns it to the terminal. The terminal can then make the user interface file effective through the application, so as to display the user interface based on the user interface file.

[0140] In another possible implementation manner, the server stores the account logged in by the terminal and the user interface file.

[0141] In another possible implementation manner, the method further includes: the computer device displays a user interface leaderboard, the user interface leaderboard includes a target number of user interfaces, and each user interface in the user interface leaderboard is generated by the computer device running the application.

[0142] That is, after at least one computer device running the application generates a user interface, it can evaluate multiple user interfaces, select a target number of user interfaces with better display effects, create a user interface leaderboard, and publish it in the application. Then, the computer device running the application can display the user interface leaderboard in the application. Moreover, each user interface in the user interface leaderboard is generated by the computer device running the application, indicating that the selected user interfaces are not made by the application designer but are custom-generated by users when using the application. Through this user interface leaderboard, numerous users of the application can view the richly styled user interfaces generated, thereby attracting more users to participate in the activity of customizing user interfaces. Among them, the user interfaces can be selected by the application operator or through user voting. The embodiments of the present application do not limit this.

[0143] In the related art, during the development of an application, the designer makes a user interface for the application. After completion, the user interface is added to the application, and then the application is published. After the computer device downloads the application and runs it, the user interface of the application is displayed. This operation process is very long and consumes a large amount of human resources. For different users, the user interface of the application is the same. Even if the designer makes different user interfaces for users to choose from, the range of user choices is limited, and the display effect of the user interface depends on the designer. However, the creativity of the designer is limited, which leads to limitations in the user interfaces made by the designer.

[0144] However, the solution of the embodiments of the present application provides a function of generating user interfaces in the application. When the computer device runs the application, it can generate a user interface that matches the interface parameters based on the input interface parameters, realizing the personalization of the user interface and no longer being limited to using the user interfaces made by the designer, enhancing the interest of the user interface, thereby improving the user viscosity of the application. And there is no need for the designer to make many different user interfaces, saving human resources and improving the efficiency of generating user interfaces.

[0145] Based on the above Figure 2 illustrated embodiments, the embodiments of the present application further provide another method for generating a user interface. Figure 3 This is a flowchart of another method for generating a user interface provided by the embodiments of the present application. The embodiments of the present application are executed by a computer device. Refer to Figure 3 , this method includes:

[0146] 301. The computer device responds to a generation instruction in the application and displays a first interface image corresponding to a second user interface and a parameter input interface in a generation interface.

[0147] Among them, the generation instruction is used to indicate generating a user interface for an application.

[0148] The generated interface includes a first interface image and a parameter input interface. The parameter input interface is used to input interface parameters. The second user interface is the user interface currently used by the application. The first interface image corresponding to the second user interface refers to the image when the application displays the second user interface. The difference between the second user interface and the first interface image is that when the application displays the second user interface, various operations can be performed based on the second user interface, such as clicking on a control in the second user interface, or responding to an instruction input by the keyboard in the case of displaying the second user interface. While the first interface image is just an image and no operations can be performed based on it, for example, clicking on a control in the first interface image or the computer device will not respond when an instruction is input by the keyboard. The first interface image can show the display effect when the application uses the second user interface. By displaying the first interface image in the generated interface, the user can preview the display effect of the second user interface, so as to determine whether they are satisfied with the display effect of the second user interface. Among them, the user interface currently used by the application can be a user interface made by a designer, or the user interface generated by the computer device last time.

[0149] In a possible implementation, the computer device generates the first interface image based on the currently used user interface file. Since the currently used user interface file is used to indicate the style of the second user interface, the first interface image generated based on this user interface file can show the display effect when the application uses the second user interface.

[0150] In a possible implementation, the computer device divides the generated interface into a first display area and a second display area, displays the first interface image in the first display area, and displays the parameter input interface in the second display area. Or, the computer device displays the first interface image at the bottom layer of the generated interface, and displays the parameter input interface on the upper layer of the first interface image. The parameter input interface can be a transparent interface to avoid blocking the first interface image, or the parameter input interface is an opaque interface, and the size of the parameter input interface is smaller than the size of the first interface image, to ensure that the parameter input interface only blocks a part of the first interface image area, rather than blocking the entire area of the first interface image.

[0151] For example, the generated interface is as Figure 4 shown. The first interface image 401 and the parameter input interface 402 are displayed in the generated interface, and the parameter input interface 402 is located on the upper layer of the first interface image 401.

[0152] 302. The computer device obtains the interface parameters input in the parameter input interface. The interface parameters are used to describe the conditions that the generated user interface needs to meet.

[0153] In the parameter input interface of the generation interface, the user inputs interface parameters, which can include various types such as text parameters and numerical parameters. After the computer device obtains the interface parameters based on the generation interface, it can generate a user interface that matches the interface parameters.

[0154] In a possible implementation, refer to Figure 4 , a generation control 403 is displayed on the parameter input interface. After the user finishes inputting the interface parameters, the generation control 403 is triggered. In response to the trigger operation on the generation control 403, the computer device obtains the interface parameters input in the parameter input interface, so as to generate a first user interface that matches the interface parameters.

[0155] In another possible implementation, refer to Figure 4 , an exit control 404 is also displayed on the parameter input interface. Before the user inputs the interface parameters, or after the user inputs the interface parameters and wants to cancel the generation of the user interface, the exit control 404 can be triggered. In response to the trigger operation on the exit control 404, the computer device cancels the display of the generation interface, or keeps the generation interface displayed and cancels the display of the parameter input interface in the generation interface.

[0156] In another possible implementation, step 302 includes:

[0157] 3021. The computer device obtains the positive keywords input in the first input field of the parameter input interface.

[0158] A first input field is displayed in the parameter input interface, and the first input field is used to input positive keywords. The positive keywords are the keywords associated with the generated user interface, that is, the user requires that the generated user interface needs to be a user interface associated with the positive keywords. For example, the generated user interface displays display elements associated with the positive keywords, or the style of the generated user interface conforms to the style indicated by the positive keywords.

[0159] For example, as Figure 5 shown, a first input field 501 is displayed in the parameter input interface, and the user inputs multiple positive keywords in the first input field 501 to indicate that the generated user interface needs to be associated with the multiple positive keywords. For example, if the positive keywords include "sports", the generated user interface presents a sports style.

[0160] In the embodiments of the present application, taking the generation interface including a parameter input interface and the first input field being displayed in the parameter input interface as an example, in other embodiments, the first input field can be located at any position in the generation interface, and the computer device obtains the positive keywords input in the first input field of the generation interface.

[0161] In another possible implementation, step 302 further includes at least one of the following:

[0162] 3022. The computer device obtains a negative keyword entered in the second input field of the parameter input interface.

[0163] The parameter input interface displays a second input field for entering a negative keyword. The negative keyword is a keyword that is not associated with the generated user interface, that is, the user requires that the generated user interface needs to be a user interface that is not associated with the negative keyword. For example, the generated user interface does not display display elements associated with the negative keyword, or the style of the generated user interface does not conform to the style indicated by the negative keyword.

[0164] For example, as Figure 5 shown, the parameter input interface displays a second input field 502, and the user enters multiple negative keywords in the second input field 502 to indicate that the generated user interface needs to be not associated with the multiple negative keywords. For example, if the negative keyword includes "mishandled", the generated user interface does not include game screens related to "mishandled".

[0165] In the embodiment of the present application, taking the generated interface including a parameter input interface and the parameter input interface displaying a second input field as an example, in other embodiments, the second input field can be located at any position in the generated interface, and the computer device obtains the negative keyword entered in the second input field of the generated interface.

[0166] 3023. The computer device obtains the relevance corresponding to the position of the slider in the slider bar of the parameter input interface.

[0167] The parameter input interface displays a slider bar, and a slider is provided on the slider bar. The position of the slider in the slider bar represents the relevance, and the relevance is the relevance between the generated user interface and the positive keyword, that is, how much the generated user interface is associated with the positive keyword. Among them, the relevance can be in the form of a number, a percentage, or other forms. The higher the relevance, the more associated the generated user interface is with the positive keyword, and the lower the relevance, the less associated the generated user interface is with the positive keyword. The user can change the position of the slider in the slider bar by dragging the slider, thereby changing the relevance. For example, when the relevance is small, the size of the display elements associated with the positive keyword in the generated user interface is small, and when the relevance is large, the size of the display elements associated with the positive keyword in the generated user interface is large. Or, when the relevance is small, there are more display elements that conform to the style of the positive keyword in the generated user interface, and when the relevance is large, there are fewer display elements that conform to the style of the positive keyword in the generated user interface.

[0168] In a possible implementation, the display area of the slider shows the degree of association, and the user can intuitively view the magnitude of the degree of association.

[0169] For example, as Figure 5 shown, a slider 503 is displayed in the generated interface. The position of the slider block 504 in the slider 503 represents the degree of association. When the slider block 504 is located at the leftmost end of the slider 503, it represents a degree of association of 0. When the slider block 504 is located at the rightmost end of the slider 503, it represents a degree of association of 10. Figure 5 The position of the slider block 504 in

[0170] In the embodiment of the present application, taking the generated interface including a parameter input interface and the parameter input interface displaying a slider as an example, in other embodiments, the slider can be located at any position in the generated interface. Then, the computer device obtains the degree of association corresponding to the position of the slider block in the slider of the generated interface.

[0171] 303. The computer device generates a first user interface that matches the interface parameters.

[0172] For example, as Figure 5 and Figure 6 shown, the prompt text displayed in the generation control 403 is "Generate". After the user inputs the interface parameters and clicks the generation control 403, the computer device starts to generate the first user interface. The prompt text displayed in the generation control 403 is changed to "Generating", and a progress prompt text "Generating... 20%" for generating the first user interface is also displayed above the generation control 403. And, during this process, if the user clicks the exit control 404, the generation of the first user interface stops. Or, as Figure 7 shown, after the generation of the first user interface is completed, the prompt text displayed in the generation control 403 is changed to "Generate Again". After that, if the user clicks the generation control 403, the computer device will generate a user interface that matches the interface parameters again.

[0173] In a possible implementation, when the interface parameters include positive keywords, the computer device generates an interface image associated with the positive keywords, and then generates a first user interface based on the interface image. For example, the interface image includes display elements (controls, colors, etc.) associated with the positive keywords, or the style of the interface image conforms to the style of the positive keywords.

[0174] In another possible implementation, when the interface parameters include negative keywords, the computer device generates an interface image associated with the positive keywords and not associated with the negative keywords, and then generates a first user interface based on the interface image. For example, the interface image includes display elements associated with the positive keywords and does not include display elements associated with the negative keywords, or the style of the interface image conforms to the style of the positive keywords and does not conform to the style of the negative keywords.

[0175] In another possible implementation, when the interface parameters include positive keywords and a degree of association, the computer device generates an interface image associated with the positive keywords and having a degree of association with the positive keywords equal to the degree of association, and then generates a first user interface based on the interface image. For example, the interface image includes display elements associated with the positive keywords, and the size of the display elements conforms to the size indicated by the degree of association.

[0176] 304. The computer device replaces the first interface image corresponding to the second user interface with the second interface image corresponding to the first user interface.

[0177] The second interface image corresponding to the first user interface is the image when the application displays the first user interface. The second interface image can show the display effect when the application uses the first user interface. The difference between the first user interface and the second interface image is that when the application displays the first user interface, various operations can be performed based on the first user interface, such as clicking on the controls in the first user interface, or responding to instructions input from the keyboard when the first user interface is displayed, while the second interface image is just an image and no operations can be performed based on the second interface image, such as clicking on the controls in the second interface image or the computer device will not respond when instructions are input from the keyboard.

[0178] By replacing the first interface image with the second interface image, the user can preview the display effect of the first user interface and can also intuitively view the differences between the first user interface and the second user interface.

[0179] The solution of the embodiments of the present application provides a function of generating a user interface in an application. When the computer device runs the application, a user interface matching the interface parameters can be generated based on the input interface parameters, realizing the personalization of the user interface, rather than being limited to using the user interfaces made by designers, enhancing the interest of the user interface, and thus improving the user stickiness of the application. And there is no need for designers to make a lot of different user interfaces, saving labor costs and improving the efficiency of generating user interfaces.

[0180] In addition, before starting to generate the first user interface, by displaying the first interface image corresponding to the second user interface in the generated interface, the display effect when the application uses the second user interface can be displayed, so that the user can preview the display effect of the second user interface and determine whether he is satisfied with the display effect of the second user interface.

[0181] In addition, after the first user interface is generated, the first interface image corresponding to the second user interface in the generated interface is replaced with the second interface image corresponding to the first user interface, which can show the display effect when the application uses the first user interface, so that the user can preview the display effect of the first user interface and intuitively view the difference between the first user interface and the second user interface.

[0182] In addition, by inputting positive keywords in the generation interface, a user interface associated with the positive keyword is generated, which meets the user's requirements for the user interface. Moreover, different user interfaces can be generated by inputting different positive keywords, which improves the diversity of the user interface and enhances the fun of the user interface, thereby improving the user stickiness of the application.

[0183] In addition, by inputting negative keywords in the generated interface, a user interface that is not associated with the negative keyword is generated, which meets the user's requirements for the user interface. Moreover, different user interfaces can be generated by inputting different negative keywords, which improves the diversity of the user interface and enhances the fun of the user interface, thereby improving the user stickiness of the application.

[0184] In addition, by inputting the positive keyword and the relevance in the generated interface, a user interface associated with the positive keyword and having a relevance equal to the relevance is generated, thus satisfying the user's requirements for the user interface. Moreover, different user interfaces can be generated by inputting different relevances, thus improving the diversity of the user interface and enhancing the fun of the user interface, thereby improving the user stickiness of the application.

[0185] In another possible implementation, the above step 303 includes: the computer device generates the second interface image through the first image generation model based on the first interface image and interface parameters corresponding to the second user interface, and generates the first user interface corresponding to the second interface image.

[0186] Wherein, the second user interface is the user interface currently used by the application. The first image generation model is used to generate an image. The first interface image and the interface parameters are input into the first image generation model to generate the second interface image. The first interface image and the interface parameters are two important input contents of the first image generation model, which can ensure that the generated second interface image not only matches the interface parameters, but also contains part of the image information of the first interface image, and will not differ too much from the first interface image.

[0187] In the embodiments of the present application, by using artificial intelligence technology, a user interface can be directly generated through an image generation model, enabling users to create various user interfaces with their own creativity, enhancing the user experience, increasing the user stickiness of the application, and saving development costs.

[0188] Optionally, the application in the embodiments of the present application is a game application. In the related art, the UIs of game applications all require designers to spend a lot of time to produce. Players basically have no options for choosing UIs. Even if designers make several sets of UIs for players to choose from, the range of choices for players is limited and the quantity is relatively small. None of these game applications generate game UIs through models, and players cannot customize UIs. By combining artificial intelligence technology with game UIs, the embodiments of the present application enable players to directly generate UIs through an image generation model in a game application. This is a highly personalized and customized experience for players. Players can create various UIs with their own creativity, customize their favorite buttons, interface themes, etc. The patterns are more diverse and richer, enhancing the players' game experience and fun. Moreover, it also brings more activities and gameplay to the game application, increasing the activity of the game application, increasing the user stickiness of the game application, and saving the development costs of the game application. This is very beneficial to both game applications and players.

[0189] The embodiments of the present application also provide another method for generating a user interface, which details the process of generating a first user interface through a first image generation model. Figure 8 is a flowchart of another method for generating a user interface provided by the embodiments of the present application. The embodiments of the present application are executed by a computer device. Refer to Figure 8 and the method includes:

[0190] 801. The computer device displays a generation interface in response to a generation instruction in the application.

[0191] 802. The computer device obtains interface parameters input in the generation interface.

[0192] The processes of steps 801-802 are the same as those of steps 201-202 and will not be elaborated here.

[0193] 803. The computer device encodes the first interface image to obtain image features.

[0194] In the embodiments of the present application, the first interface image is the interface image corresponding to the second user interface currently used by the computer device. Although the computer device needs to generate a new first user interface, in order to ensure the normal operation of the application, the first user interface needs to be able to implement the functions originally set by the application in the second user interface. This requires that the difference between the first user interface and the second user interface cannot be too large. Therefore, the first interface image also needs to be considered when generating the second user interface.

[0195] Therefore, the computer device encodes the first interface image to obtain image features, thereby performing dimensionality reduction processing on the first interface image. In this way, the first interface image can be reduced from the previous relatively large pixel level to a smaller-sized image feature, and the image feature is input into the first image generation model to enable the image feature to participate in the model operation process.

[0196] Optionally, the computer device encodes the first interface image through VAE to obtain image features, or encodes the first interface image through a CLIP encoder to obtain image features, or other encoding methods can also be used to encode the first interface image. The embodiments of the present application do not limit this.

[0197] 804. The computer device encodes the interface parameters to obtain text features.

[0198] In the embodiments of the present application, in order to generate a first user interface that matches the interface parameters, the interface parameters need to be encoded to obtain text features, so that the text features can be input into the first image generation model to enable the text features to participate in the model operation process.

[0199] Optionally, the computer device encodes the interface parameters through VAE to obtain text features, or encodes the interface parameters through a CLIP encoder to obtain text features, or other encoding methods can also be used to encode the interface parameters. The embodiments of the present application do not limit this.

[0200] Optionally, when the interface parameters include positive keywords, the positive keywords are encoded to obtain text features.

[0201] In a possible implementation, when the interface parameters include positive keywords and negative keywords, the positive keywords and negative keywords are encoded to obtain text features. In another possible implementation, when the interface parameters include positive keywords and a relevance degree, since the relevance degree itself is represented in the form of features and can be directly input into the first image generation model without encoding, the computer device only needs to encode the positive keywords to obtain text features. In another possible implementation, when the interface parameters include positive keywords, negative keywords and a relevance degree, the computer device encodes the positive keywords and negative keywords to obtain text features.

[0202] Of course, in other possible implementations, when the interface parameters include a relevance degree, the relevance degree can also be encoded so that the encoded text features include the relevance degree.

[0203] 805. The computer device encodes the text features and image features through the first encoding sub-model to obtain encoded features.

[0204] In a possible implementation, when the interface parameters include a relevance degree, the computer device encodes the image features, text features and relevance degree through the first encoding sub-model to obtain encoded features. In the first image generation model, the text features and image features interact with each other, and the relevance degree affects the parameters in the first image generation model when the text features and image features interact, thereby controlling the generated second interface image.

[0205] 806. The computer device decodes the encoded features through the decoding sub-model to obtain the second interface image.

[0206] In the embodiments of the present application, the computer device generates a second interface image based on the first interface image corresponding to the second user interface and the interface parameters through the first image generation model. In a possible implementation, as Figure 9 shown, the first image generation model includes a first encoding sub-model and a decoding sub-model. The computer device inputs the image features and text features into the first image generation model, encodes them through the first encoding sub-model, and then decodes them through the decoding sub-model to generate a new image, that is, the second interface image. Adopting the model structure as Figure 9 shown, since the process of generating the second interface image is affected by the first interface image, it can be ensured that the generated second interface image will not be too different from the first interface image and will not affect the normal operation of the application. And since the process of generating the second interface image is affected by the interface parameters, it can be ensured that the generated second interface image is an image that matches the interface parameters and can meet the requirements of the user.

[0207] 807. The computer device generates a first user interface corresponding to the second interface image.

[0208] After the computer device generates the second interface image, it converts the second interface image into a user interface file, which is used to represent the style of the first user interface. This is equivalent to the computer device generating the first user interface, and subsequently, during the operation of the application, the first user interface can be displayed based on the user interface file.

[0209] In a possible implementation, the computer device includes a terminal and a server. The terminal executes the above steps 801 - 802, and the server executes the above steps 803 to 806. After generating the second interface image, the user interface file is generated by the file generation server, that is, step 807 includes: the server sends the second interface image to the file generation server, the file generation server generates the user interface file corresponding to the second interface image and returns it to the server. The server receives the user interface file and sends it to the terminal, and the terminal stores the user interface file, so that the first user interface can be displayed based on the user interface file during the operation of the application.

[0210] In a possible implementation, as Figure 10 shown, the first image generation model further includes a second encoding sub - model and a convolutional sub - model. Then, as Figure 11 shown, through the first image generation model, generating the second interface image based on the first interface image corresponding to the second user interface and the interface parameters further includes:

[0211] 808. The computer device encodes the third interface image to obtain conditional features.

[0212] In the embodiments of the present application, the third interface image contains partial image information of the first interface image, the conditional features are the image features of the third interface image, and the conditional features are used to indicate that the second interface image generated by the first image generation model needs to contain the above - mentioned image information. Subsequently, by inputting the conditional features into the first image generation model, the conditional features can participate in the operation process, so that the second interface image generated by the first image generation model contains the above - mentioned image information.

[0213] Optionally, the third interface image is an image obtained by processing the first interface image. For example, the first image information is removed from the first interface image, and the second image information is retained to obtain the third interface image, where the first image information is the pre - set image information that does not need to be retained, and the second image information is the pre - set image information that needs to be retained.

[0214] For example, the process of obtaining the third interface image includes at least one of the following:

[0215] 1. Obtain a line image of the first interface image, where the line image contains the lines in the first interface image.

[0216] For example, the first interface image and the line image are as Figure 12 shown.

[0217] By performing line extraction on the first interface image, the lines of at least one display element in the first interface image can be extracted, so that the lines of at least one display element are retained in the line image, while the information such as color and depth inside the lines of the display element is no longer retained. Subsequently, when generating the second interface image based on the line image through the first image generation model, it can be ensured that the lines of the at least one display element in the second interface image are the same as or similar to the lines of the at least one display element in the first interface image, without causing a large difference.

[0218] 2. Obtain a depth image of the first interface image, where the depth image contains the depth of each position in the first interface image.

[0219] For example, the first interface image and the depth image are as Figure 13 shown.

[0220] By performing depth extraction on the first interface image, the depth of each position in the first interface image can be extracted, so that the depth of each position is retained in the depth image, while the information such as color of each position is no longer retained, thereby retaining the perspective relationship of each position in the first interface image, and the front, middle, and back relationships of each position in the first interface image can be used as reference objects. Subsequently, when generating the second interface image based on the depth image through the first image generation model, it can be ensured that the depth of each position in the second interface image is the same as or similar to the depth of each position in the first interface image, without causing a large difference, and the perspective feeling generated by the user viewing the second interface image is the same as or similar to the perspective feeling generated by viewing the first interface image.

[0221] 3. Obtain a color image of the first interface image, where the color image contains the main color of each region in the first interface image.

[0222] By performing color recognition on the first interface image, the first interface image can be divided according to different colors, thereby determining the main color of each divided region, so that the main color of each region is retained in the color image, while the information such as depth and lines of each region is no longer retained. Subsequently, when generating the second interface image based on the color image through the first image generation model, it can be ensured that the main color of each region in the second interface image is the same as or similar to the main color of each region in the first interface image, without causing a large difference.

[0223] In the embodiments of the present application, the third interface image is taken as an example including a line image, a depth image, or a color image. In other embodiments, the third interface image may also be other types of images, and the embodiments of the present application do not limit this.

[0224] Optionally, the computer device encodes the third interface image through a VAE or CLIP encoder to obtain conditional features.

[0225] 809. The computer device encodes the conditional features and the image features through a second encoding sub-model to obtain first conditional features, and performs a convolution operation on the first conditional features through a convolution sub-model to obtain second conditional features.

[0226] In this possible implementation, step 806 includes:

[0227] 8061. The computer device decodes the encoded features and the second conditional features through a decoding sub-model to obtain a second interface image.

[0228] After the computer device processes the conditional features and the text features through the second encoding sub-model and the convolution sub-model to obtain second conditional features, in order to make the generated second interface image controllable, the second conditional features are involved in the decoding process of the decoding sub-model. Therefore, the computer device decodes the encoded features and the second conditional features through the decoding sub-model to obtain a second interface image.

[0229] By introducing the third interface image as a condition into the process of generating an image by the first image generation model, it can be ensured that the generated second interface image contains partial image information of the first interface image and will not be significantly different from the first interface image. For example, the application is a game application with a basketball-playing function, and the first interface image includes operation controls such as a shooting control, a ball-requesting control, a switching control, and an escaping control. These operation controls are the operation controls that users need to use when participating in a basketball game. Then, the second interface image generated based on the first interface image will also include these operation controls to ensure that the basketball game can proceed normally, except that the styles of the operation controls in the second interface image are different from those in the first interface image.

[0230] The solution of the embodiments of the present application provides a function of generating a user interface in an application. When the computer device runs the application, it can automatically generate a user interface matching the interface parameters based on the input interface parameters through an image generation model, realizing the personalization of the user interface, rather than being limited to using the user interfaces made by designers, enhancing the interest of the user interface, and thus improving the user viscosity of the application. And there is no need for designers to make many different user interfaces, saving labor costs and improving the efficiency of generating user interfaces.

[0231] InFigure 10 Based on the first image generation model shown, an embodiment of the present application further provides another first image generation model, and the structure of this first image generation model is as follows Figure 14 shown. This first model includes a first encoding sub-model, a second encoding sub-model, a convolutional sub-model, and a decoding sub-model. Moreover, the first encoding sub-model includes n first encoding blocks, the second encoding sub-model includes n second encoding blocks, the convolutional sub-model includes n convolutional layers, and the decoding sub-model includes n decoding blocks, where n is an integer greater than 1.

[0232] Step 805 includes: encoding the text feature and the image feature through the first first encoding block to obtain the first encoded feature; encoding the text feature and the (x - 1)-th encoded feature through the x-th first encoding block to obtain the x-th encoded feature, until encoding the text feature and the (n - 1)-th encoded feature through the n-th first encoding block to obtain the n-th encoded feature, where x is an integer greater than 1 and less than n.

[0233] Step 809 includes: performing a convolution operation on the conditional feature, fusing the conditional feature obtained after the convolution operation with the image feature to obtain a fused feature; encoding the text feature and the fused feature through the first second encoding block to obtain the first first conditional feature; encoding the text feature and the (y - 1)-th first conditional feature through the y-th second encoding block to obtain the y-th first conditional feature, until encoding the text feature and the (n - 1)-th first conditional feature through the n-th second encoding block to obtain the n-th first conditional feature, where y is an integer greater than 1 and less than n; performing a convolution operation on each of the n first conditional features through n convolutional layers to obtain n second conditional features.

[0234] Step 8061 includes: decoding the text feature, the n-th encoded feature, and the first second conditional feature through the first decoding block to obtain the first decoded feature; decoding the text feature, the (n + 1 - z)-th encoded feature, and the z-th second conditional feature through the z-th decoding block to obtain the z-th decoded feature, until decoding the text feature, the first decoded feature, and the n-th second conditional feature through the n-th decoding block to obtain the n-th decoded feature, where z is an integer greater than 1 and less than n; generating a second interface image based on the n-th decoded feature.

[0235] In a possible implementation manner, such as Figure 14As shown, a first intermediate block is further included between the first encoding sub-model and the decoding sub-model. The first intermediate block processes the nth encoded feature and inputs the processed encoded feature into the decoding sub-model for decoding. Additionally, a second intermediate block is further included between the second encoding sub-model and the convolutional sub-model. The second intermediate block processes the nth second conditional feature and inputs the processed second conditional feature into the second intermediate block for processing.

[0236] In another possible implementation, as Figure 14 shown, the computer device also performs iterative processing. Each time after obtaining the nth decoded feature through the decoding sub-model, the nth decoded feature is also input into the first image generation model as the updated image feature and processed again through the first image generation model until the number of iterations reaches the target number T. At this time, the nth decoded feature obtained in this iteration output by the decoding sub-model is decoded to obtain the second interface image, where T is an integer greater than 1. The decoder used to decode the nth decoded feature can be a VAE decoder or other decoders. And Figure 14 the time shown represents the current number of iterations. That is, at each iteration, the current number of iterations can be encoded to obtain a time feature, and the time feature is also input into the first image generation model and processed together with the text feature through encoding, decoding, etc. to obtain the nth decoded feature corresponding to the current number of iterations. The nth decoded feature corresponding to the current number of iterations is decoded to obtain the second interface image.

[0237] In a possible implementation, the training process of the first image generation model includes: training the second image generation model, where the second image generation model includes a first encoding sub-model and a decoding sub-model; when the second image generation model meets the training end condition, copying the first encoding sub-model to obtain the second encoding sub-model; adding the second encoding sub-model and the convolutional sub-model to the second image generation model to obtain the first image generation model; and training the first image generation model while keeping the model parameters of the first encoding sub-model unchanged until the first image generation model meets the training end condition.

[0238] Among them, the first encoding sub-model can be called a locked copy, and the second encoding sub-model can be called a trainable copy. After the initial training of the first encoding sub-model and the decoding sub-model, the model parameters of the first encoding sub-model remain unchanged. Then, the second encoding sub-model and the convolutional sub-model are added. The second encoding sub-model reuses the model parameters of the first encoding sub-model. The first image generation model is trained while keeping the model parameters of the first encoding sub-model unchanged. During the training process, the model parameters of the second encoding sub-model are fine-tuned until the training of the first image generation model ends.

[0239] Therefore, the first image generation model is divided into two modules. The first module is the first encoding sub-model and the decoding sub-model. The first module retains the original process of the first image generation model for generating images, and its generation process is related to the model structure and model parameters of the first module itself. The second module is the second encoding sub-model, the convolutional sub-model, and the decoding sub-model. The second encoding sub-model is a replicated model of the first encoding sub-model. After encoding through the first encoding sub-model, the second module will apply the influence of the third interface images (such as line images, depth images, color images, etc.) to the decoding process of the decoding sub-model, so that the generated second interface image is affected by the lines, depth, and color of the first interface image. That is to say, a second interface image different from but controlled by the first interface image is generated, avoiding the generated user interface from affecting the normal operation of the application.

[0240] In a possible implementation, training the second image generation model includes: training the second image generation model based on the first model; training the first image generation model includes: training the first image generation model based on at least one of the second model, the third model, or the fourth model.

[0241] The first model includes at least one image, at least one text keyword corresponding to the image, and diffusion information. The second model includes at least one line image, at least one text keyword corresponding to the line image, and diffusion information. The third model includes at least one depth image, at least one text keyword corresponding to the depth image, and diffusion information. The fourth model includes at least one color image, at least one text keyword corresponding to the color image, and diffusion information.

[0242] Among them, the diffusion information corresponding to any image includes the noise image and the noise obtained after adding noise to the image.

[0243] First, as Figure 15 shown, the first model is set in the second image generation model. The first model includes multiple images. For each image, the text keyword corresponding to the image is set, and the DDPM algorithm is used for processing to obtain the diffusion information corresponding to the image. Specifically, the first noise is generated, the first noise is superimposed on the image to obtain the first noise image, and the first noise image and the first noise are recorded. Then, the second noise is continuously generated, the second noise is superimposed on the first noise image to obtain the second noise image, and the second noise image and the second noise are recorded, and so on, obtaining the text keywords corresponding to multiple images, the noise images, and the noise corresponding to the noise images. The number of noise addition times can be any set value.

[0244] In addition, a second model, a third model, and a fourth model are set in the first image generation model. Among them, the second model includes multiple line images. For each line image, a text keyword corresponding to the line image is set, and in the case of referring to the lines in the reference line image, the DDPM algorithm is used for processing to obtain the diffusion information corresponding to the line image. As Figure 16 shown, in the case of adding line constraint conditions, the lines in different images generated based on the same line image are the same or similar. The third model includes multiple depth images. For each depth image, a text keyword corresponding to the depth image is set, and in the case of referring to the depth in the reference depth image, the DDPM algorithm is used for processing to obtain the diffusion information corresponding to the depth image. As Figure 17 shown, in the case of adding depth constraint conditions, the depths at the same positions in different images generated based on the same depth image are the same or similar. The fourth model includes multiple color images. For each color image, a text keyword corresponding to the color image is set, and in the case of referring to the color in the reference color image, the DDPM algorithm is used for processing to obtain the diffusion information corresponding to the color image. As Figure 18 shown, in the case of adding color constraint conditions, the main colors in the same regions of different images generated based on the same color image are the same or similar. The process of creating diffusion information for images in the second model, the third model, and the fourth model is the same as that of the first model, and will not be elaborated here.

[0245] Optionally, the second image generation model is a diffusion model, such as the Stable Diffusion model or other diffusion models, etc., and the second encoding sub-model and the convolutional sub-model can form a ControlNet (control network).

[0246] During the training process of the diffusion model, any one or more images in the first model can be used as input samples, and the noise already added in the sample can be used as output samples to train the diffusion model so that the diffusion model has the ability to predict noise, that is, the diffusion model can be used as a noise predictor, so that the process of generating a new image through the diffusion model can be simulated as a process of predicting the noise in the original image and removing the noise. And during the training process after introducing ControlNet, any one or more images in the second model, the third model, and the fourth model can be used as references to train the diffusion model and ControlNet so that the diffusion model has the ability to predict noise under the constraint conditions of line images, depth images, or color images, improving the performance of the diffusion model, and further improving the display effect of the user interface generated through the diffusion model.

[0247] The operation process of the computer device for generating the first user interface is as Figure 19As shown in the figure, the diffusion model and ControlNet are trained based on the first model, the second model, the third model, and the fourth model. After the training is completed, the first image generation model can be deployed. Then, the computer device obtains the first interface image and interface parameters through the application. The interface parameters include positive keywords, negative keywords, and correlation degrees. The positive keywords and negative keywords are encoded to obtain text features, and the first interface image is encoded to obtain image features. The text features, image features, and correlation degrees are input into the diffusion model. Moreover, the line image, depth image, and color image of the first interface image are encoded to obtain conditional features, and the text features and conditional features are input into ControlNet. The processing process of the diffusion model can be regarded as a process of predicting the noise in the first interface image and removing the noise from the first interface image. And during the process of removing the noise, the conditional features will also be involved. Then the diffusion model outputs image features, and the image features are converted into a second interface image, which is the image obtained by removing the noise from the first interface image. The computer device uploads the second interface image to the file generation server, and the file generation server generates a user interface file based on the second interface image and returns it to the local computer device. The computer device can display a new first user interface based on the user interface file and preview the first user interface.

[0248] Figure 20 It is a schematic structural diagram of a user interface generation device provided by an embodiment of the present application. Refer to Figure 20 , the device includes:

[0249] A display module 2001, configured to display a generation interface in response to a generation instruction in the application, where the generation instruction is used to indicate generating a user interface for the application;

[0250] An acquisition module 2002, configured to acquire interface parameters input in the generation interface, where the interface parameters are used to describe the conditions that the generated user interface needs to meet;

[0251] A generation module 2003, configured to generate a first user interface that matches the interface parameters.

[0252] The solution of the embodiment of the present application provides a function of generating a user interface in the application. When the computer device runs the application, it can generate a user interface that matches the interface parameters based on the input interface parameters, realizing the personalization of the user interface, rather than being limited to using the user interfaces made by designers, enhancing the interest of the user interface, and thus improving the user viscosity of the application. And there is no need for designers to make many different user interfaces, saving labor costs and improving the efficiency of generating user interfaces.

[0253] Optionally, refer to Figure 21 , the display module 2001 includes:

[0254] A display unit 2011, configured to display a first interface image corresponding to a second user interface and a parameter input interface in a generation interface in response to a generation instruction in an application;

[0255] Wherein, the second user interface is the user interface currently used by the application, and the parameter input interface is used to input interface parameters.

[0256] Optionally, the display unit 2011 is further configured to replace the first interface image corresponding to the second user interface with a second interface image corresponding to a first user interface.

[0257] Optionally, referring to Figure 21 , the obtaining module 2002 includes:

[0258] A first obtaining unit 2012, configured to obtain a positive keyword input in a first input field of the generation interface, where the positive keyword is a keyword associated with the generated user interface.

[0259] Optionally, referring to Figure 21 , the obtaining module 2002 further includes at least one of the following:

[0260] A second obtaining unit 2022, configured to obtain a negative keyword input in a second input field of the generation interface, where the negative keyword is a keyword not associated with the generated user interface;

[0261] A third obtaining unit 2032, configured to obtain an association degree corresponding to the position of a sliding block in a scroll bar of the generation interface, where the association degree is the association degree between the generated user interface and the positive keyword.

[0262] Optionally, a user interface generation control is displayed in the application, and the display module 2001 is configured to display a generation interface in response to a trigger operation on the user interface generation control.

[0263] Optionally, the display module 2001 is further configured to display a user interface leaderboard, where the user interface leaderboard includes a target number of user interfaces, and each user interface in the user interface leaderboard is generated by a computer device running the application.

[0264] Optionally, referring to Figure 21 , the generation module 2003 includes:

[0265] An image generation unit 2013, configured to generate a second interface image based on the first interface image corresponding to the second user interface and interface parameters through a first image generation model;

[0266] An interface generation unit 2023, configured to generate a first user interface corresponding to the second interface image;

[0267] Among them, the second user interface is the user interface currently used by the application.

[0268] Optionally, the first image generation model includes a first encoding sub-model and a decoding sub-model. The image generation unit 2013 is configured to:

[0269] Encode the first interface image to obtain image features;

[0270] Encode the interface parameters to obtain text features;

[0271] Through the first encoding sub-model, encode the text features and the image features to obtain encoded features;

[0272] Through the decoding sub-model, decode the encoded features to obtain the second interface image.

[0273] Optionally, the first image generation model further includes a second encoding sub-model and a convolutional sub-model. The image generation unit 2013 is further configured to:

[0274] Encode the third interface image to obtain conditional features. The third interface image contains partial image information of the first interface image, and the conditional features are used to indicate that the second interface image generated by the first image generation model needs to contain the image information;

[0275] Through the second encoding sub-model, encode the conditional features and the image features to obtain the first conditional features. Through the convolutional sub-model, perform a convolutional operation on the first conditional features to obtain the second conditional features;

[0276] The image generation unit 2013 is configured to:

[0277] Through the decoding sub-model, decode the encoded features and the second conditional features to obtain the second interface image.

[0278] Optionally, the first encoding sub-model includes n first encoding blocks, where n is an integer greater than 1;

[0279] The image generation unit 2013 is configured to:

[0280] Through the first first encoding block, encode the text features and the image features to obtain the first encoded features;

[0281] Through the x-th first encoding block, encode the text features and the (x - 1)-th encoded features to obtain the x-th encoded features, until through the n-th first encoding block, encode the text features and the (n - 1)-th encoded features to obtain the n-th encoded features, where x is an integer greater than 1 and less than n.

[0282] Optionally, the second encoding sub-model includes n second encoding blocks, and the convolutional sub-model includes n convolutional layers. The image generation unit 2013 is configured to:

[0283] Perform a convolution operation on the conditional feature, and fuse the conditional feature obtained after the convolution operation with the image feature to obtain a fused feature;

[0284] Encode the text feature and the fused feature through the first second encoding block to obtain the first first conditional feature;

[0285] Encode the text feature and the (y-1)-th first conditional feature through the y-th second encoding block to obtain the y-th first conditional feature, until the text feature and the (n-1)-th first conditional feature are encoded through the n-th second encoding block to obtain the n-th first conditional feature, where y is an integer greater than 1 and less than n;

[0286] Perform a convolution operation on each of the n first conditional features through n convolutional layers to obtain n second conditional features.

[0287] Optionally, the decoding sub-model includes n decoding blocks. The image generation unit 2013 is configured to:

[0288] Decode the text feature, the n-th encoded feature, and the first second conditional feature through the first decoding block to obtain the first decoded feature;

[0289] Decode the text feature, the (n+1-z)-th encoded feature, and the z-th second conditional feature through the z-th decoding block to obtain the z-th decoded feature, until the text feature, the first decoded feature, and the n-th second conditional feature are decoded through the n-th decoding block to obtain the n-th decoded feature, where z is an integer greater than 1 and less than n;

[0290] Generate a second interface image based on the n-th decoded feature.

[0291] Optionally, the process of obtaining the third interface image includes at least one of the following:

[0292] Obtain a line image of the first interface image, where the line image includes the lines in the first interface image;

[0293] Obtain a depth image of the first interface image, where the depth image includes the depth at each position in the first interface image;

[0294] Obtain a color image of the first interface image, where the color image includes the main color of each region in the first interface image.

[0295] Optionally, referring to Figure 21 , the apparatus further includes a training module 2004, and the training module 2004 is configured to:

[0296] Train a second image generation model, where the second image generation model includes a first encoding sub-model and a decoding sub-model;

[0297] When the second image generation model meets the training end condition, copy the first encoding sub-model to obtain a second encoding sub-model;

[0298] Add the second encoding sub-model and a convolutional sub-model to the second image generation model to obtain a first image generation model;

[0299] Train the first image generation model while keeping the model parameters of the first encoding sub-model unchanged until the first image generation model meets the training end condition.

[0300] Optionally, the training module 2004 is used to:

[0301] Train the second image generation model based on the first model;

[0302] Train the first image generation model based on at least one of the second model, the third model, or the fourth model;

[0303] The first model includes at least one image, at least one text keyword corresponding to the image, and diffusion information. The second model includes at least one line image, at least one text keyword corresponding to the line image, and diffusion information. The third model includes at least one depth image, at least one text keyword corresponding to the depth image, and diffusion information. The fourth model includes at least one color image, at least one text keyword corresponding to the color image, and diffusion information;

[0304] Wherein, the diffusion information corresponding to any image includes a noise image and noise obtained by adding noise to the image.

[0305] It should be noted that: for the user interface generation device provided in the above embodiments, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the user interface generation device provided in the above embodiments and the user interface generation method embodiments belong to the same concept, and the specific implementation process can be seen in the method embodiments, which will not be elaborated here.

[0306] An embodiment of the present application also provides a computer device, which includes a processor and a memory. At least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the user interface generation method in the above embodiments.

[0307] Optionally, the computer device is provided as a terminal. Figure 22 FIG. 2200 is a schematic structural diagram of a terminal provided by an exemplary embodiment of the present application.

[0308] The terminal 2200 includes a processor 2201 and a memory 2202.

[0309] The processor 2201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 2201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 2201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2201 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2201 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.

[0310] The memory 2202 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 2202 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 2202 is used to store at least one computer program, and the at least one computer program is used to be executed by the processor 2201 to implement the user interface generation method provided in the method embodiments of the present application.

[0311] In some embodiments, the terminal 2200 may further optionally include a peripheral device interface 2203 and at least one peripheral device. The processor 2201, the memory 2202, and the peripheral device interface 2203 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 2203 through a bus, signal lines, or a circuit board. Optionally, the peripheral device includes at least one of a radio frequency circuit 2204, a display screen 2205, a camera assembly 2206, and a power supply 2207.

[0312] The peripheral device interface 2203 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 2201 and the memory 2202. In some embodiments, the processor 2201, the memory 2202, and the peripheral device interface 2203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2201, the memory 2202, and the peripheral device interface 2203 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.

[0313] The radio frequency circuit 2204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2204 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 2204 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 2204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so on. The radio frequency circuit 2204 can communicate with other devices through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: a metropolitan area network, generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 2204 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.

[0314] The display screen 2205 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 2205 is a touch display screen, the display screen 2205 also has the ability to collect touch signals on or above the surface of the display screen 2205. The touch signals can be input as control signals to the processor 2201 for processing. At this time, the display screen 2205 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 2205, which is disposed on the front panel of the terminal 2200; in other embodiments, there may be at least two display screens 2205, which are respectively disposed on different surfaces of the terminal 2200 or in a foldable design; in other embodiments, the display screen 2205 may be a flexible display screen, which is disposed on the curved surface or the folding surface of the terminal 2200. Even, the display screen 2205 can also be set to an irregular non-rectangular shape, that is, a special-shaped screen. The display screen 2205 can be prepared using materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0315] The camera module 2206 is used to collect images or videos. Optionally, the camera module 2206 includes a front camera and a rear camera. The front camera is disposed on the front panel of the terminal 2200, and the rear camera is disposed on the back of the terminal 2200. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth camera, a wide-angle camera, and a telephoto camera respectively, so as to realize the function of background blurring by fusing the main camera and the depth camera, panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions by fusing the main camera and the wide-angle camera. In some embodiments, the camera module 2206 may further include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to the combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0316] The power supply 2207 is used to supply power to each component in the terminal 2200. The power supply 2207 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When the power supply 2207 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0317] Those skilled in the art can understand, Figure 22The structure shown does not constitute a limitation on the terminal 2200, and may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.

[0318] Optionally, the computer device is provided as a server. Figure 23 It is a schematic structural diagram of a server provided by an embodiment of the present application. The server 2300 may vary greatly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPUs) 2301 and one or more memories 2302. Among them, at least one computer program is stored in the memory 2302, and the at least one computer program is loaded and executed by the processor 2301 to implement the methods provided by the above-mentioned various method embodiments. Of course, the server may also have components such as wired or wireless network interfaces, keyboards, and input / output interfaces for input / output. The server may also include other components for implementing the functions of the device, which will not be elaborated here.

[0319] The embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the user interface generation method in the above embodiment.

[0320] The embodiment of the present application also provides a computer program product, including a computer program, and the computer program is loaded and executed by a processor to implement the operations performed by the user interface generation method in the above embodiment.

[0321] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc.

[0322] The above are only optional embodiments of the embodiments of the present application, and are not intended to limit the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating a user interface, characterized in that: The method comprises: In response to a generation instruction in the application, displaying a generation interface, wherein the generation instruction is used to instruct generation of a user interface for the application; Acquire interface parameters input in the generated interface, wherein the interface parameters are used to describe conditions that the generated user interface needs to meet; A first user interface matching the interface parameters is generated.

2. The method according to claim 1, characterized in that: The step of displaying a generation interface in response to a generation instruction in the application includes: In response to the generation instruction in the application, displaying a first interface image and a parameter input interface corresponding to a second user interface in the generation interface; The second user interface is the user interface currently used by the application, and the parameter input interface is used to input the interface parameters.

3. The method according to claim 2, characterized in that After generating the first user interface matching the interface parameters, the method further includes: The first interface image corresponding to the second user interface is replaced with the second interface image corresponding to the first user interface.

4. The method according to claim 1, characterized in that The obtaining of interface parameters input in the generation interface includes: A forward keyword input in a first input field of the generated interface is obtained, wherein the forward keyword is a keyword associated with the generated user interface.

5. The method according to claim 4, characterized in that The step of obtaining the interface parameters input in the generation interface further includes at least one of the following: Acquire a negative keyword input in a second input field of the generated interface, wherein the negative keyword is a keyword not associated with the generated user interface; The relevance corresponding to the position of the sliding block in the sliding bar of the generated interface is obtained, where the relevance is the relevance between the generated user interface and the forward keyword.

6. The method according to claim 1, characterized in that The application displays a user interface generation control, and the display of the generation interface in response to the generation instruction in the application includes: In response to a triggering operation on the user interface generating control, the generating interface is displayed.

7. The method according to claim 1, characterized in that The method further comprises: A user interface ranking list is displayed, wherein the user interface ranking list includes a target number of user interfaces, and each user interface in the user interface ranking list is generated by a computer device running the application.

8. The method according to any one of claims 1 to 7, characterized in that: The generating a first user interface matching the interface parameters includes: Generate a second interface image based on the first interface image corresponding to the second user interface and the interface parameters through the first image generation model; generating the first user interface corresponding to the second interface image; The second user interface is the user interface currently used by the application.

9. The method according to claim 8, characterized in that The first image generation model includes a first encoding sub-model and a decoding sub-model, and the second interface image is generated based on the first interface image corresponding to the second user interface and the interface parameters by using the first image generation model, including: Encoding the first interface image to obtain image features; Encoding the interface parameters to obtain text features; Encoding the text features and the image features through the first encoding sub-model to obtain encoding features; The encoding feature is decoded through the decoding sub-model to obtain the second interface image.

10. The method according to claim 9, characterized in that The first image generation model further includes a second encoding sub-model and a convolution sub-model, and the second interface image is generated based on the first interface image corresponding to the second user interface and the interface parameters by the first image generation model, and further includes: Encoding the third interface image to obtain a conditional feature, wherein the third interface image includes part of the image information of the first interface image, and the conditional feature is used to indicate that the second interface image generated by the first image generation model needs to include the image information; The conditional feature and the image feature are encoded by the second encoding sub-model to obtain a first conditional feature, and the first conditional feature is convolved by the convolution sub-model to obtain a second conditional feature; The decoding sub-model is used to decode the coding feature to obtain the second interface image, including: The encoding feature and the second conditional feature are decoded through the decoding sub-model to obtain the second interface image.

11. The method according to claim 10, characterized in that The first coding sub-model includes n first coding blocks, where n is an integer greater than 1; The encoding of the text features and the image features by the first encoding sub-model to obtain encoding features includes: Encoding the text feature and the image feature through the first of the first encoding blocks to obtain the first of the encoding features; The text feature and the x-1th encoding feature are encoded through the xth first encoding block to obtain the xth encoding feature, until the text feature and the n-1th encoding feature are encoded through the nth first encoding block to obtain the nth encoding feature, where x is an integer greater than 1 and less than n.

12. The method according to claim 11, characterized in that The second encoding sub-model includes n second encoding blocks, the convolution sub-model includes n convolution layers, the conditional feature and the image feature are encoded by the second encoding sub-model to obtain a first conditional feature, and the first conditional feature is convolved by the convolution sub-model to obtain a second conditional feature, including: Performing a convolution operation on the conditional feature, and fusing the conditional feature obtained after the convolution operation with the image feature to obtain a fused feature; Encoding the text feature and the fusion feature through the first second encoding block to obtain the first first conditional feature; By using the yth second coding block, the text feature and the y-1th first conditional feature are encoded to obtain the yth first conditional feature, until by using the nth second coding block, the text feature and the n-1th first conditional feature are encoded to obtain the nth first conditional feature, where y is an integer greater than 1 and less than n; Through the n convolutional layers, convolution operations are performed on the n first conditional features respectively to obtain n second conditional features.

13. The method according to claim 12, characterized in that The decoding sub-model includes n decoding blocks, and the decoding sub-model is used to decode the encoding feature and the second conditional feature to obtain the second interface image, including: Decoding the text feature, the nth encoding feature and the first second conditional feature through the first decoding block to obtain a first decoding feature; The text feature, the n+1-zth encoding feature and the zth second conditional feature are decoded through the zth decoding block to obtain the zth decoding feature, until the text feature, the first decoding feature and the nth second conditional feature are decoded through the nth decoding block to obtain the nth decoding feature, where z is an integer greater than 1 and less than n; Based on the nth decoding feature, the second interface image is generated.

14. The method according to claim 10, characterized in that The process of acquiring the third interface image includes at least one of the following: Acquire a line image of the first interface image, where the line image includes lines in the first interface image; Acquire a depth image of the first interface image, wherein the depth image includes the depth of each position in the first interface image; A color image of the first interface image is obtained, where the color image includes a main color of each area in the first interface image.

15. The method according to claim 10, characterized in that The training process of the first image generation model includes: Training a second image generation model, where the second image generation model includes the first encoding sub-model and the decoding sub-model; When the second image generation model meets the training end condition, copying the first encoding sub-model to obtain the second encoding sub-model; Adding the second encoding sub-model and the convolution sub-model to the second image generation model to obtain the first image generation model; While keeping the model parameters of the first encoding sub-model unchanged, the first image generation model is trained until the first image generation model meets the training end condition.

16. The method according to claim 15, characterized in that The training of the second image generation model comprises: training the second image generation model based on the first model; The training of the first image generation model comprises: training the first image generation model based on at least one of the second model, the third model or the fourth model; The first model includes at least one image, text keywords corresponding to the at least one image, and diffusion information; the second model includes at least one line image, text keywords corresponding to the at least one line image, and diffusion information; the third model includes at least one depth image, text keywords corresponding to the at least one depth image, and diffusion information; the fourth model includes at least one color image, text keywords corresponding to the at least one color image, and diffusion information; The diffusion information corresponding to any image includes a noise image obtained by adding noise to the image and the noise.

17. A user interface generating device, characterized in that: The device comprises: A display module, configured to display a generation interface in response to a generation instruction in the application, wherein the generation instruction is used to instruct generation of a user interface for the application; An acquisition module, used to acquire interface parameters input in the generation interface, wherein the interface parameters are used to describe conditions that the generated user interface needs to meet; A generating module is used to generate a first user interface matching the interface parameters.

18. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the user interface generation method according to any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the user interface generating method according to any one of claims 1 to 16.

20. A computer program product, comprising a computer program, characterized in that The computer program is loaded and executed by a processor to implement the operations performed by the user interface generating method according to any one of claims 1 to 16.