CN111597002A - Page rendering method and device, electronic equipment and storage medium - Google Patents

Page rendering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111597002A
CN111597002A CN202010414188.XA CN202010414188A CN111597002A CN 111597002 A CN111597002 A CN 111597002A CN 202010414188 A CN202010414188 A CN 202010414188A CN 111597002 A CN111597002 A CN 111597002A
Authority
CN
China
Prior art keywords
mode
page
page control
rendered
preset
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
CN202010414188.XA
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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010414188.XA priority Critical patent/CN111597002A/en
Publication of CN111597002A publication Critical patent/CN111597002A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

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

Abstract

The embodiment of the invention provides a page rendering method and device, electronic equipment and a storage medium. The scheme is as follows: the method comprises the steps that when a mode switching behavior for switching a page display mode of a current page is monitored by a mode manager, a global notification message is sent; when each page control receives the global notification message, requesting a preset interface for target object parameters of an object to be rendered in a mode to be switched; the preset interface determines target object parameters in a to-be-switched mode based on a mode identifier in the global notification message and a preset corresponding relation between the object parameters of each object in the page control and the mode identifier; and each page control renders the object to be rendered included in the page control according to the target object parameter of the object to be rendered. By the technical scheme provided by the embodiment of the invention, the intrusiveness of the page display mode conversion process to the software architecture of the application software and the service logic of the page is effectively reduced, so that the stability of the service performance of the page is ensured.

Description

