Interactive interface generation method and device, electronic equipment and storage medium

By training the layout generator and introducing the layout discriminator, the problem of low adaptation efficiency of multi-device UI interface is solved, automatic generation and automatic adaptation are realized, and development efficiency and layout generation performance are improved.

CN119148889APending Publication Date: 2024-12-17DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411284696.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

When designing a user interface (UI), it is necessary to manually set different UI layouts for different devices, resulting in inefficient development, especially when the device types are diverse.

Method used

By collecting the sample device information of the real UI interface and its adapted devices, the layout generator is trained, so that it can automatically generate the UI layout adapted to a specific device, and introduce a layout discriminator for adversarial training to optimize the layout generation performance, thereby achieving cross-border Automatic adaptation of the platform or UI interface across devices.

Benefits of technology

It improves the efficiency of UI interface generation and development, realizes automatic generation of interactive interfaces that are suitable for specific devices, and further optimizes layout generation performance through adversarial training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119148889A_ABST
    Figure CN119148889A_ABST
Patent Text Reader

Abstract

The invention provides an interactive interface generation method and device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, and the method comprises the steps: obtaining a real interactive interface and sample equipment information of equipment deployed by the real interactive interface; extracting sample element information of at least one interaction element from the real interaction interface; the sample equipment information and the sample element information are input into a layout generator, predicted layout information output by the layout generator is obtained, and the predicted layout information is layout information of interactive elements matched with the deployment equipment in an interactive interface; inputting the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator; and performing adversarial training on a layout generator and a layout discriminator based on the sample discrimination result, so that the layout generator is used for generating layout information adaptive to the interactive interface of the deployment equipment. According to the method, the UI interface adaptive to the specific equipment can be automatically generated, and the development efficiency of the UI interface is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to an interactive interface generation method, device, electronic device, and storage medium. Background Art

[0002] User Interface (UI) refers to the interface between users and software, applications or devices, and can also be called an interactive interface. In the process of designing a UI interface, the UI interface may need to be adapted to different devices. Since the screen size and resolution of different devices are different, different UI layouts need to be manually set for the same UI interface to adapt to different devices. Manual adaptation requires UI interface developers to make detailed adjustments for different devices. When there are many types of devices, the efficiency of UI interface development is low. Summary of the invention

[0003] The present disclosure provides an interactive interface generation method, device, electronic device and storage medium, which can automatically generate a UI interface adapted to a specific device, thereby improving the efficiency of UI interface generation and development. The technical solution is as follows:

[0004] According to one aspect of the present disclosure, a method for generating an interactive interface is provided, the method comprising:

[0005] Acquire a real interactive interface and sample device information of devices deployed on the real interactive interface;

[0006] Extracting sample element information of at least one interactive element from the real interactive interface;

[0007] Inputting the sample device information and the sample element information into a layout generator to obtain predicted layout information output by the layout generator, wherein the predicted layout information is layout information of the interactive elements in the interactive interface adapted to the deployment device;

[0008] Inputting the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator;

[0009] The layout generator and the layout discriminator are adversarially trained based on the sample discrimination result, so that the layout generator is used to generate layout information adapted to the interactive interface of the deployment device.

[0010] According to another aspect of the present disclosure, a method for generating an interactive interface is provided, the method comprising:

[0011] Acquire target element information of at least one interactive element included in the interactive interface to be generated and target device information of a device required to be deployed on the interactive interface to be generated;

[0012] Inputting the target device information and the target element information into a trained layout generator to obtain target layout information output by the trained layout generator, wherein the target layout information is layout information of the interactive elements adapted to the deployed device in the interactive interface to be generated;

[0013] Based on the target layout information, the target interaction interface is generated.

[0014] According to another aspect of the present disclosure, there is provided an interactive interface generating device, the device comprising:

[0015] A first acquisition module is used to acquire a real interactive interface and sample device information of a device deployed on the real interactive interface;

[0016] An extraction module, used to extract sample element information of at least one interactive element from the real interactive interface;

[0017] A generating module, configured to input the sample device information and the sample element information into a layout generator, and obtain predicted layout information output by the layout generator, wherein the predicted layout information is layout information of the interactive elements in an interactive interface adapted to the deployment device;

[0018] A discrimination module, used for inputting the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator;

[0019] A training module is used to conduct adversarial training on the layout generator and the layout discriminator based on the sample discrimination result, so that the layout generator is used to generate layout information adapted to the interactive interface of the deployment device.

[0020] According to another aspect of the present disclosure, there is provided an interactive interface generating device, the device comprising:

[0021] A first acquisition module is used to acquire target element information of at least one interactive element included in the interactive interface to be generated and target device information of a device required to be deployed on the interactive interface to be generated;

[0022] A first generating module, configured to input the target device information and the target element information into a trained layout generator, and obtain target layout information output by the trained layout generator, wherein the target layout information is layout information of the interactive elements adapted to the deployed device in the interactive interface to be generated;

[0023] The second generating module is used to generate the target interaction interface based on the target layout information.

[0024] According to one aspect of the present disclosure, an electronic device is provided, including: a processor and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the above-mentioned method for generating an interactive interface.

[0025] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the interactive interface generating method as described above.

[0026] According to another aspect of the present disclosure, a computer program product is provided, the computer program product comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned interactive interface generation method.

[0027] The beneficial effects brought by the technical solution provided by the embodiments of the present disclosure include at least:

