A page rendering method, device, apparatus and storage medium

By retrieving components and functions from template definition files and storage pools, the problem of reusing components and functions in page rendering is solved, enabling efficient reuse of page components and logic functions and simplifying the front-end development process.

CN119311980BActive Publication Date: 2026-07-28BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING YOUZHUJU NETWORK TECH CO LTD
Filing Date
2023-07-11
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

In existing technologies, each activity template requires the writing of corresponding page components and logic functions during the page rendering process, resulting in poor reusability and a complex writing process.

Method used

By obtaining the template definition file of the target activity template, obtaining the element definition file corresponding to the element to be rendered, retrieving page components and logic functions from the target storage pool, rendering the activity configuration page based on these components and functions, and improving the reusability of logic functions by using pipeline functions.

Benefits of technology

It improves the reusability of page components and logic functions, simplifies the page rendering process, and enhances the efficiency and maintainability of front-end development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311980B_ABST
    Figure CN119311980B_ABST
Patent Text Reader

Abstract

The present disclosure provides a page rendering method, device and equipment and storage medium, the method comprises: in response to the page rendering request for the target activity template, obtaining the template definition file corresponding to the target activity template, wherein the to-be-rendered element is defined in the template definition file; obtaining the element definition file corresponding to the to-be-rendered element in the template definition file; obtaining the page component and the logic function corresponding to the to-be-rendered element from the target storage pool, and rendering the activity configuration page corresponding to the target activity template based on the page component and the logic function corresponding to the to-be-rendered element, wherein the page component and the logic function corresponding to the to-be-rendered element are defined in the element definition file. It can be seen that the embodiments of the present disclosure can obtain the page component and the logic function corresponding to the to-be-rendered element from the target storage pool based on the to-be-rendered element defined in the template definition file, thereby improving the reusability of the page component and the logic function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing, and more particularly to a page rendering method, apparatus, device, and storage medium. Background Technology

[0002] In front-end development, page rendering is an indispensable technology. For example, when a user accesses a new page or jumps from the current page to a new page, the components required for page display need to be rendered into the new page.

[0003] Currently, page rendering technology requires writing corresponding page components and logic functions for each activity template, a process that is complex and difficult to reuse. Therefore, significantly improving the reusability of page components and logic functions is a pressing technical problem that needs to be solved. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a page rendering method.

[0005] In a first aspect, this disclosure provides a page rendering method, the method comprising:

[0006] In response to a page rendering request for a target activity template, a template definition file corresponding to the target activity template is obtained; wherein, the template definition file defines elements to be rendered;

[0007] Obtain the element definition file corresponding to the element to be rendered in the template definition file; wherein, the element to be rendered consists of page components and logic functions, and the element definition file defines the page components and logic functions corresponding to the element to be rendered;

[0008] Retrieve the page component and logic function corresponding to the element to be rendered from the target storage pool;

[0009] Based on the page components and logic functions corresponding to the element to be rendered, render the activity configuration page corresponding to the target activity template.

[0010] In one optional implementation, the element definition file defines page components and logic functions corresponding to various page types for the element to be rendered, the page rendering request carries the target page type, and the step of retrieving the page components and logic functions corresponding to the element to be rendered from the target storage pool includes:

[0011] Retrieve the page components and logic functions corresponding to the elements to be rendered from the target storage pool for the target page type.

[0012] In an optional implementation, the template definition file further defines active template routes, and the method further includes:

[0013] Based on the activity template route, generate routes for activity configuration pages of multiple page types corresponding to the target activity template;

[0014] Accordingly, after rendering the activity configuration page corresponding to the target activity template based on the page component and logic function corresponding to the element to be rendered, the process further includes:

[0015] Register the route of the activity configuration page with the front-end routing module; wherein, the front-end routing module is used to control the display of the multiple types of activity configuration pages based on the route.

[0016] In one optional implementation, the method further includes:

[0017] Store the pre-built page components carrying component identifiers into the target storage pool;

[0018] And / or, store the logical function carrying the function identifier into the target storage pool.

[0019] In one optional implementation, the element definition file defines the component identifier and function identifier corresponding to the element to be rendered, and the step of obtaining the page component and logic function corresponding to the element to be rendered from the target storage pool includes:

[0020] Based on the component identifier and function identifier corresponding to the element to be rendered as defined in the element definition file, the page component and logic function corresponding to the element to be rendered are obtained from the target storage pool.