Page rendering method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a page rendering method and apparatus, an electronic device, and a storage medium.
Background
With the development of the mobile internet and the popularization of the intelligent mobile terminal, in order to improve the visual experience of the user using the intelligent mobile terminal, various page display modes, such as a dark mode and a night mode, are developed.
At present, when the page display mode of the intelligent mobile terminal is adapted, the software architecture of the application software in the intelligent mobile terminal needs to be adjusted, and the service logic implementation of the page is also affected, so that the software architecture of the application software and the service logic of the page have higher intrusiveness when the page display mode of the page is converted, and the service performance of the page is affected.
Disclosure of Invention
The embodiment of the invention aims to provide a page rendering method, a page rendering device, electronic equipment and a storage medium, so as to reduce the intrusiveness of a page display mode conversion process on a software architecture of application software and a service logic of a page, thereby ensuring the stability of the service performance of the page. The specific technical scheme is as follows:
in a first aspect of an embodiment of the present invention, a page rendering method is first provided, where the page rendering method is applied to an intelligent mobile terminal, where the intelligent mobile terminal includes a mode manager, a preset interface, and multiple page controls, and the method includes:
the method comprises the steps that when a mode switching behavior for switching a page display mode of a current page is monitored by a mode manager, a global notification message comprising a mode identifier corresponding to a mode to be switched is sent;
when each page control receives the global notification message, requesting a preset interface for target object parameters of an object to be rendered included by the page control in the mode to be switched;
the preset interface determines target object parameters of the objects to be rendered requested by each page control in the to-be-switched mode based on the mode identifier in the global notification message and a preset corresponding relationship between the object parameters of each object in the page control and the mode identifier; returning the target object parameter of each object to be rendered to the corresponding page control;
and each page control renders the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
Optionally, when receiving the global notification message, the step of requesting, from the preset interface, a target object parameter of an object to be rendered included in the page control in the to-be-switched mode includes:
when each page control receives the global notification message, selecting an object displayed on a display interface in the page control as an object to be rendered;
and each page control requests the preset interface for the target object parameters of the object to be rendered included by the page control in the mode to be switched according to the selected object to be rendered.
Optionally, the preset interface includes a preset color value interface and a preset image interface; the object to be rendered comprises a color value object and/or an image object;
when each page control receives the global notification message, the step of requesting the preset interface for the target object parameters of the object to be rendered included in the page control in the mode to be switched includes:
when each page control receives the global notification message, if an object to be rendered included in the page control includes a color value object, the page control sends a first acquisition request for an object parameter corresponding to the color value object to the preset color value interface; and/or
And if the object to be rendered included in the page control contains an image object, sending a second acquisition request aiming at the object parameter corresponding to the image object to the preset image interface.
Optionally, the step of determining, by the preset interface, target object parameters of the object to be rendered requested by each page control in the to-be-switched mode based on the mode identifier in the global notification message and the preset correspondence between the object parameter of each object in the page control and the mode identifier includes:
when receiving the first acquisition request, the preset color value interface determines color values corresponding to the mode identifier in the global notification message and the color value object corresponding to the first acquisition request as target object parameters of the color value object requested by the page control sending the first acquisition request in the to-be-switched mode according to a preset corresponding relationship between the object parameters and the mode identifier of each object in the page control; and/or
And when receiving the second acquisition request, the preset image interface determines, according to a preset corresponding relationship between the object parameter and the mode identifier of each object in the page control, the image corresponding to the mode identifier in the global notification message and the image object corresponding to the second acquisition request as the target object parameter of the image object requested by the page control sending the second acquisition request in the to-be-switched mode.
Optionally, the step of sending a global notification message including a mode identifier corresponding to the mode to be switched includes:
if the mode switching behavior comprises a mode identifier of a mode to be switched, sending a global notification message based on the mode identifier of the mode to be switched;
if the mode switching behavior does not include the mode identifier of the mode to be switched, determining the mode to be switched based on the page display mode of the current page or the environmental parameters of the current environment, and sending a global notification message including the mode identifier corresponding to the mode to be switched.
Optionally, the step of rendering, by each page control, the object to be rendered included in the page control according to the received target object parameter of the object to be rendered includes:
and each page control carries out self-assignment operation on the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
In a second aspect of the embodiments of the present invention, there is also provided a page rendering apparatus, applied to an intelligent mobile terminal, where the intelligent mobile terminal includes a mode manager, a preset interface, and multiple page controls;
the mode manager is used for sending a global notification message including a mode identifier corresponding to a mode to be switched when monitoring a mode switching behavior for switching a page display mode of a current page;
each page control is used for requesting the preset interface for the target object parameters of the object to be rendered included by the page control in the mode to be switched when the global notification message is received;
the preset interface is used for determining target object parameters of the objects to be rendered requested by each page control in the to-be-switched mode based on the mode identifier in the global notification message and the preset corresponding relationship between the object parameters of each object in the page control and the mode identifier; returning the target object parameter of each object to be rendered to the corresponding page control;
and each page control is used for rendering the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
Optionally, each page control is specifically configured to select, when the global notification message is received, an object displayed on a display interface in the page control as an object to be rendered; and according to the selected object to be rendered, requesting a target object parameter of the object to be rendered included by the page control in the mode to be switched from the preset interface.
Optionally, the preset interface includes a preset color value interface and a preset image interface; the object to be rendered comprises a color value object and/or an image object;
each page control is specifically configured to, when receiving the global notification message, send a first acquisition request for an object parameter corresponding to a color value object to the preset color value interface if an object to be rendered included in the page control includes the color value object; and/or if the object to be rendered included in the page control includes an image object, sending a second acquisition request for the object parameter corresponding to the image object to the preset image interface.
Optionally, the preset color value interface is specifically configured to, when the first acquisition request is received, determine, according to a preset correspondence between an object parameter of each object in a page control and a mode identifier, a color value corresponding to the mode identifier in the global notification message and a color value object corresponding to the first acquisition request as a target object parameter of a color value object requested by the page control that sends the first acquisition request in the to-be-switched mode;
the preset image interface is specifically configured to, when the second acquisition request is received, determine, according to a preset correspondence between an object parameter and a mode identifier of each object in a page control, an image corresponding to the mode identifier in the global notification message and an image object corresponding to the second acquisition request as a target object parameter of the image object requested by the page control that sends the second acquisition request in the to-be-switched mode.
Optionally, the mode manager is specifically configured to send a global notification message based on the mode identifier of the mode to be switched if the mode switching behavior includes the mode identifier of the mode to be switched; if the mode switching behavior does not include the mode identifier of the mode to be switched, determining the mode to be switched based on the page display mode of the current page or the environmental parameters of the current environment, and sending a global notification message including the mode identifier corresponding to the mode to be switched.
Optionally, each page control is specifically configured to perform a self-assignment operation on the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
In a third aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any page rendering method step when executing the program stored in the memory.
In a fourth aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to execute any one of the above-mentioned page rendering methods.
In a fifth aspect of the embodiments of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described page rendering methods.
According to the page rendering method, the page rendering device, the electronic device and the storage medium provided by the embodiment of the invention, when monitoring a switching behavior for switching a page display mode of a current page, a mode manager enables each page control to request a preset interface for a target object parameter of an object to be rendered in the mode to be switched by sending a global notification message, and the preset interface can return the corresponding target object parameter to each page control, so that each page control renders the object to be rendered according to the received target object parameter. Compared with the prior art, the preset interface determines the target object parameters of the object to be rendered in the mode to be switched included in each page control according to the preset corresponding relation between the object parameters of each object in the page control and the mode identification, so that when the page display mode of the current page is switched, the software architecture of the application software in the intelligent mobile terminal does not need to be adjusted, the service logic of the page is not influenced, the intrusiveness of the page display mode switching process on the software architecture of the application software and the service logic of the page is effectively reduced, and the stability of the page service performance is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a first flowchart of a page rendering method according to an embodiment of the present invention;
fig. 2 is a second flowchart of a page rendering method according to an embodiment of the present invention;
fig. 3 is a third flowchart illustrating a page rendering method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a process for determining target object parameters corresponding to a color value object according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a process for determining target object parameters corresponding to an image object according to an embodiment of the present invention;
fig. 6 is a fourth flowchart illustrating a page rendering method according to an embodiment of the present invention;
fig. 7 is a fifth flowchart illustrating a page rendering method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a page rendering apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to solve the problems that the intrusiveness of the conversion process of the existing page display mode on the software architecture of the application software and the business logic of the page is high and the business performance of the page is influenced, the embodiment of the invention provides a page rendering method. The method can be applied to any intelligent mobile terminal. The intelligent mobile terminal includes but is not limited to electronic devices such as a smart phone, a computer, and a smart band. The intelligent mobile terminal comprises a mode manager, a preset interface and a plurality of page controls.
As shown in fig. 1, fig. 1 is a first flowchart of a page rendering method according to an embodiment of the present invention. The method is applied to the intelligent mobile terminal and specifically comprises the following steps.
Step S101, when monitoring a mode switching behavior for switching a page display mode of a current page, a mode manager sends a global notification message including a mode identifier corresponding to a mode to be switched.
Step S102, when each page control receives the global notification message, the target object parameters of the object to be rendered included by the page control in the mode to be switched are requested from a preset interface.
Step S103, a preset interface determines target object parameters of objects to be rendered requested by each page control in a mode to be switched based on a mode identifier in the global notification message and a preset corresponding relation between an object parameter of each object in the page control and the mode identifier; and returning the target object parameter of each object to be rendered to the corresponding page control.
And step S104, rendering the object to be rendered included in the page control by each page control according to the received target object parameter of the object to be rendered.
By the method provided by the embodiment of the invention, when monitoring the switching behavior for switching the page display mode of the current page, the mode manager can make each page control request the target object parameter of the object to be rendered in the mode to be switched from the preset interface by sending the global notification message, and the preset interface can return the corresponding target object parameter to each page control, so that each page control renders the object to be rendered according to the received target object parameter. Compared with the prior art, the preset interface determines the target object parameters of the object to be rendered in the mode to be switched included in each page control according to the preset corresponding relation between the object parameters of each object in the page control and the mode identification, so that when the page display mode of the current page is switched, the software architecture of the application software in the intelligent mobile terminal does not need to be adjusted, the service logic of the page is not influenced, the intrusiveness of the page display mode switching process on the software architecture of the application software and the service logic of the page is effectively reduced, and the stability of the page service performance is ensured.
The following examples illustrate the present invention.
For the step S101, when monitoring a mode switching behavior for switching a page display mode of a current page, a mode manager sends a global notification message including a mode identifier corresponding to a mode to be switched.
In the embodiment of the invention, a mode manager, namely themeManager, can be preset in the intelligent mobile terminal. The mode manager can monitor the page display mode of the current page of the display interface of the intelligent mobile terminal in real time. And the mode manager can also monitor whether the mode switching behavior for switching the page display mode of the current page is triggered in real time. Upon determining that a mode switch behavior has been triggered, the mode manager may send a global notification message according to the traversal results for the current page. That is, through traversing the current page, a plurality of page controls corresponding to the current page and a preset interface are determined, and thus, a global notification message is respectively sent to each page control and the preset interface. And each page control and the preset interface in the intelligent mobile terminal can receive the global notification message. And the global notification message comprises a mode identifier corresponding to the mode to be switched.
In an embodiment of the present invention, the mode switching behavior may be automatically or passively triggered by the smart mobile terminal. For example, a user can trigger a mode switching behavior for switching a page display mode of a current display interface of the intelligent mobile terminal according to own requirements. At this time, the intelligent mobile terminal will passively trigger the mode switching behavior, that is, the mode manager will monitor the mode switching behavior of the page display mode for the current page. For another example, the smart mobile terminal may automatically trigger the mode switching behavior according to the environmental parameters of the current environment. That is, the intelligent mobile terminal may automatically trigger the mode switching behavior when the environmental parameter of the current environment reaches the preset environmental parameter threshold. At this time, the mode manager will monitor the mode switching behavior of the page display mode for the current page. Here, the trigger of the mode switching action is not particularly limited.
The environment parameters of the current environment include, but are not limited to, the current time and the ambient brightness.
In the embodiment of the present invention, the page display mode may be a mode corresponding to a dark color/light color mode. The color mode may be a mode corresponding to a day/night view mode. Here, the page display mode is not particularly limited. In addition, the mode to be switched is a page display mode to be switched, namely, a page display mode corresponding to a page after the page display mode of the page is switched. The mode to be switched can be any page display mode of a dark color/light color mode and a day/night scene mode.
The dark/light mode is not the same as the day/night view mode. The design of the dark/light mode described above focuses primarily on visual performance. The dark mode is a User Interface (UI) design that the intelligent mobile terminal provides for display in a dimly lit environment. The page display modes corresponding to the dark/light modes include only the dark mode and the light mode. Namely, the page display mode of the current page is either a light color mode or a dark color mode. The day/night scene mode is to ensure the readability of the information displayed on the display interface in a dark environment, avoid the stimulation of the light quantity of the display interface to the eyes of the user and save energy. The day mode and the night mode may respectively provide a plurality of page display modes for the user to select. Here, the page display mode is not particularly limited. The light color mode may be a default page display mode in the intelligent mobile terminal, a page display mode set by a user, or any page display mode in the day/night scene mode.
In an optional embodiment, when the mode switching behavior includes a mode identifier of a to-be-switched mode, the sending of the global notification message including the mode identifier corresponding to the to-be-switched mode in step S101 may specifically be represented as: and sending a global notification message comprising the mode identifier corresponding to the mode to be switched according to the mode identifier of the mode to be switched.
For example, when the mode switching behavior is triggered by a user clicking or selecting a mode to be switched, the mode switching behavior carries a mode identifier of the mode to be switched clicked or selected by the user. The mode manager can directly send the global notification message according to the mode identifier of the mode to be switched carried in the mode switching behavior.
In another optional embodiment, when the mode switching behavior does not include the mode identifier of the mode to be switched, the sending of the global notification message including the mode identifier corresponding to the mode to be switched in step S101 may specifically be represented as: determining a mode to be switched based on a page display mode of a current page or an environmental parameter of a current environment, and sending a global notification message including a mode identifier corresponding to the mode to be switched.
For example, the above-mentioned mode switching behavior is automatically triggered by the smart mobile terminal. At this time, if the mode management monitors that the page display mode of the current page is one of the light color mode and the dark color mode, the mode manager can determine the mode identifier of the mode to be switched. That is, when the page display mode of the current page is the light color mode, the mode administrator can determine that the mode identifier of the mode to be switched is the mode identifier corresponding to the dark color mode. When the page display mode of the current page is the deep color mode, the mode manager can determine that the mode identifier of the mode to be switched is the mode identifier corresponding to the deep color mode. The mode manager sends the global notification message.
For another example, the above-mentioned mode switching behavior is still automatically triggered by the smart mobile terminal. At this time, if the mode management monitors that the page display mode of the current page is one of the day/night scene modes, the mode manager may determine the page display mode corresponding to the environmental parameter of the current environment, that is, the mode to be switched, according to the environmental parameter of the current environment and the preset corresponding relationship between the environmental parameter and the page display mode, thereby determining the mode identifier of the mode to be switched. The mode manager sends the global notification message.
In the embodiment of the present invention, the determination of the to-be-switched mode and the mode identifier of the to-be-switched mode is not specifically limited.
For step S102, when receiving the global notification message, each page control requests the preset interface for the target object parameters of the object to be rendered included in the page control in the mode to be switched.
In an optional embodiment, after receiving the global notification message sent by the mode manager, each page control may screen out an object to be rendered from a plurality of objects included in the page control, so as to request, from the preset interface, a target object parameter of the object to be rendered in the mode to be rendered. For example, each page control may send a get request including an object identifier of an object to be rendered to the preset interface.
In the embodiment of the present invention, the preset interface may include a preset color value interface and a preset image interface; the object to be rendered included in each page control may include a color value object and/or an image object.
For convenience of understanding, a page control including a clock in a display interface of a mobile phone is taken as an example, an image object included in the page control is a picture of the clock, and the color value object may be a background color of the page control and a foreground color corresponding to the clock image. That is, the object to be rendered included in the page control is a clock image, a background color of the page control, and a foreground color corresponding to the clock image. In the embodiment of the present invention, the objects to be rendered included in each page control may be the same or different, and here, the objects to be rendered included in each page control are not specifically limited.
For the step S103, the preset interface determines the target object parameter of the object to be rendered requested by each page control in the mode to be switched, based on the mode identifier in the global notification message and the preset corresponding relationship between the object parameter of each object in the page control and the mode identifier; and returning the target object parameter of each object to be rendered to the corresponding page control.
In the embodiment of the present invention, when the object to be rendered is a color value object, the target object parameter returned to the page control by the preset interface is a color value corresponding to the color value object in the mode to be switched, such as a Red, Green, Blue (RGB) value. When the object to be rendered is an image object, the target object parameters returned to the page control by the preset interface are corresponding image parameters of the image object in the mode to be switched, such as image shape, size and other parameters.
The preset interface is an interface for providing services to the outside, which is obtained by encapsulating a preset color value object or a preset image object. For the above preset interface and the method for obtaining the target object parameter of the object to be rendered included in each page control, reference may be made to the following description, which is not specifically described herein.
In the embodiment of the present invention, the preset interface stores a preset corresponding relationship between an object parameter and a mode identifier of each object in the page control, and may be specifically as shown in table 1.
TABLE 1
Pattern identification Object identification Object parameters
Mode 1 Object 1 Parameter 1
Mode 1 Object 2 Parameter 2
Mode 2 Object 1 Parameter 3
Mode 2 Object 2 Parameter 4
The preset correspondence shown in table 1 includes correspondence among a pattern identifier, an object identifier, and an object parameter. For example, the target object parameter of the object 1 in the mode 1 is the parameter 1. In addition to the pattern identifier, the object identifier, and the object parameter shown in table 1, the preset correspondence may include other information. For example, in order to facilitate determination of the target object parameter of the object to be rendered corresponding to each page control, the preset corresponding relationship may further include a page control identifier of each page control. Here, the preset correspondence relationship is not particularly limited.
The preset interface comprises a preset color value interface and a preset image interface, so that a preset object relation between the object parameter and the mode identifier of each color value object in the page control is stored in the preset color value interface. And a preset object relation between the object parameter and the mode identifier of each image object in the page airborne process is stored in the preset color value interface.
Through the preset interface, the intelligent mobile terminal can accurately obtain the target object parameters of the object to be rendered, which are included by the page control, and the accuracy of the target object parameters of the object to be rendered, which are obtained by the page control, is improved.
For the step S104, each page control renders the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
In an optional embodiment, when each page control renders an object to be rendered included therein, each page control may render the object to be rendered included in each page control in a hierarchical order corresponding to the current page, for example, according to an order from top to bottom or according to an order from bottom to top of the hierarchy, so as to obtain a rendered page, that is, a page in the to-be-switched mode.
The hierarchical order of each page control in the current page may be determined according to the traversal result of the mode manager traversing the current page.
In an optional embodiment, for the step S103 and the step S104, the intelligent mobile terminal may obtain, layer by layer, a target object parameter corresponding to an object to be rendered included in each page control, and immediately render the object to be rendered included in the page control when the target object parameter is obtained, thereby completing rendering of the object to be rendered included in each page control, and obtaining a rendered page.
In another optional embodiment, for step S103 and step S104, the smart mobile terminal may obtain a target object parameter corresponding to an object to be rendered included in each page control. And after the target object parameters corresponding to all the page controls are obtained, sequentially rendering each page control of the current page according to the target object parameters corresponding to the object to be rendered included in each page control, so as to obtain the rendered page. For example, when each page control receives the corresponding target object parameter, a service or a process may control rendering of the object to be rendered included in each page control.
In an optional embodiment, in the method shown in fig. 1, the intelligent mobile terminal may further receive an update instruction of the preset corresponding relationship between the object parameter and the mode identifier of each object in the page control, and update the preset corresponding relationship between the object parameter and the mode identifier of each object in the page control based on the update instruction.
In the embodiment of the invention, a business party can maintain the color matching schemes of different page display modes, a design party or an adapter party only needs to update the preset corresponding relation between the object parameter and the mode identifier of each object in the page control according to specific requirements, the software architecture of the application software of the intelligent mobile terminal does not need to be adjusted, the business logic of the page is not influenced, the intrusiveness of the page display mode adaptation or conversion process on the software architecture of the application software and the business logic of the page is effectively reduced, and the stability of the page business performance is ensured.
In the embodiment of the present invention, the page display mode switching process of the current page in the intelligent mobile terminal is triggered by the mode manager, that is, the mode manager monitors whether to trigger the mode switching behavior, and sends the global notification message when monitoring the mode switching behavior, so that each page control obtains the target object parameter of the object to be rendered, and performs page rendering according to the obtained target object parameter. In addition, the switching process of the page display mode of the current page can also be triggered by the above page controls. For example, when the mode switching behavior is triggered by the intelligent mobile terminal, the page control may trigger the step of acquiring the target object parameter of the object to be rendered in the mode to be switched, so as to render the page according to the acquired target object parameter. Compared with the method for triggering the switching process of the page display mode of the current page by the page control, the method for triggering the switching process of the page display mode of the current page by the mode manager in the embodiment of the invention can be suitable for the switching process of the page display modes of different application software, and has small invasion to the service logic of each application software, thereby effectively improving the portability of the mode manager, expanding the application range of the page rendering method and improving the universality of the page rendering method.
In an optional embodiment, according to the method shown in fig. 1, an embodiment of the present invention further provides a page rendering method. As shown in fig. 2, fig. 2 is a second flowchart of a page rendering method according to an embodiment of the present invention. The method comprises the following steps.
Step S201, when monitoring a mode switching behavior for switching a page display mode of a current page, a mode manager sends a global notification message including a mode identifier corresponding to a mode to be switched.
Step S201 is the same as step S101.
Step S202, when each page control receives the global notification message, selecting an object displayed on a display interface in the page control as an object to be rendered.
In this step, multiple objects may be included in each page control. When the object to be rendered corresponding to each page control is determined, a plurality of objects included in each page control can be screened, that is, each page control can determine the object displayed on the display interface of the intelligent mobile terminal in the page control at the current moment as the object to be rendered.
In the embodiment of the present invention, the display interface of the intelligent mobile terminal may include a plurality of page controls of different hierarchies. Taking the display interface of the intelligent mobile terminal of the apple Operating System (iOS) as an example, the current page of the display interface may include page controls such as a user interface window (UIWindow), a user interface view controller-view (uiview), a view-sub-view (view). The page controls are stacked and displayed according to a preset hierarchical sequence, and therefore the current page is obtained. However, for all page controls included in the current page, there may be page controls or objects among the page controls that are not displayed in the current page. Therefore, by screening a plurality of objects included in each page control, the number of objects to be rendered included in each page control can be reduced on the premise that each object displayed in the display interface of the intelligent mobile terminal can be rendered, so that the time for rendering each page control in the later period is effectively shortened, and the page rendering efficiency is improved.
Step S203, each page control requests, according to the selected object to be rendered, a preset interface for a target object parameter of the object to be rendered included in the page control in the mode to be switched.
The step S203 is not specifically described herein with reference to the step S102.
Step S204, a preset interface determines target object parameters of the objects to be rendered requested by each page control in the mode to be switched based on the mode identification in the global notification message and the preset corresponding relation between the object parameters of each object in the page control and the mode identification; and returning the target object parameter of each object to be rendered to the corresponding page control.
In step S205, each page control renders the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
The above-described steps S204 to S205 are the same as the above-described steps S103 to S104.
In an optional embodiment, the preset interface includes a preset color value interface and a preset image interface. According to the method shown in fig. 1, an embodiment of the present invention further provides a page rendering method. As shown in fig. 3, fig. 3 is a third flowchart illustrating a page rendering method according to an embodiment of the present invention. The method comprises the following steps.
Step S301, when monitoring a mode switching behavior for switching a page display mode of a current page, a mode manager sends a global notification message including a mode identifier corresponding to a mode to be switched.
Step S301 is the same as step S101.
Step S302, when each page control receives the global notification message, if the object to be rendered included in the page control includes a color value object, the page control sends a first obtaining request for an object parameter corresponding to the color value object to a preset color value interface.
The first obtaining request includes an object identifier of the color value object.
Step S303, when each page control receives the global notification message, if the object to be rendered included in the page control includes an image object, sending a second acquisition request for an object parameter corresponding to the image object to a preset image interface.
The second acquisition request includes an object identifier of the image object.
For the above step S302 and step S303, the obtaining request sent by each page control is different according to the difference of the object to be rendered included in each page control. For example, a page control that includes only color value objects will only send the first get request described above. The page control including only the image object will send only the second acquisition request. The page control, which includes both the color value object and the image object, will send the first and second acquisition requests described above.
Step S304, when the preset color value interface receives the first acquisition request, according to the preset corresponding relation between the object parameter and the mode identifier of each object in the page control, the color value corresponding to the mode identifier in the global notification message and the color value object corresponding to the first acquisition request is determined as the target object parameter of the color value object requested by the page control sending the first acquisition request in the mode to be switched.
In the embodiment of the present invention, the preset color value interface is a service interface provided to the outside after a preset color value object, that is, the ThemeColor, is encapsulated. The preset color value object is inherited from UIColor (user interface color), and the preset color value object internally comprises a method a1, a property B1 and a property C1, which can be specifically expressed as follows:
method A1: UIcolor ^ interface Styleprovider (__ kindof NSString ^ _ Nullableidentifier);
attribute B1: NSString _ current themeidentifier;
attribute C1: UIColor ui rawColor.
The method a1 is a function pointer (block), the parameter of which is the mode identifier of the mode to be switched, i.e. identifier, and the block return value is UIColor color value, i.e. the object parameter corresponding to the color value object, the block is implemented outside the interface, and the block is called inside the interface and returns the object parameter. Attribute B1 is the mode identification of the mode to be switched. The attribute C1 is a color value held by the ThemeColor in the mode to be switched, that is, an object parameter corresponding to the color value object.
In the embodiment of the invention, the acquisition method of the raw color in the Themecolor is rewritten. When the preset color value interface receives the first obtaining request, the preset color value interface transmits a mode identifier of a mode to be switched, namely an attribute B1, serving as a parameter to an internal execution method A1, so that the color value corresponding to the color value object is returned to the page control according to the preset corresponding relation between the object parameter of each color value object in the page control and the mode identifier, and the target object parameter corresponding to the color value object is obtained.
For ease of understanding, the determination of the target object parameters corresponding to the color-valued object will be described with reference to fig. 4. Fig. 4 is a schematic flowchart of a process for determining target object parameters corresponding to a color value object according to an embodiment of the present invention.
Step S401, a page control having a color value object in a current page sends a first obtaining request including an object identifier of an object to be rendered to a preset color value interface.
Step S402, when the preset color value interface receives the first acquisition request, the method for acquiring the color value is triggered. I.e. triggering the acquisition method of ui _ rawColor.
In this step, the preset color value interface determines the target object parameter of the color value object in the page control in the mode to be switched according to the mode identifier in the global notification message, the object identifier in the first acquisition request, and the preset corresponding relationship between the object parameter of each color value object in the page control and the mode identifier. That is, the preset color value interface triggers method A1 described above and internally accesses its ui _ rawColor attribute (i.e., attribute C1 described above). And triggering the block by a preset color value interface, inputting parameters by taking a mode identifier (namely the attribute B1) in the global notification message, and acquiring a ui _ rawColor value of the color value object in the page control to be switched in combination with an internal ui _ rawColor attribute according to a preset corresponding relation between an object parameter and the mode identifier of each color value object in the page control stored in the preset color value interface and the object identifier in the first acquisition request, wherein the ui _ rawColor value is used as a target object parameter corresponding to the color value object.
In step S403, the preset color value interface returns the determined target object parameter to the page control with the color value object, so that the page control with the color value object renders the color value object according to the received target object parameter.
In this step, the preset color value interface may package a target object parameter (i.e., the ui _ rawColor) corresponding to the color value object as a CGColor, and return the CGColor to the page control having the color value object. CGcolor is a color component.
In the embodiment of the invention, the native interface in the intelligent mobile terminal is used for acquiring the target corresponding parameters corresponding to the color value objects included in the page control, so that the method has the characteristics of low dependency and high portability.
Step S305, when the preset image interface receives the second acquisition request, according to the preset corresponding relation between the object parameter and the mode identifier of each object in the page control, determining the image corresponding to the mode identifier in the global notification message and the image object corresponding to the second acquisition request as the target object parameter of the image object requested by the page control sending the second acquisition request in the to-be-switched mode.
In the embodiment of the present invention, the preset image interface is a service interface provided to the outside after a preset image object, that is, the theamage, is encapsulated. The preset image object is inherited from the NSObject class, which belongs to the root class and is located at the highest level in the hierarchy. The preset image object internally comprises a method A2, an attribute B2 and an attribute C2, and can be specifically represented as follows:
method A2: UIImage (^ interface StyleProvider) (__ kindof NSString ^ _ Nullableidentifier);
attribute B2: NSString _ current themeidentifier;
attribute C2: UIImage ui _ rawImage.
The method a2 is a block, the parameter of which is the mode identifier of the mode to be switched, i.e., identifier, and the block return value is an NSObject image, i.e., the object parameter corresponding to the image object, the block is implemented outside the interface, and the block is called inside the interface and returns the object parameter. Attribute B2 is the mode identification of the mode to be switched. The attribute C2 is an image parameter held by the media image in the mode to be switched, that is, an object parameter corresponding to the image object.
In the embodiment of the present invention, the method for acquiring the raw image in the message image class is rewritten. When the preset image interface receives the second acquisition request, the preset image interface transmits a mode identifier of a mode to be switched, namely an attribute B2, as a parameter by using an internal execution method A2, so that the image parameters corresponding to the image objects are returned to the page control according to the preset corresponding relationship between the object parameters of each image object in the preset page control and the mode identifier, and the target object parameters corresponding to the image objects are obtained.
For ease of understanding, the determination of the target object parameters corresponding to the image object is described with reference to fig. 5. Fig. 5 is a schematic flow chart of a process for determining a target object parameter corresponding to an image object according to an embodiment of the present invention.
Step S501, the page control having the image object in the current page sends a second obtaining request including the object identifier of the object to be rendered to the preset image interface.
Step S502, when the preset image interface receives the second acquisition request, the method for acquiring the image parameters is triggered. That is, the acquisition method of ui _ rawImage is triggered.
In this step, the preset image interface determines target object parameters of the image objects in the page control in the mode to be switched according to the mode identifier in the global notification message, the object identifier in the second acquisition request, and the preset corresponding relationship between the object parameters of each image object in the page control and the mode identifier. That is, the default image interface triggers the method A2 and internally accesses its ui _ rawImage attribute (i.e., the attribute C2). And triggering the block by a preset image interface, inputting by taking a mode identifier (namely the attribute B2) in the global notification message as a parameter, and acquiring a ui _ rawImage value, which is smaller than the mode to be switched, of the image object in the page control as a target object parameter corresponding to the image object according to a preset corresponding relation between the object parameter and the mode identifier of each image object in the stored page control in the preset image interface and the object identifier in the second acquisition request by combining the internal ui _ rawImage attribute.
In step S503, the preset image interface returns the determined target object parameter to the page control with the image object, so that the page control with the image object renders the image object according to the received target object parameter.
In the embodiment of the invention, the native interface in the intelligent mobile terminal is used for acquiring the target corresponding parameters corresponding to the image objects included in the page control, so that the method has the characteristics of low dependency and high portability.
In the embodiment of the invention, each page control directly returns the color value object included in the page control and the target object parameter corresponding to the image object by using the preset color value interface and the preset image interface, and the object to be rendered is rendered, because the preset color value interface and the preset image interface do not influence the architecture of the application software, and the target object parameters returned by the preset color value interface and the preset image interface are the color value and the image parameter existing in the intelligent mobile terminal, namely the ui _ raw color and the ui _ raw image, the intrusiveness of the page display mode conversion process to the software architecture and the service logic is effectively reduced.
Step S306, the preset interface returns the determined target object parameter of each object to be rendered to the corresponding page control.
In this step, the preset color value interface returns the color value of each color value object determined by the preset color value interface in the mode to be rendered to the corresponding page control. And the preset image interface returns the image parameters of each determined image object in the to-be-rendered mode to the corresponding page control.
Step S307, each page control renders the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
Step S307 is the same as step S104.
In the embodiment shown in fig. 3, the preset interface is divided into the preset color value interface and the preset image interface according to the category of the object to be rendered included in each page control, that is, the category corresponding to the color value object and the image object, so that when the method shown in fig. 4 or fig. 5 is called, the preset color value interface or the preset image interface does not need to introduce a new header file, that is, the business logic for determining the target object parameter of the object to be rendered is not required to be modified, thereby reducing the intrusiveness on the business logic.
In an optional embodiment, according to the method of fig. 1, an embodiment of the present invention further provides a page rendering method. As shown in fig. 6, fig. 6 is a fourth flowchart illustrating a page rendering method according to an embodiment of the present invention. The method comprises the following steps.
Step S601, when monitoring a mode switching behavior for switching a page display mode of a current page, a mode manager sends a global notification message including a mode identifier corresponding to a mode to be switched.
Step S602, when each page control receives the global notification message, requesting, from a preset interface, a target object parameter of an object to be rendered included in the page control in the mode to be switched.
Step S603, a preset interface determines target object parameters of the objects to be rendered requested by each page control in the mode to be switched based on the mode identification in the global notification message and the preset corresponding relationship between the object parameters of each object in the page control and the mode identification; and returning the target object parameter of each object to be rendered to the corresponding page control.
The above steps S601 to S603 are the same as the above steps S101 to S103.
In step S604, each page control performs a self-assignment operation on the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
Taking an object to be rendered as a background color of a certain color value object in a page control as an example, the page control may execute a view. That is, the color value corresponding to the color value object is assigned to the color value object, and the rendering of the color value object is completed.
In the embodiment of the present invention, since the preset color value interface is inherited from the UIColor and the preset image interface is inherited from the NSObject class, the intelligent mobile terminal can directly call the color value and the image parameter in the intelligent mobile terminal through the self-assignment operation, that is, directly call the ui _ rawColor in the UIColor and the ui _ rawImage in the NSObject class, and render the color value object and the image object in the page control, so that the intrusiveness on the software architecture and the service logic is reduced, and the page rendering efficiency is improved.
For ease of understanding, the page rendering method described above is described below with reference to fig. 7. Fig. 7 is a fifth flowchart illustrating a page rendering method according to an embodiment of the present invention. The method comprises the following steps.
Step S701, a mode manager monitors whether a mode switching behavior for switching a page display mode of a current page is triggered. If yes, go to step S702. If not, the process continues to step S701.
In an optional embodiment, if the mode switching behavior triggering switching of the page display mode of the current page is not monitored, no processing is performed, that is, the mode manager continues to monitor whether the mode switching behavior triggering switching of the page display mode of the current page is monitored.
Step S702, the mode manager traverses the current page and sends a global notification message including the mode identifier corresponding to the mode to be switched.
Taking the intelligent mobile terminal of the IOS as an example, the page control includes, but is not limited to, UIWindow, uiview controller. The schema manager can traverse UIWindow, uiview controller, view, subviews, respectively, in a preset hierarchical order, such as a top-down order or a bottom-up order.
After the mode manager sends the global notification message, each page control, the preset color value interface and the preset image interface in the current page can receive the global notification message.
Step S703 is that when the page control having the color value object receives the global notification message, the page control sends a first acquisition request for the object parameter corresponding to the color value object to the preset color value interface.
The first obtaining request may include an object identifier corresponding to a color value.
Step S704, when receiving the first obtaining request, the preset color value interface determines, according to the preset corresponding relationship between the object parameter and the mode identifier of each object in the page control, the color value corresponding to the mode identifier in the global notification message and the color value object corresponding to the first obtaining request, as a target object parameter of the color value object requested by the page control sending the first obtaining request in the to-be-switched mode, and returns the target object parameter of the color value object to the corresponding page control.
Step S705, when the page control having the image object receives the global notification message, the page control sends a second acquisition request for the object parameter corresponding to the image object to the preset image interface.
The second acquisition request includes an object identifier of the image object.
Step S706, when the preset image interface receives the second acquisition request, determining the image corresponding to the mode identifier in the global notification message and the image object corresponding to the second acquisition request as the target object parameter of the image object requested by the page control sending the second acquisition request in the to-be-switched mode according to the preset corresponding relationship between the object parameter and the mode identifier of each object in the page control, and returning the target object parameter of the image object to the corresponding page control.
In the embodiment of the present invention, the execution sequence of the above step S703 to step S704 and step S705 to step S706 is not specifically limited.
In step S707, each page control performs a self-assignment operation on the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
Based on the same inventive concept, the embodiment of the invention provides a page rendering method and a page rendering device. As shown in fig. 8, fig. 8 is a schematic structural diagram of a page rendering apparatus according to an embodiment of the present invention. The device is applied to an intelligent mobile terminal which comprises a mode manager 801, a preset interface 802 and a page control 803. The page control 803 may be a plurality of page controls.
The mode manager 801 is configured to send a global notification message including a mode identifier corresponding to a mode to be switched when monitoring a mode switching behavior for switching a page display mode of a current page;
the page control 803 is configured to, when receiving the global notification message, request, from the preset interface 802, a target object parameter of an object to be rendered included in the page control 803 in the mode to be switched;
the preset interface 802 is configured to determine, based on the mode identifier in the global notification message and the preset correspondence between the object parameter of each object in the page control and the mode identifier, a target object parameter of the object to be rendered, which is requested by the page control 803 in the mode to be switched; and returns the target object parameters of the object to be rendered requested by the page control 803 to the corresponding page control 803;
and the page control 803 is configured to render the object to be rendered included in the page control 803 according to the received target object parameter of the object to be rendered.
Optionally, the page control 803 may be specifically configured to select, when the global notification message is received, an object displayed on a display interface in the page control 803 as an object to be rendered; according to the selected object to be rendered, a target object parameter of the object to be rendered included in the page control 803 in the mode to be switched is requested from the preset interface 802.
Optionally, the preset interface 802 includes a preset color value interface and a preset image interface; the object to be rendered comprises a color value object and/or an image object;
the page control 803 may be specifically configured to, when the global notification message is received, if an object to be rendered included in the page control 803 includes a color value object, send, to a preset color value interface, a first acquisition request for an object parameter corresponding to the color value object by the page control 803; and/or if the object to be rendered included in the page control 803 includes an image object, sending a second acquisition request for an object parameter corresponding to the image object to the preset image interface.
Optionally, the preset color value interface may be specifically configured to, when receiving the first acquisition request, determine, according to a preset correspondence between an object parameter of each object in the page control and the mode identifier, a color value corresponding to the mode identifier in the global notification message and the color value object corresponding to the first acquisition request as a target object parameter of the color value object requested by the page control 803 that sends the first acquisition request in the to-be-switched mode;
the preset image interface may be specifically configured to, when receiving the second acquisition request, determine, according to a preset correspondence between the object parameter and the mode identifier of each object in the page control, an image corresponding to the mode identifier in the global notification message and the image object corresponding to the second acquisition request as a target object parameter of the image object requested by the page control 803 that sends the second acquisition request in the to-be-switched mode.
Optionally, the mode manager 801 may be specifically configured to send a global notification message based on a mode identifier of a to-be-switched mode if the mode switching behavior includes the mode identifier of the to-be-switched mode; and if the mode switching behavior does not include the mode identifier of the mode to be switched, determining the mode to be switched based on the page display mode of the current page or the environmental parameters of the current environment, and sending a global notification message including the mode identifier corresponding to the mode to be switched.
Optionally, the page control 803 may be specifically configured to perform a self-assignment operation on the object to be rendered included in the page control 803 according to the received target object parameter of the object to be rendered.
By the device provided by the embodiment of the invention, when monitoring the switching behavior for switching the page display mode of the current page, the mode manager can make each page control request the target object parameter of the object to be rendered in the mode to be switched from the preset interface by sending the global notification message, and the preset interface can return the corresponding target object parameter to each page control, so that each page control renders the object to be rendered according to the received target object parameter. Compared with the prior art, the preset interface determines the target object parameters of the object to be rendered in the mode to be switched included in each page control according to the preset corresponding relation between the object parameters of each object in the page control and the mode identification, so that when the page display mode of the current page is switched, the software architecture of the application software in the intelligent mobile terminal does not need to be adjusted, the service logic of the page is not influenced, the intrusiveness of the page display mode switching process on the software architecture of the application software and the service logic of the page is effectively reduced, and the stability of the page service performance is ensured.
Based on the same inventive concept, a page rendering method is provided according to the above-described embodiment of the present invention, and an embodiment of the present invention further provides an electronic device, which is the above-described intelligent mobile terminal, as shown in fig. 9, and includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904;
a memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
when monitoring a mode switching behavior for switching a page display mode of a current page, a mode manager in the intelligent mobile terminal sends a global notification message comprising a mode identifier corresponding to a mode to be switched;
when each page control in the intelligent mobile terminal receives the global notification message, requesting a preset interface for target object parameters of an object to be rendered included by the page control in a mode to be switched;
a preset interface in the intelligent mobile terminal determines target object parameters of objects to be rendered requested by each page control in a to-be-switched mode based on a mode identifier in the global notification message and a preset corresponding relation between object parameters of each object in the page control and the mode identifier; returning the target object parameter of each object to be rendered to the corresponding page control;
and each page control in the intelligent mobile terminal renders the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
According to the electronic device provided by the embodiment of the invention, when monitoring a switching behavior for switching the page display mode of the current page, the mode manager can make each page control request the target object parameter of the object to be rendered in the mode to be switched from the preset interface by sending the global notification message, and the preset interface can return the corresponding target object parameter to each page control, so that each page control renders the object to be rendered according to the received target object parameter. Compared with the prior art, the preset interface determines the target object parameters of the object to be rendered in the mode to be switched included in each page control according to the preset corresponding relation between the object parameters of each object in the page control and the mode identification, so that when the page display mode of the current page is switched, the software architecture of the application software in the intelligent mobile terminal does not need to be adjusted, the service logic of the page is not influenced, the intrusiveness of the page display mode switching process on the software architecture of the application software and the service logic of the page is effectively reduced, and the stability of the page service performance is ensured.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
Based on the same inventive concept, the page rendering method according to the above embodiment of the present invention is provided, and an embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the page rendering method according to any of the above embodiments.
Based on the same inventive concept, the page rendering method according to the above embodiment of the present invention is provided, and a computer program product containing instructions that, when run on a computer, cause the computer to perform the page rendering method according to any of the above embodiments is also provided.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments such as the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is simple, and for relevant points, reference may be made to part of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A page rendering method is applied to an intelligent mobile terminal, the intelligent mobile terminal comprises a mode manager, a preset interface and a plurality of page controls, and the method comprises the following steps:
the method comprises the steps that when a mode switching behavior for switching a page display mode of a current page is monitored by a mode manager, a global notification message comprising a mode identifier corresponding to a mode to be switched is sent;
when each page control receives the global notification message, requesting a preset interface for target object parameters of an object to be rendered included by the page control in the mode to be switched;
the preset interface determines target object parameters of the objects to be rendered requested by each page control in the to-be-switched mode based on the mode identifier in the global notification message and a preset corresponding relationship between the object parameters of each object in the page control and the mode identifier; returning the target object parameter of each object to be rendered to the corresponding page control;
and each page control renders the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
2. The method according to claim 1, wherein the step of requesting, from the preset interface, the target object parameter of the object to be rendered included in the page control in the to-be-switched mode when each page control receives the global notification message includes:
when each page control receives the global notification message, selecting an object displayed on a display interface in the page control as an object to be rendered;
and each page control requests the preset interface for the target object parameters of the object to be rendered included by the page control in the mode to be switched according to the selected object to be rendered.
3. The method of claim 1, wherein the preset interface comprises a preset color value interface and a preset image interface; the object to be rendered comprises a color value object and/or an image object;
when each page control receives the global notification message, the step of requesting the preset interface for the target object parameters of the object to be rendered included in the page control in the mode to be switched includes:
when each page control receives the global notification message, if an object to be rendered included in the page control includes a color value object, the page control sends a first acquisition request for an object parameter corresponding to the color value object to the preset color value interface; and/or
And if the object to be rendered included in the page control contains an image object, sending a second acquisition request aiming at the object parameter corresponding to the image object to the preset image interface.
4. The method according to claim 3, wherein the step of determining, by the preset interface, the target object parameter of the object to be rendered requested by each page control in the to-be-switched mode based on the mode identifier in the global notification message and the preset correspondence between the object parameter of each object in the page control and the mode identifier comprises:
when receiving the first acquisition request, the preset color value interface determines color values corresponding to the mode identifier in the global notification message and the color value object corresponding to the first acquisition request as target object parameters of the color value object requested by the page control sending the first acquisition request in the to-be-switched mode according to a preset corresponding relationship between the object parameters and the mode identifier of each object in the page control; and/or
And when receiving the second acquisition request, the preset image interface determines, according to a preset corresponding relationship between the object parameter and the mode identifier of each object in the page control, the image corresponding to the mode identifier in the global notification message and the image object corresponding to the second acquisition request as the target object parameter of the image object requested by the page control sending the second acquisition request in the to-be-switched mode.
5. The method according to claim 1, wherein the step of sending a global notification message including a mode identifier corresponding to the mode to be switched comprises:
if the mode switching behavior comprises a mode identifier of a mode to be switched, sending a global notification message based on the mode identifier of the mode to be switched;
if the mode switching behavior does not include the mode identifier of the mode to be switched, determining the mode to be switched based on the page display mode of the current page or the environmental parameters of the current environment, and sending a global notification message including the mode identifier corresponding to the mode to be switched.
6. The method according to claim 1, wherein the step of rendering the object to be rendered included in each page control according to the received target object parameter of the object to be rendered includes:
and each page control carries out self-assignment operation on the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
7. The page rendering device is applied to an intelligent mobile terminal, wherein the intelligent mobile terminal comprises a mode manager, a preset interface and a plurality of page controls;
the mode manager is used for sending a global notification message including a mode identifier corresponding to a mode to be switched when monitoring a mode switching behavior for switching a page display mode of a current page;
each page control is used for requesting the preset interface for the target object parameters of the object to be rendered included by the page control in the mode to be switched when the global notification message is received;
the preset interface is used for determining target object parameters of the objects to be rendered requested by each page control in the to-be-switched mode based on the mode identifier in the global notification message and the preset corresponding relationship between the object parameters of each object in the page control and the mode identifier; returning the target object parameter of each object to be rendered to the corresponding page control;
and each page control is used for rendering the object to be rendered included in the page control according to the received target object parameter of the object to be rendered.
8. The apparatus according to claim 7, wherein each page control is specifically configured to select, when the global notification message is received, an object displayed on a display interface in the page control as an object to be rendered; and according to the selected object to be rendered, requesting a target object parameter of the object to be rendered included by the page control in the mode to be switched from the preset interface.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202010414188.XA 2020-05-15 2020-05-15 Page rendering method and device, electronic equipment and storage medium Pending CN111597002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010414188.XA CN111597002A (en) 2020-05-15 2020-05-15 Page rendering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010414188.XA CN111597002A (en) 2020-05-15 2020-05-15 Page rendering method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111597002A true CN111597002A (en) 2020-08-28

