User Interface Generation Method, Device, Medium, and Electronic Device

By creating user interface editing and drawing processes in terminal devices, using non-compiled programming languages ​​and preset data formats, the UI development process is simplified, the user interface generation efficiency and reliability are improved, and the inefficiency problem caused by the complexity of UI development in the existing technology is solved.

CN115712425BActive Publication Date: 2025-05-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211436347.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2025-05-27
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

The existing WPF-based UI development process is complex, resulting in inefficient user interface generation.

Method used

By pre-creating the user interface editing process and the user interface drawing process in the terminal device, editing the user interface data using a non-compiled programming language, converting it into a preset data format, and sending it to the user interface drawing process for parsing and generation.

Benefits of technology

It reduces the process of user interface development, improves the efficiency of user interface generation, reduces the difficulty of development, and improves the reliability of generating user interfaces through logical separation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712425B_ABST
    Figure CN115712425B_ABST
Patent Text Reader

Abstract

The present disclosure provides a user interface generation method, apparatus, medium, and electronic device, relating to the field of computer technology. The user interface generation method includes: a user interface editing process obtains a to-be-processed script written in a first programming language, the to-be-processed script includes first user interface data to be drawn, and the first programming language is a non-compiled programming language; the user interface editing process converts the first user interface data into first user interface data in a preset data format, and sends the first user interface data in the preset data format to a user interface drawing process; the user interface drawing process parses the first user interface data in the preset data format to obtain first user interface data having the same data structure as that of a second programming language; the user interface drawing process generates a user interface according to the first user interface data having the same data structure as that of the second programming language. The present disclosure improves the efficiency and convenience of user interface generation.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] The Windows-based user interface framework (Windows Presentation Foundation, WPF) is a commonly used development framework in the field of user interface (UI) development. Usually, C# can be used as the programming language for UI development based on WPF.

[0003] In related technologies, the UI development process based on WPF may include: an art designer designs the UI, then edits the relevant data of the UI into a corresponding extensible markup language (XML)-formatted interface object layout file, and then a programmer writes C# code to generate the UI display logic. Finally, the XML-formatted layout file and the C# code are merged and compiled into an executable EXE file, and the target UI is obtained by executing the executable EXE file.

[0004] However, since the UI development provided in related technologies requires processes such as XML interface object layout file editing, C# code writing, and code compilation, the UI development process is complex, resulting in low efficiency in generating user interfaces. Summary of the Invention

[0005] The present disclosure provides a user interface generation method, a user interface generation device, a computer-readable storage medium, and an electronic device, thereby reducing the process of user interface development, improving the efficiency of generating user interfaces, and reducing the difficulty of user interface development.

[0006] According to a first aspect of the present disclosure, there is provided a user interface generation method, which is applied to a terminal device that runs a pre-created user interface editing process and a user interface drawing process. The method includes:

[0007] The user interface editing process obtains a to-be-processed script written in a first programming language. The to-be-processed script includes first user interface data to be drawn, and the first programming language is a non-compiled programming language;

[0008] The user interface editing process converts the first user interface data into first user interface data in a preset data format, and sends the first user interface data in the preset data format to the user interface drawing process. The preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process;

[0009] The user interface drawing process parses the first user interface data in the preset data format to obtain first user interface data with the same data structure as that of the second programming language, and the user interface drawing process processes data based on the second programming language;

[0010] The user interface drawing process generates a user interface according to the first user interface data with the same data structure as that of the second programming language.

[0011] According to a second aspect of the present disclosure, there is provided a user interface generation device, which is a terminal device. The terminal device runs a pre-created user interface editing process and a user interface drawing process. The device includes:

[0012] An acquisition module, configured to enable the user interface editing process to acquire a to-be-processed script written in a first programming language. The to-be-processed script includes first user interface data to be drawn, and the first programming language is a non-compiled programming language;

[0013] A data format conversion module, configured to enable the user interface editing process to convert the first user interface data into first user interface data in a preset data format, and send the first user interface data in the preset data format to the user interface drawing process. The preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process;

[0014] A parsing module, configured to enable the user interface drawing process to parse the first user interface data in the preset data format to obtain first user interface data with the same data structure as that of the second programming language, and the user interface drawing process processes data based on the second programming language;