[0021] In one optional implementation, the first logical function in the target storage pool is implemented based on a pipeline function, which includes a synchronous pipeline function or an asynchronous pipeline function, and the first logical function includes a data verification function, a data transformation function, and / or a linkage verification function.

[0022] In one optional implementation, the different elements to be rendered defined in the template definition file belong to the same or different workflow modules, and the workflow modules are abstracted based on the activity configuration process.

[0023] Secondly, this disclosure provides a page rendering apparatus, the apparatus comprising:

[0024] The first acquisition module is used to acquire the template definition file corresponding to the target activity template in response to a page rendering request for the target activity template; wherein, the template definition file defines the elements to be rendered;

[0025] The second acquisition module is used to acquire the element definition file corresponding to the element to be rendered in the template definition file; wherein, the element to be rendered is composed of page components and logic functions, and the element definition file defines the page components and logic functions corresponding to the element to be rendered;

[0026] The third acquisition module is used to acquire the page components and logic functions corresponding to the element to be rendered from the target storage pool;

[0027] The rendering module is used to render the activity configuration page corresponding to the target activity template based on the page components and logic functions corresponding to the element to be rendered.

[0028] Thirdly, this disclosure provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the above-described method.

[0029] Fourthly, this disclosure provides a page rendering device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.

[0030] Fifthly, this disclosure provides a computer program product comprising a computer program / instruction that, when executed by a processor, implements the method described above.

[0031] The technical solution provided in this disclosure has at least the following advantages compared with the prior art:

[0032] This disclosure provides a page rendering method. In response to a page rendering request for a target activity template, the method involves: obtaining a template definition file corresponding to the target activity template, wherein the template definition file defines elements to be rendered; obtaining an element definition file corresponding to the elements to be rendered in the template definition file; retrieving page components and logic functions corresponding to the elements to be rendered from a target storage pool; and rendering an activity configuration page corresponding to the target activity template based on the page components and logic functions corresponding to the elements to be rendered. The element definition file defines the page components and logic functions corresponding to the elements to be rendered. Therefore, this disclosure can retrieve the page components and logic functions corresponding to the elements to be rendered from the target storage pool based on the elements to be rendered defined in the template definition file, thereby improving the reusability of page components and logic functions. Attached Figure Description

[0033] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0034] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0035] Figure 1 A flowchart illustrating a page rendering method provided in this embodiment of the disclosure;

[0036] Figure 2 A schematic diagram of a target storage pool provided in an embodiment of this disclosure;

[0037] Figure 3 A schematic diagram of a pipeline function provided in an embodiment of this disclosure;

[0038] Figure 4 A form submission flowchart is provided for embodiments of this disclosure;

[0039] Figure 5 An architecture diagram of a front end provided in an embodiment of this disclosure;

[0040] Figure 6 This is a schematic diagram of the structure of a page rendering apparatus provided in an embodiment of the present disclosure;

[0041] Figure 7 This is a schematic diagram of the structure of a page rendering device provided in an embodiment of this disclosure. Detailed Implementation

[0042] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0043] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0044] In front-end development, page rendering is an indispensable technology. For example, when a user accesses a new page or jumps from the current page to a new page, the components required for page display need to be rendered into the new page.

[0045] Currently, page rendering technology requires writing corresponding page components and logic functions for each activity configuration page, a process that is complex and difficult to reuse. Therefore, significantly improving the reusability of page components and logic functions is a pressing technical problem that needs to be solved.

[0046] To address this, this disclosure provides a page rendering method. In response to a page rendering request for a target activity template, the method involves: obtaining a template definition file corresponding to the target activity template, wherein the template definition file defines elements to be rendered; obtaining an element definition file corresponding to the elements to be rendered in the template definition file; retrieving page components and logic functions corresponding to the elements to be rendered from a target storage pool; and rendering an activity configuration page corresponding to the target activity template based on the page components and logic functions corresponding to the elements to be rendered, wherein the element definition file defines the page components and logic functions corresponding to the elements to be rendered. Therefore, this disclosure can retrieve page components and logic functions corresponding to the elements to be rendered from a target storage pool based on the elements to be rendered defined in the template definition file, thereby improving the reusability of page components and logic functions.

[0047] Based on this, the present disclosure provides a page rendering method, referring to... Figure 1 The flowchart below illustrates a page rendering method provided in this embodiment of the present disclosure. The method specifically includes:

[0048] S101: In response to a page rendering request for the target activity template, obtain the template definition file corresponding to the target activity template.

[0049] The template definition file contains elements to be rendered.

[0050] The page rendering method provided in this disclosure can be applied to a client, such as a client deployed on a smartphone, a client deployed on a tablet, etc.

[0051] In this embodiment of the disclosure, the target activity template can be a standardized template pre-created based on the activity information required for the target activity. Users can configure the activity information required for the target activity based on the target activity template. The target activity can be, for example, an international e-commerce marketing activity, such as a coupon activity or a discount activity. The activity information can be, for example, the activity time, activity scope, and activity rules corresponding to the target activity.

[0052] In practical applications, when a user is browsing multiple activity templates displayed on the current page, a page rendering request for the target activity template can be triggered by selecting the target activity template, such as selecting the coupon activity template. The target activity template can be any one of the multiple activity templates.

[0053] In this embodiment of the disclosure, when the client receives a page rendering request for a target activity, it can obtain the template definition file corresponding to the target activity template from local storage or from cloud storage. The template definition file can be used to describe the activity information required for the target activity corresponding to the target activity template.

[0054] In one alternative implementation, the required activity information of the target activity corresponding to the target activity template can be described by a domain-specific language (DSL). Here, DSL is a programming language or specification language that is easy for humans to understand and can be interpreted and executed by a computer, such as JSON, SQL, regular expressions, etc.

[0055] In this embodiment of the disclosure, the template definition file corresponding to the target activity template may define elements to be rendered. Specifically, the elements to be rendered may consist of page components and logic functions. The page components refer to the visual elements to be rendered and displayed, such as drop-down selection boxes, text input boxes, button controls, etc. The logic functions can be used to describe the logical relationships and associations between multiple page components.

[0056] In one optional implementation, different elements to be rendered defined in the template definition file belong to the same or different workflow modules. The workflow module can be abstracted from the activity configuration process. For example, in the process of configuring a coupon activity, it is necessary to configure the name, time, scope, discount, etc. of the coupon activity.

[0057] The workflow module can include basic information about the activity, the target audience, the scope of the activity, the conditions for the activity, the rules for the activity, and the activity display.

[0058] S102: Obtain the element definition file corresponding to the element to be rendered in the template definition file.

[0059] The element to be rendered consists of page components and logic functions, and the element definition file defines the page components and logic functions corresponding to the element to be rendered.

[0060] In this embodiment of the disclosure, since the template definition file corresponding to the target activity template defines elements to be rendered, the element definition file corresponding to the elements to be rendered can be obtained based on the elements to be rendered defined in the template definition file during the running of the template definition file.

[0061] In this embodiment of the disclosure, the element definition file can be used to describe the display style or display relationship of the element to be rendered on the activity configuration page.

[0062] S103: Obtain the page component and logic function corresponding to the element to be rendered from the target storage pool.

[0063] In this embodiment of the disclosure, since the element definition file defines the page components and logic functions corresponding to the element to be rendered, during the execution of the element definition file, the page components and logic functions corresponding to the element to be rendered can be obtained from the target storage pool based on the page components and logic functions defined in the element definition file.

[0064] In one optional implementation, since the target storage pool can be used to store and retrieve page components and logic functions corresponding to the elements to be rendered, in practical applications, page components and / or logic functions can be stored in the target storage pool in advance so that page components and logic functions can be stored or retrieved from the target storage pool based on component identifiers and function identifiers in the future. The specific storage or retrieval methods will be described in detail in subsequent embodiments and will not be elaborated here.

[0065] In practical applications, the element definition file can also define page components and logic functions corresponding to various page types for the element to be rendered. Therefore, based on the target page type carried in the page rendering request, the page components and logic functions corresponding to the element to be rendered can be obtained from the target storage pool for the target page type. The page type can include page types such as list page, form page, and detail page.

[0066] For example, assuming the target page type carried in the received page rendering request is a form page, the page components and logic functions corresponding to the form page type of the element to be rendered can be obtained from the target storage pool based on the form page type. This allows the form page corresponding to the target activity template to be rendered based on the page components and logic functions corresponding to the form page type.

[0067] S104: Based on the page components and logic functions corresponding to the element to be rendered, render the activity configuration page corresponding to the target activity template.

[0068] In this embodiment of the disclosure, the activity configuration page is used to configure the configuration information corresponding to the target activity template so that the target activity can be generated based on the configuration information in the future. The activity configuration page can be, for example, a form page, a list page, or a details page.