[0028] By collecting sample device information of real interactive interfaces and their adapted devices as training samples, a layout generator is trained so that the layout generator can have the ability to generate layout information of interactive interfaces corresponding to specific devices. Therefore, by deploying the layout generator, the purpose of automatically generating interactive interfaces can be achieved. If the interactive interface is adapted to a specific device, the ability to automatically adjust the UI layout on different platforms or devices can also be achieved, thereby achieving automatic adaptation of cross-platform or cross-device UI interfaces, thereby improving the development efficiency of UI interfaces. In addition, a layout discriminator is introduced in the layout generator training stage, so that the layout generation performance of the layout generator can be further optimized through adversarial training ideas. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0030] Figure 1 A schematic diagram showing an example system in which various methods described herein may be implemented according to an exemplary embodiment of the present disclosure;

[0031] Figure 2 A flow chart of a method for generating an interactive interface according to an exemplary embodiment of the present disclosure is shown;

[0032] Figure 3 is a schematic diagram of a training process of a layout generator provided by an exemplary embodiment of the present disclosure;

[0033] Figure 4A flowchart of another method for generating an interactive interface according to an exemplary embodiment of the present disclosure is shown;

[0034] Figure 5 is a schematic diagram of a training process of another layout generator provided by an exemplary embodiment of the present disclosure;

[0035] Figure 6 A flowchart of another method for generating an interactive interface according to an exemplary embodiment of the present disclosure is shown;

[0036] Figure 7 is a schematic diagram of a training process of another layout generator provided by an exemplary embodiment of the present disclosure;

[0037] Figure 8 A flowchart of another method for generating an interactive interface according to an exemplary embodiment of the present disclosure is shown;

[0038] Fig. 9 is a schematic diagram of a generation process of layout information provided by an exemplary embodiment of the present disclosure;

[0039] Fig.10 is a system principle diagram of interactive interface generation provided by an exemplary embodiment of the present disclosure;

[0040] Fig.11 is a structural schematic diagram of an interactive interface generating device provided by an embodiment of the present disclosure;

[0041] Fig.12 is a structural schematic diagram of another interactive interface generating device provided by an embodiment of the present disclosure;

[0042] Fig.13 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0043] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0044] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0045] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units. It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more". The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only, and are not used to limit the scope of these messages or information.

[0046] The solution of the present invention is described below with reference to the accompanying drawings, and the technical solution provided by the embodiment of the present invention is explained in detail through specific embodiments and their application scenarios.

[0047] Figure 1 Schematic diagram of an example system in which various methods described herein may be implemented according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the computer system includes a first device 110 and a second device 120 .

[0048] The first device 110 is a training device for training the layout generator. After the layout generator training is completed, the first device 110 can send the trained layout generator to the second device 120 so as to deploy the layout generator in the second device 120. The second device 120 is a device that uses the layout generator to generate and optimize layout information.

[0049] In the model training phase: the sample device information of the real interactive interface and its deployed devices is used as training data 111 to conduct adversarial training on the layout generator 112 and the layout discriminator 113.

[0050] In the model application stage: the target device information 121 and the target element information 122 can be input into the trained layout generator 123 to obtain the target layout information 124 outputted by it.

[0051] Optionally, the first device 110 and the second device 120 may be computer devices with machine learning capabilities, for example, the computer device may be a terminal or a server.

[0052] Optionally, the first device 110 and the second device 120 may be the same computer device, or the first device 110 and the second device 120 may be different computer devices. Furthermore, when the first device 110 and the second device 120 are different devices, the first device 110 and the second device 120 may be devices of the same type, such as the first device 110 and the second device 120 may both be servers; or the first device 110 and the second device 120 may also be devices of different types. The server may be an independent physical server, or a server cluster or 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. The terminal may be a smart phone, a vehicle-mounted terminal, a smart TV, a wearable device, a tablet computer, a laptop, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and the present disclosure is not limited thereto.

[0053] Please refer to Figure 2 , which shows a flow chart of a method for generating an interactive interface according to an exemplary embodiment of the present disclosure. Figure 1 The first device 110 shown in the figure is used as an example for explanation. Figure 2 As shown, the method includes:

[0054] Step 201: Acquire a real interactive interface and sample device information of a device deployed on the real interactive interface.

[0055] In order to realize automatic generation or automatic adjustment of the layout information of interactive elements in the interactive interface, the embodiment of the present disclosure trains the layout generator so that the layout generator can automatically generate the UI layout of the UI interface, so as to automatically adjust the UI layout on different platforms or devices, thereby realizing automatic adaptation of the UI interface across platforms or devices, and thus improving the development efficiency of the UI interface.

[0056] In order to enable the layout generator to generate adaptive UI layouts for different devices, a large amount of real UI layout data and device characteristic data of its adaptive devices need to be collected during the model training preparation stage, so that the layout generator can learn to generate UI layout information that adapts to different devices. In a possible implementation, a large number of real interactive interfaces and sample device information of the devices (or adaptive devices) deployed by each real interactive interface are collected and obtained. The real interactive interface can be a screenshot of the interactive interface; the sample device information can include the device screen size, screen resolution, screen color, operating system type, application type, etc. of the adaptive device.

[0057] Step 202: extracting sample element information of at least one interactive element from the real interactive interface.

[0058] After collecting a large number of real interactive interfaces and corresponding sample device information, the real interactive interfaces need to be processed in advance to extract sample element information of each interactive element contained in the real interactive interface, as the UI element information required for the subsequent layout generator to generate layout information.

[0059] Exemplarily, the interactive elements in the real interactive interface may include icons, controls (or buttons), text boxes, images and other elements, and the corresponding sample element information may include information such as the color and size of the interactive elements.

[0060] Optionally, an interactive element detection model is pre-trained, and the real interactive interface is input into the trained interactive element detection model to extract sample element information of at least one interactive element from the real interactive interface and output it. The training process of the corresponding interactive element detection model may include the following steps A to C.

[0061] Step A: obtaining the real interaction interface and the real element information corresponding to the real interaction interface.