[0015] An interface generation module, configured to enable the user interface drawing process to generate a user interface according to the first user interface data with the same data structure as that of the second programming language.

[0016] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect is implemented.

[0017] According to a second aspect of the present disclosure, there is provided an electronic device, including:

[0018] A processor; and

[0019] A memory, configured to store executable instructions of the processor;

[0020] Wherein, the processor is configured to execute the method described in the first aspect by executing the executable instructions.

[0021] The technical solution of the present disclosure has the following beneficial effects:

[0022] The user interface generation method, device, medium and electronic device provided by the embodiments of the present disclosure, on the one hand, can use a non-compiled programming language to edit the first user interface data, reducing the difficulty of user interface development; on the other hand, since no compilation is required during the process of processing the first user interface data, the time processing flow for generating the user interface based on the first user interface data can be reduced, improving the user interface generation efficiency; on the still other hand, developing the first user interface data and rendering the user interface are executed through different processes, which can achieve the logical separation of the development of the first user interface data and the rendering of the user interface, reducing the probability of failures during the user interface generation process and improving the reliability of generating the user interface.

[0023] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0025] Figure 1 Showing a schematic architecture diagram of a terminal device in this exemplary embodiment;

[0026] Figure 2 Showing a schematic flow chart of a user interface generation method in this exemplary embodiment;

[0027] Figure 3 Showing a schematic flow chart of another user interface generation method in this exemplary embodiment;

[0028] Figure 4 Showing a block diagram of a user interface generation device in this exemplary embodiment;

[0029] Figure 5 Showing a schematic structural diagram of an electronic device in this exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0030] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will recognize that one or more of the specific details may be omitted in practicing the technical solutions of the present disclosure, or other methods, components, devices, steps, etc. may be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring aspects of the present disclosure.

[0031] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0032] The flowcharts shown in the drawings are merely illustrative and do not necessarily include all steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.

[0033] Exemplary embodiments of the present disclosure provide a user interface generation method for the user interface development business. Application scenarios of the user interface generation method include, but are not limited to: during the UI development based on WPF, a terminal device runs a pre-created user interface editing process and a user interface drawing process. Among them, the user interface editing process obtains a to-be-processed script written in a first programming language. The to-be-processed script includes first user interface data to be drawn, and the first programming language is a non-compiled programming language; the user interface editing process converts the first user interface data into first user interface data in a preset data format, and sends the first user interface data in the preset data format to the user interface drawing process. The preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process; the user interface drawing process parses the first user interface data in the preset data format to obtain first user interface data with the same data structure as that of a second programming language, and the user interface drawing process processes the data based on the second programming language; the user interface drawing process generates a user interface according to the first user interface data. On the one hand, the first user interface data can be edited using a non-compiled programming language, reducing the difficulty of user interface development; on the other hand, since no compilation is required during the process of processing the first user interface data, the time processing flow for generating a user interface based on the first user interface data can be reduced, improving the efficiency of user interface generation; on the further hand, developing the first user interface data and rendering the user interface are executed by different processes, which can achieve the logical separation of the development of the first user interface data and the rendering of the user interface, reducing the probability of failures during the user interface generation process and improving the reliability of generating the user interface.

[0034] To implement the above user interface generation method, exemplary embodiments of the present disclosure provide a terminal device. Figure 1 A schematic architecture diagram of the terminal device is shown. As Figure 1 shown, a user interface editing process 101 and a user interface drawing process 102 can run in the terminal device 100; among them, the user interface editing process 101 can be a process corresponding to a business application in the terminal device, and the business application can be determined based on the scenario of the current business. The embodiments of the present disclosure do not limit this. For example, the business application can include a game engine for game development, or a modeling application for movie production, etc.; the user interface drawing process 102 can be a process corresponding to a WPF framework application running in the terminal device. Among them, the terminal device can be a laptop computer, a desktop computer, a tablet computer, etc., and the terminal device can be a user terminal used by developers.

[0035] It should be understood that the terminal device can create a user interface drawing process in response to the operation of running a WPF framework application. The WPF framework application can support processing first user interface data using a second programming language and generating a user interface. The terminal device can create a user interface editing process in response to the operation of running a business application. The business application can support writing scripts using a first programming language for users to develop the first user interface data to be drawn. Among them, the user interface drawing process and the user interface editing process can exchange data.

