CN113885996A - User interface generation method and device - Google Patents

User interface generation method and device Download PDF

Info

Publication number
CN113885996A
CN113885996A CN202111216941.5A CN202111216941A CN113885996A CN 113885996 A CN113885996 A CN 113885996A CN 202111216941 A CN202111216941 A CN 202111216941A CN 113885996 A CN113885996 A CN 113885996A
Authority
CN
China
Prior art keywords
dynamic card
card
rendering
dynamic
layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111216941.5A
Other languages
Chinese (zh)
Inventor
王佐
甘静军
何瑾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202111216941.5A priority Critical patent/CN113885996A/en
Publication of CN113885996A publication Critical patent/CN113885996A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/313Logic programming, e.g. PROLOG programming language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The present disclosure provides a method and a device for generating a user interface, where the method is applied to a terminal device, and the method includes: obtaining card data of a dynamic card to be generated; calling a rendering interface by using a rendering layer, rendering a dynamic card to be generated based on the card data, and obtaining view data of the dynamic card, wherein the rendering interface is used for calling a native rendering component and a self-rendering component; and displaying the user interface of the dynamic card in the display area of the dynamic card through the operating system of the terminal equipment based on the view data of the dynamic card.

Description

User interface generation method and device
Technical Field
The disclosure relates to the technical field of information, in particular to a method and a device for generating a user interface.
Background
Dynamic card technology (e.g., Cube dynamic card technology) aims to dynamically change the content of a high-frequency reprinted display area in a page of a native Application (App) so as to avoid updating the content in the App by re-launching the App, which results in a long period for updating the content in the App.
Generally, before displaying a User Interface (UI) of a dynamic card in a display area of the dynamic card, a terminal device needs to render the dynamic card to be generated, so that card data of the dynamic card is converted into a visual graph in the UI. In a traditional rendering mode, the App may call a native rendering component provided by an operating system of the terminal device to render a dynamic card to be generated. However, when the native rendering component is called to render the dynamic card, all rendering processes of the dynamic card occupy the UI thread to execute, which results in a large workload of the UI thread and reduces rendering efficiency of the dynamic card.
Disclosure of Invention
In view of this, embodiments of the present disclosure are directed to providing a method and an apparatus for generating a user interface, so as to improve rendering efficiency of a dynamic card.
In a first aspect, a method for generating a user interface is provided, where the method is applied to a terminal device, and the method includes: obtaining card data of a dynamic card to be generated; calling a rendering interface by using a rendering layer, rendering a dynamic card to be generated based on the card data, and obtaining view data of the dynamic card, wherein the rendering interface is used for calling a native rendering component and a self-rendering component; and displaying a User Interface (UI) of the dynamic card in a display area of the dynamic card through an operating system of the terminal equipment based on the view data of the dynamic card.
In a second aspect, an apparatus for generating a user interface is provided, where the apparatus is provided in a terminal device, and the apparatus includes: the acquisition module is used for acquiring card data of the dynamic card to be generated; the processing module is used for calling a rendering interface by using a rendering layer, rendering a dynamic card to be generated based on the card data and obtaining view data of the dynamic card, wherein the rendering interface is used for calling a native rendering component and a self-rendering component; the processing module is further configured to display a user interface UI of the dynamic card in a display area of the dynamic card through an operating system of the terminal device based on the view data of the dynamic card.
In a third aspect, a terminal device is provided, where the terminal device has a function in implementing the method design of the first aspect. These functions may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions.
In a fourth aspect, a terminal device is provided that includes a processor and a memory. The processor is configured to control the transceiver to transceive signals, the memory is configured to store a computer program, and the processor is configured to retrieve and execute the computer program from the memory, so that the terminal device performs the method of the first aspect.
In a fifth aspect, there is provided a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of the above-mentioned aspects.
In a sixth aspect, a computer-readable medium is provided, which stores program code, which, when run on a computer, causes the computer to perform the method of the above-mentioned aspects.
The method and the device render the dynamic card to be generated by calling the rendering interface by using the native rendering component and the self-rendering component together so as to display the UI of the dynamic card in the display area of the dynamic card through the operating system of the terminal device. The method has the advantages that part of the rendering process in the dynamic card is delivered to the self-drawing rendering component for rendering, and the purpose of delivering part of the rendering process to the sub-thread can be achieved, so that the UI thread and the sub-thread can be rendered in parallel, and compared with the traditional scheme of delivering all the rendering processes in the dynamic card to the UI thread, the method is beneficial to reducing the workload required by rendering the dynamic card in the UI thread and improving the rendering efficiency of the dynamic card.
Drawings
Fig. 1 is a schematic diagram of a dynamic card suitable for use in the embodiments of the present disclosure.
Fig. 2 is a flowchart of a method for generating a user interface according to an embodiment of the present disclosure.
Fig. 3 is a schematic system structure diagram of a dynamic card generation system in an embodiment of the present disclosure.
FIG. 4 is a schematic diagram of development and a work cycle of a dynamic card according to an embodiment of the disclosure.
Fig. 5 is a schematic diagram of a user interface generation apparatus according to an embodiment of the present disclosure.
Fig. 6 is a schematic block diagram of an apparatus of another embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments.
A native Application (also called a native Application) refers to an Application specific to an operating system (for example, iOS or android) of a certain terminal, and is developed by using a Development tool and a language supported by the corresponding operating system and directly calling an Application Programming Interface (SDK API) of a Software Development tool package provided by the operating system. The native application program has the defects of fixed content, weak dynamism and the like. In most cases, only the App can be re-launched if the native application needs to be updated (e.g., power is updated, user interface is updated). The content of the App is updated through version upgrading, but the period for uploading and auditing the App is required, which is hardly acceptable for the Internet era with high-speed change, so that the dynamic operation of the App makes the situation that the App can update the content of the App without version upgrading urgent.
Based on the dynamic appeal of the native application, a dynamic card technology (e.g., Cube dynamic card technology) has come to be developed, and aims to dynamically change the content of a high-frequency reprinted display area in a page of the native application. For ease of understanding, the dynamic card is described below in connection with the User Interface (UI) of the App shown in fig. 1. Referring to fig. 1, a UI 110 of App 1 is displayed in the terminal device 100. The display area for showing the "xx active content" in the UI 110 needs to push different active content at different time points (for example, holidays), so that the content which is subject to high frequency revision in the UI 110, and therefore, the UI in the display area 120 can be set to be presented by means of a dynamic card.
The Terminal device may also be referred to as a User Equipment (UE), a Mobile Terminal (MT), a remote Terminal, a Mobile device, a User Terminal, a Terminal, or a User Equipment. The terminal device in the embodiment of the present disclosure may be a mobile phone (mobile phone), a tablet computer (Pad), a notebook computer, a palm computer, a wearable device, or the like.
Before the terminal device displays a User Interface (UI) of the dynamic card in a display area of the dynamic card, rendering the dynamic card to be generated is required so that card data of the dynamic card is converted into a visual graph in the UI. At present, two traditional rendering modes exist for rendering dynamic cards.
In a first conventional rendering mode, the App may call a native rendering component provided by an operating system of the terminal device to render a dynamic card to be generated. However, when the native rendering component is called to render the dynamic card, all rendering processes of the dynamic card occupy the UI thread to execute, which results in a large workload of the UI thread and reduces rendering efficiency of the dynamic card.
In a second conventional rendering mode, the App may call the self-rendering component to render the dynamic card, but the self-rendering component is usually maintained by a third party, but a certain delay may exist between updating of the self-rendering component and updating of an operating system of the terminal device, and even a situation that the self-rendering component is not updated after the operating system is updated exists, so that compatibility between the self-rendering component and the operating system is not high, and a rendering effect of the dynamic card is reduced.
Therefore, in order to avoid the above problem, the present disclosure provides a generation scheme of a user interface, which renders a dynamic card in a hybrid (hybrid) rendering mode to display the dynamic card. A flow chart of a method for generating a user interface according to an embodiment of the present disclosure is described below with reference to fig. 2. It should be understood that the method shown in fig. 2 may be performed by a terminal device, such as terminal device 100 shown in fig. 1. The method shown in fig. 2 includes steps S210 to S230.
In step S210, card data of a dynamic card to be generated is acquired.
The card data of the dynamic card is used for describing the style and the card content of the dynamic card. In some implementations, the card data may include contents to be displayed in the dynamic card, and/or layout information of each element node in the dynamic card.
In some implementations, the step S210 may be performed by using an application layer, that is, the application layer is used to obtain the card data of the dynamic card to be generated. In some implementations, a card engine (card engine) may be deployed at the application layer to implement the functionality of obtaining card data.
In step S220, the rendering layer is used to call the rendering interface, and the dynamic card to be generated is rendered based on the card data, so as to obtain the view data of the dynamic card.
The rendering interface is used for calling the native rendering component and the self-rendering component. Wherein the native rendering component may be a system component provided by an operating system of the terminal device. In some implementations, the native rendering component described above can be one or more of an animation (animation) component, an input (input) component, a map (map) component, an audio (audio) component, and a video (video) component. The self-rendering component may be a text document component (text) component, a picture (img) component, a div component. In other implementations, the rendering interface used to call the self-rendering component may be a canvas (canvas) API interface.
In step S230, based on the view data of the dynamic card, the UI of the dynamic card is presented in the display area of the dynamic card by the operating system of the terminal device.
In some implementations, the step S230 may be performed by using a platform layer, that is, the platform layer is used to display the UI of the dynamic card in the display area of the dynamic card through the operating system of the terminal device based on the view data of the dynamic card.
In the embodiment of the disclosure, the native rendering component and the self-rendering component are used together to render the dynamic card to be generated by calling the rendering interface, so that the UI of the dynamic card is shown in the display area of the dynamic card through the operating system of the terminal device. On one hand, part of the rendering process in the dynamic card is delivered to the self-drawing rendering component for rendering, and the purpose of delivering part of the rendering process to the sub-thread can be achieved, so that the UI thread and the sub-thread can be rendered in parallel, and compared with the traditional scheme (namely the traditional rendering mode I) of delivering all the rendering process in the dynamic card to the UI thread, the method is beneficial to reducing the workload required by rendering the dynamic card in the UI thread and improving the rendering efficiency of the dynamic card.
On the other hand, in the embodiment of the present disclosure, part of the rendering process in the dynamic card may be delivered to the native rendering component for rendering, and compared to a conventional scheme (i.e., the above conventional rendering manner two) in which all the rendering process in the dynamic card is delivered to the self-rendering component for rendering, the influence on the rendering effect of the dynamic card due to incompatibility between the self-rendering component and the operating system is reduced, which is beneficial to improving the rendering effect of the dynamic card.
In order to simplify the generation process of the dynamic card and improve the generation efficiency of the dynamic card, when a developer of the App needs to generate the dynamic card, the developer of the App can call a dynamic card template in the App to generate the dynamic card. In some implementations, the dynamic card template may be pre-deployed in the form of a file. Correspondingly, the logic layer can be used for analyzing the dynamic card template file to obtain the dynamic card template.
Namely, the above method further comprises: analyzing the dynamic card template file by using the logic layer to extract the dynamic card template; the step S220 includes: and calling a rendering interface by using the rendering layer, and rendering the dynamic card based on the card data and the dynamic card template.
In some implementations, the card data may indicate an adjustment manner of nodes in the dynamic card template. The nodes in the dynamic card template may include a text display area, a graphic display area, and the like in the dynamic card template. The above adjustment mode may indicate whether the nodes in the dynamic card template need to be displayed, what size the nodes in the dynamic card template need to be displayed, the display parameters of the nodes in the dynamic card template, and the like.
If the dynamic card template is utilized to generate the dynamic card, the developer of the App can input the version number of the dynamic card template to be used through the application layer. Accordingly, the logic layer is utilized to obtain the version number in the application layer, and the dynamic card template file is selected based on the version number. That is, before parsing the dynamic card template file by using the logic layer to extract the dynamic card template, the method further includes: acquiring the version number of the dynamic card template from the application layer by using the logic layer; and selecting the dynamic card template file based on the version number of the dynamic card template by utilizing the logic layer.
In some implementations, for the convenience of front-end development, JS (javascript) language can be used as the logic language in the above logic layer, and accordingly, JS engines can be deployed in the logic layer to provide a basis for execution of code compiled based on the JS language (also referred to as "JS code"). In some implementations, the JS engine described above can provide global initialization for the JS code to be executed. In other implementations, the JS engine can provide an execution environment for the JS code to be executed. Of course, in the embodiment of the present disclosure, the logic layer may also use other languages as the logic language.
In some scenarios, the dynamic cards presented in the UI need to change. In some implementations, the content displayed on the dynamic card needs to change with the user operation, for example, if the user clicks or slides the dynamic card, the content displayed on the dynamic card needs to be updated. At this time, the event communication function in the logic layer can be used for sensing the operation of the user on the dynamic card. In some implementations, after the logic layer senses the change demand of the dynamic card through the event communication function, the logic layer may notify the rendering layer to re-render the dynamic card, and update the display content of the dynamic card.
For ease of understanding, the system structure of the dynamic card generation system in the embodiment of the present disclosure is described below by taking the system shown in fig. 3 as an example. It should be noted that, the terms used in the generating system shown in fig. 3 are the same as the above terms, and the functions implemented by the terms or the meanings of the terms are the same, and for brevity, detailed description is omitted below.
Fig. 3 is a schematic system structure diagram of a dynamic card generation system in an embodiment of the present disclosure. The system 300 shown in FIG. 3 includes an application layer 310, a logic layer 320, a rendering layer 330, and a platform layer 340.
And the application layer 310 is used for acquiring the card data and/or the version number of the dynamic card template input by the dynamic card developer.
In some implementations, the card data may include content (including files and patterns) to be displayed in the card template, and layout parameters of nodes in the card template.
The logic layer 320 has one or more functions of a parsing function, an event communication function, and a logic operation function.
The analysis function is used for analyzing the dynamic card template file to obtain the dynamic card template. Please refer to the above description for the process of obtaining the dynamic card template, which is not described herein for brevity.
The event communication function is used for communicating with the application to acquire the application event. The application event includes an operation of the application by the user, for example, the user clicks a UI of a dynamic card in the application. As another example, the user has slid the UI of the dynamic card in the application.
The logic operation function is used for performing logic operation on the application event so as to determine the updating parameters of the UI of the dynamic card responding to the application event.
And the rendering layer 330 is used for rendering the dynamic card to obtain view data of the dynamic card. In some implementations, the rendering layer has one or more of a card node layout calculation function, a rendering data calculation function, a node drawing function, and a UI composition function. In some implementations, the above-described functionality of rendering layer 330 may be implemented by a Render Engine (Render Engine).
The card node layout calculation function is used for calculating the layout of the nodes in the dynamic card. The nodes comprise display objects in the dynamic card, such as characters, images and the like. In some implementations, a card node layout calculation function may be used to calculate the location of nodes in a dynamic card. In other implementations, the card node layout calculation function may be used to calculate the size of the nodes in the dynamic card.
The rendering data calculation function is used for calculating the rendering data in the dynamic card, so that the content of the dynamic card can be presented in the UI of the dynamic card.
And the node drawing function is used for drawing the nodes in the dynamic card. In some implementations, the native rendering component may be invoked to draw a portion of the nodes in the dynamic card. Since the native rendering component is also called a "system component" and is an entity component provided by the operating system, the UI obtained by calling the native rendering component to draw part of the nodes in the dynamic card may be called an "entity UI". In other implementations, a self-drawing rendering component may also be invoked to draw a portion of the nodes in the dynamic card. Since the self-drawing rendering component is not a physical component provided by the operating system but a virtual component relative to the system component, invoking the self-drawing component to draw a part of nodes in the dynamic card to obtain a UI may be referred to as a "virtual UI".
The UI composition function is configured to combine rendering data of the "entity UI" and rendering data of the "virtual UI" to obtain view data of the dynamic card.
And the platform layer 340 is used for displaying the UI of the dynamic card in the display area of the dynamic card through the operating system of the terminal device based on the view data of the dynamic card.
The generation method of the user interface and the system structure of the dynamic card generation system according to the embodiment of the present disclosure are described above with reference to fig. 1 to 3, and the development and the work cycle of the dynamic card according to the embodiment of the present disclosure are described below with reference to fig. 4. It should be noted that, for convenience of understanding, fig. 4 only illustrates the development and work cycle of the dynamic card, and the development and work cycle of the dynamic card of the embodiment of the present disclosure may have other division manners.
As shown in fig. 4, the development and work cycle of the dynamic card can be roughly divided into 3 stages: a dynamic card development phase 410, a dynamic card execution phase 420, and a dynamic card presentation phase 430.
In the dynamic card Development phase 410, a developer of dynamic cards may develop dynamic cards in an Integrated Development Environment (IDE). In some implementations, a developer may compile a dynamic card in an IDE. In other implementations, the developer may also preview and/or debug the compiled card in the IDE. In addition, in the dynamic card development stage 410, the research and development personnel can also upload the successfully developed dynamic card to the card management background, and issue the dynamic card to the terminal device through the card management background. In some implementation manners, the card management background may be disposed in a cloud.
In the dynamic card run phase 420, the terminal device may generate a dynamic card instance of the application based on a Software Development Kit (SDK) of the dynamic card. Wherein the SDK may comprise the dynamic card generation system described above. For example, a card engine at the application layer, a JS engine at the logic layer, a rendering engine at the rendering layer, and a platform layer may be included.
In some implementations, the SDK can be called by the dynamic card instance in the application through the API interface to display the UI of the dynamic card in the display area corresponding to the dynamic card instance.
It should be noted that, in the application, one dynamic card instance may be deployed, or multiple dynamic card instances may be deployed, for example, dynamic card instance 1, dynamic card instance 2, … …, and dynamic card instance N in fig. 4. The number of instances of the dynamic card included in the application is not particularly limited by the embodiments of the present disclosure.
In the dynamic card display phase 430, the terminal device may display the dynamic card example in the display area of the dynamic card in the application. In this case, the dynamic card example 1 displays the UI of the dynamic card 1 in the display area of the dynamic card 1. The dynamic card example 2 displays the UI of the dynamic card 2 in the display area of the dynamic card 2. The dynamic card example N displays the UI of the dynamic card N in the display area of the dynamic card N.
Method embodiments of the present disclosure are described in detail above in conjunction with fig. 1-4, and apparatus embodiments of the present disclosure are described in detail below in conjunction with fig. 5-6. It is to be understood that the description of the method embodiments corresponds to the description of the apparatus embodiments, and therefore reference may be made to the preceding method embodiments for parts not described in detail.
Fig. 5 is a schematic diagram of a generation apparatus of a user interface of an embodiment of the present disclosure. The apparatus 500 shown in fig. 5 may be provided in a terminal device, the apparatus 500 comprising: an acquisition module 510 and a processing module 520.
An obtaining module 510, configured to obtain card data of a dynamic card to be generated;
the processing module 520 is configured to invoke a rendering interface by using a rendering layer, render the dynamic card to be generated based on the card data, and obtain view data of the dynamic card, where the rendering interface is configured to invoke a native rendering component and a self-rendering component;
the processing module 520 is further configured to display a user interface UI of the dynamic card in a display area of the dynamic card through an operating system of the terminal device based on the view data of the dynamic card.
Optionally, in some embodiments, the dynamic card template corresponding to the dynamic card is stored in a dynamic card template file, and the processing module is further configured to analyze the dynamic card template file by using a logic layer to extract the dynamic card template; and calling the rendering interface by using the rendering layer, and rendering the dynamic card based on the card data and the dynamic card template.
Optionally, in some embodiments, the processing module is further configured to obtain, by using the logic layer, a version number of the dynamic card template from the application layer; and selecting the dynamic card template file by utilizing the logic layer based on the version number of the dynamic card template.
Optionally, in some embodiments, the obtaining module is configured to obtain the card data of the dynamic card by using the application layer.
Optionally, in some embodiments, the processing module is further configured to display, by using a platform layer, a UI of the dynamic card in a display area of the dynamic card through an operating system of the terminal device based on the view data of the dynamic card.
In an alternative embodiment, the obtaining module 510 may be an input/output interface 630, the processing module 520 may be a processor 620, and the apparatus may further include a memory 610, as shown in fig. 6.
Fig. 6 is a schematic block diagram of an apparatus of another embodiment of the present disclosure. The apparatus 600 shown in fig. 6 may be a terminal device. The apparatus 600 may comprise: memory 610, processor 620, input/output interface 630. Wherein, the memory 66, the processor 620 and the input/output interface 630 are connected by an internal connection path, the memory 610 is used for storing instructions, and the processor 620 is used for executing the instructions stored in the memory 620 to control the input/output interface 630 to receive input data.
It should be understood that in the embodiments of the present disclosure, the processor may be a general-purpose Central Processing Unit (CPU), and the processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and is used for executing relevant programs to implement the technical solutions provided by the embodiments of the present disclosure.
The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. A portion of the processor may also include non-volatile random access memory. For example, the processor may also store information of the device type.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The method for requesting uplink transmission resources disclosed in connection with the embodiments of the present disclosure may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor. To avoid repetition, it is not described in detail here.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that, in various embodiments of the present disclosure, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present disclosure may be integrated into one module, or each module may exist alone, or two or more modules may be integrated into one module.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the disclosure are, in whole or in part, generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be read by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (12)