[0062] Step B: input the real interactive interface into the interactive element detection model to obtain the predicted element information output by the interactive element detection model.

[0063] In step C, the interactive element detection model is trained based on the loss between the predicted element information and the true element information.

[0064] In order to enable the interactive element detection model to have the ability to detect UI elements, several real interactive interfaces can be collected during the model training stage, and the real element information corresponding to the real interactive interfaces can be manually annotated. The real interactive interfaces and real element information are used as training samples to train the interactive element detection model.

[0065] Specifically, in the model training stage, the real interactive interface can be input into the interactive element detection model, and the interactive element detection model extracts UI element information from the real interactive interface and outputs predicted element information; then, based on the loss between the predicted element information and the real element information, the interactive element detection model is trained; after multiple rounds of training until the loss value is lower than the preset value, it is determined that the training of the interactive element detection model is completed.

[0066] Optionally, the interactive element detection model may use a convolutional neural network (CNN); or other networks that can be used for target detection and recognition. This embodiment does not specifically limit the model architecture of the interactive element detection model.

[0067] Exemplarily, if the interactive element detection model is a CNN network, the interactive element detection model may include four parts: an input layer, a convolutional layer, a pooling layer, and a fully connected layer, wherein the input layer is used to input a real interactive interface (UI screenshot); the convolutional layer is used to extract local features of UI elements from the real interactive interface, such as buttons, text boxes, images and other local features; the pooling layer is used to reduce the dimension of the extracted local feature map and reduce the amount of calculation; the fully connected layer is used to integrate multiple local features to output predicted element information (or predicted element features) in the real interactive interface.

[0068] Since the interactive element detection model can not only detect the element information of various interactive elements contained in the interactive interface, but also detect the layout information of the interactive elements, the sample element information required for training the layout generator can be selected from the output results of the interactive element detection model.

[0069] Step 203: input the sample device information and the sample element information into the layout generator to obtain the predicted layout information output by the layout generator. The predicted layout information is the layout information of the interactive elements adapted to the deployed device in the interactive interface.

[0070] In each round of layout generator training, sample device information and sample element information are first input into the layout generator, and the layout generator predicts the layout information of the interactive elements adapted by the deployment device in the interactive interface to output predicted layout information. The predicted layout information at least includes the layout information (e.g., position) and style information (e.g., color, size, and other features) of each interactive element in the interactive interface.

[0071] Step 204 , input the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator.

[0072] In order to improve the authenticity of the layout information generated by the layout generator, a layout discriminator is also provided to optimize the layout generation performance of the layout generator through adversarial training. The purpose of the discriminator in adversarial training is to distinguish real data as real and fake data generated by the generator as fake; the layout discriminator is used to distinguish the authenticity of the predicted layout information and the real interactive interface to obtain the sample discrimination result output by the layout discriminator, so that the layout generator and layout discriminator can be trained adversarially based on the discrimination result.

[0073] Step 205 , based on the sample discrimination result, the layout generator and the layout discriminator are adversarially trained, so that the layout generator is used to generate layout information of the interactive interface adapted to the deployment device.

[0074] In adversarial training, the purpose of the generator is to deceive the discriminator, that is, to make the generated data can be judged as true by the discriminator; based on the training purpose of the generator and the discriminator, in each round of training, the layout generator and the layout discriminator can be adversarially trained based on the sample discrimination results output by the layout discriminator, so as to compete with each other through adversarial training and optimize each other's performance; after multiple rounds of training, the layout generator can generate layout information of the interactive interface adapted to the deployment device.

[0075] Please refer to Figure 3 , which is a schematic diagram of a training process of a layout generator provided by an exemplary embodiment of the present disclosure. Figure 3 As shown, the sample device information 301 and the sample element information 302 are input into the layout generator 303 to obtain the predicted layout information 304 output by the layout generator 303; the predicted layout information 304 and the real layout information 305 are then input into the layout discriminator 306 for true and false sample discrimination, and the sample discrimination result 307 is output; and then the layout generator 303 and the layout discriminator 306 are adversarially trained based on the sample discrimination result 307.

[0076] In summary, the embodiments of the present disclosure provide a method for generating an interactive interface: by collecting sample device information of a real interactive interface and its adapted device as training samples, a layout generator is trained so that the layout generator can have the ability to generate layout information of the interactive interface corresponding to a specific device, so that the purpose of automatically generating an interactive interface can be achieved by deploying the layout generator, and if the interactive interface is adapted to a specific device, the ability to automatically adjust the UI layout on different platforms or devices can also be achieved, thereby achieving automatic adaptation of cross-platform or cross-device UI interfaces, thereby improving the development efficiency of UI interfaces; in addition, a layout discriminator is also introduced in the stage of training the layout generator, so that the layout generation performance of the layout generator can be further optimized through the idea of ​​adversarial training.

[0077] Based on the training objectives of the discriminator and the generator, corresponding loss functions are set respectively when adversarially training the layout generator and the layout discriminator to alternately train the layout generator and the layout discriminator.

[0078] Please refer to Figure 4 , which shows a flowchart of another interactive interface generation method according to an exemplary embodiment of the present disclosure. Figure 1 The first device 110 shown in the figure is used as an example for explanation. Figure 4 As shown, the method includes:

[0079] Step 401: Obtain sample device information of a real interactive interface and a device deployed on the real interactive interface.

[0080] Step 402: extract sample element information of at least one interactive element from the real interactive interface.

[0081] Step 403: input the sample device information and the sample element information into the layout generator to obtain the predicted layout information output by the layout generator. The predicted layout information is the layout information of the interactive elements adapted to the deployed device in the interactive interface.

[0082] The implementation of steps 401 to 403 may refer to steps 201 to 203, and will not be described in detail in this embodiment.

[0083] Step 404: extracting the real layout information of the interactive elements from the real interactive interface.

[0084] Before the layout discriminator discriminates between true and false UI layouts, the real layout information of the interactive elements is first extracted from the real interactive interface and then input into the layout discriminator. Exemplarily, the real layout information is the typesetting information and style information of each interactive element in the real interactive interface.

[0085] Optionally, the trained interactive element detection model can also be used to extract real layout information from the real interactive interface.

[0086] Step 405, the predicted layout information and the real layout information are input into a layout discriminator, and a first discrimination result and a second discrimination result output by the layout discriminator are obtained, wherein the first discrimination result represents the probability that the layout discriminator judges that the predicted layout information is real, and the second discrimination result represents the probability that the layout discriminator judges that the real layout information is real.

[0087] The training purpose of the layout discriminator is to discriminate real data samples as real and the data generated by the generator as false; and the training purpose of the layout generator is to deceive the layout discriminator so that the layout discriminator discriminates the generated data as real. In the actual training process of the layout discriminator and the layout generator, the predicted layout information (data generated by the layout generator) can be input into the layout discriminator to obtain the probability of the layout discriminator outputting the information as real, i.e., the first discrimination result; and the real layout information can be input into the layout discriminator to obtain the probability of the layout discriminator outputting the information as real, i.e., the second discrimination result; so that the layout generator and the layout discriminator can be adversarially trained based on the first discrimination result and the second discrimination result.

[0088] Step 406 , based on the first discrimination result and the second discrimination result, adversarially train the layout generator and the layout discriminator.

[0089] After obtaining the first discrimination result and the second discrimination result, it is also necessary to obtain the true label and the false label so as to adversarially train the layout generator and the layout discriminator based on the first discrimination result, the second discrimination result, the true label and the false label.

[0090] Since the training objectives of the layout discriminator and the layout generator are different, when the layout generator and the layout discriminator are trained adversarially based on sample discrimination results, true labels and false labels, the loss functions used by the two parts are different. Correspondingly, in an exemplary example, step 406 may also include step 406A and step 406B.

[0091] Step 406A: training a layout discriminator based on the difference between the first discrimination result and the false label, and the difference between the second discrimination result and the true label.

[0092] The training goal of the layout discriminator is to maximize the probability of distinguishing real data samples (real UI layout) as real, and the probability of distinguishing fake data samples generated by the generator as fake. The loss function of the layout discriminator consists of two parts, which can be specifically expressed as:

[0093]

[0094] Among them, L D represents the loss of the layout discriminator, D(x) represents the probability that the layout discriminator predicts the true layout information as true, D(G(z)) represents the probability that the layout discriminator predicts the generated predicted layout information as true, G(z) represents the predicted layout information generated by the layout generator, and p data(x) is the distribution of the real layout information, x represents the layout information sampled from the distribution of the real layout information, and p z(z) is the distribution of predicted layout information generated by the layout generator, z represents the distribution from p z (z) A random variable drawn from this distribution.

[0095] From formula (1), we can see that the loss function of the layout discriminator consists of two parts. One part is the loss of the layout discriminator for judging the real sample (that is, the real layout information) as real, that is, The other part is the loss of the layout discriminator for judging that the samples generated by the layout generator are false, i.e. Combine the two losses to update the parameters of the layout discriminator to maximize L D .

[0096] In a possible implementation, formula (1) is applied to determine the difference between the second discrimination result and the true label, that is, And the difference between the first discrimination result and the false label, that is, Jointly train the layout discriminator.

[0097] Step 406B: training a layout generator based on the difference between the first discrimination result and the true label.

[0098] The training objective of the layout generator is to make the generated data samples be considered as real as possible by the layout discriminator. Then the loss function of the layout generator should be determined by the difference between the first discrimination result (the predicted layout information generated by the layout discriminator) and the real label. The corresponding layout generator loss function can be specifically:

[0099]

[0100] Among them, L G represents the loss of the layout generator, G(z) represents the predicted layout information generated by the layout generator, and D(G(z)) represents the probability that the layout discriminator determines that the predicted layout information generated by the layout generator is true.

[0101] In a possible implementation, formula (2) is applied to determine the difference between the first discrimination result and the true label, that is, Train the layout generator.

[0102] In addition, in order to further optimize the UI layout generation quality of the layout generator, the reconstruction loss or generation loss between the real UI layout and the generated UI layout can be added on the basis of the loss function of formula (2). Correspondingly, optionally, step 406B can also be replaced by step 406B1 and step 406B2.

[0103] Step 406B1, determining the generation loss between the actual layout information and the predicted layout information.

[0104] Step 406B2: training the layout generator based on the difference between the first discrimination result and the true label and the generation loss.

[0105] When training the layout generator, on the one hand, the difference between the first discrimination result and the true label can be calculated, and on the other hand, the generation loss between the true layout information and the predicted layout information can be calculated, so as to jointly train the layout generator based on the two parts of loss. The loss function of the corresponding layout generator can be updated from formula (2) to formula (3), which is as follows:

[0106] L′ G =L G +λ×L recon (3)

[0107] Among them, L′ G represents the updated loss function of the layout generator, It is used to measure the ability of the generated predicted layout information to deceive the discriminator; L recon Represents the generation loss between the predicted layout information and the actual layout information (or called reconstruction loss, content loss, etc.). The generation loss between the predicted layout information and the actual layout information can be L1 loss or L2 loss. λ is a hyperparameter used to balance L G and L recon By adjusting λ, we can control the trade-off between realism and accuracy of the generator.

[0108] For example, if L1 loss is used, then If L2 loss is used, then Among them, G(z) represents the predicted layout information generated by the layout generator, x real Represents the actual layout information.

