Layout rendering method and device, equipment and storage medium
By setting a dynamic rendering area in the application page, receiving layout attribute values issued by the cloud server and performing dynamic layout rendering, the problem of poor dynamic layout flexibility of existing application pages is solved, and resource conservation and development and maintenance are simplified.
Patent Information
- Application Number
- CN202411978466.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-22
AI Technical Summary
The dynamic layout flexibility of existing application pages is poor, resulting in increased development and maintenance complexity, and large distribution resources and poor flexibility.
By setting a dynamic rendering area in the target layout page, using this dynamic rendering area to receive the layout attribute values issued by the preset cloud server, determine the target layout data, and perform dynamic layout rendering, to achieve flexible adjustment of the dynamic page.
Reduces the volume of release rendering resources, improves the flexibility of dynamic page layout, and reduces the complexity of development and maintenance.
Smart Images

Figure CN119861930A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a layout rendering method, apparatus, device and storage medium. Background Art
[0002] At present, with the rapid development of Internet technology and smart device fields, smart devices can install various applications to meet users' entertainment and work needs. Existing applications are usually provided with different application pages, and each application page is provided with a corresponding page UI (User Interface). In order to meet the dynamic needs of page UI, existing application pages usually need to develop corresponding dynamic pages for different styles. This method not only occupies a large amount of distributed resource volume, but also needs to load the corresponding dynamic content when entering the page, which has poor flexibility and increases the complexity of development and maintenance. Summary of the invention
[0003] The embodiments of the present application provide a layout rendering method, apparatus, device and storage medium, aiming to solve the technical problem of poor flexibility in dynamic layout of application pages in the prior art.
[0004] In one aspect, an embodiment of the present application provides a layout rendering method, the layout rendering method comprising the following steps:
[0005] In response to a layout rendering request, obtaining a target layout page corresponding to the layout rendering request and a dynamic rendering area in the target layout page;
[0006] Determining target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server;
[0007] The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the target layout data to obtain a rendering layout page.
[0008] In a possible implementation of the present application, before obtaining the target layout page corresponding to the layout rendering request and the dynamic rendering area in the target layout page, the method further includes:
[0009] In response to the layout creation request, an initial layout page of the target application corresponding to the layout creation request and an initial layout area to be dynamically displayed in the initial layout page are created;
[0010] Dynamically configuring the initial layout area according to preset dynamic attributes and preset style configuration to obtain a dynamic rendering area;
[0011] A target layout page of the target application is generated according to the dynamic rendering area and the initial layout page.
[0012] In a possible implementation of the present application, determining the target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server includes:
[0013] Sending a layout rendering instruction to a preset cloud server based on the dynamic rendering area, and receiving a layout attribute value sent by the preset cloud server;
[0014] The target layout data corresponding to the target layout page is determined based on the layout attribute value.
[0015] In a possible implementation of the present application, determining the target layout data corresponding to the target layout page based on the layout attribute value includes:
[0016] Determine a target layout identifier corresponding to the dynamic rendering area based on the layout attribute value and the preset resource object;
[0017] The target layout data corresponding to the target layout page is acquired based on the target layout identifier.
[0018] In a possible implementation of the present application, performing layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendered layout page includes:
[0019] Obtaining a text rendering style and an image rendering style in the target layout data;
[0020] The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the text rendering style and the image rendering style to obtain a rendering layout page.
[0021] In a possible implementation of the present application, performing layout rendering on the target layout page and / or the dynamic rendering area according to the text rendering style and the image rendering style to obtain a rendered layout page includes:
[0022] Obtaining a layout rendering type in the target layout data, where the layout rendering type includes a global rendering type and a local rendering type;
[0023] If the layout rendering type is a local rendering type, performing layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style to obtain a target dynamic rendering area;
[0024] The target dynamic rendering area is loaded in the target layout page to obtain a first rendering layout page.
[0025] In a possible implementation of the present application, after performing layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style to obtain a target dynamic rendering area, the method further includes:
[0026] Acquire the object operation instruction for the target dynamic rendering area, switch the layout attribute value based on the object operation instruction, and obtain an updated layout attribute value;
[0027] Determining update layout data of the dynamic rendering area based on the update layout attribute value and the preset resource object;
[0028] The target dynamic rendering area is updated and rendered based on the updated layout data to obtain an updated dynamic rendering area.
[0029] On the other hand, the present application provides a layout rendering device, the layout rendering device comprising:
[0030] A page acquisition module is configured to respond to a layout rendering request, acquire a target layout page corresponding to the layout rendering request, and a dynamic rendering area in the target layout page;
[0031] A layout acquisition module is configured to determine target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server;
[0032] The dynamic rendering module is configured to perform layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendered layout page.
[0033] On the other hand, the present application also provides a layout rendering device, the layout rendering device comprising:
[0034] one or more processors;
[0035] Memory; and
[0036] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps of the layout rendering method.
[0037] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the layout rendering method.
[0038] In the present application, by responding to a layout rendering request, a target layout page corresponding to the layout rendering request and a dynamic rendering area in the target layout page are obtained; the target layout data corresponding to the target layout page is determined according to the dynamic rendering area and the layout attribute value sent by the preset cloud server; the target layout page and / or the dynamic rendering area are laid out and rendered according to the target layout data to obtain a rendering layout page. This is achieved by setting a dynamic rendering area in the target layout page, and using the dynamic rendering area to receive the layout attribute value sent by the preset cloud server, using the layout attribute value to determine the corresponding target layout data, and using the target layout data to dynamically layout the target layout page and / or the dynamic rendering area, thereby reducing the volume of the rendering resources sent, improving the flexibility of the dynamic layout of the page, and reducing the complexity of development and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 A schematic diagram of a scene layout rendering method according to an embodiment of the present application;
[0041] Figure 2 A schematic diagram of a flow chart of an embodiment of a layout rendering method in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a flow chart of an embodiment of performing local dynamic rendering of a dynamic rendering area in a layout rendering method provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of a flow chart of an embodiment of dynamic updating in the layout rendering method provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the structure of an embodiment of a layout rendering device provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of an embodiment of a layout rendering device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0047] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0048] In this application, the word "exemplary" is used to mean "serving as an example, illustration, or illustration." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to implement and use the invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the invention can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.
[0049] Existing financial, banking and other service companies generally need to connect data with multiple brand manufacturers during operation. The existing data connection method is customized according to the requirements of brand manufacturers, and the table structure is designed according to the outbound fields to store and outbound data, and whether the data is sent successfully is not detected. The existing data connection method will increase the data error rate and cannot guarantee the integrity of the data, resulting in an increase in the workload of the version process and a prolonged online time to quickly connect to the online scenario application requirements.
[0050] Based on this, the present application proposes a layout rendering method, apparatus, device and computer-readable storage medium to solve the technical problem of high error rate in the data docking process in the prior art.
[0051] The layout rendering method in an embodiment of the present invention is applied to a layout rendering device, and the layout rendering device is arranged in a layout rendering device. The layout rendering device is provided with one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the layout rendering method; wherein the layout rendering device can be an intelligent terminal, such as a mobile phone, a tablet computer, a network device, and a smart computer, etc.; optionally, the layout rendering device can also be a server, or a service cluster composed of multiple servers.
[0052] like Figure 1 As shown, Figure 1 The schematic diagram of the scene of the layout rendering method of the embodiment of the present application is shown in FIG. The layout rendering scene in the embodiment of the present invention includes a layout rendering device 100 (a layout rendering device is integrated in the layout rendering device 100) and a preset cloud server 200. The layout rendering device 100 runs a computer-readable storage medium corresponding to the layout rendering method to execute the steps of the layout rendering method. The preset cloud server 200 is a cloud server terminal that is connected to the layout rendering device 100 for communication and sends the corresponding layout attribute value to the dynamic rendering area in the layout rendering device.
[0053] Understandably, Figure 1 The layout rendering device in the layout rendering method scenario shown, or the devices included in the layout rendering device, does not constitute a limitation on the embodiments of the present invention, that is, the number of devices and types of devices of the layout rendering device included in the layout rendering method scenario, or the number of devices and types of devices included in each device, do not affect the overall implementation of the technical solution in the embodiments of the present invention, and can all be regarded as equivalent replacements or derivatives of the technical solution claimed to be protected in the embodiments of the present invention.
[0054] The layout rendering device 100 in the embodiment of the present invention is mainly used to: respond to a layout rendering request, obtain a target layout page corresponding to the layout rendering request, and a dynamic rendering area in the target layout page;
[0055] Determining target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server;
[0056] The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the target layout data to obtain a rendering layout page.
[0057] The layout rendering device 100 in the embodiment of the present invention may be an independent layout rendering device, such as a smart terminal such as a mobile phone, a tablet computer, and a smart computer, or may be a layout rendering network or a layout rendering cluster composed of multiple layout rendering devices.
[0058] The embodiments of the present application provide a layout rendering method, apparatus, device, and computer-readable storage medium, which are described in detail below.
[0059] It can be understood by those skilled in the art that Figure 1 The application environment shown in is only one of the application scenarios related to the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer layout rendering devices, or layout rendering network connection relationships shown, such as Figure 1 Only one layout rendering device is shown in the figure. It can be understood that the scenario of the layout rendering method can also include one or more layout rendering devices, which is not specifically limited here. The layout rendering device 100 can also include a memory for storing target layout data and other data.
[0060] It should be noted that Figure 1 The scene diagram of the layout rendering method shown is only an example. The scene of the layout rendering method described in the embodiment of the present invention is to more clearly illustrate the technical solution of the embodiment of the present invention, and does not constitute a limitation on the technical solution provided by the embodiment of the present invention.
[0061] Based on the scenario of the above layout rendering method, various embodiments of the layout rendering method disclosed in the present invention are proposed.
[0062] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of a layout rendering method in an embodiment of the present application. The layout rendering method includes the following steps 201 to 203:
[0063] 201. Respond to a layout rendering request and obtain a target layout page corresponding to the layout rendering request and a dynamic rendering area in the target layout page;
[0064] The layout rendering method in this embodiment is applied to a layout rendering device. The type and number of the layout rendering device are not specifically limited. That is, the layout rendering device can be one or more smart terminals or servers. In a specific embodiment, the layout rendering device is a smart phone or other smart terminal that can perform layout rendering on a specified user page.
[0065] Specifically, in order to avoid the situation where the existing layout rendering operation has poor flexibility and requires a large amount of resource volume to be issued, the layout rendering device responds to the layout rendering request for the target layout page during operation. Among them, the layout rendering request is an operation request that drives the layout rendering device to use the dynamic rendering area in the target layout page to dynamically render the target layout page locally or globally. Optionally, the triggering method of the layout rendering request is not specifically limited here, that is, the layout rendering request can be actively triggered by the user. For example, the user can actively trigger the layout rendering request by clicking the layout rendering button in the layout rendering setting page of the target layout page. In addition, the layout rendering request can also be automatically triggered by the layout rendering device. For example, the layout rendering device is provided with an automatic rendering process, and the layout rendering request is automatically triggered when the dynamic rendering area is detected in the target layout page.
[0066] Specifically, after receiving the layout rendering request, the layout rendering device parses the layout rendering request, locates the target layout page to be rendered according to the target page identifier carried in the layout rendering request, and obtains the dynamic rendering area in the target layout page. The target layout page is an interactive layout page to be dynamically rendered locally or globally. In a specific embodiment, the target layout page can be an application layout page of a specified application. The specified application can be any one of a third-party application, a system application, and the operating system itself. The dynamic rendering area is a dynamic layout area in the target layout page that can receive the layout attribute value sent by the cloud server, and perform local or global dynamic rendering according to the target layout data corresponding to the layout attribute value. In a specific embodiment, the target layout page can be an XML page, and the dynamic rendering area can be a DynamicStyle area.
[0067] Specifically, before receiving the layout rendering request, the layout rendering device also responds to the layout creation request in advance, parses the layout creation request, determines the target application corresponding to the layout creation request, creates an initial layout page of the target application corresponding to the layout creation request in the layout rendering device, and selects the initial layout area to be dynamically displayed in the initial layout page. The initial layout page is an XML (eXtens ibl eMarkup Language) page for user page element configuration. The initial layout area is the element area selected in the initial layout page to be dynamically displayed.
[0068] Specifically, after creating the initial layout page and the initial layout area, the layout rendering device also dynamically configures the initial layout area according to the preset dynamic attributes and the preset style configuration to obtain the dynamic rendering area. That is, after determining the initial layout area in the initial layout page, the layout rendering device adds the preset dynamic attributes to the initial layout area, and after adding the preset dynamic attributes to the initial layout area, the layout rendering device also performs style configuration on the initial layout area according to the preset style configuration to obtain the dynamic rendering area, so that the dynamic rendering area can apply different styles according to specific events or scenes.
[0069] Specifically, after generating the dynamic rendering area, the layout rendering device also generates the target layout page of the target application according to the dynamic rendering area and the initial layout page. That is, after generating the dynamic rendering area, the layout rendering device loads the dynamic rendering area on the initial layout page, and associates the dynamic rendering area with the local dynamic rendering event or the global dynamic rendering event corresponding to the layout rendering request to generate the target layout page.
[0070] 202. Determine target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server;
[0071] Specifically, after obtaining the target layout page and the dynamic rendering area in the target layout page, the layout rendering device also determines the target layout data corresponding to the initial layout page based on the dynamic rendering area and the layout attribute values sent by the preset cloud server, thereby achieving the goal of locating the target layout data to be rendered corresponding to the initial layout page by only obtaining the layout attribute values sent by the cloud, thereby reducing the data volume of the data sent by the cloud during dynamic rendering, thereby saving resources.
[0072] Specifically, the dynamic rendering area set in the layout rendering device can receive the layout attribute value sent by the cloud server, and use the layout attribute value to obtain the corresponding target layout data. That is, the layout rendering device uses the dynamic rendering area to send a layout rendering instruction to the preset cloud server, and uses the dynamic rendering area to receive the layout attribute value sent by the preset cloud server, and determines the target layout data corresponding to the initial layout page based on the layout attribute value. Among them, the layout attribute value is used to indicate the element style attribute value of the target layout data corresponding to the dynamic rendering area in the dynamic rendering area. Optionally, in a specific embodiment, the layout attribute value can be a layout style name or layout style type corresponding to the target layout data. The target layout data is the layout file data corresponding to the target user interface of the dynamic rendering area in the current rendering scene.
[0073] Specifically, after obtaining the layout attribute value of the dynamic rendering area, the layout rendering device also determines the target layout identifier of the dynamic rendering area according to the layout attribute value and the preset resource object, and obtains the target layout data corresponding to the initial layout page and / or the dynamic rendering area based on the target layout identifier. Optionally, in a specific embodiment, the preset resource object can be a Resource object.
[0074] Specifically, after obtaining the layout attribute value, the layout rendering device inputs the layout attribute value into the preset resource object, drives the preset resource object to perform identification mapping based on the layout attribute value, thereby obtaining the target layout identifier associated with the layout attribute value in the preset resource object. And based on the target layout identifier, the target layout data to be dynamically rendered for the initial layout page and / or the dynamic rendering area is obtained. The target layout identifier is the layout file data identifier corresponding to the target layout data.
[0075] Optionally, after obtaining the target layout identifier corresponding to the target layout data, the layout rendering device makes a layout data request to a preset cloud server through the initial layout page and / or the dynamic rendering area to obtain the target layout data sent by the preset cloud server.
[0076] Optionally, the layout rendering device can also filter the target layout data for dynamically rendering the initial layout page and / or the dynamic rendering area from the local layout data according to the target layout identifier.
[0077] Optionally, in other embodiments, the layout rendering device can also switch the layout attribute value according to a specific operation behavior triggered by the user, so as to determine the updated layout attribute value, and determine the updated target layout data according to the updated layout attribute value, and perform dynamic rendering processing using the updated target layout data.
[0078] 203. Perform layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendered layout page.
[0079] Specifically, after obtaining the target layout data, the layout rendering device also performs layout rendering on the target layout page and / or the dynamic rendering area according to the target layout attributes to obtain a rendering layout page, thereby improving the dynamic flexibility of the target layout page, so that the target layout page can dynamically adjust the target layout page or the dynamic rendering area according to the dynamic parameters sent from the cloud to meet the corresponding scene rendering requirements.
[0080] Specifically, after acquiring the target layout data, the layout rendering device parses the target layout data, acquires the text rendering style and the image rendering style in the target layout data, and performs layout rendering on the target layout page and / or the dynamic rendering area according to the text rendering style and the image rendering style to obtain a rendered layout page. The text rendering style is the specified rendering style information for dynamically rendering the text information specified in the target layout page and / or the dynamic rendering area. The image rendering style is the specified rendering style information for dynamically rendering the image information specified in the target layout page and / or the dynamic rendering area.
[0081] Specifically, the layout rendering device obtains the text to be rendered and the image to be rendered in the target layout page and / or the dynamic rendering area, and passes the text to be rendered into the text rendering style for text rendering to obtain the target rendered text. And passes the image to be rendered into the image rendering style for image rendering to obtain the target rendered image.
[0082] Specifically, after obtaining the target rendering text and the target rendering image, the layout rendering device uses the target rendering text and the target rendering image to load them into the target layout page and / or the dynamic rendering area to obtain a rendering layout page, wherein the rendering layout page includes a first rendering layout page for local dynamic rendering that only performs local rendering on the dynamic rendering area and a second rendering layout page for global dynamic rendering on the target layout page.
[0083] In this embodiment, the layout rendering device obtains the target layout page corresponding to the layout rendering request and the dynamic rendering area in the target layout page by responding to the layout rendering request; determines the target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server; performs layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendering layout page. This is achieved by setting a dynamic rendering area in the target layout page, and using the dynamic rendering area to receive the layout attribute value sent by the preset cloud server, using the layout attribute value to determine the corresponding target layout data, and using the target layout data to dynamically layout the target layout page and / or the dynamic rendering area, thereby reducing the volume of the rendering resources sent, improving the flexibility of the dynamic layout of the page, and reducing the complexity of development and maintenance.
[0084] like Figure 3 As shown, Figure 3 This is a flow chart of an embodiment of performing local dynamic rendering of a dynamic rendering area in a layout rendering method provided in an embodiment of the present application. Specifically, in this embodiment, the layout rendering method further includes steps 301 to 303:
[0085] 301. Obtain a layout rendering type in the target layout data, where the layout rendering type includes a global rendering type and a local rendering type;
[0086] 302. If the layout rendering type is a local rendering type, performing layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style to obtain a target dynamic rendering area;
[0087] 303. Load the target dynamic rendering area in the target layout page to obtain a first rendering layout page.
[0088] Specifically, in this embodiment, after acquiring the target layout data, the layout rendering device also performs layout rendering on the target layout page and / or the dynamic rendering area according to the target layout attributes to obtain a rendering layout page, thereby improving the dynamic flexibility of the target layout page, so that the target layout page can dynamically adjust the target layout page or the dynamic rendering area according to the dynamic parameters sent from the cloud to meet the corresponding scene rendering requirements.
[0089] Specifically, after acquiring the target layout data, the layout rendering device also parses the target layout data to determine the layout rendering type in the target layout data, and then performs layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style to obtain the target dynamic rendering area. The layout rendering type is a rendering type parameter that characterizes the corresponding local rendering or dynamic rendering of the target layout page. The layout rendering type includes a global rendering type and a local rendering type.
[0090] Optionally, if the layout rendering device determines that the layout rendering type is a local rendering type, the regional rendering text and / or regional rendering image corresponding to the dynamic rendering area is obtained, and the regional rendering text is passed into the text rendering style corresponding to the target layout data for text rendering to obtain the target regional text. And the regional rendering image is passed into the image rendering style corresponding to the target layout data for image rendering to obtain the target regional image.
[0091] Specifically, after acquiring the target area text and the target area image, the layout rendering device loads the target area text and the target area image into the dynamic rendering area for layout rendering to obtain the target dynamic rendering area.
[0092] Specifically, after obtaining the target dynamic rendering area after dynamic rendering, the layout rendering device loads the target dynamic rendering area on the target layout page to obtain a first rendering layout page, so as to realize local dynamic rendering of the dynamic rendering area in the target layout page, thereby reducing rendering costs and saving rendering resources.
[0093] In this embodiment, the layout rendering device obtains the layout rendering type in the target layout data, wherein the layout rendering type includes a global rendering type and a local rendering type; if the layout rendering type is a local rendering type, the dynamic rendering area is layout rendered according to the text rendering style and the image rendering style to obtain a target dynamic rendering area; the target dynamic rendering area is loaded in the target layout page to obtain a first rendering layout page. The target layout data is determined according to the layout attribute value sent by the preset cloud server, and the dynamic rendering area is locally rendered using the target layout data, thereby reducing rendering costs and saving rendering resources.
[0094] like Figure 4 As shown, Figure 4 This is a flow chart of an embodiment of a layout rendering method for dynamic updating provided in an embodiment of the present application. Specifically, in this embodiment, the layout rendering method further includes steps 401 to 403:
[0095] 401. Obtain the object operation instruction for the target dynamic rendering area, switch the layout attribute value based on the object operation instruction, and obtain an updated layout attribute value;
[0096] 402. Determine update layout data of the dynamic rendering area based on the update layout attribute value and a preset resource object;
[0097] 403. Update and render the target dynamic rendering area based on the updated layout data to obtain an updated dynamic rendering area.
[0098] Based on the above embodiments, in this embodiment, the layout rendering device can also switch the layout attribute value according to the object operation instruction triggered by the user, so as to perform local update rendering on the target dynamic rendering area to obtain an updated dynamic rendering area.
[0099] Specifically, when a dynamic rendering area is defined with multiple layout attribute values, after the layout rendering device completes partial rendering of the dynamic rendering area and obtains the target dynamic rendering area, it can also respond to the object operation instruction triggered by the user for the target dynamic rendering area, and switch the layout attribute value based on the object operation instruction to obtain the updated layout attribute value, wherein the object operation instruction is an operation instruction that drives the layout rendering device to switch the rendering style of the target dynamic rendering area. Optionally, in a specific embodiment, the object operation instruction can be a sliding operation instruction. For example, the user slides the target dynamic rendering area to drive the layout rendering device to switch the layout attribute value and obtain the updated layout attribute value.
[0100] Specifically, after obtaining the updated layout attribute value, the layout rendering device determines the updated layout data of the dynamic rendering area based on the updated layout attribute value and the preset resource object. That is, after obtaining the updated layout attribute value, the layout rendering device inputs the updated layout attribute value into the preset resource object, drives the preset resource object to perform identifier mapping based on the updated layout attribute value, thereby obtaining the updated layout identifier associated with the updated layout attribute value in the preset resource object. And based on the updated layout identifier, the updated layout data to be dynamically rendered for the initial layout page and / or the dynamic rendering area is obtained.
[0101] Specifically, after acquiring the updated layout data, the layout rendering device updates and renders the target dynamic rendering area based on the updated layout data to obtain an updated dynamic rendering area. That is, the layout rendering device performs partial update and rendering on the dynamic rendering area based on the updated text rendering style and the updated image rendering style in the updated layout data to obtain an updated dynamic rendering area.
[0102] In this embodiment, the layout rendering device obtains the object operation instruction for the target dynamic rendering area, switches the layout attribute value based on the object operation instruction, and obtains the updated layout attribute value; determines the updated layout data of the dynamic rendering area based on the updated layout attribute value and the preset resource object; and updates and renders the target dynamic rendering area based on the updated layout data to obtain the updated dynamic rendering area. The local update rendering of the dynamic rendering area based on the user operation instruction is realized, thereby improving the rendering flexibility of the target page layout.
[0103] In order to better implement the layout rendering method in the embodiment of the present application, based on the layout rendering method, the embodiment of the present application also provides a layout rendering device, such as Figure 5 As shown, Figure 5 The schematic diagram of the structure of the layout rendering device provided in the embodiment of the present application is as follows. Specifically, the layout rendering device 500 includes:
[0104] The page acquisition module 501 is configured to respond to a layout rendering request, acquire a target layout page corresponding to the layout rendering request, and a dynamic rendering area in the target layout page;
[0105] The layout acquisition module 502 is configured to determine the target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server;
[0106] The dynamic rendering module 503 is configured to perform layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendered layout page.
[0107] In a possible implementation of this embodiment, before the layout rendering device obtains the target layout page corresponding to the layout rendering request and the dynamic rendering area in the target layout page, it also includes:
[0108] In response to the layout creation request, an initial layout page of the target application corresponding to the layout creation request and an initial layout area to be dynamically displayed in the initial layout page are created;
[0109] Dynamically configuring the initial layout area according to preset dynamic attributes and preset style configuration to obtain a dynamic rendering area;
[0110] A target layout page of the target application is generated according to the dynamic rendering area and the initial layout page.
[0111] In a possible implementation of this embodiment, the layout rendering device determines the target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server, including:
[0112] Sending a layout rendering instruction to a preset cloud server based on the dynamic rendering area, and receiving a layout attribute value sent by the preset cloud server;
[0113] The target layout data corresponding to the target layout page is determined based on the layout attribute value.
[0114] In a possible implementation of this embodiment, the layout rendering device determines the target layout data corresponding to the target layout page based on the layout attribute value, including:
[0115] Determine a target layout identifier corresponding to the dynamic rendering area based on the layout attribute value and the preset resource object;
[0116] The target layout data corresponding to the target layout page is acquired based on the target layout identifier.
[0117] In a possible implementation of this embodiment, the layout rendering device performs layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendered layout page, including:
[0118] Obtaining a text rendering style and an image rendering style in the target layout data;
[0119] The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the text rendering style and the image rendering style to obtain a rendering layout page.
[0120] In a possible implementation of this embodiment, the layout rendering device performs layout rendering on the target layout page and / or the dynamic rendering area according to the text rendering style and the image rendering style to obtain a rendered layout page, including:
[0121] Obtaining a layout rendering type in the target layout data, where the layout rendering type includes a global rendering type and a local rendering type;
[0122] If the layout rendering type is a local rendering type, performing layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style to obtain a target dynamic rendering area;
[0123] The target dynamic rendering area is loaded in the target layout page to obtain a first rendering layout page.
[0124] In a possible implementation of this embodiment, the layout rendering device performs layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style, and after obtaining the target dynamic rendering area, further includes:
[0125] Acquire the object operation instruction for the target dynamic rendering area, switch the layout attribute value based on the object operation instruction, and obtain an updated layout attribute value;
[0126] Determining update layout data of the dynamic rendering area based on the update layout attribute value and the preset resource object;
[0127] The target dynamic rendering area is updated and rendered based on the updated layout data to obtain an updated dynamic rendering area.
[0128] In this embodiment, the layout rendering device obtains the target layout page corresponding to the layout rendering request and the dynamic rendering area in the target layout page by responding to the layout rendering request; determines the target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server; performs layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendering layout page. This is achieved by setting a dynamic rendering area in the target layout page, and using the dynamic rendering area to receive the layout attribute value sent by the preset cloud server, using the layout attribute value to determine the corresponding target layout data, and using the target layout data to dynamically layout the target layout page and / or the dynamic rendering area, thereby reducing the volume of the rendering resources sent, improving the flexibility of the page dynamic layout, and reducing the complexity of development and maintenance.
[0129] The embodiment of the present invention also provides a layout rendering device, such as Figure 6 As shown, Figure 6A schematic diagram of the structure of an embodiment of a layout rendering device provided in an embodiment of the present application.
[0130] The layout rendering device integrates any one of the layout rendering devices provided by the embodiments of the present invention, and the layout rendering device includes:
[0131] one or more processors;
[0132] Memory; and
[0133] One or more applications, wherein the one or more applications are stored in the memory and are configured so that the processor executes the steps of the layout rendering method described in any of the above-mentioned layout rendering method embodiments.
[0134] Specifically, the layout rendering device may include one or more processing core processors 601, one or more computer-readable storage media memories 602, a power supply 603, an input unit 604 and other components. Those skilled in the art will appreciate that Figure 6 The layout rendering device structure shown in the figure does not constitute a limitation on the layout rendering device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0135] The processor 601 is the control center of the layout rendering device. It uses various interfaces and lines to connect the various parts of the entire layout rendering device. By running or executing software programs and / or modules stored in the memory 602, and calling the data stored in the memory 602, it performs various functions of the layout rendering device and processes data, thereby monitoring the layout rendering device as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.
[0136] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the layout rendering device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0137] The layout rendering device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 603 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0138] The layout rendering device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0139] Although not shown, the layout rendering device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 601 in the layout rendering device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:
[0140] In response to a layout rendering request, obtaining a target layout page corresponding to the layout rendering request and a dynamic rendering area in the target layout page;
[0141] Determining target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server;
[0142] The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the target layout data to obtain a rendering layout page.
[0143] To this end, an embodiment of the present invention provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the layout rendering methods provided in the embodiments of the present invention. For example, the computer program may be loaded by a processor to execute the following steps:
[0144] In response to a layout rendering request, obtaining a target layout page corresponding to the layout rendering request and a dynamic rendering area in the target layout page;
[0145] Determining target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server;
[0146] The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the target layout data to obtain a rendering layout page.
[0147] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0148] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0149] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0150] The above is a detailed introduction to a layout rendering method provided in an embodiment of the present application. Specific embodiments are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A layout rendering method, characterized in that: The layout rendering method comprises: In response to a layout rendering request, obtaining a target layout page corresponding to the layout rendering request and a dynamic rendering area in the target layout page; Determining target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server; The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the target layout data to obtain a rendering layout page.
2. The layout rendering method according to claim 1, characterized in that: Before obtaining the target layout page corresponding to the layout rendering request and the dynamic rendering area in the target layout page, the method further includes: In response to the layout creation request, an initial layout page of the target application corresponding to the layout creation request and an initial layout area to be dynamically displayed in the initial layout page are created; Dynamically configuring the initial layout area according to preset dynamic attributes and preset style configuration to obtain a dynamic rendering area; A target layout page of the target application is generated according to the dynamic rendering area and the initial layout page.
3. The layout rendering method according to claim 1, characterized in that: The determining the target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server includes: Sending a layout rendering instruction to a preset cloud server based on the dynamic rendering area, and receiving a layout attribute value sent by the preset cloud server; The target layout data corresponding to the target layout page is determined based on the layout attribute value.
4. The layout rendering method according to claim 3, characterized in that: The determining, based on the layout attribute value, target layout data corresponding to the target layout page includes: Determine a target layout identifier corresponding to the dynamic rendering area based on the layout attribute value and the preset resource object; The target layout data corresponding to the target layout page is acquired based on the target layout identifier.
5. The layout rendering method according to any one of claims 1 to 4, characterized in that: The step of performing layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendered layout page includes: Obtaining a text rendering style and an image rendering style in the target layout data; The target layout page and / or the dynamic rendering area are subjected to layout rendering according to the text rendering style and the image rendering style to obtain a rendering layout page.
6. The layout rendering method according to claim 5, characterized in that: The step of performing layout rendering on the target layout page and / or the dynamic rendering area according to the text rendering style and the image rendering style to obtain a rendered layout page includes: Obtaining a layout rendering type in the target layout data, where the layout rendering type includes a global rendering type and a local rendering type; If the layout rendering type is a local rendering type, performing layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style to obtain a target dynamic rendering area; The target dynamic rendering area is loaded in the target layout page to obtain a first rendering layout page.
7. The layout rendering method according to claim 6, characterized in that: After performing layout rendering on the dynamic rendering area according to the text rendering style and the image rendering style to obtain a target dynamic rendering area, the method further includes: Acquire the object operation instruction for the target dynamic rendering area, switch the layout attribute value based on the object operation instruction, and obtain an updated layout attribute value; Determining update layout data of the dynamic rendering area based on the update layout attribute value and the preset resource object; The target dynamic rendering area is updated and rendered based on the updated layout data to obtain an updated dynamic rendering area.
8. A layout rendering device, characterized in that: The layout rendering device comprises: A page acquisition module is configured to respond to a layout rendering request, acquire a target layout page corresponding to the layout rendering request, and a dynamic rendering area in the target layout page; A layout acquisition module is configured to determine target layout data corresponding to the target layout page according to the dynamic rendering area and the layout attribute value sent by the preset cloud server; The dynamic rendering module is configured to perform layout rendering on the target layout page and / or the dynamic rendering area according to the target layout data to obtain a rendered layout page.
9. A layout rendering device, characterized in that: The layout rendering device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to implement the steps of the layout rendering method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of the layout rendering method according to any one of claims 1 to 7.