Family

ID=72182865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010414188.XA Pending CN111597002A (en) 2020-05-15 2020-05-15 Page rendering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111597002A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112331158A (en) * 2020-11-18 2021-02-05 北京小米移动软件有限公司 Terminal display adjusting method, device, equipment and storage medium
CN112791404A (en) * 2021-01-12 2021-05-14 网易(杭州)网络有限公司 Control method and device for virtual object in game and touch terminal
CN112965779A (en) * 2021-03-26 2021-06-15 网易(杭州)网络有限公司 Page mode switching method, device and equipment
CN113569169A (en) * 2021-07-29 2021-10-29 北京奇艺世纪科技有限公司 Page display method and device
CN113656718A (en) * 2021-08-17 2021-11-16 北京奇艺世纪科技有限公司 Theme switching method and device
CN114675912A (en) * 2021-05-06 2022-06-28 腾讯云计算(北京)有限责任公司 Theme skin switching method and device, computer equipment and computer storage medium
CN114915837A (en) * 2021-02-10 2022-08-16 武汉斗鱼网络科技有限公司 Video rendering triggering method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484396A (en) * 2016-09-18 2017-03-08 北京京东尚科信息技术有限公司 Night changing method, device and terminal unit
CN110609722A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Dark mode display interface processing method, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484396A (en) * 2016-09-18 2017-03-08 北京京东尚科信息技术有限公司 Night changing method, device and terminal unit
CN110609722A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Dark mode display interface processing method, electronic equipment and storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112331158A (en) * 2020-11-18 2021-02-05 北京小米移动软件有限公司 Terminal display adjusting method, device, equipment and storage medium
CN112791404A (en) * 2021-01-12 2021-05-14 网易(杭州)网络有限公司 Control method and device for virtual object in game and touch terminal
CN112791404B (en) * 2021-01-12 2024-04-12 网易(杭州)网络有限公司 Control method and device for virtual object in game and touch terminal
CN114915837A (en) * 2021-02-10 2022-08-16 武汉斗鱼网络科技有限公司 Video rendering triggering method and device, electronic equipment and storage medium
CN114915837B (en) * 2021-02-10 2023-08-25 武汉斗鱼网络科技有限公司 Triggering method and device for video rendering, electronic equipment and storage medium
CN112965779A (en) * 2021-03-26 2021-06-15 网易(杭州)网络有限公司 Page mode switching method, device and equipment
CN114675912A (en) * 2021-05-06 2022-06-28 腾讯云计算(北京)有限责任公司 Theme skin switching method and device, computer equipment and computer storage medium
CN113569169A (en) * 2021-07-29 2021-10-29 北京奇艺世纪科技有限公司 Page display method and device
CN113656718A (en) * 2021-08-17 2021-11-16 北京奇艺世纪科技有限公司 Theme switching method and device