[0036] The following describes the user interface generation method from the perspective of the user terminal. Among them, a pre-created user interface editing process and a user interface drawing process are running in the terminal device. Figure 2 An exemplary process of the user interface generation method executed by the terminal device is shown, which may include:

[0037] Step S201, the user interface editing process obtains a to-be-processed script written in the first programming language.

[0038] Among them, the to-be-processed script includes the first user interface data to be drawn, and the first programming language is a non-compiled programming language.

[0039] Step S202, the user interface editing process converts the first user interface data into the first user interface data in a preset data format, and sends the first user interface data in the preset data format to the user interface drawing process.

[0040] Among them, the preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process.

[0041] Step S203, the user interface drawing process parses the first user interface data in the preset data format to obtain the first user interface data with the same data structure as that of the second programming language.

[0042] Among them, the user interface drawing process processes data based on the second programming language.

[0043] Step S204, the user interface drawing process generates a user interface according to the first user interface data with the same data structure as that of the second programming language.

[0044] In summary, for the user interface generation method provided in the embodiments of the present disclosure, on the one hand, the first user interface data can be edited using a non-compiled programming language, reducing the difficulty of user interface development; on the other hand, since no compilation is required during the process of processing the first user interface data, the time processing flow for generating the user interface based on the first user interface data can be reduced, improving the efficiency of user interface generation; furthermore, developing the first user interface data and rendering the user interface are executed through different processes, which can achieve the logical separation of the development of the first user interface data and the rendering of the user interface, reducing the probability of failures during the user interface generation process and improving the reliability of generating the user interface.

[0045] The following elaborates in detail on the specific implementation manners of each step in the Figure 2 illustrated embodiments:

[0046] In step S201, the user interface editing process may obtain a to-be-processed script written in a first programming language.

[0047] In the embodiments of the present disclosure, the to-be-processed script includes first user interface data to be drawn obtained by a terminal device. The first user interface data may include parameter information of interface objects. The parameter information may include type information of interface objects and attribute information of interface objects. The type information of interface objects may be a control, a prompt box, a text information input box, or a dropdown box, etc. The attribute information of interface objects may be position information, color information, and shape information of interface objects, etc.; wherein, the first programming language is a non-compiled programming language. For example, the first programming language may be the Python language, or the JavaScript language, etc.

[0048] In an alternative implementation manner, the process by which the user interface editing process obtains a to-be-processed script written in a first programming language may include: during the running of a business application, the user interface editing process may obtain first user interface data written in a first programming language to obtain a to-be-processed script.

[0049] Exemplarily, when the first programming language is the Python language and in a game development scenario, the business application may be a game engine. Then, the composition of the to-be-processed script that the user interface editing process in the terminal device may obtain may include: during the running of the game engine, the user interface editing process may obtain first user interface data written in the Python language to obtain a to-be-processed script.

[0050] In step S202, the user interface editing process may convert the first user interface data into first user interface data in a preset data format and send the first user interface data in the preset data format to the user interface drawing process.

[0051] In the embodiments of the present disclosure, the preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process. The preset data format can be determined based on actual needs, and the embodiments of the present disclosure do not limit this. By way of example, the preset data format can include the JSON (JavaScript Object Notation) format, the XML format, or the Protobuf (Protocol Buffers) format.

[0052] In an alternative embodiment, the process by which the user interface editing process sends the first user interface data in the preset data format to the user interface drawing process may include: the user interface editing process sends the first user interface data in the preset data format to the user interface drawing process through a named pipe (NamedPipe).

[0053] In an alternative embodiment, the process by which the user interface editing process sends the first user interface data in the preset data format to the user interface drawing process may include: the user interface editing process serially sends the first user interface data in the preset data format to the user interface drawing process, which can improve the reliability of the user interface data transmitted between the user interface editing process and the user interface drawing process and improve the matching degree between the drawn user interface and the user's expectations.

[0054] It can be understood that the process by which the user interface editing process serially sends the first user interface data in the preset data format to the user interface drawing process may include: the user interface editing process serially sends the first user interface data in the preset data format to the user interface drawing process through a named pipe.