[0109] It should be noted that in each round of training, the layout generator and layout discriminator can be optimized by alternating training. First, the parameters of the layout generator are fixed, and the loss L of the layout discriminator is calculated. D , update the parameters of the layout discriminator to maximize L D ; Then fix the parameters of the layout discriminator and calculate the loss L of the layout generator G or L′ G , update the parameters of the layout generator to minimize L G or L′ GThe layout generator and layout discriminator are repeatedly trained alternately for multiple rounds. Usually, the layout generator is trained once for each layout discriminator training. This alternating training process will enable the layout generator to gradually generate more realistic samples (i.e., layout information), and the discriminator will gradually improve its ability to distinguish between true and false samples, thereby achieving the ultimate goal, that is, the UI layout information generated by the generator can achieve the best display effect on different devices.

[0110] Please refer to Figure 5 , which is a schematic diagram of another training process of a layout generator provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, the adversarial training process of the layout generator and the layout discriminator is as follows: first, the sample device information 501 and the sample element information 502 are input into the layout generator 503 to obtain the predicted layout information 504 output by the layout generator 503; then, the predicted layout information 504 and the real layout information 505 are input into the layout discriminator 506 for discrimination to obtain the probability that the layout discriminator 506 discriminates that the predicted layout information is false, i.e., the first discrimination result 507, and the probability that the real layout information 505 is true, i.e., the second discrimination result 508; further, when updating the parameters of the layout discriminator 506, the layout discriminator 506 is trained based on the difference between the first discrimination result 507 and the false label 510, and the difference between the second discrimination result 508 and the real label 509; when updating the parameters of the layout generator, the layout generator 503 is trained based on the difference between the first discrimination result 507 and the real label 509, and the difference between the real layout information 505 and the predicted layout information 504.

[0111] In this embodiment, by setting corresponding loss functions for the layout discriminator and the layout generator respectively, during the alternating training process, the layout generator can gradually generate more realistic layout information, and the discriminator can also gradually improve the ability to distinguish between real layout information and false layout information, so that the trained layout generator has the ability to generate layout information adapted to different devices.

[0112] In addition to adapting to different devices, different types of users may have different interaction requirements for the same interactive interface. For example, user 1 may expect interactive element A to be displayed on the left side of the interactive interface, while user 2 may prefer interactive element A to be displayed on the right side of the interactive interface. In order to make the interactive interface adapt to the usage needs of different users, object behavior information is introduced during model training so that the layout generator can learn the impact of different object behaviors on the layout of the interactive interface.

[0113] Please refer to Figure 6 , which shows a flowchart of another interactive interface generation method according to an exemplary embodiment of the present disclosure. Figure 1 The first device 110 shown in the figure is used as an example for explanation. Figure 6 As shown, the method includes:

[0114] Step 601: Obtain sample device information of a real interactive interface and a device deployed on the real interactive interface.

[0115] Step 602: extract sample element information of at least one interactive element from the real interactive interface.

[0116] The implementation of step 601 and step 602 can refer to the above embodiment, and this embodiment will not be described in detail here.

[0117] Step 603: Acquire sample behavior information of sample objects adapted by the real interactive interface.

[0118] In order to enable the layout generator to generate layout information of an interactive interface adapted to a specific user, in addition to obtaining sample device information of the real interactive interface and the device deployed by the real interactive interface, it is also necessary to obtain sample behavior information of sample objects adapted to the real interactive interface. Taking the sample object as a user as an example, the sample behavior information may include the user's operation behavior data on the real interactive interface, such as clicks, slides, and dwell time.

[0119] Step 604, input the sample device information, sample element information and sample behavior information into the layout generator to obtain the predicted layout information output by the layout generator. The predicted layout information is the layout information of the interactive elements adapted to the deployed devices and sample objects in the interactive interface.

[0120] Corresponding to each round of layout generator training process, the sample device information, sample element information and sample behavior information are first input into the layout generator, and the layout generator predicts the layout information of the interactive elements adapted to the deployment devices and sample objects in the interactive interface to output the predicted layout information.

[0121] Step 605: input the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator.

[0122] Step 606: adversarially train the layout generator and the layout discriminator based on the sample discrimination results.

[0123] The implementation of step 605 and step 606 can refer to the above embodiment, and this embodiment will not be described in detail here.

[0124] Please refer to Figure 7 , which is a schematic diagram of another training process of a layout generator provided by an exemplary embodiment of the present disclosure. Figure 7As shown, sample device information 701, sample element information 702 and sample behavior information 703 are input into layout generator 704 to obtain predicted layout information 705 output by layout generator 704; predicted layout information 705 and real layout information 706 are then input into layout discriminator 707 for true and false sample discrimination, and sample discrimination result 708 is output; then, based on sample discrimination result 708, layout generator 704 and layout discriminator 707 are adversarially trained.

[0125] In this embodiment, by introducing sample behavior information of sample objects in the process of training the layout generator, the layout generator can learn the layout difference information of different sample objects in addition to the layout difference information of different devices. Thus, the trained layout generator can have the ability to generate layout information adapted to different devices and different usage objects, thereby further improving the efficiency of developers in designing UI interfaces.

[0126] The above embodiments mainly describe the training process of the layout generator. After the layout generator is trained using the method shown in the above embodiments, the layout generator can be applied in actual development and design or application use to generate and optimize the UI interface.

[0127] Please refer to Figure 8 , which shows a flowchart of another interactive interface generation method according to an exemplary embodiment of the present disclosure. Figure 1 The second device 120 shown in the figure is used as an example for explanation. Figure 8 As shown, the method includes:

[0128] Step 801: Obtain target element information of at least one interactive element included in the interactive interface to be generated and target device information of a device required to be deployed for the interactive interface to be generated.