[0069] In one alternative implementation, after obtaining the page component and logic function corresponding to the element to be rendered, the activity configuration page corresponding to the target activity template can be rendered based on the template rendering engine.

[0070] In the page rendering method provided in this disclosure, in response to a page rendering request for a target activity template, a template definition file corresponding to the target activity template is obtained, wherein the template definition file defines elements to be rendered; an element definition file corresponding to the elements to be rendered in the template definition file is obtained; page components and logic functions corresponding to the elements to be rendered are obtained from a target storage pool; and based on the page components and logic functions corresponding to the elements to be rendered, the activity configuration page corresponding to the target activity template is rendered, wherein the element definition file defines the page components and logic functions corresponding to the elements to be rendered. Therefore, this disclosure embodiment can obtain the page components and logic functions corresponding to the elements to be rendered from the target storage pool based on the elements to be rendered defined in the template definition file, thereby improving the reusability of page components and logic functions.

[0071] In one optional implementation, the element definition file may also define component identifiers and function identifiers corresponding to the elements to be rendered, wherein the component identifier is the path that can be read from the corresponding page component, and the function identifier is the path that can be read from the corresponding logic function.

[0072] For example, suppose the element definition file is named element. In the element definition file element, there are component identifiers corresponding to the element to be rendered, such as component, and function identifiers corresponding to the element to be rendered, such as effect. The component field is used to describe the path (i.e., component identifier) ​​of the page component, and the effect field is used to describe the path (i.e., function identifier) ​​of the logical function.

[0073] In this embodiment of the disclosure, the component identifier and function identifier corresponding to the element to be rendered are defined in the element definition file so that the page component corresponding to the component identifier can be obtained based on the component identifier, and the logic function corresponding to the function identifier can be obtained based on the function identifier.

[0074] In practical applications, after establishing the target storage pool, pre-built page components carrying component identifiers can also be stored in the target storage pool, and / or logic functions carrying function identifiers can be stored in the target storage pool. This allows the page components and logic functions corresponding to the elements to be rendered to be directly retrieved from the target storage pool when rendering the target activity template, thereby improving the reusability of page components and logic functions.

[0075] like Figure 2The diagram shown is a schematic of a target storage pool provided in an embodiment of this disclosure. In practical applications, the setExtemal function can be used to store page components or logical functions. When defining the setExtemal function, two parameters are declared in parentheses: the page component and the component identifier corresponding to the page component, or the logical function and the function identifier corresponding to the logical function, such as setExtemal("component identifier", page component).

[0076] In this embodiment of the disclosure, since the element definition file defines the component identifier and logic function corresponding to the element to be rendered, when the element definition file is run, the page component and logic function corresponding to the element to be rendered can be obtained from the target storage pool according to the component identifier and function identifier corresponding to the element to be rendered defined in the element definition file.

[0077] like Figure 2 As shown, the getExtemal function can be used to read page components or logic functions. When defining the getExtemal function, a parameter is declared in parentheses, which is the component identifier or function identifier, such as getExtemal(“component identifier”).

[0078] As can be seen, this embodiment of the present disclosure stores pre-built page components carrying component identifiers in a target storage pool, and / or stores logic functions carrying function identifiers in the target storage pool, so that when the element definition file corresponding to the element to be rendered in the template definition file is obtained later, the page components and logic functions corresponding to the element to be rendered can be obtained from the target storage pool according to the component identifiers and function identifiers corresponding to the element to be rendered defined in the element definition file, thereby solving the problem that page components and logic functions are difficult to reuse in the page rendering process.

[0079] In practical applications, in order to further improve the reusability and testability of logic functions, the first logic function in the target storage pool can also be implemented based on pipeline functions. The first logic function can be any logic function in the target storage pool.

[0080] Pipe functions are a common concept in functional programming. They typically chain multiple functions together, allowing you to pass a value as an argument to the first function, pass the return value of the first function as an argument to the second function, and so on, until you get a final return value. If any function returns an error during the processing of the arguments, the execution of subsequent functions is terminated, and an exception is thrown.

[0081] like Figure 3The diagram shown is a schematic of a pipeline function provided in an embodiment of this disclosure. A specified parameter is input into the pipeline function. First, function 1 processes the parameter. If function 1 returns value 1, then function 2 passes the return value 1 to function 2. At this time, function 2 processes the return value 1. If function 2 returns value 2, then function 3 passes the return value 2 to function 3, and so on, until the final return value is obtained, which is the output of the pipeline function.

