Nothing Special   »   [go: up one dir, main page]

CN114356464A - User interface adaptation method, rendering method, device, equipment and storage medium - Google Patents

User interface adaptation method, rendering method, device, equipment and storage medium Download PDF

Info

Publication number
CN114356464A
CN114356464A CN202011093022.9A CN202011093022A CN114356464A CN 114356464 A CN114356464 A CN 114356464A CN 202011093022 A CN202011093022 A CN 202011093022A CN 114356464 A CN114356464 A CN 114356464A
Authority
CN
China
Prior art keywords
program
applet
package
application program
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.)
Pending
Application number
CN202011093022.9A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202011093022.9A priority Critical patent/CN114356464A/en
Publication of CN114356464A publication Critical patent/CN114356464A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure relates to a user interface adaptation method, a rendering device, equipment and a storage medium, wherein a request message containing a screen parameter and an application program identifier of terminal equipment is sent to a server, so that the server obtains a first program package of the application program according to the identifier of the application program, obtains a second UI material matched with the screen parameter of the terminal equipment according to the first UI material in the first program package, generates a second program package of the application program according to the second UI material, and sends the second program package to the terminal equipment, so that the terminal equipment can render a user of the application program according to the second UI material. According to the scheme provided by the embodiment of the disclosure, the user interface of the application program can be adapted to the terminal devices with different screen sizes, and the display effect and the user experience of the user interface are improved.

Description

User interface adaptation method, rendering method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of data processing, and in particular, to an adaptation method, a rendering method, an adaptation device, a rendering device, a piece of equipment, and a storage medium for a user interface.
Background
The applet is an application program which can be used without downloading and installation and has the characteristics of convenience and quickness in use. With the continuous development of the technology of the internet of things, more and more applets are used on terminal devices of the internet of things, but with the development of the technology of the internet of things, the problem of how to adapt user interfaces of the same applet to different terminal screen sizes is solved, and no better solution is provided at present.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide an adaptation method, a rendering method, an apparatus, a device, and a storage medium for a user interface.
A first aspect of an embodiment of the present disclosure provides a method for adapting a user interface, where the method includes: receiving a request message of a terminal device for requesting a program package, wherein the request message comprises a screen parameter of the terminal device and an identifier of an application program; acquiring a first program package of the application program according to the identifier of the application program; acquiring a second User Interface (UI) material matched with the screen parameter of the terminal equipment according to a first UI resource included in the first program package; and generating a second program package of the application program according to the second UI materials, and sending the second program package to the terminal equipment so that the terminal equipment can render the user interface of the application program based on the second UI materials in the second program package.
A second aspect of an embodiment of the present disclosure provides a rendering method of a user interface, including: when the triggering operation of a user on the application program is detected, acquiring an identifier of the application program; acquiring a second program package according to the identifier of the application program, wherein the second program package is generated according to a second UI material corresponding to the application program, the second UI material is obtained by conversion according to a first UI material in a first program package corresponding to the application program, and the second UI material is matched with the screen parameter of the terminal equipment bearing the application program; rendering the user interface of the application based on the second UI material in the second package.
A third aspect of the embodiments of the present disclosure provides a method for adapting a user interface, where the method includes: receiving a request message of a terminal device for requesting a program package, wherein the request message comprises an identifier of the terminal device and an identifier of an application program; acquiring a first program package of the application program according to the identifier of the application program; acquiring screen parameters of the terminal equipment according to the identifier of the terminal equipment; acquiring a second User Interface (UI) material matched with the screen parameter according to a first UI material included in the first program package; and generating a second program package of the application program according to the second UI material, and sending the second program package to the terminal equipment so that the terminal equipment renders the user interface of the application program based on the second UI material in the second program package.
A fourth aspect of the embodiments of the present disclosure provides a method for adapting a user interface, including: receiving a request message for requesting an applet package sent by terminal equipment of the Internet of things, wherein the applet refers to an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the Internet of things and an identification of the applet; acquiring a first program package of the small program according to the identifier of the small program; acquiring a second UI material matched with the screen parameter of the terminal equipment of the Internet of things according to the first UI material included in the first program package; and generating a second program package of the applet according to the second UI material, and sending the second program package to the terminal equipment of the Internet of things, so that the terminal equipment of the Internet of things renders the user interface of the applet based on the second UI material in the second program package.
A fifth aspect of an embodiment of the present disclosure provides a rendering method for a user interface, where the method includes: when the triggering operation of a user on the applet is detected, acquiring an identifier of the applet, wherein the applet refers to an application program which can be used without downloading and installing; acquiring a second program package of the applet according to the identifier of the applet, wherein the second program package is generated according to a second UI material corresponding to the applet, the second UI material is obtained by conversion according to a first UI material in the first program package corresponding to the applet, and the second UI material is matched with a screen parameter of a terminal device bearing the applet; rendering the user interface of the applet based on the second UI material in the second package.
A sixth aspect of the embodiments of the present disclosure provides an apparatus for adapting a user interface, including:
and the receiving module is used for receiving a request message of the terminal equipment for requesting the program package, wherein the request message comprises the screen parameters of the terminal equipment and the identification of the application program.
And the acquisition module is used for acquiring the first program package of the application program according to the identification of the application program.
And the conversion module is used for acquiring a second UI material matched with the screen parameter of the terminal equipment according to the first UI material included in the first program package.
And the generating module is used for generating a second program package of the application program according to the second UI material.
And the first sending module is used for sending the second program package to the terminal equipment so that the terminal equipment can render the user interface of the application program based on the second UI materials in the second program package.
A seventh aspect of the embodiments of the present disclosure provides a rendering apparatus of a user interface, including:
the first acquisition module is used for acquiring the identifier of the application program when the triggering operation of the application program by a user is detected.
And the second obtaining module is used for obtaining a second program package according to the identifier of the application program, wherein the second program package is generated according to a second UI material corresponding to the application program, the second UI material is obtained by conversion according to a first UI material in the first program package corresponding to the application program, and the second UI material is matched with the screen parameter of the terminal equipment bearing the application program.
And the rendering module is used for rendering the user interface of the application program based on the second UI material in the second program package.
An eighth aspect of the embodiments of the present disclosure provides an adapting device of a user interface, including:
and the receiving module is used for receiving a request message of the terminal equipment for requesting the program package, wherein the request message comprises the identifier of the terminal equipment and the identifier of the application program.
And the first acquisition module is used for acquiring the first program package of the application program according to the identification of the application program.
And the second acquisition module is used for acquiring the screen parameters of the terminal equipment according to the identifier of the terminal equipment.
And the conversion module is used for acquiring second UI materials matched with the screen parameters according to the first UI materials included in the first program package.
And the generating module is used for generating a second program package of the application program according to the second UI material.
And the sending module is used for sending the second program package to the terminal equipment so that the terminal equipment can render the user interface of the application program based on the second UI materials in the second program package.
A ninth aspect of the embodiments of the present disclosure provides an adaptation apparatus of a user interface, including:
the receiving module is used for receiving a request message which is sent by the terminal equipment of the Internet of things and used for requesting the applet package, wherein the applet refers to an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the Internet of things and identification of the applet.
And the applet searching module is used for acquiring a first program package of the applet according to the identification of the applet.
And the small program resource transcoding module is used for acquiring a second UI material matched with the screen parameter according to the first UI material included in the first program package.
And the applet resource packaging module is used for generating a second program package of the applet according to the second UI material.
And the program package issuing module is used for sending the second program package to the Internet of things terminal equipment so that the Internet of things terminal equipment renders the user interface of the applet based on the second UI material in the second program package.
A tenth aspect of the embodiments of the present disclosure provides a rendering apparatus of a user interface, including:
and the applet scheduling module is used for acquiring the identification of the applet when the trigger operation of the user on the applet is detected, wherein the applet refers to the application program which can be used without downloading and installing.
And the acquisition module is used for acquiring a second program package of the applet according to the identifier of the applet, wherein the second program package is generated according to a second UI material corresponding to the applet, the second UI material is obtained by conversion according to a first UI material in the first program package corresponding to the applet, and the second UI material is matched with the screen parameter of the terminal equipment bearing the applet.
And the applet rendering module is used for rendering the user interface of the applet based on the second UI material in the second program package.
An eleventh aspect of an embodiment of the present disclosure provides a server, including:
a processor and a memory; wherein the memory is used for storing the computer program; a processor for executing the computer program, when executed by the processor, implementing the method of the first or third aspect.
A twelfth aspect of an embodiment of the present disclosure provides a terminal device, including: a processor, a memory and a display screen; the display screen is used for displaying a user interface of an application program loaded on the terminal equipment; a memory for storing a computer program; a processor for executing the computer program, which when executed by the processor may implement the method of the second aspect described above.
A thirteenth aspect of the embodiments of the present disclosure provides an internet of things server, including: a processor and a memory; a memory for storing a computer program; a processor for executing the computer program, which when executed by the processor may implement the method of: receiving a request message for requesting an applet package sent by terminal equipment of the Internet of things, wherein the applet refers to an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the Internet of things and an identification of the applet; acquiring a first program package of the small program according to the identifier; acquiring a second UI material matched with the screen parameter according to the first UI material included in the first program package; and generating a second program package of the applet according to the second UI material, and sending the second program package to the terminal equipment of the Internet of things, so that the terminal equipment of the Internet of things renders the user interface of the applet based on the second UI material in the second program package.
A fourteenth aspect of the embodiments of the present disclosure provides an internet of things terminal device, including: a processor, a memory and a display screen; the display screen is used for displaying a user interface of an application program loaded on the terminal equipment; a memory for storing a computer program; a processor for executing the computer program, which when executed by the processor, implements the method of: when the triggering operation of a user on the applet is detected, acquiring an identifier of the applet, wherein the applet refers to an application program which can be used without downloading and installing; acquiring a second program package of the applet according to the identifier of the applet, wherein the second program package is generated according to a second UI material corresponding to the applet, the second UI material is obtained by conversion according to a first UI material in the first program package corresponding to the applet, and the second UI material is matched with a screen parameter of terminal equipment bearing the lower program; rendering the user interface of the applet based on the second UI material in the second package.
A fifteenth aspect of embodiments of the present disclosure provides a computer-readable storage medium having a computer program stored therein, which, when executed by a processor, can implement the method of any one of the first to fourth aspects described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
according to the method and the device for rendering the user interface of the application program, the request message containing the screen parameter of the terminal device and the application program identifier is sent to the server, so that the server obtains the first program package of the application program according to the identifier of the application program, obtains the second UI material matched with the screen parameter of the terminal device according to the first UI material in the first program package, generates the second program package of the application program according to the second UI material, and renders the user interface of the application program according to the second UI material by sending the second program package to the terminal device. According to the method and the device, the UI materials of the application program can be converted, so that the UI materials issued to the terminal equipment are all the UI materials matched with the screen parameters of the terminal equipment, and the user interface of the application program can obtain a good display effect on the terminal equipment with different screen sizes. Moreover, when a developer of the scheme based on the embodiment of the disclosure develops an application program, the developer does not need to design different packages for terminal devices with different screen sizes, so that a large amount of work and time can be saved, and the packages of the application program can be miniaturized.
In addition, because the conversion operation of the UI material is executed on the server in the embodiment of the present disclosure, the requirement on the processing capability of the terminal device is reduced, for the terminal device with weak processing capability, especially for a part of terminal devices in the internet of things, the scheme in the embodiment of the present disclosure can perform effective adaptation on the user interfaces on the devices, especially for the download-free and installation-free application program such as the applet, because the program runs mainly by acquiring the program package from the server, for the network of the internet of things, which includes more devices, has a larger size span of the device screen, and has weak processing capability for a part of devices, the application of the applet is limited, but obviously, the scheme provided in the embodiment of the present disclosure can eliminate the use limitation of the applet in the internet of things, broadens the use range of the applet, the types of available application programs in the Internet of things are increased, and the development of the Internet of things is promoted.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic diagram of an adaptation scenario of a user interface provided by an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a method for adapting a user interface according to an embodiment of the present disclosure;
fig. 3A is a schematic diagram of a display interface of a terminal device according to an embodiment of the present disclosure;
fig. 3B is a schematic diagram of a display interface of another terminal device provided in the embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a method for adapting a user interface provided by an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a correspondence relationship between an application program and a package according to an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a rendering method of a user interface according to another embodiment of the disclosure;
FIG. 7 is a flowchart illustrating a method for adapting a user interface according to an embodiment of the present disclosure;
FIG. 8 is a flowchart illustrating a rendering method of a user interface according to another embodiment of the present disclosure;
FIG. 9 is a schematic structural diagram of an adapting device of a user interface provided by an embodiment of the present disclosure;
FIG. 10 is a schematic structural diagram of an adapting device of a further user interface provided by the embodiment of the present disclosure;
FIG. 11 is a schematic structural diagram of a rendering apparatus for a user interface provided in an embodiment of the present disclosure;
FIG. 12 is a schematic structural diagram of an adapting device of a further user interface provided by the embodiment of the present disclosure;
FIG. 13 is a schematic structural diagram of a rendering apparatus for a user interface provided in an embodiment of the present disclosure;
FIG. 14 is a schematic structural diagram of an adapting device of a user interface provided by an embodiment of the present disclosure;
fig. 15 is a schematic structural diagram of a server provided in the embodiment of the present disclosure;
fig. 16 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
For the sake of understanding, some terms related to the embodiments of the present disclosure are first explained:
an Integrated Development Environment (IDE) is an application program for providing a program Development Environment, and generally includes tools such as a code editor, a compiler, a debugger, and a graphical user interface. The IDE integrates a code writing function, an analysis function, a compiling function, a debugging function and the like into a whole to develop a software service suite.
The small program: the applet is an application program that can be used without downloading and installing, and the user can open the applet by a specific operation, such as scanning or searching, in the application program of the terminal device. The applet is readily available without installation and uninstallation, and the user does not need to be concerned about the problem of installing too many applications.
A User Agent (UA) is a special character string header, and can send its own hardware and/or software information to a server through a UA character string terminal device, and the server can identify information such as an operating system, an operating system version, a CPU type, a browser version, a browser rendering engine, a browser language, a browser plug-in, and the like of the terminal device based on the UA character string.
The screen resolution refers to the number of pixel points in the horizontal and vertical directions of the screen, and the unit is px, and 1px is 1 pixel point. The resolution of a screen is typically described in vertical pixels by horizontal pixels (e.g., 1960 by 1080).
The pixel density (dots per inch, dpi for short) refers to the number of pixels in one square inch area. Common values are 120, 160, 240.
A device independent pixel (dp) is a physical measurement unit, and its calculation formula can be generally expressed as: px is dp (dpi/160), and the larger the screen resolution is, the more pixels corresponding to 1dp are.
The following describes aspects of embodiments of the present disclosure.
In the related art, application programs can be generally divided into two types, one type of application program is an application program which needs to be downloaded and installed to be used, and UI materials of the application program are downloaded and stored on terminal equipment; another type of application is an application that can be used without downloading and installing, also known as an applet, whose UI material needs to be downloaded from a server each time it is run. However, no matter which of the two applications is used, in order to enable the user interface of the same application to obtain the same or similar display effect on the terminal devices with different screen resolutions, research and development personnel generally need to design various UI materials for various screen resolutions during research and development.
For example, in an android system, in order to ensure that different users can obtain consistent user experience, so that a user interface of an application program has the same or similar display effect on android devices with different sizes and different screen resolutions, research and development personnel need to design different UI materials for different screen resolutions in an IDE of an android, and the UI materials are stored in corresponding folders. When a terminal device requests a package of an application program, UI materials matching the screen resolution of the terminal device are acquired from a corresponding folder, for example, for a terminal device with a screen resolution of 1080x1920, a UI material with a resolution of 1080x1920 needs to be designed, the materials are stored in a folder "values-xxhdpi" representing the resolution of 1080x1920 in the package, for a terminal device with a screen resolution of 320x480, a UI material with a resolution of 320x480 needs to be designed, the materials are stored in a folder "values-mdpi" representing the resolution of 320x480 in the package, for a terminal device with a screen resolution of 480x800, a UI material with a resolution of 480x800 needs to be designed, and the materials are stored in a folder "values-hdpi" representing the resolution of 480x800 in the package.
By analogy, when the application program is adapted to terminal devices with several resolutions, several UI materials need to be designed, and UI materials with different resolutions are stored in different folders. Although the user interface adaptation method provided by the related art can solve the adaptation problem of the user interface on a certain program, the method still has the following defects:
1. in the network that equipment resolution ratio span is great such as thing networking, the resolution ratio of equipment generally varies from 160P to 8K, unlike mobile terminal such as cell-phone, the span of screen size is not big, even do simple drawing and zoom to user interface, can not have great influence to user's experience yet, because resolution ratio span between the equipment is great in the thing networking, if just simply stretch and zoom to user interface, will seriously reduce user interface's display effect, influence user experience. If a corresponding UI material is designed for each resolution device, huge workload is caused because of numerous devices and large resolution span between devices.
2. The large amount of UI materials carried will result in a huge program package of the application program, and in networks such as the internet of things, the read only memory (ROM for short) of some devices is small, and too large program package will occupy too much memory, and is not suitable for devices with small memory. Moreover, with the development of the internet of things, the application requirements of the internet of things on various application programs, especially applets, are rapidly increasing, and it is obvious that the user interface adaptation method provided by the related technology cannot meet the use requirements of the internet of things.
3. Research and development personnel need to pay attention to the operation scene of the application program, namely, the screen resolutions of various devices in the application scene need to be counted, so that different UI materials can be designed for the devices with different screen resolutions, and the research and development difficulty is high.
In still other related arts, there is also provided a method of converting UI materials of an application program into UI materials matching the screen resolution of a terminal device by the terminal device itself. However, the method has a high requirement on the processing capacity of the terminal device, and the processing capacity of partial devices in networks such as the internet of things is weak, so that the method cannot be used. For example, taking a smart television as an example, a common smart television generally carries a Random Access Memory (RAM) of 1G to 2G, while a RAM carried by a general mobile phone generally varies from 4G to 8G. Compared with a mobile phone, the processing capability of the smart television is weak, and although the method for converting the UI material through the terminal device can be applied to the mobile phone, the method is obviously not suitable for being applied to the smart television, so that the problem of adaption of the user interface on all devices in the network cannot be solved through the method for converting the UI material through the terminal device.
In addition, some related technologies also provide a method of dot 9 map, which can also solve the problem of adapting a user interface to different terminal devices, but the method can only be applied to a control with a single color (for example, a button on the user interface, etc.) on the user interface, and cannot be applied to the entire user interface, and therefore, the problem of adapting the user interface cannot be solved well.
In view of the foregoing drawbacks of the related art, the embodiment of the present disclosure provides a new user interface adaptation and rendering scheme, and for example, fig. 1 is a schematic diagram of an adaptation scenario of a user interface provided by the embodiment of the present disclosure, where the scenario may be exemplarily understood as a scenario in which a user downloads an application or opens an applet, and a terminal device and a server in the scenario may be exemplarily understood as devices in the same network (for example, any one of the internet of things, the internet, and the mobile internet, but not limited to these networks), where the terminal device may be understood as a device that is equipped with a screen and has an interface rendering function and an information transceiving function, for example, in the embodiment of the present disclosure, the terminal device may be specifically a mobile phone, a smart television, a computer tablet, a wearable device, a Personal Digital Assistant (Personal Digital Assistant, PDA for short), smart car, or other internet of things devices, but the terminal device in this embodiment may not be limited to these devices in other embodiments. As shown in fig. 1, a developer develops an application in the IDE and sends the developed package to a server for storage. When the application program is developed, a developer can develop a set of UI materials only for a set of screen parameters, and can also develop multiple sets of UI materials for different screen parameters, where the screen parameters at least include but are not limited to one of the following: screen resolution, pixel density of the screen, screen size.
Taking only developing a set of UI materials as an example, when a user performs a specific trigger operation on an application program, for example, clicking the application program to download, or scanning, searching, or selecting a certain applet from a list in the applet, the terminal device obtains an identifier of the application program and its own screen parameter, and carries the identifier of the application program and the screen parameter in a request message to send to the server. The identifier of the application program may be obtained by scanning the two-dimensional code of the application program exemplarily, or obtained according to a mapping relationship between the application program and the identifier of the application program, which is not specifically limited in this embodiment of the present disclosure. The screen parameters of the terminal device may be obtained through, but not limited to, an Application Program Interface (API) on the terminal device. The screen parameters include, but are not limited to, one or more of the following: screen resolution, pixel density of the screen, screen size. The identifier of the application program and the screen parameter of the terminal device may be carried in a User Agent (UA) and sent to the server through a request message.
And after receiving the request message of the terminal equipment, the server searches and obtains a program package corresponding to the application program from the stored program packages according to the identification of the application program. By traversing the UI materials in the application package, the UI materials in the package are all converted into the UI materials matched with the screen parameters of the terminal equipment, then packaging the converted UI materials, sending a program package containing the converted UI materials to the terminal equipment, so that the terminal device renders the interface of the application program based on the converted UI materials, for example, the screen resolution corresponding to the UI materials in the original package is 1080x1920, the screen resolution of the terminal device is 480x800, the UI material with the original resolution of 1080x1920 is converted into UI material with the resolution of 480x800, then packages the UI material with the resolution of 480x800, transmits a package containing the UI material with the resolution of 480x800 to the terminal device, the method for UI material conversion may be set as needed, and the embodiment of the present disclosure is not particularly limited.
According to the method and the device, the UI material of the application program is converted into the UI material matched with the screen parameter of the terminal device through the server, and then the program package containing the UI material is issued to the terminal device, so that the problem of adaption between the user interface of the application program and the terminal device is solved. And because the server has the function of converting UI materials, research and development personnel do not need to design different UI materials aiming at different screen parameters when researching and developing the application program, and even only need to design one set of UI materials in some scenes, thereby saving a large amount of research and development work and time and simultaneously realizing the miniaturization of the program package. In addition, the UI materials are converted on the server, the requirement on the processing capacity of the terminal equipment can be lowered, the scheme provided by the embodiment of the disclosure can be widely applied to equipment with various processing capacities, especially for networks with weak processing capacities of some equipment such as the Internet of things, the scheme provided by the embodiment of the disclosure can well solve the adaptation problem of all equipment in the network, the application limit of application programs, especially small programs, in the networks such as the Internet of things is reduced, the application range of the application programs is expanded, and the types and functions of the application programs in the Internet of things are enriched.
In order to better understand the technical solutions of the embodiments of the present disclosure, the solutions of the embodiments of the present disclosure are described below with reference to exemplary embodiments.
Fig. 2 is a flowchart of an adaptation method of a user interface provided by an embodiment of the present disclosure, which may be executed by a server. The server has graphics processing capability and information transceiving capability. The server is used for interacting with the terminal equipment and sending the program package of the application program to the terminal equipment according to the request of the terminal equipment. As shown in fig. 2, the method provided by this embodiment includes:
step 201, receiving a request message of the terminal device for requesting the program package, where the request message includes a screen parameter of the terminal device and an identifier of the application program.
Step 202, acquiring a first package of the application program according to the identifier of the application program.
And step 203, acquiring second UI materials matched with the screen parameters according to the first UI materials included in the first program package.
And step 204, generating a second program package of the application program according to the second UI material, and sending the second program package to the terminal device, so that the terminal device renders the user interface of the application program based on the second UI material in the second program package.
The first package referred to in this embodiment is a pre-stored package corresponding to the application identifier carried in the request message.
The application program referred to in this embodiment may be understood as an applet that can be used without being downloaded and installed, or an application program that can be used without being downloaded and installed. When the application program referred to in this embodiment is specifically an application program that needs to be downloaded and installed for use, the program package requested by the terminal device from the server is an installation package of the application program, and the installation package includes UI materials of the application program. When the application program referred to in this embodiment is specifically an applet that can be used without downloading or installing, the terminal device requests the server for a package for supporting the operation of the applet, where the package includes UI materials of an applet user interface.
The screen parameters referred to in this embodiment include, but are not limited to, at least one of the following: screen resolution, pixel density of the screen, screen size.
When the triggering operation of the user on the application program is detected, the terminal equipment acquires the screen parameters of the terminal equipment, schedules the application program and acquires the identifier of the application program. For example, when a user selects a program from an application download list or an applet list displayed on the terminal device, the terminal device may read a mapping relationship between an element in the current list and a program identifier from a rendering file of the current interface, and then obtain the identifier of the program according to the mapping relationship. When a user opens a certain applet through operations such as scanning the two-dimensional code, the terminal equipment can obtain the identification of the applet through the analysis of the two-dimensional code. The screen parameters of the terminal device may be obtained by reading configuration information of the terminal device through an application program interface on the terminal device, for example, the screen resolution and the screen size of the terminal device may be obtained through objects of the created Display class (or referred to as Display class) and Display index class (or referred to as Display Metrics class). Of course, the method for acquiring the identifier of the application program and the screen parameter of the terminal device is only an exemplary illustration and not a unique limitation, and actually, the method for acquiring the identifier of the application program and the screen parameter of the terminal device may be configured as required and is not necessarily limited to a specific method.
For example, fig. 3A is a schematic diagram of a display interface of a terminal device provided in the embodiment of the present disclosure, as shown in fig. 3A, the display interface of the terminal device includes a window 31, the window 31 includes an application list, n applications in the list can be exemplarily understood as applets in this embodiment, and when a user clicks a certain applet in the list, the terminal device carries an identifier of the applet and a screen parameter on a position of the window 31 in a request message and sends the request message to a server. For another example, fig. 3B is a schematic diagram of another display interface of a terminal device provided in the embodiment of the present disclosure, as shown in fig. 3B, the terminal device is in a split-screen display state, and the screen includes a split-screen area a and a split-screen area B, where, when a user triggers a certain applet on the split-screen area B (for example, clicks an applet in an applet list or opens a camera to scan an applet two-dimensional code, etc.), the terminal device obtains a screen parameter of the split-screen area B, and sends the screen parameter of the split-screen area B and an identifier of the applet to a server. Of course, fig. 3A and 3B are only exemplary and are not the only limitations of the disclosed embodiments.
After acquiring the identifier and the screen parameter of the application program, the terminal device sends a request message for requesting a program package to the server, wherein the request message at least comprises the screen parameter of the terminal device and the identifier of the application program. In an exemplary embodiment, the request message sent by the terminal device to the server may further include a UA string, and the screen parameter of the terminal device and the identifier of the application may be sent to the server through a preset field in the UA string. In addition, in some embodiments, the UA string may further include other hardware information and/or software information of the terminal device, such as an operating system of the terminal device, a version of the operating system, a CPU type, a browser, a version of the browser, a browser rendering engine, a browser language, a browser plug-in, and the like.
After receiving the request message of the terminal device, the server analyzes and obtains the screen parameters of the terminal device and the identifier of the application program from the request message, and searches and obtains a program package (namely, a first program package) of the application program according to the identifier of the application program, wherein the program package comprises UI materials (namely, the first UI materials) designed by research and development personnel for certain screen parameters. And traversing each UI material in the program package, and converting the traversed UI material to obtain the UI material (namely, the second UI material) matched with the screen parameter. For example, if the resolution of UI materials designed by developers is 1080x1920 and the screen resolution of the terminal device is 480x800, all UI materials with the resolution of 1080x1920 are converted into UI materials with the resolution of 480x 800. The conversion method of the UI material may be set as needed, and this embodiment is not limited herein. When the first UI material in the program package is matched with the screen parameter of the terminal device, the second UI material obtained after the first UI material is converted is the same as the first UI material, and the conversion operation can not be executed at the moment.
In order to enable the user interface of the application program to be adaptive to the screen of the terminal device, after obtaining the second UI material, the server replaces the first UI material in the first program package with the second UI material to generate a second program package, or generates the second program package by packaging the second UI material. And then, the second program package is sent to the terminal equipment, so that the application interface of the application program can be matched with the screen of the terminal equipment.
It should be noted that, in this embodiment, the request message sent by the terminal device includes the screen parameter of the terminal device, which is not the only way for the server to obtain the screen parameter of the terminal device, for example, in other embodiments, the request message sent by the terminal device may also carry an identifier of the terminal device, and after the server receives the request message of the terminal device, the server obtains the screen parameter of the terminal device from a network or a preset database according to the identifier of the terminal device. Therefore, the method for the server to obtain the screen parameters in the present embodiment is only illustrative and not limited.
In this embodiment, the request message including the screen parameter of the terminal device and the application identifier is sent to the server, so that the server obtains the first program package of the application according to the identifier of the application, obtains the second UI material matched with the screen parameter of the terminal device according to the first UI material in the first program package, generates the second program package of the application according to the second UI material, and sends the second program package to the terminal device, so that the terminal device can render the user of the application according to the second UI material. Because the embodiment can convert the UI material of the application program, the UI material issued to the terminal equipment is the UI material matched with the screen parameter of the terminal equipment, and therefore, the user interface of the application program can obtain better display effect on the terminal equipment with different screen sizes. Moreover, when the research and development personnel of the scheme based on the embodiment research and development personnel research and develop the application program, different program packages do not need to be designed for terminal devices with different screen sizes, so that a large amount of research and development work and time can be saved, and the program packages of the application program are miniaturized. In addition, because the conversion operation of the UI material is executed on the server in this embodiment, the requirement on the processing capability of the terminal device is reduced, for the terminal device with weak processing capability, especially for part of the terminal devices in the internet of things, the scheme in this embodiment can effectively adapt the user interfaces on these devices, especially for the download-free and installation-free application programs such as applets, because the running of the program mainly depends on obtaining the program package from the server, for the network with weak processing capability, the application of the applets is limited, but obviously, the scheme provided in this embodiment can eliminate the use limitation of the applets in the internet of things, broaden the use range of the applets, and increase the types of the application programs available in the internet of things, the development of the Internet of things is promoted.
Fig. 4 is a flowchart illustrating a method for adapting a user interface according to an embodiment of the present disclosure, where as shown in fig. 4, the method includes the following steps:
step 401, receiving a request message for requesting a program package from a terminal device, where the request message includes a screen parameter of the terminal device and an identifier of an application program.
And 402, acquiring a plurality of program packages corresponding to the application program according to the identification of the application program.
For example, fig. 5 is a schematic diagram of a correspondence relationship between an application program and a package provided in the embodiment of the present disclosure. As shown in fig. 5, in this embodiment, one application program may correspond to a plurality of program packages, and different program packages correspond to different screen parameters. All of these packages may be designed by developers. Or part of the program packages can be designed by the developer, and the other part of the program packages is generated by converting the UI materials in the program packages designed by the developer by the server and then repackaging the converted UI materials. That is, in the present embodiment, a plurality of packages corresponding to the application program are stored in the server. Of course, fig. 5 is merely an illustration and is not the only limitation of the embodiments of the present disclosure.
Step 403, determining whether a program package matched with the screen parameter of the terminal device exists in the program packages based on the corresponding relationship between the plurality of program packages corresponding to the application program and the screen parameter, wherein if the program package exists, step 404 is executed, otherwise step 405 and 408 are executed.
Referring to fig. 5, after receiving the request message of the terminal device, the server first parses the identifier of the application and the screen parameters of the terminal device from the request message, then a plurality of packages corresponding to the application program are obtained from the local search based on the identification of the application program, and comparing the screen parameters corresponding to the program packages with the screen parameters corresponding to the terminal device respectively based on the corresponding relationship between each program package and the screen parameters, if the screen parameter corresponding to one of the program packages is consistent with the screen parameter of the terminal equipment, determining that the program package is matched with the screen parameter of the terminal equipment, and if the screen parameters corresponding to the program packages are not consistent with the screen parameters of the terminal equipment, determining that the program packages matched with the screen parameters of the terminal equipment do not exist in the program packages corresponding to the application programs.
And step 404, sending the program package matched with the screen parameters of the terminal equipment to the terminal equipment.
And step 405, acquiring a first program package corresponding to the application program according to the identifier of the application program.
For example, in this embodiment, the method for acquiring the first package may include the following methods, but it should be noted that the following methods are only exemplary and are not only limited to the method for acquiring the first package:
in an exemplary method, one package may be randomly acquired from a plurality of packages corresponding to the application as a first package corresponding to the application, that is, in this case, the first package may be exemplarily understood as any one of the plurality of packages corresponding to the application.
In another exemplary method, a corresponding package with the highest screen resolution may be obtained from a plurality of packages corresponding to the application as the first package of the application according to the correspondence between the packages and the screen parameters, such as shown in fig. 5. In this method, the distortion rate of the UI material conversion can be reduced by using, as the first package, the package corresponding to the screen resolution highest among the plurality of packages corresponding to the application program.
And 406, acquiring second UI materials matched with the screen parameters according to the first UI materials included in the first program package.
Step 407, generating a second program package of the application program according to the second UI material, and sending the second program package to the terminal device, so that the terminal device renders the user interface of the application program based on the second UI material in the second program package.
And step 408, establishing a corresponding relation between the second program package and the screen parameters of the terminal equipment, and storing the second program package and the corresponding relation.
For example, assuming that the screen resolution corresponding to the converted second UI material is 480x800, after the second package is generated based on the second UI material, the correspondence between the second package and 480x800 may be added to the correspondence shown in fig. 5 and stored. When other equipment with the screen resolution of 480x800 requests the program package of the application program, the second program package is directly issued to the equipment, so that conversion processing of UI materials is not needed, and issuing efficiency and user experience of the program package are improved.
In the embodiment, the plurality of program packages corresponding to the application program are stored on the server, so that different program packages correspond to different screen parameters, and the times of converting UI materials by the server can be reduced. Meanwhile, research and development personnel can only research and develop one or a few program packages, and other program packages are obtained by performing UI material conversion processing on the program packages researched and developed by the research and development personnel through the server, so that the UI materials of the application program can be adapted to different screen parameters, the workload of the research and development personnel can be reduced, and the research and development efficiency is improved. In addition, when the server does not have the program package matched with the screen parameters of the terminal equipment, the server can also obtain the UI materials matched with the screen parameters of the terminal equipment by converting the UI materials in the stored program package, so that the user interface of the application program can be matched with any terminal equipment, and the display effect of the user interface is improved. After the UI material conversion processing, the server generates a corresponding program package based on the converted UI material, and establishes and stores the corresponding relation between the program package and the screen parameters of the terminal equipment, so that the next time equipment with the same screen parameters requests the program package of the application program, the program package matched with the screen parameters can be directly obtained and sent to the equipment without carrying out the UI material conversion processing, the processing resources of the server are saved, and the issuing efficiency of the program package is improved.
Fig. 6 is a flowchart of a rendering method of a user interface provided in an embodiment of the present disclosure, where the method may be executed by a terminal device in the foregoing embodiment. As shown in fig. 6, the method includes:
step 601, when detecting the trigger operation of the user to the application program, acquiring the identifier of the application program.
The application program referred to in this embodiment may be understood as an applet that can be used without being downloaded and installed, or an application program that can be used without being downloaded and installed.
The trigger operation for the application program refers to an operation of opening an applet or downloading the application program. In this embodiment, the user may trigger the application program through at least one of the following operations: speaking a preset voice command, selecting a program from a small program list or an application program downloading list, scanning a two-dimensional code of the small program through a scanning device mounted on the terminal device, and the like.
Step 602, obtaining the second package according to the identifier of the application program.
And the second program package is generated according to second UI materials corresponding to the application program, wherein the second UI materials are obtained by conversion according to the first UI materials in the first program package corresponding to the application program, and the second UI materials are matched with the screen parameters of the terminal equipment bearing the application program.
For example, in this embodiment, the step of acquiring the second package according to the identifier of the application program may include:
and S1, sending a request message for requesting the program package to the server, wherein the request message comprises the screen parameters of the terminal equipment for bearing the application program and the identification of the application program.
In an exemplary embodiment, the request message may include a UA string in which the screen parameter of the terminal device is carried.
And S2, receiving the second program package sent by the server.
The second program package is a program package generated by the server according to the second UI material by converting the first UI material in the first program package corresponding to the application program into the second UI material matched with the screen parameter of the terminal device after receiving the request message of the terminal device.
Step 603, rendering the user interface of the application program based on the second UI material in the second package.
The implementation manner and the beneficial effects of this embodiment are similar to those of the embodiment of fig. 2, and are not described herein again.
Fig. 7 is a flowchart illustrating a method for adapting a user interface according to an embodiment of the present disclosure, in which the terminal device in the embodiment of fig. 2 is specifically exemplified by an internet of things terminal device, and the application is specifically exemplified by an applet that can be used without downloading or installing. The execution subject of the present embodiment is exemplarily embodied as an internet of things server. It is understood that in other embodiments of the present disclosure, the terminal device and the server in the embodiment of fig. 2 may also be embodied as devices in other network devices, such as internet devices, mobile internet devices, and the like, and the application program may also be embodied as other application programs that need to be downloaded and installed for use. As shown in fig. 7, the method includes:
step 701, receiving a request message for requesting an applet package sent by an internet of things terminal device.
The applet is an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the internet of things and the identification of the applet.
Step 702, acquiring a first program package of the applet according to the identifier of the terminal device of the internet of things.
And 703, acquiring a second UI material matched with the screen parameter of the terminal equipment of the Internet of things according to the first UI material included in the first program package.
Step 704, generating a second program package of the applet according to the second UI material, and sending the second program package to the internet of things terminal device, so that the internet of things terminal device renders the user interface of the applet based on the second UI material in the second program package.
The implementation manner and the beneficial effects of this embodiment are similar to those of the embodiment of fig. 2, and are not described herein again.
Fig. 8 is a flowchart illustrating a rendering method of a user interface provided in an embodiment of the present disclosure, where the method may be executed by an internet of things terminal device in the embodiment of fig. 7, as shown in fig. 8, the method includes:
step 801, acquiring an identifier of an applet when a trigger operation of a user on the applet is detected.
Wherein, the applet is an application program which can be used without downloading and installing.
The triggering operation of the applet refers to an operation of triggering the terminal equipment of the internet of things to open the applet. In this embodiment, the user is configured to trigger the operation of the applet by at least one of: speaking a preset voice command, selecting a certain applet from the applet list, scanning a two-dimensional code of the applet through a scanning device mounted on the terminal device, and the like.
And step 802, acquiring a second program package of the small program according to the identifier of the small program.
And the second program package is generated according to second UI materials corresponding to the small programs, wherein the second UI materials are obtained by conversion according to the first UI materials in the first program package corresponding to the small programs, and the second UI materials are matched with the screen parameters of the terminal equipment bearing the small programs.
And step 803, rendering the user interface of the small program based on the second UI material in the second program package.
The implementation manner and the beneficial effects of this embodiment are similar to those of the embodiment of fig. 6, and are not described herein again.
Fig. 9 is a schematic structural diagram of an adapting device of a user interface provided by an embodiment of the present disclosure, which may be understood as a server or a part of functional modules in the server in the above embodiments by way of example. As shown in fig. 9, the adapting device 90 includes:
a receiving module 91, configured to receive a request message for requesting a package from a terminal device, where the request message includes a screen parameter of the terminal device and an identifier of an application program.
An obtaining module 92, configured to obtain the first package of the application program according to the identifier.
And a conversion module 93, configured to obtain, according to the first user interface UI material included in the first program package, a second UI material matched with the screen parameter.
A generating module 94, configured to generate a second package of the application program according to the second UI material.
A first sending module 95, configured to send the second package to the terminal device, so that the terminal device renders the user interface of the application program based on second UI materials in the second package.
In an embodiment, the request message includes a UA string of the user agent, and the screen parameter is carried in the UA string.
In one embodiment, the application comprises an applet that is usable without installation and download.
In one embodiment, when a plurality of windows are included on the screen of the terminal device, the screen parameter is a screen parameter of the application program corresponding to the window.
In an embodiment, when the terminal device is in a split screen state, the screen parameter is a screen parameter of a split screen area where the application program is located.
The apparatus provided in this embodiment can execute the method in the embodiment of fig. 2, and the execution manner and the beneficial effects are similar, which are not described herein again.
Fig. 10 is a schematic structural diagram of another adapting device for a user interface according to an embodiment of the present disclosure, in this embodiment, one application may correspond to a plurality of program packages, and different program packages correspond to different screen parameters, where the screen parameters include screen resolution. As shown in fig. 10, the adapting device 90 may further include, on the basis of the structure shown in fig. 9:
the package management module 96, configured to, after the receiving module 91 receives the request message, obtain a plurality of packages corresponding to the application program according to the identifier; and judging whether a program package matched with the screen parameters of the terminal equipment exists in the program packages based on the corresponding relation between the program packages and the screen parameters.
A second sending module 97, configured to, when a program package matched with the screen parameter of the terminal device exists in the plurality of program packages, directly send the program package matched with the screen parameter of the terminal device to the terminal device.
The obtaining module 92 is configured to, when no package matching the screen parameter of the terminal device exists in the plurality of packages, obtain a first package of the application program according to an identifier of the application program.
In an exemplary embodiment, the first package refers to a package with the highest resolution of a corresponding screen in a plurality of packages corresponding to the application program.
And the package management module is further configured to establish a corresponding relationship between the second package and the screen parameter after the generation module 94 generates the second package of the application program according to the second UI material.
And the program package storage module is used for storing the second program package and the corresponding relation.
The apparatus provided in this embodiment can be used to execute the method in the embodiment of fig. 4, and the execution manner and the beneficial effects are similar, which are not described herein again.
Fig. 11 is a schematic structural diagram of a rendering apparatus of another user interface provided in an embodiment of the present disclosure, where the adapting apparatus may be understood as a terminal device or a part of functional modules in the terminal device in the foregoing embodiments. As shown in fig. 11, the rendering apparatus 1000 includes:
a first obtaining module 1001, configured to obtain an identifier of an application program when a trigger operation of a user on the application program is detected.
A second obtaining module 1002, configured to obtain a second program package according to the identifier of the application, where the second program package is generated according to a second UI material corresponding to the application, where the second UI material is obtained by converting according to a first UI material in a first program package corresponding to the application, and the second UI material is matched with a screen parameter of a terminal device bearing the application.
A rendering module 1003, configured to render the user interface of the application program based on the second UI material in the second package.
In an embodiment, the request message includes a UA string, and the screen parameter is carried in the UA string.
In one embodiment, the application refers to an applet, which refers to an application that can be used without installation and download.
The apparatus provided in this embodiment can be used to execute the method in the embodiment of fig. 6, and the execution manner and the beneficial effects are similar, which are not described herein again.
Fig. 12 is a schematic structural diagram of an adapting device of another user interface provided in the embodiment of the present disclosure, where the adapting device may be embodied as an internet of things server or a part of functional modules in the internet of things server in the foregoing embodiment. As shown in fig. 12, the adapting device 2000 includes:
the receiving module 2001 is configured to receive a request message sent by an internet of things terminal device and used for requesting an applet package, where the applet refers to an application program that can be used without downloading and installing, and the request message includes a screen parameter of the internet of things terminal device and an identifier of the applet.
And the applet searching module 2002 is configured to obtain the first package of the applet according to the identifier.
And the applet resource transcoding module 2003 is configured to obtain a second UI material matched with the screen parameter according to the first UI material included in the first package.
And an applet resource packaging module 2004, configured to generate a second package of the applet according to the second UI material.
The package issuing module 2005 is configured to send the second package to the internet of things terminal device, so that the internet of things terminal device renders the user interface of the applet based on second UI materials in the second package.
In one embodiment, the adapting device 2000 may further include: a package management module 2006 and a package storage module 2007.
A package management module 2006, configured to, after the receiving module 2001 receives the request message, obtain, according to the identifier, a plurality of packages corresponding to the application program; and judging whether a program package matched with the screen parameters of the terminal equipment exists in the program packages based on the corresponding relation between the program packages and the screen parameters.
The program package issuing module 2005 is further configured to, when a program package matching the screen parameter of the terminal device exists in the plurality of program packages, directly send the program package matching the screen parameter of the terminal device to the terminal device.
The applet searching module 2002 is further configured to, when no package matching the screen parameter of the terminal device exists in the plurality of packages, obtain a first package of the application program according to the identifier of the application program.
In an exemplary embodiment, the first package refers to a package with the highest resolution of a corresponding screen in a plurality of packages corresponding to the application program.
The package management module 2006 is further configured to establish a corresponding relationship between the second package and the screen parameter after the applet resource packaging module 2004 generates the second package of the application according to the second UI material.
A package storage module 2007, configured to store the second package and the corresponding relationship.
The apparatus provided in this embodiment can execute the method in the embodiment of fig. 4 or fig. 7, and the execution manner and the beneficial effects thereof are similar and will not be described again here.
Fig. 13 is a schematic structural diagram of a rendering apparatus of another user interface provided in the embodiment of the present disclosure, where the adapting apparatus may be embodied as an internet of things terminal device or a part of functional modules in the internet of things terminal device in the foregoing embodiment. As shown in fig. 13, the rendering apparatus 3000 includes:
the applet scheduling module 3001 is configured to, when a trigger operation of a user on an applet is detected, obtain an identifier of the applet, where the applet refers to an application that can be used without downloading or installing.
The obtaining module 3002 is configured to obtain a second program package of the applet according to the identifier of the applet, where the second program package is generated according to a second UI material corresponding to the applet, where the second UI material is obtained by converting a first UI material in the first program package corresponding to the applet, and the second UI material is matched with a screen parameter of a terminal device that carries the applet.
An applet rendering module 3003, configured to render a user interface of the applet based on the second UI material in the second package.
The apparatus provided in this embodiment can execute the method in the embodiment of fig. 8, and the execution manner and the beneficial effects thereof are similar and will not be described again here.
Fig. 14 is a schematic structural diagram of an adapting device of a user interface provided in an embodiment of the present disclosure, and as shown in fig. 14, an adapting device 6000 includes:
a receiving module 6001, configured to receive a request message that is used by a terminal device to request a package, where the request message includes an identifier of the terminal device and an identifier of an application.
A first obtaining module 6002, configured to obtain a first package of the application according to the identifier of the application.
A second obtaining module 6003, configured to obtain a screen parameter of the terminal device according to the identifier of the terminal device.
A converting module 6004, configured to obtain, according to the first user interface UI material included in the first program package, a second UI material matched with the screen parameter.
A generating module 6005, configured to generate a second package of the application according to the second UI material.
A sending module 6006, configured to send the second program package to the terminal device, so that the terminal device renders the user interface of the application based on the second UI material in the second program package.
The implementation manner and the advantageous effects of the apparatus provided by this embodiment are similar to those of the embodiment of fig. 2 and are not described again here.
Fig. 15 is a schematic structural diagram of a server according to an embodiment of the present disclosure, and as shown in fig. 15, the server 4000 includes: a processor 4001 and a memory 4002;
a memory 4002 for storing a computer program;
a processor 4001 for executing the computer program, the processor performing the method of the embodiment of fig. 2 or fig. 4 when the computer program is executed by the processor.
Fig. 16 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure, and as shown in fig. 16, the terminal device 5000 includes: a processor 5001, a memory 5002, and a display 5003;
a display screen 5003 for displaying a user interface of an application program loaded on the terminal device;
a memory 5002 for storing computer programs;
a processor 5001 for executing the computer program, which when executed by the processor performs the method of the embodiment of fig. 6 described above.
The embodiment of the present disclosure further provides an internet of things server, which includes: a processor and a memory;
the memory for storing a computer program;
the processor is configured to execute the computer program, and when the computer program is executed by the processor, the following method is implemented:
receiving a request message for requesting an applet package sent by terminal equipment of the Internet of things, wherein the applet refers to an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the Internet of things and an identifier of the applet;
acquiring a first program package of the applet according to the identifier;
acquiring a second UI material matched with the screen parameter according to the first UI material included in the first program package;
and generating a second program package of the applet according to the second UI material, and sending the second program package to the Internet of things terminal equipment so that the Internet of things terminal equipment renders the user interface of the applet based on the second UI material in the second program package.
The embodiment of the present disclosure further provides an internet of things terminal device, including: a processor, a memory and a display screen;
the display screen is used for displaying a user interface of an application program loaded on the terminal equipment;
the memory for storing a computer program;
the processor is configured to execute the computer program, and when the computer program is executed by the processor, the following method is implemented:
when the triggering operation of a user on an applet is detected, acquiring an identifier of the applet, wherein the applet refers to an application program which can be used without downloading and installing;
acquiring a second program package according to the identifier of the application program, wherein the second program package is generated according to second UI materials corresponding to the application program, the second UI materials are obtained by conversion according to first UI materials in a first program package corresponding to the application program, and the second UI materials are matched with screen parameters of terminal equipment bearing the application program;
rendering a user interface of the applet based on the second UI material in the second package.
The embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor can execute the method of any one of the embodiments in fig. 2 to 8.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (25)

1. A method for adapting a user interface, comprising:
receiving a request message of a terminal device for requesting a program package, wherein the request message comprises a screen parameter of the terminal device and an identifier of an application program;
acquiring a first program package of the application program according to the identifier;
acquiring a second User Interface (UI) material matched with the screen parameter according to a first UI material included in the first program package;
and generating a second program package of the application program according to the second UI material, and sending the second program package to the terminal equipment so that the terminal equipment renders the user interface of the application program based on the second UI material in the second program package.
2. The method of claim 1, wherein the request message includes a User Agent (UA) string, and wherein the screen parameter is carried in the UA string.
3. The method of claim 1, wherein after generating the second package of the application from the second UI material, the method further comprises:
establishing a corresponding relation between the second program package and the screen parameters;
and storing the second program package and the corresponding relation.
4. The method of claim 1, wherein the application program corresponds to a plurality of packages, and different packages correspond to different screen parameters, the screen parameters including screen resolution;
the first program package is a program package with the highest screen resolution in a plurality of program packages corresponding to the application program.
5. The method of claim 4, wherein after receiving the request message for requesting the package from the terminal device, the method further comprises:
acquiring a plurality of program packages corresponding to the application program according to the identification;
judging whether a program package matched with the screen parameters of the terminal equipment exists in the program packages based on the corresponding relation between the program packages and the screen parameters;
if the program package exists, the program package matched with the screen parameters of the terminal equipment is sent to the terminal equipment;
and if not, executing the step of acquiring the first program package.
6. The method of any of claims 1-5, wherein the application comprises an applet that is usable without installation and download.
7. The method according to any one of claims 1-5, wherein when a plurality of windows are included on the screen of the terminal device, the screen parameter is a screen parameter of the application corresponding to the window.
8. The method according to any one of claims 1-5, wherein when the terminal device is in a split screen state, the screen parameter is a screen parameter of a split screen area where the application program is located.
9. A method of rendering a user interface, comprising:
when the triggering operation of a user on an application program is detected, acquiring an identifier of the application program;
acquiring a second program package according to the identifier of the application program, wherein the second program package is generated according to second UI materials corresponding to the application program, the second UI materials are obtained by conversion according to first UI materials in a first program package corresponding to the application program, and the second UI materials are matched with screen parameters of terminal equipment bearing the application program;
rendering a user interface of the application based on the second UI material in the second package.
10. The method of claim 9, wherein said obtaining the second package according to the application identifier comprises:
sending a request message for requesting a program package to a server, wherein the request message comprises screen parameters of the terminal equipment and an identifier of the application program;
and receiving a second program package fed back by the server based on the request message.
11. The method of claim 9, wherein the request message includes a UA string, and wherein the screen parameter is carried in the UA string.
12. The method according to claim 9 or 11, wherein the application is an applet, and the applet is an application that can be used without installation and download.
13. A method for adapting a user interface, comprising:
receiving a request message of a terminal device for requesting a program package, wherein the request message comprises an identifier of the terminal device and an identifier of an application program;
acquiring a first program package of the application program according to the identifier of the application program;
acquiring screen parameters of the terminal equipment according to the identifier of the terminal equipment;
acquiring a second User Interface (UI) material matched with the screen parameter according to a first UI material included in the first program package;
and generating a second program package of the application program according to the second UI material, and sending the second program package to the terminal equipment so that the terminal equipment renders the user interface of the application program based on the second UI material in the second program package.
14. A method for adapting a user interface, comprising:
receiving a request message for requesting an applet package sent by terminal equipment of the Internet of things, wherein the applet refers to an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the Internet of things and an identifier of the applet;
acquiring a first program package of the applet according to the identifier;
acquiring a second UI material matched with the screen parameter according to the first UI material included in the first program package;
and generating a second program package of the applet according to the second UI material, and sending the second program package to the Internet of things terminal equipment so that the Internet of things terminal equipment renders the user interface of the applet based on the second UI material in the second program package.
15. A method of rendering a user interface, comprising:
when the triggering operation of a user on an applet is detected, acquiring an identifier of the applet, wherein the applet refers to an application program which can be used without downloading and installing;
acquiring a second program package of the applet according to the identifier of the applet, wherein the second program package is generated according to a second UI material corresponding to the applet, the second UI material is obtained by conversion according to a first UI material in the first program package corresponding to the applet, and the second UI material is matched with a screen parameter of a terminal device bearing the applet;
rendering a user interface of the applet based on the second UI material in the second package.
16. An apparatus for adapting a user interface, comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a request message of a terminal device for requesting a program package, and the request message comprises a screen parameter of the terminal device and an identifier of an application program;
the acquisition module is used for acquiring a first program package of the application program according to the identifier;
the conversion module is used for acquiring a second User Interface (UI) material matched with the screen parameter according to the first UI material included in the first program package;
the generating module is used for generating a second program package of the application program according to the second UI material;
and the first sending module is used for sending the second program package to the terminal equipment so as to enable the terminal equipment to render the user interface of the application program based on the second UI material in the second program package.
17. An apparatus for rendering a user interface, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an identifier of an application program when the triggering operation of a user on the application program is detected;
a second obtaining module, configured to obtain a second program package according to the identifier of the application program, where the second program package is generated according to a second UI material corresponding to the application program, where the second UI material is obtained by converting according to a first UI material in a first program package corresponding to the application program, and the second UI material is matched with a screen parameter of a terminal device that carries the application program;
and the rendering module is used for rendering the user interface of the application program based on the second UI material in the second program package.
18. An apparatus for adapting a user interface, comprising:
a receiving module, configured to receive a request message for requesting a program package from a terminal device, where the request message includes an identifier of the terminal device and an identifier of an application program;
the first acquisition module is used for acquiring a first program package of the application program according to the identifier of the application program;
the second acquisition module is used for acquiring the screen parameters of the terminal equipment according to the identifier of the terminal equipment;
the conversion module is used for acquiring a second User Interface (UI) material matched with the screen parameter according to the first UI material included in the first program package;
the generating module is used for generating a second program package of the application program according to the second UI material;
and the sending module is used for sending the second program package to the terminal equipment so as to enable the terminal equipment to render the user interface of the application program based on the second UI material in the second program package.
19. An apparatus for adapting a user interface, comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a request message which is sent by terminal equipment of the Internet of things and used for requesting an applet package, the applet is an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the Internet of things and an identifier of the applet;
the applet searching module is used for acquiring a first program package of the applet according to the identifier;
the small program resource transcoding module is used for acquiring a second UI material matched with the screen parameter according to a first UI material included in the first program package;
the applet resource packaging module is used for generating a second program package of the applet according to the second UI material;
and the program package issuing module is used for sending the second program package to the Internet of things terminal equipment so as to enable the Internet of things terminal equipment to render the user interface of the applet based on second UI materials in the second program package.
20. An apparatus for rendering a user interface, comprising:
the system comprises an applet scheduling module, a applet selecting module and an applet selecting module, wherein the applet scheduling module is used for acquiring an identifier of an applet when the trigger operation of a user on the applet is detected, and the applet refers to an application program which can be used without downloading and installing;
the acquisition module is used for acquiring a second program package of the applet according to the identification of the applet, wherein the second program package is generated according to a second UI material corresponding to the applet, the second UI material is obtained by conversion according to a first UI material in the first program package corresponding to the applet, and the second UI material is matched with a screen parameter of a terminal device bearing the applet;
and the applet rendering module is used for rendering the user interface of the applet based on the second UI material in the second program package.
21. A server, comprising a processor and a memory;
the memory for storing a computer program;
the processor for executing the computer program, the method of any of claims 1-8, 13 being performed when the computer program is executed by the processor.
22. A terminal device, comprising a processor, a memory and a display screen;
the display screen is used for displaying a user interface of an application program loaded on the terminal equipment;
the memory for storing a computer program;
the processor for executing the computer program, the method of any of claims 9-12 being performed when the computer program is executed by the processor.
23. An internet of things server, comprising: a processor and a memory;
the memory for storing a computer program;
the processor is configured to execute the computer program, and when the computer program is executed by the processor, the following method is implemented:
receiving a request message for requesting an applet package sent by terminal equipment of the Internet of things, wherein the applet refers to an application program which can be used without downloading and installing, and the request message comprises screen parameters of the terminal equipment of the Internet of things and an identifier of the applet;
acquiring a first program package of the applet according to the identifier;
acquiring a second UI material matched with the screen parameter according to the first UI material included in the first program package;
and generating a second program package of the applet according to the second UI material, and sending the second program package to the Internet of things terminal equipment so that the Internet of things terminal equipment renders the user interface of the applet based on the second UI material in the second program package.
24. An internet of things terminal device, comprising: a processor, a memory and a display screen;
the display screen is used for displaying a user interface of an application program loaded on the terminal equipment;
the memory for storing a computer program;
the processor is configured to execute the computer program, and when the computer program is executed by the processor, the following method is implemented:
when the triggering operation of a user on an applet is detected, acquiring an identifier of the applet, wherein the applet refers to an application program which can be used without downloading and installing;
acquiring a second program package of the applet according to the identifier of the applet, wherein the second program package is generated according to a second UI material corresponding to the applet, the second UI material is obtained by conversion according to a first UI material in the first program package corresponding to the applet, and the second UI material is matched with a screen parameter of terminal equipment bearing the lower program;
rendering a user interface of the applet based on the second UI material in the second package.
25. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-13.
CN202011093022.9A 2020-10-13 2020-10-13 User interface adaptation method, rendering method, device, equipment and storage medium Pending CN114356464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011093022.9A CN114356464A (en) 2020-10-13 2020-10-13 User interface adaptation method, rendering method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011093022.9A CN114356464A (en) 2020-10-13 2020-10-13 User interface adaptation method, rendering method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114356464A true CN114356464A (en) 2022-04-15

Family

ID=81090124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011093022.9A Pending CN114356464A (en) 2020-10-13 2020-10-13 User interface adaptation method, rendering method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114356464A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114510266A (en) * 2022-04-20 2022-05-17 武汉绿之云科技有限公司 Method and system for releasing light application at one end and automatically adapting to use of multiple terminals
CN114647478A (en) * 2022-05-23 2022-06-21 武汉中科通达高新技术股份有限公司 Data billboard generation method and device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740004A (en) * 2014-12-12 2016-07-06 上海科泰世纪科技有限公司 Application program installation method and system
CN109101233A (en) * 2017-06-20 2018-12-28 福建星网视易信息系统有限公司 It is adapted to the method, storage equipment and Android device of a variety of screen resolutions
CN110007919A (en) * 2019-04-08 2019-07-12 深圳市多翼电智科技有限公司 A kind of dynamic density screen adaptation method and system for the automatic airport of unmanned plane
CN110032409A (en) * 2018-12-28 2019-07-19 阿里巴巴集团控股有限公司 A kind of client screen adaptation method, device and electronic equipment
CN110502245A (en) * 2018-05-16 2019-11-26 华为技术有限公司 Data processing method, terminal, server and application and development equipment
CN110865863A (en) * 2019-11-18 2020-03-06 北京小米移动软件有限公司 Interface display method and device for fast application and storage medium
CN110874217A (en) * 2019-11-18 2020-03-10 北京小米移动软件有限公司 Interface display method and device for fast application and storage medium
CN111694530A (en) * 2020-06-09 2020-09-22 北京百度网讯科技有限公司 Screen adaptation method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740004A (en) * 2014-12-12 2016-07-06 上海科泰世纪科技有限公司 Application program installation method and system
CN109101233A (en) * 2017-06-20 2018-12-28 福建星网视易信息系统有限公司 It is adapted to the method, storage equipment and Android device of a variety of screen resolutions
CN110502245A (en) * 2018-05-16 2019-11-26 华为技术有限公司 Data processing method, terminal, server and application and development equipment
CN110032409A (en) * 2018-12-28 2019-07-19 阿里巴巴集团控股有限公司 A kind of client screen adaptation method, device and electronic equipment
CN110007919A (en) * 2019-04-08 2019-07-12 深圳市多翼电智科技有限公司 A kind of dynamic density screen adaptation method and system for the automatic airport of unmanned plane
CN110865863A (en) * 2019-11-18 2020-03-06 北京小米移动软件有限公司 Interface display method and device for fast application and storage medium
CN110874217A (en) * 2019-11-18 2020-03-10 北京小米移动软件有限公司 Interface display method and device for fast application and storage medium
CN111694530A (en) * 2020-06-09 2020-09-22 北京百度网讯科技有限公司 Screen adaptation method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114510266A (en) * 2022-04-20 2022-05-17 武汉绿之云科技有限公司 Method and system for releasing light application at one end and automatically adapting to use of multiple terminals
CN114510266B (en) * 2022-04-20 2022-10-21 武汉绿之云科技有限公司 Method and system for releasing light application at one end and automatically adapting to use of multiple terminals
CN114647478A (en) * 2022-05-23 2022-06-21 武汉中科通达高新技术股份有限公司 Data billboard generation method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109857515B (en) Bridge communication method, device, equipment and computer readable storage medium
KR101541263B1 (en) Method and apparatus for executing user action commands
CN105718313A (en) Application operation method and device
CN109582395B (en) Applet running method and device, electronic equipment and storage medium
US20130185699A1 (en) Storage Device Including Software Development Kit that Supports Multiple Types of Platforms and Multiple Programming Languages
CN108874922B (en) Client device, webpage rendering method based on single page application and storage medium
US10997384B2 (en) Service process starting method and apparatus
CN107818023B (en) Thread-based message processing method, intelligent device and storage medium
CN114356464A (en) User interface adaptation method, rendering method, device, equipment and storage medium
CN110874172B (en) Method, device, medium and electronic equipment for amplifying APP interface
CN105260459B (en) Searching method and device
CN112256990A (en) Image processing method and device and computer readable storage medium
CN113887442A (en) OCR training data generation method, device, equipment and medium
CN113553123A (en) Data processing method and device, electronic equipment and storage medium
CN114301970B (en) Service calling method, device, electronic equipment and storage medium
CN101772196A (en) Method and system for processing message sent by mobile terminal and acting server
CN111782992B (en) Display control method, device, equipment and readable storage medium
CN114969603A (en) 5G message-based picture acquisition and picture generation method and system
WO2022099870A1 (en) Handwriting graphing method, apparatus, and electronic device
CN110334301A (en) A kind of page restoring method and device
CN114237926A (en) Multi-platform interaction method, device, equipment, storage medium and computer program product
CN107220306B (en) Searching method and device
CN108632339A (en) A kind of method and system of dynamic select server
CN112631592B (en) Data request method, device, apparatus, medium and program product
RU2803487C1 (en) Method and system for translating text in image on web page

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