[0129] Similar to the training process of the layout generator, when the layout generator is applied to generate layout information for a specific device, it is also necessary to obtain the target element information of at least one interactive element required in the interactive interface to be generated, as well as the target device information of the deployment device that needs to be deployed or adapted for the interactive interface to be generated, so as to provide the layout generator with input information for generating layout information.

[0130] Optionally, a screen characteristic database is also provided, which stores device information associated with several devices, and the device information may include detailed information such as device type, screen size, resolution, color depth, user interaction mode, etc. When generating layout information of the interactive interface, the target device information corresponding to the deployed device can be obtained from the screen characteristic database based on the input device identification of the deployed device.

[0131] Step 802, input the target device information and the target element information into the trained layout generator to obtain the target layout information output by the trained layout generator, where the target layout information is the layout information of the interactive elements adapted to the deployed device in the interactive interface to be generated.

[0132] After obtaining the target device information and target element information, the target device information and target element information can be input into the trained layout generator, which predicts the layout information of the interactive elements adapted to the deployed device in the interactive interface to be generated, and outputs the target layout information.

[0133] Since the layout generator can also introduce user behavior information during the training process so that the generated layout information is adapted to a specific type of user, the object behavior information of the target object using the interface to be interacted with can also be obtained during the application of the layout generator, so that the target device information, target element information and object behavior information can be input into the trained layout generator together, and the layout generator predicts the layout information adapted to the deployed device and the target object, and outputs the target layout information.

[0134] It should be noted that the layout generator used in this embodiment is trained using Figure 2 , Figure 4 and Figure 6 The layout generator trained by the interactive interface generation method shown.

[0135] Step 803: Generate a target interactive interface based on the target layout information.

[0136] In order to display the generated interactive interface to the user, the interactive interface rendering may also be performed based on the generated target layout information to generate the target interactive interface and display it on the front end.

[0137] It should be noted that the application scenarios of the interactive interface generation method can be: (1) the development stage of the target interactive interface: that is, the developer can pre-set or input the target element information of the multiple interactive elements required to be included in the interactive interface to be generated, and input the adapted target device information, so that the layout generator can construct new target layout information based on the target element information and the target device information to generate a new target interactive interface; (2) the optimization stage of the target interactive interface: the developer pre-sets a basic initial interactive interface, and the layout generator optimizes the initial interactive interface to adapt to different devices and / or different users; (3) the use stage of the target interactive interface: if the target interactive interface is the application interface of a certain application, after the application is deployed on the user's device, the user's target behavior information can be extracted through the user's historical operation data of using the application to optimize the target interactive interface so that the target interactive interface adapts to the user operation habits of the current user.

[0138] In the optimization scenario of the target interactive interface, if there is an initial interactive interface to be optimized, the initial interactive interface of the interactive interface to be generated is first obtained, and the initial interactive interface is input into the trained interactive element detection model, and the interactive element detection model extracts interactive element features and outputs target element information; the obtained target element information and target device information are then input into the trained layout generator for layout information prediction to obtain the optimized target layout information; and then the initial interactive interface is optimized based on the target layout information to generate an optimized target interactive interface.

[0139] Please refer to Fig. 9 , which is a schematic diagram of the generation process of layout information provided by the exemplary embodiment of the present disclosure. Fig. 9 As shown, taking the optimization of the interactive interface as an example, when the user operation triggers the interface optimization, the UI initialization loading is performed, that is, the initial interactive interface is loaded, the device characteristic analysis module obtains the device information, the AI ​​adaptation engine analyzes the device characteristics and user behavior, and obtains the matched device information from the screen characteristic database; so that the real-time UI adjustment module can perform UI optimization, that is, based on the device information, user behavior information and UI element information, the optimized UI layout information is obtained; further, the display device outputs the optimized UI interface based on the optimized UI layout information.

[0140] In this embodiment, by pre-deploying a layout generator in the device and calling the layout generator to generate layout information adapted to different devices and / or different users, it is beneficial to improve the development efficiency of the interactive interface; and make the layout information more in line with user needs.

[0141] Please refer to Fig.10 , which is a system schematic diagram of interactive interface generation provided by the exemplary embodiment of the present disclosure. Fig.10 As shown in the figure, the system consists of five parts: user interface, AI adaptation engine, device characteristic analysis module, screen characteristic database, and real-time UI adjustment. The user interface is defined by HTML / CSS / JS, the AI ​​adaptation engine is responsible for the overall adaptation logic, the device characteristic analysis module is used to collect device information, the screen characteristic database stores the characteristic parameters of different devices, and the real-time UI adjustment module is responsible for specific UI optimization. The specific application generation process can be:

[0142] 1. Front-end integration

[0143] 1. Deploy the trained model: Convert the trained CNN (interactive element detection model) and GAN model (layout generator) into a format that can be run in a browser (or other applications), such as TensorFlow.js or ONNX.js model; and deploy the model to a server or CDN for front-end calls.

[0144] 2. Front-end framework selection: Use modern front-end frameworks such as React, Vue.js or Angular to build cross-platform applications (that is, developers design the application interface of cross-platform applications); use TensorFlow.js or ONNX.js to load and run trained models on the front end.

[0145] 3. Front-end integration model:

[0146] (1) In the front-end project, use JavaScript to load the model and perform inference; use TensorFlow.js or ONNX.js to load the model file and create a model instance. The specific model loading code can be as follows:

[0147] "import*as tf from'@tensorflow / tfjs';

[0148] const cnnModel=await tf.loadGraphModel('path / to / cnn / model.json') / / Load CNN model (i.e. load interactive element detection model)

[0149] const ganModel = await tf.loadGraphModel('path / to / gan / generator / model.json')" / / Load the GAN generator model (i.e. load the layout generator)"

[0150] (2) Real-time data collection and processing: collect user behavior data (i.e. object behavior information) and device characteristic data (i.e. target device information) in real time on the front end; preprocess the data into the format required for model input. The specific code for obtaining device characteristic data and user behavior data can be shown as follows:

[0151] "const deviceFeatures=getDeviceFeatures();

[0152] const userBehavior = getUserBehavior(); / / Get device characteristics and user behavior data

[0153] const inputData = preprocessData(deviceFeatures, userBehavior); / / Preprocess data

[0154] 4. Real-time UI adjustment

[0155] (1) Use the CNN model to detect UI elements: After data preprocessing of the initial interactive interface, input it into the CNN model to detect UI elements (i.e., use the interactive element detection model to extract the target element information in the initial interactive interface). The specific code can be as follows:

[0156] "const cnnOutput=await cnnModel.predict(tf.tensor(inputData));

[0157] const uiElements = processCnnOutput (cnnOutput) / / Use the CNN model to detect the input data and output UI element information"

[0158] (2) Use the GAN model to generate an optimized layout: Input UI elements and feature data (feature data includes device feature data + user behavior data) into the GAN generator to generate an optimized UI layout. The specific code can be as follows:

[0159] "const ganInput=prepareGanInput(uiElements,deviceFeatures,userBehavior);

[0160] const optimizedLayout = await ganModel.predict(tf.tensor(ganInput)) / / Use the GAN model to generate optimized layout information based on UI elements, device characteristics and user behavior data"

[0161] (3) Dynamically adjust the front-end UI: According to the optimized layout generated by GAN, dynamically adjust the layout and style of the front-end UI. The specific code can be as follows: "applyLayoutToUI(layout) / / Apply the layout to the UI interface".

[0162] Optionally, during the application of the layout generator, feedback data can also be collected in real time to continuously optimize the UI interface.

[0163] 2. Device feature analysis: The device feature analysis module can collect information such as the screen size, resolution, operating system, browser type, user behavior, etc. of the current device in real time, providing basic data for the AI ​​adaptation engine. This data is obtained through front-end scripts or system APIs.

[0164] 3. Screen characteristic database: Establish a database containing a large number of device screen characteristic parameters, which is constantly updated and expanded to ensure that the system can adapt to the latest devices. The database contains detailed information such as device type, screen size, resolution, color depth, user interaction mode, etc.

[0165] 4. Real-time UI adjustment: The real-time UI adjustment module optimizes and adjusts the user interface based on the analysis results of the AI ​​adaptation engine, including adjusting the layout, font size, button position, color, etc. The adjustment process is completed at the millisecond level to ensure that users do not perceive delays during the interaction process.

[0166] Please refer to Fig.11 , which is a structural diagram of an interactive interface generation device provided by an embodiment of the present disclosure. The device can be deployed in Figure 1 In the first device 110 shown, for example, Fig.11 As shown, the device 1100 includes:

[0167] The first acquisition module 1101 is used to acquire the real interaction interface and sample device information of the device deployed by the real interaction interface;

[0168] An extraction module 1102, configured to extract sample element information of at least one interactive element from the real interactive interface;

[0169] A generating module 1103, configured to input the sample device information and the sample element information into a layout generator, and obtain predicted layout information output by the layout generator, wherein the predicted layout information is layout information of the interactive elements in the interactive interface adapted to the deployed device;

[0170] A determination module 1104 is used to input the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample determination result output by the layout discriminator;

[0171] The training module 1105 is used to perform adversarial training on the layout generator and the layout discriminator based on the sample discrimination result, so that the layout generator is used to generate layout information adapted to the interactive interface of the deployment device.

[0172] Optionally, the identification module 1104 is further configured to:

[0173] Extracting real layout information of the interactive elements from the real interactive interface;

[0174] Inputting the predicted layout information and the real layout information into the layout discriminator, obtaining a first discrimination result and a second discrimination result output by the layout discriminator, wherein the first discrimination result represents the probability that the layout discriminator discriminates that the predicted layout information is real, and the second discrimination result represents the probability that the layout discriminator discriminates that the real layout information is real;

[0175] The training module 1105 is further used for:

[0176] Based on the first discrimination result and the second discrimination result, the layout generator and the layout discriminator are adversarially trained.

[0177] Optionally, the training module 1105 is further used to:

[0178] Based on the difference between the first discrimination result and the false label, and the difference between the second discrimination result and the true label, training the layout discriminator;

[0179] The layout generator is trained based on the difference between the first discrimination result and the true label.

[0180] Optionally, the training module 1105 is further used to:

[0181] determining a generation loss between the actual layout information and the predicted layout information;

[0182] The layout generator is trained based on the difference between the first discrimination result and the true label and the generation loss.

[0183] Optionally, the device further comprises:

[0184] A second acquisition module, used to acquire sample behavior information of a sample object adapted by the real interactive interface;

[0185] The generating module is further used for:

[0186] The sample device information, the sample element information and the sample behavior information are input into the layout generator to obtain the predicted layout information output by the layout generator, wherein the predicted layout information is the layout information of the interactive elements in the interactive interface adapted to the deployment device and the sample object.

[0187] Please refer to Fig.12 , which is a schematic diagram of the structure of another interactive interface generation device provided by an embodiment of the present disclosure. The device can be deployed in Figure 1 In the second device 120 shown, for example, Fig.12 As shown, the device 1200 includes:

[0188] The first acquisition module 1201 is used to acquire target element information of at least one interactive element included in the interactive interface to be generated and target device information of the device required to be deployed for the interactive interface to be generated;

[0189] A first generating module 1202 is configured to input the target device information and the target element information into a trained layout generator, and obtain target layout information output by the trained layout generator, wherein the target layout information is layout information of the interactive elements adapted to the deployed device in the interactive interface to be generated;