[0082] This disclosure embodiment can use pipeline functions to chain together multiple logic functions of the same type. Different logic functions can be configured for differences between different tenants or effective regions, thereby achieving the effect of displaying different activity templates for different tenants or effective regions.

[0083] In this embodiment of the disclosure, the pipe function may include a synchronous pipe function or an asynchronous pipe function. The difference between an asynchronous pipe function and a synchronous pipe function is that the execution of each function in an asynchronous pipe function is asynchronous.

[0084] In addition, the embodiments of this disclosure use pipeline functions to connect multiple logic functions in series, so that adding, deleting or replacing any logic function will not affect the operation of other logic functions.

[0085] In this embodiment of the disclosure, the first logic function may include a data verification function, a data conversion function, and / or a linkage verification function; wherein, the data verification function is used to verify the configuration information filled in on the activity configuration page, such as verifying whether the basic information of the target activity, the activity object, etc. are empty, or verifying whether the activity scope of the target activity is within the restriction range; the data conversion function is used to convert the currently filled configuration information into information that meets the conditions, such as converting the filled activity time into the target effective region, such as the time corresponding to Indonesia; the linkage verification function is used to verify the correlation between multiple configuration information, such as after determining the discount rate to be 20%, when filling in the specific discount price, verifying whether the specific discount price meets the above discount rate.

[0086] like Figure 4 The diagram shown illustrates a form submission flowchart based on a pipeline function, provided in this embodiment of the present disclosure. Specifically, in a scenario where a form is submitted on the activity configuration page corresponding to the target activity template, the rendering engine automatically executes... Figure 4 The process is shown below.

[0087] When a user clicks the submit button, the system first determines whether the activity configuration page needs to be validated. If validation is required, each piece of information to be configured on the activity configuration page is validated, such as whether the basic information of the target activity is empty and whether the scope of the target activity is within the limit. If there is an error in the information to be configured, an error message is displayed on the activity configuration page to prompt the user to check or modify the information to be configured.

[0088] When a user clicks the submit button, if it's determined that no validation is needed, or if no errors are found after validating the configuration information, data transformation can be performed using pipeline functions A and B to retrieve the configuration information from the activity configuration page. Pipeline function A can be used to pre-fill some of the configuration information into the activity configuration page. For example, when the user selects a tenant and effective region, contextual information injection can be used to pre-fill some information corresponding to the target activity into the activity configuration page. Pipeline function B can receive the return value of pipeline function A, as well as the information entered by the user on the activity configuration page.

[0089] As can be seen, the embodiments of this disclosure can implement the first logic function in the target storage pool based on pipeline functions, thereby further improving the reusability and testability of the logic function. Furthermore, adding, deleting, or replacing any logic function can reduce the impact on other logic functions.

[0090] In practical applications, the template definition file can also define activity template routes. Activity template routes are used to generate routes for activity configuration pages of multiple page types corresponding to the target activity template. For example, when a user triggers a display request for activity configuration pages of multiple page types, routes for activity configuration pages of multiple types corresponding to the target activity template are generated based on the activity template routes.

[0091] In this embodiment of the disclosure, routing refers to displaying different pages or content based on different URL addresses. The task of assigning different content or pages to different URL addresses is completed by the front-end routing. Therefore, after rendering the activity configuration page corresponding to the target activity template based on the page component and logic function corresponding to the element to be rendered, it is also necessary to register the route of the activity configuration page to the front-end routing module.

[0092] In this embodiment of the disclosure, the front-end routing module is used to control the display of multiple types of activity configuration pages based on the routing of the activity configuration page. That is, when the front-end routing module receives a user's switching operation between multiple pages corresponding to the target activity template, it can control the display of different types of activity configuration pages based on the routing of multiple page types of activity configuration pages, such as switching from a form page to a details page and displaying the details page.

[0093] As can be seen, the embodiments of this disclosure can generate routes for multiple page types of activity configuration pages corresponding to the target activity based on the activity template routes defined in the template definition file. This allows the front-end routing module to control the display of multiple types of activity configuration pages based on the activity configuration page routes after the activity configuration page routes are registered with the front-end routing module.

[0094] Based on the above method embodiments, this disclosure also provides a front-end architecture diagram to describe the process of rendering the activity configuration page corresponding to the target activity template based on rendering elements, such as... Figure 5 The diagram shown is an architecture diagram of the front end provided in an embodiment of this disclosure.

[0095] The front-end architecture diagram includes a general layer, a bridging layer, a model layer, a business layer, and a presentation layer. The general layer includes multiple page components categorized based on page functions, as well as multiple logic functions categorized based on function functions.

[0096] The bridging layer is mainly used to bridge the general layer and the model layer. In practical applications, for example, it can use the setExternal function to store pre-built page components with component identifiers into the target storage pool, and / or store logic functions with function identifiers into the target storage pool, and use the getExternal function to retrieve the page components and logic functions corresponding to the elements to be rendered from the target storage pool and pass them to the model layer, thereby realizing the function of bridging the general layer and the model layer.

[0097] The model layer is mainly used to describe the template definition file corresponding to the target activity template. The template definition file defines elements to be rendered. Different elements to be rendered belong to the same or different workflow modules. For example, under the basic information workflow module, the elements to be rendered include activity management, activity name, and activity time.

[0098] The business layer is configured with multiple activity templates and rendering requests. For example, activity templates may include coupon activity templates, subsidy activity templates, etc. The rendering engine is used to render the activity templates of the business layer to the presentation layer, which is the activity configuration page of the user's client.

[0099] As can be seen, the embodiments disclosed herein can abstract the activity configuration process and redesign the front-end architecture, thereby providing a testable, maintainable and easily extensible front-end architecture.

[0100] Based on the above method embodiments, this disclosure also provides a page rendering apparatus, with reference to... Figure 6 This is a schematic diagram of the structure of a page rendering apparatus provided in an embodiment of the present disclosure. The apparatus includes:

[0101] The first acquisition module 601 is used to acquire the template definition file corresponding to the target activity template in response to a page rendering request for the target activity template; wherein, the template definition file defines elements to be rendered;

[0102] The second acquisition module 602 is used to acquire the element definition file corresponding to the element to be rendered in the template definition file; wherein, the element to be rendered is composed of page components and logic functions, and the element definition file defines the page components and logic functions corresponding to the element to be rendered;

[0103] The third acquisition module 603 is used to acquire the page component and logic function corresponding to the element to be rendered from the target storage pool;

[0104] The rendering module 604 is used to render the activity configuration page corresponding to the target activity template based on the page components and logic functions corresponding to the element to be rendered.

[0105] In one optional implementation, the element definition file defines page components and logic functions corresponding to various page types for the element to be rendered, the page rendering request carries the target page type, and the third acquisition module includes:

[0106] The first acquisition submodule is used to acquire the page components and logic functions corresponding to the elements to be rendered from the target storage pool for the target page type.

[0107] In one optional implementation, the template definition file further defines an active template route, and the device further includes:

[0108] The generation module is used to generate routes for multiple page types of activity configuration pages corresponding to the target activity template based on the activity template route;

[0109] The registration module is used to register the route of the activity configuration page with the front-end routing module; wherein, the front-end routing module is used to control the display of the multiple types of activity configuration pages based on the route.

[0110] In one optional embodiment, the apparatus further includes:

[0111] A storage module is used to store pre-built page components carrying component identifiers into the target storage pool;

[0112] And / or, store the logical function carrying the function identifier into the target storage pool.

[0113] In one optional implementation, the third acquisition module includes:

[0114] The second acquisition submodule is used to acquire the page component and logic function corresponding to the element to be rendered from the target storage pool according to the component identifier and function identifier corresponding to the element to be rendered as defined in the element definition file.

[0115] In one optional implementation, the first logical function in the target storage pool is implemented based on a pipeline function, which includes a synchronous pipeline function or an asynchronous pipeline function, and the first logical function includes a data verification function, a data transformation function, and / or a linkage verification function.

[0116] In one optional implementation, the different elements to be rendered defined in the template definition file belong to the same or different workflow modules, and the workflow modules are abstracted based on the activity configuration process.

[0117] In the page rendering apparatus provided in this embodiment, in response to a page rendering request for a target activity template, a template definition file corresponding to the target activity template is obtained, wherein the template definition file defines elements to be rendered; an element definition file corresponding to the elements to be rendered in the template definition file is obtained; page components and logic functions corresponding to the elements to be rendered are obtained from a target storage pool; and an activity configuration page corresponding to the target activity template is rendered based on the page components and logic functions corresponding to the elements to be rendered, wherein the element definition file defines the page components and logic functions corresponding to the elements to be rendered. Therefore, this embodiment can obtain the page components and logic functions corresponding to the elements to be rendered from the target storage pool based on the elements to be rendered defined in the template definition file, thereby improving the reusability of page components and logic functions.

[0118] In addition to the methods and apparatus described above, this disclosure also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the page rendering method described in this disclosure.

[0119] This disclosure also provides a computer program product, which includes a computer program / instructions that, when executed by a processor, implement the page rendering method described in this disclosure.

[0120] In addition, this disclosure also provides a page rendering device, see [link to relevant documentation]. Figure 7 As shown, it may include:

[0121] The page rendering device includes a processor 701, a memory 702, an input device 703, and an output device 704. The number of processors 701 in the device can be one or more. Figure 7Taking a processor as an example. In some embodiments of this disclosure, the processor 701, memory 702, input device 703, and output device 704 can be connected via a bus or other means, wherein, Figure 7 Taking the example of a connection between China and Israel via a bus.

[0122] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing of the page rendering device by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The input device 703 can be used to receive input digital or character information, and to generate signal inputs related to user settings and function control of the page rendering device.

[0123] Specifically in this embodiment, the processor 701 loads the executable files corresponding to the processes of one or more applications into the memory 702 according to the following instructions, and the processor 701 runs the applications stored in the memory 702, thereby realizing the various functions of the page rendering device described above.

[0124] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0125] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of rendering a page, the method comprising: The method includes: In response to a page rendering request for a target activity template, a template definition file corresponding to the target activity template is obtained; wherein, the template definition file defines elements to be rendered; Obtain the element definition file corresponding to the element to be rendered in the template definition file; wherein, the element to be rendered consists of page components and logic functions, the element definition file defines page components and logic functions corresponding to various page types for the element to be rendered, and the page rendering request carries the target page type, the page type including at least one of list page type, form page type and detail page type; From the target storage pool, obtain the page components and logic functions corresponding to the element to be rendered for the target page type; Based on the page components and logic functions corresponding to the element to be rendered, render the activity configuration page corresponding to the target activity template.

2. The method of claim 1, wherein, The template definition file also defines active template routes, and the method further includes: Based on the activity template route, generate routes for activity configuration pages of multiple page types corresponding to the target activity template; Accordingly, after rendering the activity configuration page corresponding to the target activity template based on the page component and logic function corresponding to the element to be rendered, the process further includes: Register the route of the activity configuration page with the front-end routing module; wherein, the front-end routing module is used to control the display of the multiple types of activity configuration pages based on the route.

3. The method of claim 1, wherein, The method further includes: Store the pre-built page components carrying component identifiers into the target storage pool; And / or, store the logical function carrying the function identifier into the target storage pool.

4. The method of claim 3, wherein, The element definition file defines the component identifier and function identifier corresponding to the element to be rendered. The step of retrieving the page component and logic function corresponding to the element to be rendered from the target storage pool includes: Based on the component identifier and function identifier corresponding to the element to be rendered as defined in the element definition file, the page component and logic function corresponding to the element to be rendered are obtained from the target storage pool.

5. The method of claim 1, wherein, The first logical function in the target storage pool is implemented based on a pipeline function, which includes synchronous pipeline functions or asynchronous pipeline functions. The first logical function includes a data verification function, a data transformation function, and / or a linkage verification function.

6. The method according to claim 1, characterized in that, The different elements to be rendered defined in the template definition file belong to the same or different workflow modules, and the workflow modules are abstracted based on the activity configuration process.

7. A page rendering device, characterized in that, The device includes: The first acquisition module is used to acquire the template definition file corresponding to the target activity template in response to a page rendering request for the target activity template; wherein, the template definition file defines the elements to be rendered; The second acquisition module is used to acquire the element definition file corresponding to the element to be rendered in the template definition file; wherein, the element to be rendered is composed of page components and logic functions, the element definition file defines page components and logic functions corresponding to various page types for the element to be rendered, and the page rendering request carries the target page type, the page type including at least one of list page type, form page type and detail page type; The third acquisition module is used to acquire the page components and logic functions corresponding to the element to be rendered from the target storage pool for the target page type; The rendering module is used to render the activity configuration page corresponding to the target activity template based on the page components and logic functions corresponding to the element to be rendered.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the method as described in any one of claims 1-6.

9. A page rendering device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as claimed in any one of claims 1-6.