Similar Documents

Publication Publication Date Title
CN111597002A (en) Page rendering method and device, electronic equipment and storage medium
US20190220318A1 (en) Memory Reclamation Method and Apparatus
CN105447139B (en) Data acquisition statistical method and system, terminal and service equipment thereof
CN111143723A (en) Page jump method and device, electronic equipment and storage medium
EP4209904A1 (en) Cloud resource management method and apparatus, and computer device and storage medium
CN105389325A (en) Content search method and electronic device implementing same
CN109309735B (en) Connection processing method, server, system and storage medium
CN112995239B (en) Data processing method and device
US11080107B2 (en) Event notification method, server device, event notification apparatus, and medium
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN112783731B (en) Abnormal device detection method, device and storage medium
WO2020015114A1 (en) Method for querying operating state of application, and terminal device
CN117040799A (en) Page interception rule generation and page access control method and device and electronic equipment
CN115657625B (en) Monitoring method, program product, system, device and readable storage medium
CN111314150A (en) System and method for acquiring device log and mobile terminal
CN113779412B (en) Message touch method, node and system based on blockchain network
CN113726855B (en) Service aggregation method, device, electronic equipment and computer-readable storage medium
CN108388462A (en) Element alteration notification method, device and terminal device
CN113778780B (en) Application stability determining method and device, electronic equipment and storage medium
CN107453950A (en) A kind of information processing method and monitoring system
CN112306723B (en) Operation information acquisition method and device applied to applet
WO2021212492A1 (en) Information pushing method and apparatus, electronic device, and computer-readable medium
CN108491230A (en) Cartoon display method and device, client
CN113656718A (en) Theme switching method and device
CN108399223A (en) A kind of data capture method, device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200828