[0190] The second generating module 1203 is used to generate the target interaction interface based on the target layout information.

[0191] Optionally, the device further comprises:

[0192] A second acquisition module is used to acquire object behavior information of a target object using the interaction interface to be generated;

[0193] The first generating module 1202 is further configured to:

[0194] The target device information, the target element information and the object behavior information are input into the trained layout generator to obtain the target layout information output by the trained layout generator.

[0195] The exemplary embodiment of the present disclosure also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to cause the electronic device to perform the method according to the embodiment of the present disclosure when executed by the at least one processor.

[0196] The exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform the method according to the embodiments of the present disclosure.

[0197] The exemplary embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform the method according to the embodiments of the present disclosure.

[0198] refer to Fig.13, a block diagram of an electronic device 1300 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0199] like Fig.13 As shown, the electronic device 1300 includes a computing unit 1301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1302 or a computer program loaded from a storage unit 1308 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the device 1300 can also be stored. The computing unit 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0200] Multiple components in the electronic device 1300 are connected to the I / O interface 1305, including: an input unit 1306, an output unit 1307, a storage unit 1308, and a communication unit 1309. The input unit 1306 can be any type of device that can input information to the electronic device 1300, and the input unit 1306 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device. The output unit 1307 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1308 can include but is not limited to a disk, an optical disk. The communication unit 1309 allows the electronic device 1300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0201] The computing unit 1301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1301 performs the various methods and processes described above. For example, in some embodiments, Figure 2 , Figure 4 , Figure 6 , Figure 8 The method shown may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 1308. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 1300 via ROM 1302 and / or communication unit 1309. In some embodiments, computing unit 1301 may be configured to execute the computer program in any other suitable manner (e.g., by means of firmware). Figure 2 , Figure 4 , Figure 6 , Figure 8 The method shown.

[0202] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0203] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0204] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0205] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0206] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0207] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

Claims

1. A method for generating an interactive interface, characterized in that: The method comprises: Acquire a real interactive interface and sample device information of devices deployed on the real interactive interface; Extracting sample element information of at least one interactive element from the real interactive interface; Inputting the sample device information and the sample element information into a layout generator to obtain predicted layout information output by the layout generator, wherein the predicted layout information is layout information of the interactive elements in the interactive interface adapted to the deployment device; Inputting the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator; The layout generator and the layout discriminator are adversarially trained based on the sample discrimination result, so that the layout generator is used to generate layout information adapted to the interactive interface of the deployment device.

2. The method according to claim 1, characterized in that The step of inputting the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator includes: Extracting real layout information of the interactive elements from the real interactive interface; Inputting the predicted layout information and the real layout information into the layout discriminator, obtaining a first discrimination result and a second discrimination result output by the layout discriminator, wherein the first discrimination result represents the probability that the layout discriminator discriminates that the predicted layout information is real, and the second discrimination result represents the probability that the layout discriminator discriminates that the real layout information is real; The adversarial training of the layout generator and the layout discriminator based on the sample discrimination result includes: Based on the first discrimination result and the second discrimination result, the layout generator and the layout discriminator are adversarially trained.

3. The method according to claim 2, characterized in that The adversarial training of the layout generator and the layout discriminator based on the first discrimination result and the second discrimination result includes: Based on the difference between the first discrimination result and the false label, and the difference between the second discrimination result and the true label, training the layout discriminator; The layout generator is trained based on the difference between the first discrimination result and the true label.

4. The method according to claim 3, characterized in that The training of the layout generator based on the difference between the first discrimination result and the true label further includes: determining a generation loss between the actual layout information and the predicted layout information; The layout generator is trained based on the difference between the first discrimination result and the true label and the generation loss.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquiring sample behavior information of a sample object adapted by the real interactive interface; The step of inputting the sample device information and the sample element information into a layout generator to obtain predicted layout information output by the layout generator includes: The sample device information, the sample element information and the sample behavior information are input into the layout generator to obtain the predicted layout information output by the layout generator, wherein the predicted layout information is the layout information of the interactive elements in the interactive interface adapted to the deployment device and the sample object.

6. A method for generating an interactive interface, characterized in that: The method comprises: Acquire target element information of at least one interactive element included in the interactive interface to be generated and target device information of a device required to be deployed on the interactive interface to be generated; Inputting the target device information and the target element information into a trained layout generator to obtain target layout information output by the trained layout generator, wherein the target layout information is layout information of the interactive elements adapted to the deployment device in the interactive interface to be generated, and the trained layout generator is trained by using the interactive interface generation method according to any one of claims 1 to 5; Based on the target layout information, the target interaction interface is generated.

7. The method according to claim 6, characterized in that The method further comprises: Acquire object behavior information of a target object using the interactive interface to be generated; The step of inputting the target device information and the target element information into a trained layout generator to obtain target layout information output by the trained layout generator includes: The target device information, the target element information and the object behavior information are input into the trained layout generator to obtain the target layout information output by the trained layout generator.

8. An interactive interface generating device, characterized in that: The device comprises: A first acquisition module is used to acquire a real interactive interface and sample device information of a device deployed on the real interactive interface; An extraction module, used to extract sample element information of at least one interactive element from the real interactive interface; A generating module, configured to input the sample device information and the sample element information into a layout generator, and obtain predicted layout information output by the layout generator, wherein the predicted layout information is layout information of the interactive elements in an interactive interface adapted to the deployment device; A discrimination module, used for inputting the predicted layout information and the real interactive interface into a layout discriminator to obtain a sample discrimination result output by the layout discriminator; A training module is used to conduct adversarial training on the layout generator and the layout discriminator based on the sample discrimination result, so that the layout generator is used to generate layout information adapted to the interactive interface of the deployment device.

9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.