[0055] In step S203, the user interface drawing process parses the first user interface data in the preset data format to obtain the first user interface data having the same data structure as that of the second programming language.

[0056] In the embodiments of the present disclosure, the second programming language can be a programming language supported by the WPF framework, and the second programming language can be the C# programming language or the C programming language; the user interface drawing process can process data based on the second programming language.

[0057] In an alternative embodiment, the user interface drawing process can parse the first user interface data in the preset data format to obtain the first user interface data having the same data structure as that of the second programming language.

[0058] Exemplarily, the preset data format is JSON, and the second programming language is the C# programming language. The process by which the user interface drawing process parses the first user interface data in the preset data format to obtain the first user interface data with the same data structure as that of the second programming language may include: The user interface drawing process converts the first user interface data in JSON format into the first user interface data in C# programming language format.

[0059] In step S204, the user interface drawing process generates a user interface based on the first user interface data with the same data structure as that of the second programming language.

[0060] In an alternative implementation, different types of interface object types and corresponding interface object generation mechanisms may be pre-stored in the WPF framework. For example, the generation mechanism of controls, the generation logic of dropdown boxes, or the generation logic of text input boxes, etc., so as to quickly generate a user interface after obtaining the first user interface data. The process by which the user interface drawing process generates a user interface based on the first user interface data with the same data structure as that of the second programming language may include: determining the parameter information of the interface object in the first user interface data; in the pre-generated interface object types and corresponding interface object generation mechanisms, determining the target interface object generation mechanism corresponding to the type information of the interface object; processing the attribute information of the interface object based on the target interface object generation mechanism to obtain a user interface. Based on the pre-established generation mechanisms of different types of interface objects, after obtaining the first user interface data, interface objects can be quickly generated and displayed to obtain a user interface.

[0061] In an alternative implementation, the process by which the user interface drawing process generates a user interface based on the first user interface data with the same data structure as that of the second programming language may include: determining the parameter information of the interface object in the first user interface data, and displaying the parameter information of the interface object, and in response to the arrangement operation of the parameter information of the interface object, generating a user interface. The interface object can be manually drawn according to the parameter information of the interface object to obtain a user interface, further improving the reliability of the generated user interface.

[0062] In the embodiments of the present disclosure, modification of the generated user interface is supported. After the user interface drawing process generates a user interface according to first user interface data that is the same as the data structure of a second programming language, the user interface editing process can further obtain modified first user interface data in response to a modification operation on the first user interface data; the user interface editing process converts the modified first user interface data into modified first user interface data in a preset data format, and sends the modified first user interface data in the preset data format to the user interface drawing process; the user interface drawing process parses the modified first user interface data in the preset data format to obtain modified first user interface data corresponding to the second programming language; the user interface drawing process modifies the user interface based on the modified first user interface data to obtain a modified user interface.

[0063] When it is necessary to modify the user interface generated based on the first user interface data in the to-be-processed script, there is no need to re-edit a new interface object layout file and a new code file. Instead, the first user interface data can be directly modified in the business application. After the user interface editing process corresponding to the business application obtains the modified first user interface data, it can directly send the modified first user interface data to the user interface drawing process to modify the already generated user interface and obtain a modified user interface, reducing the process in the user interface modification process, improving the modification efficiency of the user interface, and enhancing the user interface development experience.

[0064] In an alternative embodiment, the to-be-processed script further includes business logic data of the current business, and the business logic data is used to represent the execution logic of the business. For example, the execution logic of a game, or the execution logic of an interactive animation, etc. After the user interface drawing process generates a user interface according to first user interface data that is the same as the data structure of a second programming language, as Figure 3 shown, the terminal device can further:

[0065] Step S301, the user interface drawing process generates a user interface object trigger message for the user interface object in response to a trigger operation on the user interface object.

[0066] In the embodiments of the present disclosure, the trigger operation of the user interface object can be determined according to the type of the user interface object, and the embodiments of the present disclosure do not limit this. By way of example, for a control, the trigger operation of the user interface object can include a click operation on the control, or a position movement operation; for a drop-down box, the trigger operation of the user interface object can include a click operation on the drop-down box, and a selection operation on any content displayed in the drop-down box, etc.

[0067] In an alternative embodiment, the process by which the user interface drawing process generates a user interface object trigger message in response to a trigger operation on a user interface object in the user interface is as follows: obtain the user interface object selected by the trigger operation and the operation information of the trigger operation, and generate an object trigger message based on the user interface object selected by the triggered operation and the operation information. For example, for the position movement information of any control in the user interface, the movement information may include the starting position and the ending position of the control being moved.

[0068] Step S302, the user interface drawing process converts the user interface object trigger message into a user interface object trigger message in a preset data format, and sends the user interface object trigger message in the preset data format to the user interface editing process.

[0069] In an alternative embodiment, the process by which the user interface drawing process sends the user interface object trigger message in the preset data format to the user interface editing process may include: the user interface drawing process sends the user interface object trigger message in the preset data format to the user interface editing process through a named pipe.

[0070] In an alternative embodiment, the process by which the user interface drawing process sends the user interface object trigger message in the preset data format to the user interface editing process may include: serializing the user interface object trigger message in the preset data format to the user interface editing process, which can improve the reliability of the user interface object trigger message transmitted between the user interface editing process and the user interface drawing process.

[0071] Step S303, the user interface editing process parses the user interface object trigger message in the preset data format to obtain the user interface object trigger message.

[0072] In the embodiments of the present disclosure, if the user interface editing process supports a first programming language, then the data format of the user interface object trigger message parsed by the user interface editing process is the data format of the first programming language.

[0073] Among them, the process by which the user interface editing process parses the user interface object trigger message in the preset data format to obtain the user interface object trigger message may include: the user interface editing process parses the user interface object trigger message in the preset data format to obtain a user interface object trigger message with the same data structure as that of the first programming language.

[0074] Step S304, the user interface editing process determines the updated first user interface data based on the service logic data and the user interface object trigger message, and repeats the above process of generating the user interface according to the first user interface data until all the user interfaces corresponding to the current service are obtained.

[0075] In the implementation of the present disclosure, the updated first user interface data is the user interface data of the next user interface displayed after a trigger operation is performed on the currently generated user interface in the business logic data. By way of example, the business logic data is game business logic data, the trigger operation is a position movement operation on a control in the currently generated user interface, and the updated first user interface data is the user interface data of the next user interface displayed after the position movement operation on the control in the currently generated user interface in the game business logic data. By performing a trigger operation on the interface in the currently generated user interface, it is possible to control the continued generation of other user interfaces in the business logic until all user interfaces in the business logic are generated, which can improve the automation level in the user interface development process and further reduce the manpower requirements.

[0076] In an alternative implementation manner, determining the updated first user interface data according to the business logic data and the interface object trigger message includes: determining a target business logic corresponding to the interface object trigger message according to the business logic data; obtaining second user interface data corresponding to the target business logic; and determining the second user interface data as the updated first user interface data. The target business logic includes the logic of the user interface displayed after performing the trigger operation in the interface object trigger message. Based on the pre-written business logic data, it is possible to quickly determine the user interface data of the user interface to be drawn after performing a trigger operation on the currently generated user interface, further improving the drawing efficiency of the user interfaces in the entire business logic.

[0077] The embodiments of the present disclosure provide a user interface generation device. The user interface generation device may be a terminal device, and the terminal device runs a pre-created user interface editing process and a user interface drawing process, as Figure 4 shown. The user interface generation device 400 includes:

[0078] An acquisition module 401, configured to enable the user interface editing process to acquire a to-be-processed script written in a first programming language. The to-be-processed script includes the first user interface data to be drawn, and the first programming language is a non-compiled programming language;

[0079] A data format conversion module 402, configured to enable the user interface editing process to convert the first user interface data into the first user interface data in a preset data format, and send the first user interface data in the preset data format to the user interface drawing process. The preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process;

[0080] The parsing module 403 is configured to enable a user interface drawing process to parse first user interface data in a preset data format, obtain first user interface data having the same data structure as that of a second programming language, and the user interface drawing process processes data based on the second programming language;

[0081] The interface generation module 404 is configured to enable the user interface drawing process to generate a user interface according to the first user interface data having the same data structure as that of the second programming language.

[0082] Optionally, as Figure 4 shown, the user interface generation device 400 further includes a modification module 405, which is configured to:

[0083] The user interface editing process obtains modified first user interface data in response to a modification operation on the first user interface data;

[0084] The user interface editing process converts the modified first user interface data into modified first user interface data in a preset data format, and sends the modified first user interface data in the preset data format to the user interface drawing process;

[0085] The user interface drawing process parses the modified first user interface data in the preset data format, and obtains modified first user interface data corresponding to the second programming language;

[0086] The user interface drawing process modifies the user interface based on the modified first user interface data, and obtains a modified user interface.

[0087] Optionally, as Figure 4 shown, the user interface generation device 400 further includes an update module 406, which is configured to:

[0088] The user interface drawing process generates a user interface object trigger message for a user interface object in response to a trigger operation on the user interface;

[0089] The user interface drawing process converts the user interface object trigger message into a user interface object trigger message in a preset data format, and sends the user interface object trigger message in the preset data format to the user interface editing process;

[0090] The user interface editing process parses the user interface object trigger message in the preset data format, and obtains the user interface object trigger message;

[0091] The user interface editing process determines updated first user interface data according to service logic data and the user interface object trigger message, and repeats the above process of generating a user interface according to the first user interface data until all user interfaces corresponding to the current service are obtained.

[0092] Optionally, the update module 406 is configured to:

[0093] Serialize and send the trigger message of the interface object in the preset data format to the user interface editing process.

[0094] Optionally, the update module 406 is configured to:

[0095] Determine the target business logic corresponding to the trigger message of the interface object according to the business logic data;

[0096] Obtain the second user interface data corresponding to the target business logic;

[0097] Determine the second user interface data as the updated first user interface data.

[0098] Optionally, the interface generation module 404 is configured to:

[0099] Determine the parameter information of the interface object in the first user interface data, where the parameter information includes the type information of the interface object and the attribute information of the interface object;

[0100] In the pre-generated interface object types and corresponding interface object generation mechanisms, determine the target interface object generation mechanism corresponding to the type information of the interface object;

[0101] Process the attribute information of the interface object based on the target interface object generation mechanism to obtain the user interface.

[0102] Optionally, the data format conversion module 402 is configured to:

[0103] Serialize and send the first user interface data in the preset data format to the user interface drawing process.

[0104] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, including program code. When the program product runs on an electronic device, the program code is used to cause the electronic device to execute the steps according to the various exemplary embodiments of the present disclosure described in the "Exemplary Method" section above in this specification. In one embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.

[0105] The program product may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the readable storage medium (a non-exhaustive list) include: an electrical connection having one or more wires, a portable 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.

[0106] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0107] The program code contained on the readable medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0108] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).

[0109] Exemplary embodiments of the present disclosure also provide an electronic device, which may be a back-end server of an information platform. The following refers to Figure 5 to illustrate this electronic device. It should be understood that Figure 5 the displayed electronic device 500 is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0110] As shown Figure 5 in FIG. 1, the electronic device 500 is presented in the form of a general-purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, and a bus 530 that connects different system components (including the storage unit 520 and the processing unit 510).

[0111] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section above of this specification. For example, the processing unit 510 may execute the method steps as shown Figures 2 to 3 in FIG. 2, etc.

[0112] The storage unit 520 may include a volatile storage unit, such as a random access storage unit (RAM) 521 and / or a cache storage unit 522, and may further include a read-only storage unit (ROM) 523.

[0113] The storage unit 520 may also include a program / utility 524 having a set (at least one) of program modules 525. Such program modules 525 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0114] The bus 530 may include a data bus, an address bus, and a control bus.

[0115] The electronic device 500 may also communicate with one or more external devices 600 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and such communication may be performed through an input / output (I / O) interface 540. The electronic device 500 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 550. As shown in the figure, the network adapter 550 communicates with other modules of the electronic device 500 through the bus 530. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in combination with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0116] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0117] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuits", "modules", or "systems" here. After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily think of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

[0118] It should be understood that the present disclosure is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only defined by the appended claims.

Claims

1. A method for generating a user interface, characterized in that, the method is applied to a terminal device that runs a pre-created user interface editing process and a user interface drawing process, and the method includes: the user interface editing process obtains a to-be-processed script written in a first programming language, the to-be-processed script includes first user interface data to be drawn, and the first programming language is a non-compiled programming language; the user interface editing process converts the first user interface data into first user interface data in a preset data format, and sends the first user interface data in the preset data format to the user interface drawing process, and the preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process; the user interface drawing process parses the first user interface data in the preset data format to obtain first user interface data with the same data structure as that of a second programming language, and the user interface drawing process processes the data based on the second programming language; the user interface drawing process generates a user interface according to the first user interface data with the same data structure as that of the second programming language.

2. The method according to claim 1, characterized in that, after the user interface drawing process generates a user interface according to the first user interface data with the same data structure as that of the second programming language, the method further includes: the user interface editing process obtains modified first user interface data in response to a modification operation on the first user interface data; the user interface editing process converts the modified first user interface data into modified first user interface data in a preset data format, and sends the modified first user interface data in the preset data format to the user interface drawing process; the user interface drawing process parses the modified first user interface data in the preset data format to obtain modified first user interface data corresponding to the second programming language; the user interface drawing process modifies the user interface based on the modified first user interface data to obtain a modified user interface.

3. The method according to claim 1, characterized in that, the to-be-processed script further includes service logic data of the current service. After the user interface drawing process generates a user interface according to the first user interface data with the same data structure as that of the second programming language, the method further includes: the user interface drawing process generates a user interface object trigger message for the user interface object in response to a trigger operation on the user interface object; the user interface drawing process converts the user interface object trigger message into a user interface object trigger message in a preset data format, and sends the user interface object trigger message in the preset data format to the user interface editing process; the user interface editing process parses the user interface object trigger message in the preset data format to obtain the user interface object trigger message; The user interface editing process determines the updated first user interface data according to the service logic data and the interface object trigger message, and repeats the above process of generating the user interface according to the first user interface data until all user interfaces corresponding to the current service are obtained.

4. The method according to claim 3, wherein, sending the interface object trigger message in the preset data format to the user interface editing process includes: serializing and sending the interface object trigger message in the preset data format to the user interface editing process.

5. The method according to claim 3, wherein, determining the updated first user interface data according to the service logic data and the interface object trigger message includes: determining the target service logic corresponding to the interface object trigger message according to the service logic data; obtaining the second user interface data corresponding to the target service logic; determining the second user interface data as the updated first user interface data.

6. The method according to claim 1, wherein, generating the user interface according to the first user interface data having the same data structure as that of the second programming language includes: determining the parameter information of the interface object in the first user interface data, where the parameter information includes the type information of the interface object and the attribute information of the interface object; determining the target interface object generation mechanism corresponding to the type information of the interface object in the pre-generated interface object types and corresponding interface object generation mechanisms; processing the attribute information of the interface object based on the target interface object generation mechanism to obtain the user interface.

7. The method according to claim 1, wherein, sending the first user interface data in the preset data format to the user interface drawing process includes: serializing and sending the first user interface data in the preset data format to the user interface drawing process.

8. A user interface generation device, wherein, the device is a terminal device, the terminal device runs a pre-created user interface editing process and a user interface drawing process, and the device includes: an acquisition module configured to enable the user interface editing process to acquire a to-be-processed script written in a first programming language, the to-be-processed script includes the first user interface data to be drawn, and the first programming language is a non-compiled programming language; a data format conversion module configured to enable the user interface editing process to convert the first user interface data into the first user interface data in a preset data format, and send the first user interface data in the preset data format to the user interface drawing process, and the preset data format is a data format recognizable by both the user interface editing process and the user interface drawing process; an analysis module configured to enable the user interface drawing process to analyze the first user interface data in the preset data format to obtain the first user interface data having the same data structure as that of the second programming language, and the user interface drawing process processes data based on the second programming language; An interface generation module, configured to enable the user interface drawing process to generate a user interface according to the first user interface data that is the same as the data structure of the second programming language.

9. A computer-readable storage medium, having a computer program stored thereon, wherein, the computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.

10. An electronic device, wherein, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method according to any one of claims 1 to 7 by executing the executable instructions.

Citation Information

Patent Citations

  • User interface generation method and device

    CN106598556A

  • User interface rendering method and device

    CN108572818A