1. A method for generating a user interface is applied to a terminal device, and comprises the following steps:
obtaining card data of a dynamic card to be generated;
calling a rendering interface by using a rendering layer, rendering a dynamic card to be generated based on the card data, and obtaining view data of the dynamic card, wherein the rendering interface is used for calling a native rendering component and a self-rendering component;
and displaying a User Interface (UI) of the dynamic card in a display area of the dynamic card through an operating system of the terminal equipment based on the view data of the dynamic card.
2. The method of claim 1, wherein the dynamic card template corresponding to the dynamic card is stored in a dynamic card template file, the method further comprising:
analyzing the dynamic card template file by using a logic layer to extract the dynamic card template;
the method for calling the rendering interface by using the rendering layer and rendering the dynamic card to be generated based on the card data comprises the following steps:
and calling the rendering interface by using the rendering layer, and rendering the dynamic card based on the card data and the dynamic card template.
3. The method of claim 2, prior to the parsing the dynamic card template file with a logical layer to extract the dynamic card template, the method further comprising:
acquiring the version number of the dynamic card template from the application layer by using the logic layer;
and selecting the dynamic card template file by utilizing the logic layer based on the version number of the dynamic card template.
4. The method of claim 3, the obtaining card data for a dynamic card to be displayed, comprising:
and acquiring the card data of the dynamic card by utilizing the application layer.
5. The method of any one of claims 1-4, wherein the presenting, by an operating system of the terminal device, a User Interface (UI) of the dynamic card in a display area of the dynamic card based on the view data of the dynamic card comprises:
and displaying the UI of the dynamic card in the display area of the dynamic card through an operating system of the terminal equipment by utilizing a platform layer based on the view data of the dynamic card.
6. An apparatus for generating a user interface, the apparatus being provided in a terminal device, the apparatus comprising:
the acquisition module is used for acquiring card data of the dynamic card to be generated;
the processing module is used for calling a rendering interface by using a rendering layer, rendering a dynamic card to be generated based on the card data and obtaining view data of the dynamic card, wherein the rendering interface is used for calling a native rendering component and a self-rendering component;
the processing module is further configured to display a user interface UI of the dynamic card in a display area of the dynamic card through an operating system of the terminal device based on the view data of the dynamic card.
7. The apparatus of claim 6, wherein the dynamic card template corresponding to the dynamic card is stored in a dynamic card template file,
the processing module is further used for analyzing the dynamic card template file by using a logic layer so as to extract the dynamic card template; and
and calling the rendering interface by using the rendering layer, and rendering the dynamic card based on the card data and the dynamic card template.
8. The apparatus of claim 7, the processing module further to:
acquiring the version number of the dynamic card template from the application layer by using the logic layer;
and selecting the dynamic card template file by utilizing the logic layer based on the version number of the dynamic card template.
9. The apparatus as set forth in claim 8,
the acquisition module is used for acquiring the card data of the dynamic card by utilizing the application layer.
10. The device of any one of claims 6-9,
the processing module is further configured to display the UI of the dynamic card in the display area of the dynamic card through an operating system of the terminal device based on the view data of the dynamic card by using a platform layer.
11. An apparatus for generating a user interface, comprising a memory having executable code stored therein and a processor configured to execute the executable code to implement the method of any one of claims 1-5.
12. A terminal device comprising a memory having executable code stored therein and a processor configured to execute the executable code to implement the method of any one of claims 1-5.
CN202111216941.5A 2021-10-19 2021-10-19 User interface generation method and device Pending CN113885996A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111216941.5A CN113885996A (en) 2021-10-19 2021-10-19 User interface generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111216941.5A CN113885996A (en) 2021-10-19 2021-10-19 User interface generation method and device

Publications (1)

Publication Number Publication Date
CN113885996A true CN113885996A (en) 2022-01-04

Family

ID=79003590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111216941.5A Pending CN113885996A (en) 2021-10-19 2021-10-19 User interface generation method and device

Country Status (1)

Country Link
CN (1) CN113885996A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700852A (en) * 2022-09-14 2023-09-05 荣耀终端有限公司 Card display method, terminal, storage medium and program product

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700852A (en) * 2022-09-14 2023-09-05 荣耀终端有限公司 Card display method, terminal, storage medium and program product

Similar Documents

Publication Publication Date Title
WO2018205730A1 (en) Method and device for obtaining smart contract interface in blockchain
CN109634490B (en) List display method, device, equipment and storage medium
CN111221521B (en) Method, device, computer system and readable storage medium for generating log code
US11550599B2 (en) Method and apparatus for running applet
US11210119B2 (en) Method and device for displaying interface, electronic equipment, server, and storage medium
CN110020329B (en) Method, device and system for generating webpage
CN111581555B (en) Document loading method, device, equipment and storage medium
CN107479868B (en) Interface loading method, device and equipment
CN110020231A (en) Webpage capture method and device thereof
CN112817657A (en) Application program starting item loading method, device and system and storage medium
CN108170430B (en) Interface display method and system
CN113885996A (en) User interface generation method and device
CN114186527A (en) Method and device for realizing automatic wiring of integrated circuit independent of grid point
CN113761871A (en) Rich text rendering method and device, electronic equipment and storage medium
CN115543324B (en) Method, device, equipment and medium for generating interactive interface
CN114911541B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN111538667A (en) Page testing method and device
CN115982491A (en) Page updating method and device, electronic equipment and computer readable storage medium
CN112181408A (en) Method and device for displaying view list on front page of application program
CN110647371A (en) Multi-language resource file analysis method and system based on service configuration
CN112433778B (en) Mobile device page display method and device, electronic device and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium
US11438403B2 (en) Page presentation method and system, computer system, and computer readable medium
CN112256252B (en) Interface generation method and device, storage medium and electronic equipment
CN113268221A (en) File matching method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination