CN111008057A - Page display method and device and storage medium - Google Patents

Page display method and device and storage medium Download PDF

Info

Publication number
CN111008057A
CN111008057A CN201911192790.7A CN201911192790A CN111008057A CN 111008057 A CN111008057 A CN 111008057A CN 201911192790 A CN201911192790 A CN 201911192790A CN 111008057 A CN111008057 A CN 111008057A
Authority
CN
China
Prior art keywords
style data
template
target page
data item
page
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
CN201911192790.7A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201911192790.7A priority Critical patent/CN111008057A/en
Publication of CN111008057A publication Critical patent/CN111008057A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The disclosure provides a page display method, a page display device and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: when a target page display instruction is received, template style data is obtained, the template style data comprises style data items of at least one dimension, specified style data items of the target page are obtained, the specified style data items and the template style data are fused to obtain fused style data, and the target page is displayed according to the first fused style data. By setting the universal template style data, at least one style data item in the template style data is suitable for any page, and the specified style data item of the target page and the universal template style data are fused when the target page is displayed, so that the same style data item does not need to be set in the style data of each page, the same style data item is prevented from being stored, and the storage space for storing the style data items is saved.

Description

Page display method and device and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page display method and apparatus, and a storage medium.
Background
With the development of computer technology and the gradual increase of the requirements of users on display effects, the page styles of applications are concerned by the users.
Currently, a page display method is proposed, where each page of an application is provided with corresponding style data, the style data includes at least one style data item, and a display style of the page can be determined according to the set style data. Therefore, when a page presentation instruction is received, the page is presented according to the style data of the page.
However, the above scheme needs to set corresponding style data for each page, and the style data of different pages may include the same style data item, and storing the same style data item may result in waste of storage space.
Disclosure of Invention
The present disclosure provides a page display method, device and storage medium, which can overcome the problems in the related art, and the technical scheme is as follows:
according to a first aspect provided by the embodiments of the present disclosure, a page display method is provided, where the method includes:
when a target page display instruction is received, template style data is obtained, wherein the template style data comprises style data items of at least one dimension;
acquiring a specified style data item of a target page;
fusing the specified style data item with the template style data to obtain fused style data;
and displaying the target page according to the fusion style data.
In a possible implementation manner, the obtaining a specified style data item of a target page, where the target page display instruction carries a target page identifier, includes:
and inquiring style configuration information according to the target page identifier to obtain a specified style data item corresponding to the target page identifier, wherein the style configuration information comprises the page identifier and the style data item of each page.
In another possible implementation manner, the obtaining template style data includes:
and calling the template style data loaded into the memory.
In another possible implementation, the method further includes:
and when an application is started, loading the template style data into the memory, wherein the target page is a page in the application.
In another possible implementation manner, the fusing the specified style data item and the template style data to obtain fused style data includes:
and combining the specified style data item with the style data item in the template style data to obtain the fusion style data.
In another possible implementation manner, the merging the specified style data item with the style data item in the template style data to obtain the fused style data includes:
and when the template style data comprises a first style data item with the same dimension as the specified style data item, replacing the first style data item in the template style data with the specified style data item, and taking style data obtained after replacement as the fusion style data.
In another possible implementation, the method further includes:
and when the specified style data item of the target page is not acquired, displaying the target page according to the template style data.
According to a second aspect provided by an embodiment of the present disclosure, there is provided a page displaying apparatus, including:
the style data acquisition module is used for acquiring template style data when a target page display instruction is received, wherein the template style data comprises style data items of at least one dimension;
the style data item acquisition module is used for acquiring a specified style data item of the target page;
the fusion module is used for fusing the specified style data item with the template style data to obtain fused style data;
and the first display module is used for displaying the target page according to the fusion style data.
In one possible implementation manner, the target page display instruction carries a target page identifier, and the style data item obtaining module includes:
and the query unit is used for querying style configuration information according to the target page identifier to obtain a specified style data item corresponding to the target page identifier, wherein the style configuration information comprises the page identifier and the style data item of each page.
In another possible implementation manner, the pattern data obtaining module includes:
and the calling unit is used for calling the template style data loaded into the memory.
In another possible implementation manner, the apparatus further includes:
and the loading module is used for loading the template style data into the memory when an application is started, wherein the target page is a page in the application.
In another possible implementation manner, the fusion module includes:
and the merging unit is used for merging the specified style data item and the style data item in the template style data to obtain the fused style data.
In another possible implementation manner, the merging unit is further configured to, when the template style data includes a first style data item having the same dimension as the specified style data item, replace the first style data item in the template style data with the specified style data item, and use style data obtained after replacement as the fusion style data.
In another possible implementation manner, the apparatus further includes:
and the second display module is used for displaying the target page according to the template style data when the specified style data item of the target page is not acquired.
According to a third aspect provided by an embodiment of the present disclosure, there is provided an electronic device, including:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to:
when a target page display instruction is received, template style data is obtained, wherein the template style data comprises style data items of at least one dimension;
acquiring a specified style data item of a target page;
fusing the specified style data item with the template style data to obtain fused style data;
and displaying the target page according to the fusion style data.
According to a fourth aspect provided by an embodiment of the present disclosure, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the operations performed in the page presentation method according to the first aspect.
The beneficial effects brought by the technical scheme provided by the embodiment of the disclosure at least comprise:
according to the method, the device and the storage medium provided by the embodiment of the disclosure, when a target page display instruction is received, template style data is obtained, the template style data comprises style data items of at least one dimension, specified style data items of a target page are obtained, the specified style data items and the template style data are fused to obtain fused style data, and the target page is displayed according to the first fused style data. By setting the universal template style data, at least one style data item in the template style data is suitable for any page, and the specified style data item of the target page and the universal template style data are fused when the target page is displayed, so that the same style data item does not need to be set in the style data of each page, the same style data item is prevented from being stored, and the storage space for storing the style data items is saved.
When the method is applied to starting, the template style data is loaded into the memory, and when the page is displayed each time, only the style data items set independently by the page need to be loaded, and the data items in the template style data do not need to be loaded each time, so that the loading time of the page is saved.
Moreover, the same style data items included in the style data of different pages are added to the template style, so that the same style data items do not need to be set in the style data of each page, the time consumption for developing the application is reduced, and the workload of a developer is reduced.
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.
FIG. 1 is a flow diagram illustrating a page presentation method in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a page presentation method in accordance with an exemplary embodiment;
FIG. 3 is a block diagram illustrating a fast application framework in accordance with an exemplary embodiment;
FIG. 4 is a flowchart illustrating the launching of a fast application in accordance with an exemplary embodiment;
FIG. 5 is a schematic diagram illustrating the structure of a page displaying apparatus according to an exemplary embodiment;
FIG. 6 is a schematic diagram illustrating the structure of a page displaying apparatus according to an exemplary embodiment;
fig. 7 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more clear, the present disclosure is further described in detail below with reference to the embodiments and the accompanying drawings. The exemplary embodiments and descriptions of the present disclosure are provided herein for illustration of the present disclosure, but not for limitation of the present disclosure.
Fig. 1 is a flowchart illustrating a page presentation method according to an exemplary embodiment, as shown in fig. 1, the method including:
in step 101, when a target page presentation instruction is received, template style data is acquired, wherein the template style data comprises style data items of at least one dimension.
In step 102, the specified style data items of the target page are obtained.
In step 103, the specified style data item is fused with the template style data to obtain fused style data.
In step 104, the target page is displayed according to the fusion style data.
According to the method provided by the embodiment of the disclosure, when a target page display instruction is received, template style data is obtained, the template style data comprises style data items of at least one dimension, specified style data items of a target page are obtained, the specified style data items and the template style data are fused to obtain fused style data, and the target page is displayed according to the first fused style data. By setting the universal template style data, at least one style data item in the template style data is suitable for any page, and the specified style data item of the target page and the universal template style data are fused when the target page is displayed, so that the same style data item does not need to be set in the style data of each page, the same style data item is prevented from being stored, and the storage space for storing the style data items is saved.
In one possible implementation manner, the obtaining of the specified style data item of the target page by the target page display instruction carrying the target page identifier includes:
and inquiring style configuration information according to the target page identifier to obtain a specified style data item corresponding to the target page identifier, wherein the style configuration information comprises the page identifier and the style data item of each page.
In another possible implementation, obtaining template style data includes:
and calling the template style data loaded into the memory.
In another possible implementation, the method further includes:
when the application is started, the template style data is loaded into a memory, and the target page is a page in the application.
In another possible implementation manner, fusing the specified style data item with the template style data to obtain fused style data, including:
and combining the specified style data item with the style data item in the template style data to obtain fused style data.
In another possible implementation manner, merging the specified style data item with the style data item in the template style data to obtain fused style data includes:
and when the template style data comprises a first pattern data item with the same dimension as the specified style data item, replacing the first pattern data item in the template style data with the specified style data item, and taking the style data obtained after replacement as fusion style data.
In another possible implementation, the method further includes:
and when the specified style data item of the target page is not acquired, displaying the target page according to the template style data.
Fig. 2 is a flowchart illustrating a page displaying method according to an exemplary embodiment, as shown in fig. 2, applied to an electronic device, which may be a mobile phone, a tablet computer, a computer device, and the like, the method includes the following steps:
in step 201, when the electronic device starts an application, the template style data is loaded into the memory.
In the embodiment of the present disclosure, the style data is used to indicate a display style of the page, such as indicating a background style, a font style, a page frame style, and the like of the page. The style data may include style data items of at least one dimension, and the style data items of each dimension may represent a display style of the page in the dimension, e.g., style data items indicating font style, style data items indicating background style, style data items indicating page border style, etc., all belong to different dimensions.
In addition, multiple dimensions may have a hierarchical relationship, and any dimension may further include multiple sub-dimensions of a next layer, for example, a font style may include a font color, a font size, and the like, and if the font color and the font size belong to different sub-dimensions of the font dimension, a style data item indicating the font color and a style data item indicating the font size belong to different dimensions.
In the embodiment of the present disclosure, an application may include a plurality of pages, each page having corresponding style data, and for any page, the page may be presented according to the style data corresponding to the page. In order to save storage space, the same style data items included in the style data of different pages are added into the template style data, in addition, in order to embody the personalized style of the pages, each page can also be independently set with the specified style data items, when the target page is displayed, the template style data and the specified style data items of the target page can be fused, and the target page is displayed by the fused style data.
The application may be an application for providing multiple functions, for example, an instant messaging application, a news browsing application, a video playing application, and the like, and the user may chat with a friend, browse news, or watch video data, and the like, based on the application. The template style data includes the same style data item among style data of different pages, and can be applied to a plurality of pages. The template style data comprises at least one dimension of style data items, and each dimension of style data items corresponds to a different display style. For example, if the style data item indicating the background style is included in the template style data, and the style data item indicates that the background color is blue, the backgrounds of the multiple pages in the application all show blue.
When the application is started, the template style data is loaded into the memory, so that the template style data can be directly called when any page is displayed after the application is started, and the template style data does not need to be loaded when any page is displayed, thereby saving the loading time of the page.
In one possible implementation, the template style data is stored in the form of a start-up file, such that when the application is started, the template style data is loaded. For example, for template Style data of any application, the template Style data is stored in an app.cs.json (application.mapping Style sheets. javascript object notification) file, so that when the application is started, the json file is loaded, and thus the template Style data is loaded into a memory.
In addition, a developer sets parameters of style data items in the template style data in an app.ux (application.user Experience) file, compiles the parameters in the app.ux file through a compiling tool to generate an app.css.json file, and thus, the template style data is stored in the app.css.json file.
In step 202, when the electronic device receives a target page display instruction, the template style data loaded into the memory is called.
The target page can be any page in the application. The target page display instruction can be triggered by the electronic equipment detecting the clicking operation, the sliding operation or the long-pressing operation of the user. For example, the application is a news browsing application, the news browsing application includes a plurality of pages, and the way of switching the pages by the news browsing application may be clicking a next button in the page, or performing a sliding operation on the currently displayed page, or long-pressing any position on the currently displayed page. When the terminal detects the click operation of a next page button in the first page, receiving a display instruction of the next page of the first page, wherein the target page is the next page; or when the terminal detects the sliding operation on the first page, receiving a display instruction of the next page of the first page, wherein the target page is the next page; or when the terminal detects the long press operation on the first page, receiving a display instruction of the next page of the first page, wherein the target page is the next page.
When the electronic equipment receives a target page display instruction, the style data corresponding to the target page needs to be acquired so as to be displayed according to the style data. And calling the template style data loaded into the memory by the electronic equipment because the template style data is the style data shared by each page in the application.
In step 203, the electronic device queries style configuration information according to the target page identifier to obtain a designated style data item corresponding to the target page identifier.
In the embodiment of the present disclosure, each page in the application may further have a specified style data item, and the specified style data item of the page is stored in the style configuration information, so that the corresponding specified style data item may be called later when the page is loaded.
The specified style data item is a style data item set independently by the target page, and the specified style data item can be a style data item of any dimension. For example, the style data item is specified as a style data item indicating that the background color is red.
The style configuration information comprises a page identifier and a style data item of each page, the target page identifier is carried by the target page display instruction, when the electronic equipment receives the page display instruction, the target page identifier is obtained, the style configuration information is inquired according to the target page identifier, and the specified style data item can be obtained.
For example, the style configuration information may store the page identification and the style data item in the form of a list, as shown in table 1.
TABLE 1
Page identification Style data item
Page identification A Style data item A
Page identification B Style data item B
In a possible implementation manner, in the style configuration information, the target page identifier corresponds to multiple specified style data items, and the electronic device queries the style configuration information according to the target page identifier to obtain multiple specified style data items corresponding to the target page identifier. Wherein, in the plurality of specified style data items, different specified style data items correspond to different dimensions.
For example, in the style configuration information, the specified style data items corresponding to the target page identifier a include a font style data item, a page border style data item, a background style data item, and the like, and the font style data item, the page border style data item, and the background style data item correspond to different dimensions.
In step 204, the electronic device merges the specified style data item with the style data item in the template style data to obtain the fused style data.
Because the style data items in the specified style data item and the template style data item are the style data items corresponding to the target page, before the target page is displayed by the electronic equipment, the specified style data item and the style data items in the template style data are combined, so that all style data items corresponding to the target page are obtained.
For the process of acquiring the fusion style data, in one possible implementation manner, the electronic device adds the specified style data item to the template style data, and takes the added template style data as the fusion style data.
In another possible implementation manner, the template style data includes a plurality of filling positions, each filling position corresponds to one dimension, and is used for filling the style data items of the dimension, so that different filling positions can fill the style data items of different dimensions. Therefore, the style data items included in the template style data are all filled at the filling positions corresponding to the dimensions to which the style data items belong, and the filling positions corresponding to the dimensions to which the style data items not included belong are empty.
And the electronic equipment fills the specified style data item into the template style data, and obtains fusion style data at a filling position corresponding to the dimension to which the specified style data item belongs.
For example, if all the pages of the application include 30 style data items belonging to different dimensions, the template style data includes 30 filling positions, the template style data includes 3 style data items, the 3 style data items are respectively filled at 3 filling positions corresponding to the dimensions, and the remaining 27 filling positions are empty. When the specified style data item of the target page is 1 item, and when the specified style data item is combined with the style data item in the template style data, the specified style data item is filled to a filling position corresponding to the dimension to which the specified style data item belongs, the obtained fusion style data comprises 4 style data items, the 4 style data items are respectively filled at the corresponding 4 filling positions, and the rest 26 filling positions are empty.
It should be noted that the embodiment of the present disclosure is described in the case that the style data item having the same dimension as the specified style data item is not included in the template style data, and in another embodiment, the step 204 may include:
and when the template style data comprises a first pattern data item with the same dimension as the specified style data item, replacing the first pattern data item in the template style data with the specified style data item, and taking the style data obtained after replacement as fusion style data.
The template style data can be applied to a plurality of pages, the style data items included in the template style data can be applied to the plurality of pages, in order to embody the individuation of the target page, the target page can also be provided with individually set specified style data items, the priority of the specified style data items of the target page is higher than that of the style data items in the template style data, when the template style data includes first style data items with the same dimension as the specified style data items, the target page is represented to be displayed in a style corresponding to the specified style data items in the dimension, and the specified style data items are replaced with the first style data items in the template style data, so that the obtained fusion style data meets the requirement of a user on displaying the style of the target page.
For example, the background style data item included in the template style data indicates that the background color of the target page is blue, the specified background style data item of the target page indicates that the background color of the target page is red, and the obtained fusion style data indicates that the background color of the target page is red.
In step 205, the electronic device presents the target page according to the fused style data.
And after the electronic equipment obtains the fusion style data, displaying the target page in a style corresponding to the fusion style data, thereby displaying the target page.
In addition, before the electronic device displays the target page, the electronic device also acquires a display element of the target page, and when the electronic device displays the target page, the display element is displayed in a style indicated by the fused style data. The display elements are elements to be displayed in the target page, such as characters or pictures.
For example, the display elements of the target page include the words "information presentation" and the picture 1, and the fusion style data includes: the font style data item indicates that characters in a page are displayed black and the font size is 'four', the background style data item indicates that the background color in the page is green, the page frame style data item indicates that the frame of the page is a dotted line and a red frame, and the picture style data item indicates that the picture size in the page is 30 multiplied by 30 pixels and is displayed in the middle, so that the page displayed by the electronic equipment according to the fusion style data is green, the characters are displayed in the middle, the frame is a red dotted frame, and the size of the picture 1 is 30 multiplied by 30 pixels and is displayed in the middle.
It should be noted that, in the embodiment of the present disclosure, the specified style data item of the target page is included in the style configuration information, and in another embodiment, after the step 202, when the electronic device does not acquire the specified style data item of the target page, the target page is displayed according to the template style data.
And if the electronic equipment does not acquire the specified style data item of the target page and indicates that the target page does not have the individually set style data item, the target page is displayed according to the style corresponding to the template style data item.
It should be noted that, in the embodiment of the present disclosure, the page is displayed in the application after the application is started, and in another embodiment, the electronic device may directly obtain the template style data and the specified style data item of the target page, so as to display the target page without limiting the application to which the target page belongs. For example, template style data is stored in the terminal, when the terminal receives a target page display instruction, the template style data and a specified style data item of the target page are obtained, the specified style data item and the template style data are fused to obtain fused style data, and the target page is displayed according to the fused style data.
According to the method provided by the embodiment of the disclosure, when a target page display instruction is received, template style data is obtained, the template style data comprises style data items of at least one dimension, specified style data items of a target page are obtained, the specified style data items and the template style data are fused to obtain fused style data, and the target page is displayed according to the first fused style data. By setting the universal template style data, at least one style data item in the template style data is suitable for any page, and the specified style data item of the target page and the universal template style data are fused when the target page is displayed, so that the same style data item does not need to be set in the style data of each page, the same style data item is prevented from being stored, and the storage space for storing the style data items is saved.
When the method is applied to starting, the template style data is loaded into the memory, and when the page is displayed each time, only the style data items set independently by the page need to be loaded, and the data items in the template style data do not need to be loaded each time, so that the loading time of the page is saved.
Moreover, the same style data items included in the style data of different pages are added to the template style, so that the same style data items do not need to be set in the style data of each page, the time consumption for developing the application is reduced, and the workload of a developer is reduced.
The fast Application related in the embodiments of the present disclosure is a novel Application form based on a hardware platform of an electronic device, and can run based on a native API (Application Programming Interface) provided by an operating system.
The fast application is developed by adopting a unified standard, and is rendered as native without installation, namely, the fast application is used as point, and has native application experience (performance, system integration, interaction and the like). The framework of the fast application can be deeply integrated in an operating system, can operate at the level of the operating system, and realizes seamless connection with other application services. Developers can operate on different types of electronic equipment through one-time development. The method is applied to the electronic equipment manufacturers at the beginning of birth, realizes standardization unification among the electronic equipment manufacturers on the aspects of development specifications, capability access, developer service and the like, and greatly reduces the adaptation cost of developers.
Compared with the traditional application, the quick application has the following characteristics:
instant: the user can use the method point by point, and the user does not need to wait;
everywhere (Everywhere visible): deeply integrated with the use scene of the electronic equipment, and everywhere has an entrance, such as a search engine, an intelligent assistant, intelligent recommendation, an application market, a browser and the like;
efficiency: the quasi-front-end development mode is high in efficiency.
FIG. 3 illustrates a block diagram of a fast application framework 300 shown in an exemplary embodiment of the present disclosure, the fast application framework including: scenario portal 320, fast application engine 340, and Operating System (OS) infrastructure and hardware 360.
The scene portal 320 includes at least one of a negative one-screen, a global search, a lock screen, a desktop, an application marketplace, a browser, and a two-dimensional code. The appearance of the scene portal 320 may be in the form of a page and a card.
The fast application engine 340 includes a front end framework 341, a generic scenario 342, a lightweight scenario 343, an embedded SDK (Software Development Kit) 344, and business access 345.
The front-end framework 341 includes a Model-View-Model (MVVM), a Virtual-Document Object Model (V-DOM), a route, an Application Programming Interface (API), a service API, a User Interface (UI) component, a route, and the like;
the general scene 342 and the lightweight scene 343 include a JavaScript (a programming language) engine, a standard rendering engine, an extreme rendering engine, end-cloud-core acceleration, a security mechanism, an emerging scene such as AI (Artificial Intelligence), AR (Augmented Reality), and the like, system integration (application management, rights management, and the like);
service access 345 includes push, account/payment, etc.
OS infrastructure and hardware 360 includes: a graphics library, a native control, a system service, and a GPU (graphics Processing Unit)/NPU (embedded Neural network processor), etc.
From the execution path level, there are a standard HTML (Hyper Text Markup Language) 5 mode to support a general Web scene, and a JS (JavaScript, a programming Language) and Native (Native) mode to support a lighter and faster experience.
The architecture of the fast application engine will be briefly described in 3 aspects below.
1) Application development:
the design of the front end of the fast application refers to and integrates the design thought of the mainstream front end framework: the application is built in a componentized mode, an MVVM design mode taking data binding as a core is adopted, the performance is improved in a V-DOM mode, and meanwhile, a simple and clear template of a class Vue (a virtual machine shelling engine) is selected. Meanwhile, the layout aspect is correspondingly simplified. From the perspective of new application form, native UI mapping and capability opening, a set of components and API specifications need to be defined, and the rapid development application is convenient to develop.
2) System integration:
fast applications, as a complete application modality, can be deeply integrated with the system, run as native applications, and interact with the system. There are currently two forms of rapid application: a full screen mode independent application mode and an embedded mode card mode. Under the independent application form, the experience of the user is similar to a native application program, and the method has complete life cycle management, page management, routing and the like. The fast application can be hosted in the Activity of android, the page is hosted in Fragment, and the instance is managed and controlled through independent background Service. The card form is another form, and dynamic content is displayed in a light weight manner by embedding the embedded SDK (Software Development Kit) as an independent local control into each corner of the system. In the aspect of security isolation, better security guarantee can be achieved through a sandbox mechanism, process isolation and authority control in combination with the support of an operating system layer.
3) Performance experience and emerging scenes, such as JavaScript engines, rendering engines, end-cloud-core acceleration, emerging scenes, and the like:
in the aspects of interactive experience, resource overhead, stability and the like, the fast application realizes effective combination of a front-end development mode, native rendering and platform capability by introducing a native rendering path.
Different from cross-platform frameworks of other application layers, the application is planted in an operating system of the electronic equipment, and deep integration of a slave chip, the operating system and the cloud can be realized. By taking the acceleration of the starting performance as an example by combining the end and the cloud, the optimization of the network link layer can greatly accelerate the starting speed of the application through the cooperative rendering of the cloud and the end. Meanwhile, the special capability of the hardware platform can be integrated, and the experience is further improved. For example, the computing power of an NPU (Neural-network processing Unit, network processor) may be integrated into a fast application engine in combination with an AI chip of an electronic device, so that an AI scene (face recognition, image super-resolution, and the like) may be executed at a low latency and high performance on an end side, and meanwhile, the privacy of a user is effectively protected, and a bandwidth is saved.
Fig. 4 shows a flowchart illustrating the start-up of a fast application according to an exemplary embodiment of the present disclosure, including:
1) when the system is started for the first time, a user clicks a program package for triggering downloading of the fast application, and meanwhile, initialization related work of the fast application engine is carried out. After the whole fast application program package is downloaded and verified, the JavaScript file of the first page to be displayed is loaded and rendered.
2) The page rendering comprises JavaScript loading, execution of page and JavaScript frame logic, layout operation and drawing of the native UI control. When the logic in the page is executed, one or more network requests are generated, and the data returned by the network requests drive the page to be rendered again until the content of the page on the first screen is completely displayed.
The network request, JavaScript execution, typesetting and drawing are not in simple serial relation, but are parallelly interwoven, thereby affecting the rendering performance of the whole page and being strongly related to the logic and network conditions of page design and the running state of equipment.
Due to the specificity of fast applications, fast applications are expected to perform more tasks and perform more functions. At present, in the process of gradually improving the functions of the fast application, the embodiment of the present disclosure provides a new function of the fast application, in which the same style data items included in the style data of different pages are added to the template style data, and the template style data is applied to a plurality of pages, so that the sharing of the style data is realized, and the functions of the fast application are expanded.
Fig. 5 is a block diagram illustrating a page presentation apparatus according to an exemplary embodiment, as shown in fig. 3, the apparatus including:
the style data acquiring module 501 is configured to acquire template style data when a target page display instruction is received, where the template style data includes a style data item of at least one dimension;
a style data item acquisition module 502 for acquiring a specified style data item of a target page;
the fusion module 503 is configured to fuse the specified style data item with the template style data to obtain fusion style data;
and a first display module 504, configured to display the target page according to the fusion style data.
The device provided by the embodiment of the disclosure acquires template style data when a target page display instruction is received, wherein the template style data comprises at least one dimension style data item, acquires a specified style data item of a target page, fuses the specified style data item and the template style data to obtain fused style data, and displays the target page according to the first fused style data. By setting the universal template style data, at least one style data item in the template style data is suitable for any page, and the specified style data item of the target page and the universal template style data are fused when the target page is displayed, so that the same style data item does not need to be set in the style data of each page, the same style data item is prevented from being stored, and the storage space for storing the style data items is saved.
In one possible implementation manner, as shown in fig. 6, the target page display instruction carries a target page identifier, and the style data item obtaining module 502 includes:
the querying unit 5201 is configured to query style configuration information according to the target page identifier to obtain a specified style data item corresponding to the target page identifier, where the style configuration information includes the page identifier and the style data item of each page.
In another possible implementation manner, as shown in fig. 6, the style data obtaining module 501 includes:
the calling unit 5101 is configured to call template style data that has been loaded into the memory.
In another possible implementation manner, as shown in fig. 6, the apparatus further includes:
the loading module 505 is configured to load the template style data into the memory when the application is started, where the target page is a page in the application.
In another possible implementation, as shown in fig. 6, the fusion module 503 includes:
the merging unit 5301 is configured to merge the specified style data item with the style data item in the template style data to obtain merged style data.
In another possible implementation manner, as shown in fig. 6, the merging unit 5301 is further configured to, when the template style data includes a first style data item having the same dimension as the specified style data item, replace the first style data item in the template style data with the specified style data item, and use style data obtained after replacement as the fused style data.
In another possible implementation manner, as shown in fig. 6, the apparatus further includes:
and a second display module 506, configured to display the target page according to the template style data when the specified style data item of the target page is not obtained.
Fig. 7 is a block diagram of a terminal according to an embodiment of the disclosure. For example, the terminal 700 may be configured to perform the steps performed by the terminal in the page displaying method provided in the foregoing embodiments. Referring to fig. 7, terminal 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the terminal 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operation at the terminal 700. Examples of such data include instructions for any application or method operating on terminal 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 706 provides power to the various components of terminal 700. Power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal 700.
The multimedia component 708 includes a screen that provides an output interface between the terminal 700 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the terminal 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing various aspects of state assessment for the terminal 700. For example, sensor assembly 714 can detect an open/closed state of terminal 700, relative positioning of components, such as a display and keypad of terminal 700, change in position of terminal 700 or a component of terminal 700, presence or absence of user contact with terminal 700, orientation or acceleration/deceleration of terminal 700, and temperature change of terminal 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communications between the terminal 700 and other devices in a wired or wireless manner. The terminal 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications.
In an exemplary embodiment, the terminal 700 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the terminal 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiment of the present disclosure also provides a computer-readable storage medium, where at least one instruction is stored in the computer-readable storage medium, and the instruction is loaded and executed by a processor to implement the operations performed in the page display method of the foregoing embodiment.
The embodiment of the present disclosure further provides a computer program, where at least one instruction is stored in the computer program, and the instruction is loaded and executed by a processor to implement the operations performed in the page display method of the foregoing embodiment.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A page display method is characterized by comprising the following steps:
when a target page display instruction is received, template style data is obtained, wherein the template style data comprises style data items of at least one dimension;
acquiring a specified style data item of a target page;
fusing the specified style data item with the template style data to obtain fused style data;
and displaying the target page according to the fusion style data.
2. The method according to claim 1, wherein the target page display instruction carries a target page identifier, and the obtaining of the specified style data item of the target page includes:
and inquiring style configuration information according to the target page identifier to obtain a specified style data item corresponding to the target page identifier, wherein the style configuration information comprises the page identifier and the style data item of each page.
3. The method of claim 1, wherein the obtaining template style data comprises:
and calling the template style data loaded into the memory.
4. The method of claim 3, further comprising:
and when an application is started, loading the template style data into the memory, wherein the target page is a page in the application.
5. The method according to claim 1, wherein fusing the specified style data item with the template style data to obtain fused style data comprises:
and combining the specified style data item with the style data item in the template style data to obtain the fusion style data.
6. The method according to claim 5, wherein merging the specified style data item with a style data item in the template style data to obtain the fused style data comprises:
and when the template style data comprises a first style data item with the same dimension as the specified style data item, replacing the first style data item in the template style data with the specified style data item, and taking style data obtained after replacement as the fusion style data.
7. The method of claim 1, further comprising:
and when the specified style data item of the target page is not acquired, displaying the target page according to the template style data.
8. A page display apparatus, the apparatus comprising:
the style data acquisition module is used for acquiring template style data when a target page display instruction is received, wherein the template style data comprises style data items of at least one dimension;
the style data item acquisition module is used for acquiring a specified style data item of the target page;
the fusion module is used for fusing the specified style data item with the template style data to obtain fused style data;
and the first display module is used for displaying the target page according to the fusion style data.
9. The apparatus according to claim 8, wherein the target page display instruction carries a target page identifier, and the style data item obtaining module includes:
and the query unit is used for querying style configuration information according to the target page identifier to obtain a specified style data item corresponding to the target page identifier, wherein the style configuration information comprises the page identifier and the style data item of each page.
10. The apparatus of claim 8, wherein the pattern data acquisition module comprises:
and the calling unit is used for calling the template style data loaded into the memory.
11. The apparatus of claim 10, further comprising:
and the loading module is used for loading the template style data into the memory when an application is started, wherein the target page is a page in the application.
12. The apparatus of claim 8, wherein the fusion module comprises:
and the merging unit is used for merging the specified style data item and the style data item in the template style data to obtain the fused style data.
13. The apparatus according to claim 12, wherein the merging unit is further configured to, when a first pattern data item having a same dimension as the specified pattern data item is included in the template pattern data, replace the first pattern data item in the template pattern data with the specified pattern data item, and use the style data obtained after replacement as the fused pattern data.
14. The apparatus of claim 8, further comprising:
and the second display module is used for displaying the target page according to the template style data when the specified style data item of the target page is not acquired.
15. An electronic device, characterized in that the electronic device comprises:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to:
when a target page display instruction is received, template style data is obtained, wherein the template style data comprises style data items of at least one dimension;
acquiring a specified style data item of a target page;
fusing the specified style data item with the template style data to obtain fused style data;
and displaying the target page according to the fusion style data.
16. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to perform operations performed in the page presentation method according to any one of claims 1 to 7.
CN201911192790.7A 2019-11-28 2019-11-28 Page display method and device and storage medium Pending CN111008057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911192790.7A CN111008057A (en) 2019-11-28 2019-11-28 Page display method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911192790.7A CN111008057A (en) 2019-11-28 2019-11-28 Page display method and device and storage medium

Publications (1)

Publication Number Publication Date
CN111008057A true CN111008057A (en) 2020-04-14

Family

ID=70112513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911192790.7A Pending CN111008057A (en) 2019-11-28 2019-11-28 Page display method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111008057A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112672226A (en) * 2020-12-22 2021-04-16 深圳市创维软件有限公司 Display mode setting method, playing device and readable storage medium
CN113268237A (en) * 2021-05-25 2021-08-17 平安科技(深圳)有限公司 Function page generation method, device, equipment and medium of function module
CN113934469A (en) * 2021-10-13 2022-01-14 北京有竹居网络技术有限公司 Template loading method, control method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373567A (en) * 2014-09-01 2016-03-02 北京奇虎科技有限公司 Page generation method and client
CN108038134A (en) * 2017-11-20 2018-05-15 东软集团股份有限公司 The method, apparatus and storage medium and electronic equipment of page presentation
US20190102366A1 (en) * 2016-09-30 2019-04-04 Tencent Technology (Shenzhen) Company Limited Information processing method, terminal, and computer storage medium
US20190213262A1 (en) * 2016-12-12 2019-07-11 Tencent Technology (Shenzhen) Company Limited Methods and devices for processing template data, requesting template data, and presenting template data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373567A (en) * 2014-09-01 2016-03-02 北京奇虎科技有限公司 Page generation method and client
US20190102366A1 (en) * 2016-09-30 2019-04-04 Tencent Technology (Shenzhen) Company Limited Information processing method, terminal, and computer storage medium
US20190213262A1 (en) * 2016-12-12 2019-07-11 Tencent Technology (Shenzhen) Company Limited Methods and devices for processing template data, requesting template data, and presenting template data
CN108038134A (en) * 2017-11-20 2018-05-15 东软集团股份有限公司 The method, apparatus and storage medium and electronic equipment of page presentation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112672226A (en) * 2020-12-22 2021-04-16 深圳市创维软件有限公司 Display mode setting method, playing device and readable storage medium
CN113268237A (en) * 2021-05-25 2021-08-17 平安科技(深圳)有限公司 Function page generation method, device, equipment and medium of function module
CN113934469A (en) * 2021-10-13 2022-01-14 北京有竹居网络技术有限公司 Template loading method, control method, device, equipment and storage medium
CN113934469B (en) * 2021-10-13 2023-11-24 北京有竹居网络技术有限公司 Template loading method, control method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
CN111026490B (en) Page rendering method and device, electronic equipment and storage medium
CN110874217B (en) Interface display method and device for quick application and storage medium
CN110990075B (en) Method, device, equipment and storage medium for starting fast application
WO2020038163A1 (en) Icon display method and apparatus, and terminal and storage medium
CN109542417B (en) Method, device, terminal and storage medium for rendering webpage through DOM
CN109710259B (en) Data processing method, device and storage medium
CN111008057A (en) Page display method and device and storage medium
CN110971974B (en) Configuration parameter creating method, device, terminal and storage medium
US20230004620A1 (en) Page display method
CN110851108A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN110865863B (en) Interface display method and device for fast application and storage medium
CN110851240B (en) Function calling method, device and storage medium
CN111046265B (en) Card data display method, device, equipment and storage medium
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
CN110865864B (en) Interface display method, device and equipment for quick application and storage medium
US11210119B2 (en) Method and device for displaying interface, electronic equipment, server, and storage medium
CN111104183B (en) Application program running method and device, electronic equipment and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN110891194B (en) Comment information display method and device, terminal and storage medium
CN111221613B (en) Program calling method and device and storage medium
CN110865760A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN110908629A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN110990105B (en) Interface display method and device, electronic equipment and storage medium
CN111026491B (en) Interface display method, device, electronic equipment, server and storage medium

Legal Events

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