CN110874217A - Interface display method and device for fast application and storage medium - Google Patents

Interface display method and device for fast application and storage medium Download PDF

Info

Publication number
CN110874217A
CN110874217A CN201911130083.5A CN201911130083A CN110874217A CN 110874217 A CN110874217 A CN 110874217A CN 201911130083 A CN201911130083 A CN 201911130083A CN 110874217 A CN110874217 A CN 110874217A
Authority
CN
China
Prior art keywords
configuration information
template configuration
application
target
user interface
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.)
Granted
Application number
CN201911130083.5A
Other languages
Chinese (zh)
Other versions
CN110874217B (en
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201911130083.5A priority Critical patent/CN110874217B/en
Publication of CN110874217A publication Critical patent/CN110874217A/en
Application granted granted Critical
Publication of CN110874217B publication Critical patent/CN110874217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the disclosure provides a method and a device for displaying an interface of a fast application and a storage medium, and relates to the technical field of application programs. The method comprises the following steps: receiving an interface display instruction of the fast application; acquiring equipment information of a terminal; determining target template configuration information in a template configuration information set according to the equipment information, wherein the template configuration information set is adapted to at least two types of terminals and comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal; acquiring application data of the fast application; and calling the target template configuration information, and displaying a user interface corresponding to the application data and the target display template. The technical scheme provided by the embodiment of the disclosure avoids the complexity of compiling a plurality of sets of program codes, and is convenient and time-saving.

Description

Interface display method and device for fast application and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of application programs, in particular to a method and a device for displaying an interface of a fast application and a storage medium.
Background
The fast application is a new form application which is ready to search without downloading, uses front-end technology stack development, and has double advantages of HTML 5(Hyper Text Markup Language 5) and native application.
The fast application can be applied to different types and models of equipment, and therefore, related technicians need to write multiple sets of program codes for different types and models of equipment. Each set of program code can only adapt a UI (User Interface) of a fast application to a device of a specific model among a certain class of devices.
Due to the fact that the types and the models of the equipment are numerous, programming of corresponding program codes for the equipment of each type and model is tedious and time-consuming.
Disclosure of Invention
The embodiment of the disclosure provides a quick application interface display method and device and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present disclosure provides an interface display method for a fast application, where the fast application is an application that runs based on a fast application framework integrated in an operating system, and the method includes:
receiving an interface display instruction of the fast application;
acquiring equipment information of a terminal;
determining target template configuration information in a template configuration information set according to the equipment information, wherein the template configuration information set is adapted to at least two types of terminals, the template configuration information set comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal;
acquiring application data of the fast application;
and calling the target template configuration information, and displaying a user interface corresponding to the application data and the target display template.
Optionally, the determining, according to the device information, target template configuration information in a template configuration information set includes:
and comparing the equipment information with the template configuration information in the template configuration information set, and determining the template configuration information conforming to the equipment information as the target template configuration information.
Optionally, the invoking the target template configuration information and displaying the user interface corresponding to the application data and the target display template includes:
adding the application data to a program code of the target template configuration information, and generating the user interface conforming to the target display template through the target template configuration information;
and displaying the user interface.
Optionally, the adding the application data to the program code of the target template configuration information, and generating the user interface conforming to the target display template through the target template configuration information includes:
adding the application data to program code of the target template configuration information;
generating a pending user interface through the target template configuration information, wherein the pending user interface refers to an unrendered user interface;
and rendering the pending user interface in a native rendering mode according to the target template configuration information to generate the user interface conforming to the target display template.
Optionally, the device information includes at least one of a device type, a screen size, a screen resolution, and a screen pixel ratio of the terminal.
Optionally, the acquiring device information of the terminal includes:
and calling a hook function to acquire the equipment information from an operating system of the terminal.
Optionally, the acquiring application data of the fast application includes:
and calling the API of the native application of the fast application through the API of the application programming interface of the fast application, and acquiring the application data through the API of the native application.
In another aspect, an embodiment of the present disclosure provides an interface display apparatus for a fast application, where the fast application is an application running based on a fast application framework integrated in an operating system, and the apparatus includes:
the instruction receiving module is configured to receive an interface display instruction of the fast application;
an information acquisition module configured to acquire device information of a terminal;
the template determining module is configured to determine target template configuration information in a template configuration information set according to the device information, wherein the template configuration information set is adapted to at least two types of terminals, the template configuration information set comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal;
a data acquisition module configured to acquire application data of the fast application;
and the interface display module is configured to call the target template configuration information and display a user interface corresponding to the application data and the target display template.
Optionally, the template determination module is configured to:
and comparing the equipment information with the template configuration information in the template configuration information set, and determining the template configuration information conforming to the equipment information as the target template configuration information.
Optionally, the interface display module includes:
the interface generation submodule is configured to add the application data to the program code of the target template configuration information, and generate the user interface conforming to the target display template through the target template configuration information;
an interface display sub-module configured to display the user interface.
Optionally, the interface generation sub-module is configured to:
adding the application data to program code of the target template configuration information;
generating a pending user interface through the target template configuration information, wherein the pending user interface refers to an unrendered user interface;
and rendering the pending user interface in a native rendering mode according to the target template configuration information to generate the user interface conforming to the target display template.
Optionally, the device information includes at least one of a device type, a screen size, a screen resolution, and a screen pixel ratio of the terminal.
Optionally, the information obtaining module is configured to:
and calling a hook function to acquire the equipment information from an operating system of the terminal.
Optionally, the data acquisition module is configured to:
and calling an API of a native application of the fast application through an API of the application programming interface of the fast application, and acquiring the application data through the API of the native application.
In another aspect, an embodiment of the present disclosure provides an interface display apparatus for a fast application, where the fast application is an application running based on a fast application framework integrated in an operating system, and the apparatus includes:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
receiving an interface display instruction of the fast application;
acquiring equipment information of a terminal;
determining target template configuration information in a template configuration information set according to the equipment information, wherein the template configuration information set is adapted to at least two types of terminals, the template configuration information set comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal;
acquiring application data of the fast application;
and calling the target template configuration information, and displaying a user interface corresponding to the application data and the target display template.
In yet another aspect, the disclosed embodiments provide a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above-described method.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
after receiving an interface display instruction of the fast application, acquiring equipment information of the terminal, determining target template configuration information according to the equipment information, acquiring application data of the fast application, calling the target template configuration information, and displaying a user interface corresponding to the application data and the target display template, so that the user interface adaptive to various different types of terminals can be generated by compiling one set of program codes, the complexity of compiling multiple sets of program codes is avoided, and the development cost of the fast application is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating the launching of a fast application according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method for interface display for a fast application in accordance with an illustrative embodiment;
FIG. 3 is a flow chart illustrating a method for interface display for a fast application in accordance with another illustrative embodiment;
FIG. 4 is a block diagram illustrating a fast application framework in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating an interface display device for a fast application in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an interface display device for a fast application according to another exemplary embodiment;
FIG. 7 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The quick application is a novel application form based on a mobile phone hardware platform, does not need to be installed, is used on demand, and has native application experience (performance, system integration, interaction and the like). Meanwhile, the method is quickly applied to the layer of development specification, capability access, developer service and the like at the beginning of birth, so that standardization and unification among mobile phone manufacturers are realized, and the adaptation cost of developers is greatly reduced.
Compared with the traditional application, the quick application has the following characteristics:
instant: the user can use the method point by point, and the user does not need to wait;
everywhere: deeply integrated with the usage scenario of the cell phone, ubiquitous portal (search, intelligent assistant, intelligent recommendation, application marketplace, browser … …);
efficiency: the quasi-front-end development mode is high in efficiency.
Due to the specificity of fast applications, fast applications are expected to perform more tasks and perform more functions. At present, in the process of gradually improving the functions of the fast application, the embodiment of the present disclosure provides a new function of the fast application, and the new function is utilized to realize that the fast application is displayed in a reasonable and accurate interface template in different terminals, thereby expanding the functions of the fast application and improving the processing capability and the practicability of the fast application.
In the method provided by the embodiment of the present application, the execution subject of each step may be a terminal, the terminal refers to an electronic device having functions of data calculation, processing, storage, and interface display, and the terminal may be a terminal such as a mobile phone, a tablet Computer, a tv (television), a wearable device, a PC (Personal Computer), a sound box with a screen, an intelligent robot, and the like.
The technical solution of the present disclosure will be described below with reference to several embodiments.
FIG. 1 is a flow diagram illustrating a method for interface display for a fast application in accordance with an exemplary embodiment. Referring to fig. 1, the method may be applied to the terminal described above. The method may include the steps of:
in step 101, an interface display instruction of a fast application is received.
Fast applications are applications that run based on a fast application framework integrated in the operating system. The fast application is also an application which can be used as a search without downloading, and has the characteristics of small size, no installation and less occupied resources.
In some possible embodiments, the terminal may further receive a start instruction of the fast application, where the start instruction includes an interface display instruction of the fast application.
In some possible embodiments, the terminal may further receive an interface switching instruction of the fast application, where the interface switching instruction includes an interface display instruction of the fast application.
Optionally, when the interface of the fast application needs to be started or switched, the terminal may receive an interface display instruction of the fast application by recognizing a trigger operation of the user. The trigger operation may include inputting an instruction code, a click operation, a voice input, a gesture operation, and the like.
The click operation may be an icon control or a name control corresponding to the fast click application, and the click operation may include a touch operation, a mouse click operation, and the like.
In step 102, device information of the terminal is acquired.
The method comprises the steps that an application file of the fast application is stored on a fast application platform, when a terminal receives a starting instruction of the fast application for the first time, the terminal obtains the application file of the fast application from the fast application platform, opens the fast application on the terminal, and displays a user interface of the fast application. After the terminal acquires the application file of the fast application, the terminal firstly acquires the own device information, and the device information is used for determining the target template configuration information in the fast application.
In some possible embodiments, the fast application is started in the terminal, the application file is still stored in the terminal, and after receiving the start instruction of the fast application again, the terminal may obtain the device information of itself, and then according to the device information, run the application file stored in the terminal and display the user interface adapted to the terminal, without re-obtaining the application file of the fast application from the fast application platform.
In some possible embodiments, the terminal acquires the device information of the terminal once every time the terminal receives the interface switching instruction of the fast application.
In some possible embodiments, after the application file of the fast application in the terminal is deleted, when the start instruction of the fast application is received again, the application file of the fast application needs to be acquired from the fast application platform again.
Optionally, a hook function is provided in the terminal, and device information is obtained from an operating system of the terminal through the hook function, and the device information may include at least one of a device type, a screen size, a screen resolution, and a screen pixel ratio of the terminal. The device type indicates the type of the terminal, for example, the terminal may include a mobile phone, a tablet computer, a smart watch, a television, and the like; the screen size is used for representing information such as length, width, diagonal length and the like of a terminal screen; the screen resolution refers to the number of pixels displayed on the screen; the screen pixel ratio refers to the aspect ratio of the pixel points.
The equipment information can also comprise equipment model, manufacturer, screen material and the like; the device information refers to device parameters of the terminal, and in the embodiment of the present disclosure, the type and number of the parameters included in the device information are not limited.
In step 103, target template configuration information in the template configuration information set is determined according to the device information.
In some possible embodiments, the template configuration information set is adapted to at least two types of terminals, the template configuration information set includes template configuration information of the at least two types of terminals, and the target template configuration information is used to configure a target display template adapted to a user interface of the terminal. The at least two types of terminals may refer to terminals with different device information, and the different device information may refer to different device information, or different device information.
The display template of the user interface refers to the typesetting and displaying mode of the user interface; the display template can comprise one or more interface elements of tables, pictures, icons, dynamic images, wire frames and the like; the template configuration information may be used to represent the interface elements included in the display template, as well as the display locations of the interface elements in the user interface.
In some possible embodiments, the template configuration information that conforms to the device information is determined as the target template configuration information by comparing the device information with the template configuration information in the template configuration information set.
In some possible embodiments, multiple screens are provided on the same device, and for any one of the screens, the target template configuration information corresponding to the screen may be determined according to the information of the screen.
In some possible embodiments, the target template configuration information may be determined according to one type of device information, or may also be determined according to multiple types of device information, which is not limited in this disclosure.
In step 104, application data for the fast application is obtained.
After determining the target template configuration information, the terminal acquires application data of the fast application; optionally, the application data is used to display a user interface of the fast application on the terminal.
It should be noted that the fast application corresponds to the native application, and optionally, the application data of the fast application is provided by a background server of the native application, so that the terminal invokes an Application Programming Interface (API) of the fast application through the API of the fast application, and obtains the application data through the API of the native application. Wherein, the API of the fast application is obtained by encapsulating the API of the native application.
Alternatively, the background server of the native application may include a third party server, which refers to a background server that is different from the provider of the background server of the fast application.
Alternatively, the third-party server may be a server provided by a developer of the fast application, and the third-party server may be used for storing business data of the fast application.
In step 105, the target template configuration information is invoked, and a user interface corresponding to the application data and the target display template is displayed.
In some possible embodiments, the application data may be displayed in the user interface according to the target display template by combining the application data with the target template configuration information.
To sum up, in the technical scheme provided in the embodiment of the present disclosure, after receiving an interface display instruction of a fast application, device information of a terminal is obtained, target template configuration information is determined according to the device information, application data of the fast application is obtained, the target template configuration information is called, and a user interface corresponding to the application data and the target display template is displayed, so that a user interface adapted to terminals of various different types can be generated by writing one set of program codes, thereby avoiding complexity in writing multiple sets of program codes and saving development cost of the fast application.
Based on fig. 1, in an alternative embodiment, the step 105 may further include the following sub-steps 1051 and 1052:
in step 1051, adding the application data to the program code of the target template configuration information, and generating a user interface conforming to the target display template through the target template configuration information;
in step 1052, a user interface is displayed.
Optionally, the target template configuration information is represented by the program code, the application data is added to the corresponding program code, and the program code is executed, so that the application data can be displayed in the user interface according to the target display template.
The template configuration information may be specification information provided by a fast application platform to a fast application developer, or may be written by the fast application developer.
In some possible embodiments, the above sub-step 1051 may include the following sub-steps:
1. adding the application data to the program code of the target template configuration information;
2. generating a pending user interface through the target template configuration information, wherein the pending user interface refers to an unrendered user interface;
3. and rendering the user interface to be determined in a native rendering mode through the configuration information of the target template to generate the user interface conforming to the target display template.
Rendering is, among other things, a method of generating a visualized image or interface.
In an exemplary embodiment, setting the template configuration information according to the device type, the corresponding program code may include:
t tv/type of device tv
<list-item>ABC</list-item>
<list>
The code, when executed in a television, may display an ABC list. Since the ABC list is declared in the code to be only suitable for use with a television, the program code will not be executed in other devices and the ABC list will not be displayed.
In the implementation manner, the application data is added to the program code of the target template configuration information, and the user interface conforming to the target template is displayed through native rendering, so that the application data can be displayed in the user interface according to the target display template.
FIG. 3 is a block diagram illustrating a fast application framework in accordance with an exemplary embodiment. Referring to fig. 3, the fast application framework includes: scenario portal 320, fast application engine 340, and Operating System (OS) infrastructure & hardware 360.
The scene portal 320 includes at least one of a negative one-screen, a global search, a lock screen, a desktop, an application marketplace, a browser, and a two-dimensional code. The appearance of the scene portal 320 may be in the form of a page and a card.
The fast application engine 340 includes a front end framework 341, a generic scenario 342, a lightweight scenario 343, an embedded SDK (Software Development Kit) 344, and business access 345.
The front-end framework 341 includes MVVM (Model-View-Model), V-DOM, routing, basic API (Application Programming Interface), service API, UI (user Interface) component, and the like;
the general scene 342 and the lightweight scene 343 include a JavaScript engine, a standard rendering engine, an extreme rendering engine, an end-cloud-core acceleration, a security mechanism, an emerging scene (AI (Artificial Intelligence), AR (Augmented Reality), etc.), system integration (application management, rights management, etc.);
service access 345 includes Push (Push), account/payment, etc.
OS infrastructure & hardware 360 includes: a graphics library, a native control, a system service, and a GPU (graphics Processing Unit)/NPU (embedded Neural network processor), etc.
From the execution path level, there are a standard HTML5 approach to support generic Web scenes (typically through the Webview component of the system or customized Webview) and a js (javascript) + Native approach to support a lighter weight, faster experience. The architecture of the fast application engine will be briefly described in terms of 3 levels.
1) Application development (front end framework + component & API capability)
Front-end design for fast applications mirrors and integrates the design ideas of mainstream front-end frameworks (Vue, React, etc.): the application is built in a componentized mode, an MVVM design mode taking data binding as a core is adopted, the performance is improved in a V-DOM mode, and meanwhile, a concise and clear template of the class Vue is selected. Meanwhile, the layout aspect is correspondingly simplified. From the perspective of new application form, native UI mapping and capability opening, a set of components and API specifications need to be defined, and the rapid development and application are convenient to develop.
2) System integration (application management, card-embedded SDK, security mechanism, etc.)
The fast application, as a complete application modality, can be deeply integrated with the system, run as a native application, and interact with the system. There are currently two forms of rapid application: a full screen mode independent application mode and an embedded mode card mode. In the form of independent application, the experience of the user is similar to a native application program, and the method has complete life cycle management, page management, routing and the like. The fast application can be parasitized on the Activity of android, the page is parasitized on the Fragment, and the management and control of the instance are carried out through the independent background Service. The card is another form, and is embedded into each corner of the system as an independent local control through the embedded SDK, so that dynamic content is presented in a light weight mode. In the aspect of security isolation, better security guarantee can be achieved through a sandbox mechanism, process isolation and authority control in combination with the support of an operating system layer.
3) Performance experience & emerging scenes (JavaScript engine, rendering engine, end-cloud-core acceleration, emerging scenes)
In the aspects of interactive experience, resource overhead, stability and the like, the fast application realizes effective combination of a front-end development mode, native rendering and platform capacity by introducing a native rendering path.
Different from cross-platform frameworks of other application layers, the cross-platform framework is fast applied to an operating system planted on a mobile phone, and the deep integration of a chip operating system cloud can be realized. The combination of the end and the cloud takes the acceleration of the starting performance as an example, and the optimization of the network link layer can greatly accelerate the starting speed of the application through the cooperative rendering of the cloud and the end. Meanwhile, the special capability of the hardware platform can be integrated, and the experience is further improved. For example, the calculation power of the NPU can be integrated into a fast application engine by combining with a mobile phone AI chip, so that an AI scene (face recognition, image super-resolution, and the like) can be executed at a low delay and high performance on the end side, the privacy of a user is effectively protected, and the bandwidth is saved.
FIG. 4 is a flowchart illustrating the launching of a fast application according to an exemplary embodiment. Referring to fig. 4, the start-up procedure of the fast application may include:
1) when the system is started for the first time, a user clicks and triggers downloading of a program package of the fast application, and meanwhile initialization related work of the fast application engine is carried out. After the whole fast application program package is downloaded and verified, the JavaScript file of the first page to be displayed is loaded and rendered. The package download in this process is a bottleneck, and from the measured data in the previous period, the package download time of about 200K (Kilobyte) in a normal network is at least more than 400 milliseconds, and the package download time of 2M (megabyte) is more than 2 seconds.
2) The page rendering comprises JavaScript loading, execution of page and JavaScript frame logic, layout operation and drawing of the native UI control. When the logic in the page is executed, one or more network requests (from the page to the application-own three-party server) are generated, and the data returned by the network requests drive the re-rendering of the page until the content of the first screen is completely displayed.
Here, the network request, JavaScript execution, typesetting and drawing are not simply in a serial relationship, but are parallelly interleaved to influence the rendering performance of the whole page, and are strongly related to the logic of page design, the network condition and the running state of the device.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 5 is a block diagram illustrating an interface display apparatus for a fast application according to an example embodiment. The apparatus 500 has functions of implementing the above-mentioned interface display method example of the fast application, and the functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The apparatus 500 may be the terminal described above, or may be provided on the terminal. Referring to fig. 5, the apparatus 500 may include: an instruction receiving module 510, an information obtaining module 520, a template determining module 530, a data obtaining module 540, and an interface display module 550.
The instruction receiving module 510 is configured to receive an interface display instruction of the fast application.
The information obtaining module 520 is configured to obtain device information of the terminal.
The template determining module 530 is configured to determine, according to the device information, target template configuration information in a template configuration information set, where the template configuration information set is adapted to at least two types of terminals, the template configuration information set includes template configuration information of the at least two types of terminals, and the target template configuration information is used to configure a target display template adapted to a user interface of the terminal.
The data obtaining module 540 is configured to obtain application data of the fast application.
The interface display module 550 is configured to invoke the target template configuration information and display a user interface corresponding to the application data and the target display template.
To sum up, in the technical scheme provided in the embodiment of the present disclosure, after receiving an interface display instruction of a fast application, device information of a terminal is obtained, target template configuration information is determined according to the device information, application data of the fast application is obtained, the target template configuration information is called, and a user interface corresponding to the application data and the target display template is displayed, so that a user interface adapted to terminals of various different types can be generated by writing one set of program codes, thereby avoiding complexity in writing multiple sets of program codes and saving development cost of the fast application.
In an exemplary embodiment, the template determining module 530 is configured to compare the device information with the template configuration information in the template configuration information set, and determine the template configuration information conforming to the device information as the target template configuration information.
In an exemplary embodiment, as shown in fig. 6, the interface display module 550 further includes: an interface generation submodule 551 and an interface display submodule 552.
The interface generation submodule 551 is configured to add the application data to the program code of the target template configuration information, and generate the user interface conforming to the target display template through the target template configuration information.
The interface display sub-module 552 is configured to display the user interface.
In an exemplary embodiment, as shown in fig. 6, the interface generation submodule 551 is configured to:
adding the application data to program code of the target template configuration information;
generating a pending user interface through the target template configuration information, wherein the pending user interface refers to an unrendered user interface;
and rendering the pending user interface in a native rendering mode according to the target template configuration information to generate the user interface conforming to the target display template.
In an exemplary embodiment, the device information includes at least one of a device type, a screen size, a screen resolution, and a screen pixel ratio of the terminal.
In an exemplary embodiment, the information acquisition module is configured to: and calling a hook function to acquire the equipment information from an operating system of the terminal.
In an exemplary embodiment, the data acquisition module is configured to: and calling an API of a native application of the fast application through an API of the application programming interface of the fast application, and acquiring the application data through the API of the native application.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure further provides an interface display apparatus for a fast application, which can implement the interface display method for a fast application provided by the present disclosure, where the fast application is an application that runs based on a fast application framework integrated in an operating system. The device includes: a processor, and a memory for storing executable instructions for the processor. Wherein the processor is configured to:
receiving an interface display instruction of the fast application;
acquiring equipment information of a terminal;
determining target template configuration information in a template configuration information set according to the equipment information, wherein the template configuration information set is adapted to at least two types of terminals, the template configuration information set comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal;
acquiring application data of the fast application;
and calling the target template configuration information, and displaying a user interface corresponding to the application data and the target display template.
In some possible designs, the processor is configured to:
and comparing the equipment information with the template configuration information in the template configuration information set, and determining the template configuration information conforming to the equipment information as the target template configuration information.
In some possible designs, the processor is configured to:
adding the application data to a program code of the target template configuration information, and generating the user interface conforming to the target display template through the target template configuration information;
and displaying the user interface.
In some possible designs, the processor is configured to:
adding the application data to program code of the target template configuration information;
generating a pending user interface through the target template configuration information, wherein the pending user interface refers to an unrendered user interface;
and rendering the pending user interface in a native rendering mode according to the target template configuration information to generate the user interface conforming to the target display template.
In some possible designs, the device information includes at least one of a device type, a screen size, a screen resolution, and a screen pixel ratio of the terminal.
In some possible designs, the processor is configured to:
and calling a hook function to acquire the equipment information from an operating system of the terminal.
In some possible designs, the processor is configured to:
and calling the API of the native application of the fast application through the API of the application programming interface of the fast application, and acquiring the application data through the API of the native application.
FIG. 7 is a block diagram illustrating an apparatus in accordance with an example embodiment. For example, the apparatus 700 may be a mobile phone, a computer device, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, apparatus 700 may include one or more of the following components: processing component 702, memory 704, power component 706, multimedia component 708, audio component 710, Input/Output (I/O) interface 712, sensor component 714, and communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 704 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Programmable Read-Only Memory (ROM), Read Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of device 700, sensor assembly 714 may also detect a change in position of device 700 or a component of device 700, the presence or absence of user contact with device 700, orientation or acceleration/deceleration of device 700, and a change in temperature of device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the apparatus 700 and other devices. The apparatus 700 may access a Wireless network based on a communication standard, such as Wi-Fi (Wireless Fidelity), 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for performing the interface display method of the above-described fast Application.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising a computer program, such as the memory 704 comprising a computer program, executable by the processor 720 of the apparatus 700 to perform the interface display method of the fast application is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a RAM, a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It should be understood that reference to "a plurality" herein means two or more. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. An interface display method for a fast application, wherein the fast application is an application running based on a fast application framework integrated in an operating system, the method comprising:
receiving an interface display instruction of the fast application;
acquiring equipment information of a terminal;
determining target template configuration information in a template configuration information set according to the equipment information, wherein the template configuration information set is adapted to at least two types of terminals, the template configuration information set comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal;
acquiring application data of the fast application;
and calling the target template configuration information, and displaying a user interface corresponding to the application data and the target display template.
2. The method of claim 1, wherein determining the target template configuration information in the set of template configuration information according to the device information comprises:
and comparing the equipment information with the template configuration information in the template configuration information set, and determining the template configuration information conforming to the equipment information as the target template configuration information.
3. The method of claim 1, wherein said invoking the target template configuration information to display a user interface corresponding to the application data and the target display template comprises:
adding the application data to a program code of the target template configuration information, and generating the user interface conforming to the target display template through the target template configuration information;
and displaying the user interface.
4. The method of claim 3, wherein adding the application data to the program code of the target template configuration information, generating the user interface conforming to the target display template from the target template configuration information comprises:
adding the application data to program code of the target template configuration information;
generating a pending user interface through the target template configuration information, wherein the pending user interface refers to an unrendered user interface;
and rendering the pending user interface in a native rendering mode according to the target template configuration information to generate the user interface conforming to the target display template.
5. The method according to any one of claims 1 to 4, wherein the device information includes at least one of a device type, a screen size, a screen resolution, and a screen pixel ratio of the terminal.
6. The method according to any one of claims 1 to 4, wherein the acquiring the device information of the terminal comprises:
and calling a hook function to acquire the equipment information from an operating system of the terminal.
7. The method according to any one of claims 1 to 4, wherein the obtaining application data of the fast application comprises:
and calling the API of the native application of the fast application through the API of the application programming interface of the fast application, and acquiring the application data through the API of the native application.
8. An interface display apparatus for a fast application, wherein the fast application is an application that runs based on a fast application framework integrated in an operating system, the apparatus comprising:
the instruction receiving module is configured to receive an interface display instruction of the fast application;
an information acquisition module configured to acquire device information of a terminal;
the template determining module is configured to determine target template configuration information in a template configuration information set according to the device information, wherein the template configuration information set is adapted to at least two types of terminals, the template configuration information set comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal;
a data acquisition module configured to acquire application data of the fast application;
and the interface display module is configured to call the target template configuration information and display a user interface corresponding to the application data and the target display template.
9. The apparatus of claim 8, wherein the template determination module is configured to:
and comparing the equipment information with the template configuration information in the template configuration information set, and determining the template configuration information conforming to the equipment information as the target template configuration information.
10. The apparatus of claim 8, wherein the interface display module comprises:
the interface generation submodule is configured to add the application data to the program code of the target template configuration information, and generate the user interface conforming to the target display template through the target template configuration information;
an interface display sub-module configured to display the user interface.
11. The apparatus of claim 10, wherein the interface generation submodule is configured to:
adding the application data to program code of the target template configuration information;
generating a pending user interface through the target template configuration information, wherein the pending user interface refers to an unrendered user interface;
and rendering the pending user interface in a native rendering mode according to the target template configuration information to generate the user interface conforming to the target display template.
12. The apparatus according to any one of claims 8 to 11, wherein the device information includes at least one of a device type, a screen size, a screen resolution, and a screen pixel ratio of the terminal.
13. The apparatus according to any one of claims 8 to 11, wherein the information acquisition module is configured to:
and calling a hook function to acquire the equipment information from an operating system of the terminal.
14. The apparatus of any of claims 8 to 11, wherein the data acquisition module is configured to:
and calling an API of a native application of the fast application through an API of the application programming interface of the fast application, and acquiring the application data through the API of the native application.
15. An interface display apparatus for a fast application, wherein the fast application is an application that runs based on a fast application framework integrated in an operating system, the apparatus comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
receiving an interface display instruction of the fast application;
acquiring equipment information of a terminal;
determining target template configuration information in a template configuration information set according to the equipment information, wherein the template configuration information set is adapted to at least two types of terminals, the template configuration information set comprises template configuration information of the at least two types of terminals, and the target template configuration information is used for configuring a target display template adapted to a user interface of the terminal;
acquiring application data of the fast application;
and calling the target template configuration information, and displaying a user interface corresponding to the application data and the target display template.
16. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201911130083.5A 2019-11-18 2019-11-18 Interface display method and device for quick application and storage medium Active CN110874217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911130083.5A CN110874217B (en) 2019-11-18 2019-11-18 Interface display method and device for quick application and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911130083.5A CN110874217B (en) 2019-11-18 2019-11-18 Interface display method and device for quick application and storage medium

Publications (2)

Publication Number Publication Date
CN110874217A true CN110874217A (en) 2020-03-10
CN110874217B CN110874217B (en) 2023-08-15

Family

ID=69718084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911130083.5A Active CN110874217B (en) 2019-11-18 2019-11-18 Interface display method and device for quick application and storage medium

Country Status (1)

Country Link
CN (1) CN110874217B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857712A (en) * 2020-06-30 2020-10-30 深圳市中农易讯信息技术有限公司 Form processing method, device, terminal and medium
CN112433725A (en) * 2020-11-26 2021-03-02 泰康保险集团股份有限公司 Interface generation method and device, electronic equipment and storage medium
CN112751836A (en) * 2020-12-24 2021-05-04 华人运通(上海)云计算科技有限公司 Vehicle data display method, device, storage medium and system
CN113296770A (en) * 2021-04-28 2021-08-24 厦门科灿信息技术有限公司 Equipment management interface generation method and device and terminal
WO2021223178A1 (en) * 2020-05-07 2021-11-11 深圳市欢太科技有限公司 User interface processing method and related apparatus
CN113986387A (en) * 2021-10-28 2022-01-28 上海米哈游璃月科技有限公司 Project configuration information loading method and device, electronic equipment and storage medium
CN114281451A (en) * 2021-12-10 2022-04-05 西安万像电子科技有限公司 Method and device for self-adapting screens with different resolutions by application interface and electronic equipment
CN114356464A (en) * 2020-10-13 2022-04-15 阿里巴巴集团控股有限公司 User interface adaptation method, rendering method, device, equipment and storage medium
CN114443161A (en) * 2021-12-31 2022-05-06 北京达佳互联信息技术有限公司 Application docking method, device, equipment and storage medium
CN115981588A (en) * 2023-03-16 2023-04-18 中国邮电器材集团有限公司 Multi-terminal data display method, equipment and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043368A (en) * 2006-06-30 2007-09-26 华为技术有限公司 Method and system for unifying Web pages
US20140075283A1 (en) * 2012-09-07 2014-03-13 Vistaprint Technologies Limited Website Builder Systems and Methods with Device Detection to Adapt Rendering Behavior Based on Device Type
CN104267921A (en) * 2014-09-29 2015-01-07 广州华多网络科技有限公司 Page display control method and server
CN104407779A (en) * 2014-12-15 2015-03-11 北京国双科技有限公司 Arrangement display method and device for graphical interface
CN109375967A (en) * 2018-08-27 2019-02-22 北京达佳互联信息技术有限公司 Application Program Interface display methods and device, mobile terminal and storage medium
CN110035181A (en) * 2019-04-12 2019-07-19 维沃移动通信有限公司 It is a kind of to apply card theme setting method and terminal fastly

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043368A (en) * 2006-06-30 2007-09-26 华为技术有限公司 Method and system for unifying Web pages
US20140075283A1 (en) * 2012-09-07 2014-03-13 Vistaprint Technologies Limited Website Builder Systems and Methods with Device Detection to Adapt Rendering Behavior Based on Device Type
CN104267921A (en) * 2014-09-29 2015-01-07 广州华多网络科技有限公司 Page display control method and server
CN104407779A (en) * 2014-12-15 2015-03-11 北京国双科技有限公司 Arrangement display method and device for graphical interface
CN109375967A (en) * 2018-08-27 2019-02-22 北京达佳互联信息技术有限公司 Application Program Interface display methods and device, mobile terminal and storage medium
CN110035181A (en) * 2019-04-12 2019-07-19 维沃移动通信有限公司 It is a kind of to apply card theme setting method and terminal fastly

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021223178A1 (en) * 2020-05-07 2021-11-11 深圳市欢太科技有限公司 User interface processing method and related apparatus
CN115136117A (en) * 2020-05-07 2022-09-30 深圳市欢太科技有限公司 User interface processing method and related device
CN111857712A (en) * 2020-06-30 2020-10-30 深圳市中农易讯信息技术有限公司 Form processing method, device, terminal and medium
CN114356464A (en) * 2020-10-13 2022-04-15 阿里巴巴集团控股有限公司 User interface adaptation method, rendering method, device, equipment and storage medium
CN112433725A (en) * 2020-11-26 2021-03-02 泰康保险集团股份有限公司 Interface generation method and device, electronic equipment and storage medium
CN112751836A (en) * 2020-12-24 2021-05-04 华人运通(上海)云计算科技有限公司 Vehicle data display method, device, storage medium and system
CN113296770A (en) * 2021-04-28 2021-08-24 厦门科灿信息技术有限公司 Equipment management interface generation method and device and terminal
CN113986387A (en) * 2021-10-28 2022-01-28 上海米哈游璃月科技有限公司 Project configuration information loading method and device, electronic equipment and storage medium
CN114281451A (en) * 2021-12-10 2022-04-05 西安万像电子科技有限公司 Method and device for self-adapting screens with different resolutions by application interface and electronic equipment
CN114443161A (en) * 2021-12-31 2022-05-06 北京达佳互联信息技术有限公司 Application docking method, device, equipment and storage medium
CN114443161B (en) * 2021-12-31 2024-05-28 北京达佳互联信息技术有限公司 Application docking method, device, equipment and storage medium
CN115981588A (en) * 2023-03-16 2023-04-18 中国邮电器材集团有限公司 Multi-terminal data display method, equipment and system
CN115981588B (en) * 2023-03-16 2023-09-26 中国邮电器材集团有限公司 Multi-terminal data display method, device and system

Also Published As

Publication number Publication date
CN110874217B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN110874217B (en) Interface display method and device for quick application and storage medium
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
CN110990105B (en) Interface display method and device, electronic equipment and storage medium
CN110865863B (en) Interface display method and device for fast application and storage medium
CN109460233B (en) Method, device, terminal equipment and medium for updating native interface display of page
CN110990075B (en) Method, device, equipment and storage medium for starting fast application
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
CN111026490B (en) Page rendering method and device, electronic equipment and storage medium
CN110851240B (en) Function calling method, device and storage medium
US20210173681A1 (en) Method and device for displaying interface, electronic equipment, server, and storage medium
CN111008057A (en) Page display method and device and storage medium
CN110928543A (en) Page processing method and device and storage medium
CN110968362B (en) Application running method, device and storage medium
CN110865864B (en) Interface display method, device and equipment for quick application and storage medium
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
CN110971974B (en) Configuration parameter creating method, device, terminal and storage medium
CN111427622A (en) Method and device for executing script codes in application program
CN107728809A (en) A kind of application interface display methods, device and storage medium
CN110908629A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN111104183B (en) Application program running method and device, electronic equipment and storage medium
US11194598B2 (en) Information display method, terminal and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN111338961B (en) Application debugging method and device, electronic equipment and storage medium
EP3835967A1 (en) Card data display method and apparatus, and storage medium
CN110865760A (en) Electronic equipment operation method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant