Page rendering method and device, storage medium and electronic device

By building a page template library and a profile library, automatically match and configure data to achieve page rendering, the problem of resource waste when page requirements of data statistics are changed, and page updates are achieved quickly responding and resource-saving.

CN115129316BActive Publication Date: 2025-02-14BEIJING SOUFUN SCI & TECH DEV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210854784.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2025-02-14
Estimated Expiration
2042-07-18

AI Technical Summary

Technical Problem

When the requirements of data statistics pages change, developers need to develop pages, resulting in waste of resources.

Method used

By building a page template library and a profile library, determine the target page template and profile file, perform page element matching and configuration data import, and realize page rendering.

Benefits of technology

There is no need to redevelop the page, just modify the configuration data in the page template or profile to achieve page updates, saving manpower and development resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129316B_ABST
    Figure CN115129316B_ABST
Patent Text Reader

Abstract

The present invention provides a page rendering method and device, a storage medium and an electronic device, the method comprising: determining a target page template, a target default configuration file and a target page profile file corresponding to a target page. If each page element in the target page template does not correspond one to one with each page element identifier in the target page profile file, each first page element and each second page element are determined in each page element. According to the target page profile file, the configuration data corresponding to each first page element is determined; according to the target default configuration file, the configuration data corresponding to each second page element is determined. According to the configuration data of the first page element and the second page element, the target page template is configured, and the page is rendered with the configured target page template. By applying the method of the present invention, when the page requirements change, the page template or the page profile file can be configured without the need to develop a page program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a page rendering method and device, a storage medium and an electronic device. Background Art

[0002] In the information architecture of an enterprise organization, data statistics is one of the common functions of the business system. Therefore, in the front-end page system of the business system, the data statistics page is also one of the main pages.

[0003] At present, data statistics pages are usually developed page by page by developers. Developers design and develop pages according to the data display requirements of each page, obtain fixed page programs corresponding to each requirement, and render the page according to the fixed page program when the corresponding page needs to be displayed.

[0004] In actual data statistics scenarios, there are usually a large number of page requirements. In the process of business development, new page requirements will continue to arise, and new pages need to be developed. The data display requirements of a single page may also change during the business development process. Based on the existing page development and rendering methods, when new page requirements arise or existing page requirements change, developers are required to develop pages, which consumes a lot of human resources and development resources. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a page rendering method to solve the problem that when new page requirements are generated or existing page requirements change, page development is required, which consumes a lot of resources.

[0006] The embodiment of the present invention also provides a page rendering device to ensure the actual implementation and application of the above method.

[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0008] A page rendering method, comprising:

[0009] In the case where a target page for displaying statistical data needs to be rendered, a target page template corresponding to the current target page and a target default configuration file corresponding to the target page template are determined in the constructed page template library; the target page template includes a plurality of page elements; the page template library includes a plurality of page templates and a default configuration file corresponding to each of the page templates;

[0010] In the constructed profile library, a target page profile corresponding to the current target page is determined; the target page profile includes a plurality of page element identifiers and configuration data corresponding to each of the page element identifiers; the profile library includes a plurality of page profiles;

[0011] Determining whether the plurality of page elements and the plurality of page element identifiers match one-to-one;

[0012] If the plurality of page elements and the plurality of page element identifiers do not have a one-to-one correspondence, then determining, among the plurality of page elements, a first page element corresponding to each of the page element identifiers;

[0013] Determine each page element among the plurality of page elements except each of the first page elements as a second page element;

[0014] Determining configuration data corresponding to each of the first page elements according to the target page profile;

[0015] Determining configuration data corresponding to each of the second page elements according to the target default configuration file;

[0016] According to the configuration data corresponding to each of the first page elements and the configuration data corresponding to each of the second page elements, data configuration is performed on the target page template to obtain a target page template with completed data configuration;

[0017] The target page is rendered based on the target page template configured with the completion data to display the front-end interface corresponding to the target page.

[0018] In the above method, optionally, determining the configuration data corresponding to each of the first page elements according to the target page profile file includes:

[0019] For each of the first page elements, the configuration data corresponding to the page element identifier corresponding to the first page element is read from the target page profile file, and the configuration data is used as the configuration data corresponding to the first page element.

[0020] In the above method, optionally, determining the configuration data corresponding to each second page element according to the target default configuration file includes:

[0021] The default configuration data corresponding to each of the second page elements is read from the default configuration data corresponding to each of the page elements contained in the target default configuration file, and the default configuration data corresponding to each of the second page elements is used as the configuration data corresponding to each of the second page elements.

[0022] The above method may optionally further include:

[0023] If the plurality of page elements and the plurality of page element identifiers are matched one-to-one, then determining configuration data corresponding to each of the page elements according to the target page profile file;

[0024] The target page template is configured with data according to the configuration data corresponding to each of the page elements to render the target page.

[0025] The above method may optionally further include:

[0026] Determine the page operation logic function and general response strategy corresponding to the target page template;

[0027] In response to a page operation performed by a user in the front-end interface, determining operation data corresponding to the page operation through the page operation logic function;

[0028] A general response operation is determined according to the operation data and the general response strategy, and the general response operation is executed.

[0029] The above method may optionally further include:

[0030] Determining a special response strategy corresponding to the target page according to the target page profile;

[0031] A special response operation is determined according to the operation data and the special response strategy, and the special response operation is executed.

[0032] A page rendering device, comprising:

[0033] A first determining unit is used to determine, in a constructed page template library, a target page template corresponding to the current target page and a target default configuration file corresponding to the target page template when a target page for displaying statistical data needs to be rendered; the target page template includes a plurality of page elements; the page template library includes a plurality of page templates and a default configuration file corresponding to each of the page templates;

[0034] The second determining unit is used to determine a target page profile corresponding to the current target page in the constructed profile library; the target page profile includes a plurality of page element identifiers and configuration data corresponding to each of the page element identifiers; the profile library includes a plurality of page profiles;

[0035] A judging unit, used to judge whether the plurality of page elements and the plurality of page element identifiers match one-to-one;

[0036] A third determining unit is configured to determine, if the plurality of page elements and the plurality of page element identifiers do not have a one-to-one correspondence, a first page element corresponding to each of the plurality of page element identifiers among the plurality of page elements;

[0037] a fourth determining unit, configured to determine each page element among the plurality of page elements except each of the first page elements as a second page element;

[0038] a fifth determining unit, configured to determine configuration data corresponding to each of the first page elements according to the target page profile;

[0039] a sixth determining unit, configured to determine configuration data corresponding to each of the second page elements according to the target default configuration file;

[0040] a configuration unit, configured to perform data configuration on the target page template according to the configuration data corresponding to each of the first page elements and the configuration data corresponding to each of the second page elements, so as to obtain a target page template with completed data configuration;

[0041] The first rendering unit is used to render the target page based on the target page template configured with the completion data, so as to display a front-end interface corresponding to the target page.

[0042] In the above device, optionally, the fifth determining unit includes:

[0043] The first reading subunit is used to read, for each of the first page elements, configuration data corresponding to the page element identifier corresponding to the first page element from the target page profile file, and use the configuration data as the configuration data corresponding to the first page element.

[0044] A storage medium includes stored instructions, wherein when the instructions are executed, a device where the storage medium is located is controlled to execute the page rendering method as described above.

[0045] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors as the page rendering method described above.

[0046] A page rendering method provided based on the above-mentioned embodiment of the present invention includes: determining a target page template corresponding to the current target page and its corresponding target default configuration file in a constructed page template library. Determining a target page profile file corresponding to the current target page in a constructed profile file library. Determining whether each page element matches each page element identifier one-to-one. If not, determining the first page element corresponding to each page element identifier in each page element. Determining each page element except each first page element in each page element as a second page element. Determining the configuration data corresponding to each first page element according to the target page profile file. Determining the configuration data corresponding to each second page element according to the target default configuration file. Performing data configuration on the target page template according to the configuration data corresponding to each first page element and the configuration data corresponding to each second page element to obtain a target page template with data configuration completed. Performing page rendering on the target page based on the target page template with data configuration completed to display the front-end interface corresponding to the target page. Applying the method provided by the embodiment of the present invention, each page template can be set based on the common page structure of the statistical data page. For each specific page, specify its corresponding page template, and configure the configuration data in the template according to its page requirements to obtain its corresponding page profile file. When a target page needs to be rendered, the target page template is configured with its corresponding target page profile file and the default configuration file of the target page template, and the page is rendered with the template that has completed the data configuration. When new page requirements are generated or existing page requirements change, the page template corresponding to the page can be reset or the configuration data in the page profile file corresponding to the page can be modified. There is no need to redevelop the page, which can save a lot of human resources and development resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0048] Figure 1 A method flow chart of a page rendering method provided by an embodiment of the present invention;

[0049] Figure 2 A flowchart of another method of a page rendering method provided by an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of the structure of a page rendering device provided by an embodiment of the present invention;

[0051] Figure 4 Another structural schematic diagram of a page rendering device provided by an embodiment of the present invention;

[0052] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0055] As can be seen from the background technology, in the data statistics page rendering process, it is usually rendered based on a fixed page architecture independently developed and designed. When a new page needs to be added or the page requirements of an existing page change, developers need to develop or modify each page through page development, which consumes a lot of human resources and development resources.

[0056] In the actual page system, most of the pages of data statistics have highly similar overall structures. Therefore, the embodiment of the present invention provides a page rendering method, which constructs various types of reusable page templates and their default configuration data. For each page, based on its corresponding page template, the corresponding configuration data is set as required. In the page rendering process, based on the page template corresponding to the page, the configuration data set as required and the default configuration data, the page rendering can be realized. When the page requirements change, only the association of the page template or the configuration data of the page needs to be modified, without the need to develop a page program.

[0057] The embodiment of the present invention provides a page rendering method, which can be applied to various business systems. The execution subject can be a processor of the system. The method flow chart of the method is as follows: Figure 1 As shown, including:

[0058] S101: When a target page for displaying statistical data needs to be rendered, a target page template corresponding to the current target page and a target default configuration file corresponding to the target page template are determined in a constructed page template library; the target page template includes a plurality of page elements; the page template library includes a plurality of page templates and a default configuration file corresponding to each of the page templates;

[0059] In the method provided by the embodiment of the present invention, a page template library is pre-built in the system, which includes multiple page templates and a default configuration file corresponding to each page template. Each page template is generally configured according to the page requirements of the data statistics page of the system. Each page template can cover the page requirements of some pages. The page template defines the composition of the page, such as the page elements it contains, the position of each page element, the attributes of the page element, etc. Multiple page elements are set in each page template, such as various page components such as title bars and list boxes. The default configuration file corresponding to each page template records the default configuration data of each page element in the page template, such as the default display of certain data in the title bar, default enablement, etc. When configuring the front-end page of the data statistics class for the system, the page template associated with each page can be set. Specifically, it can be set by binding the page template identifier and the like. The page template can be reused, that is, multiple pages can be associated with the same page template.

[0060] In the method provided by an embodiment of the present invention, when a user accesses a data statistics page through the front end, the page template corresponding to the current target page (i.e., the page accessed by the user) can be obtained from the constructed page template library as the target page template, and the default configuration file corresponding to the target page template can be obtained as the target default configuration file.

[0061] S102: Determine a target page profile corresponding to the current target page in the constructed profile library; the target page profile includes a plurality of page element identifiers and configuration data corresponding to each of the page element identifiers; the profile library includes a plurality of page profiles;

[0062] In the method provided by the embodiment of the present invention, a profile file library is pre-constructed in the system, which includes page profile files corresponding to each data statistics page in the system, and each page profile file corresponds to each page one by one. Each page profile file records the page profile data of the data statistics page. The page profile data is set by the developer according to the page requirements and the page template corresponding to the page. The page profile data includes configuration data of the page elements in the corresponding page template, which is specifically set by means of page element identifiers and their corresponding configuration data, such as information such as the default values ​​of search items in the page search area. The page profile data in the page profile file may include the configuration data of all page elements in the corresponding page template, or may only include the configuration data of some page elements, and can be configured as needed.

[0063] In the method provided by the embodiment of the present invention, a page profile file corresponding to a target page can be obtained from a profile library as the target page profile file.

[0064] S103: Determine whether the plurality of page elements and the plurality of page element identifiers have a one-to-one correspondence;

[0065] In the method provided by the embodiment of the present invention, each page element identifier in the target page profile file can be read, and each page element in the target page template can be read. By matching the page element identifier with the page element, it is determined whether each page element in the target page template and each page element identifier in the target page profile file match one-to-one, that is, whether each page element has a page element identifier corresponding to it, that is, it is determined whether the configuration data of each page element in the target page template is configured in the target page profile file.

[0066] S104: If the plurality of page elements and the plurality of page element identifiers are not matched one-to-one, determining, among the plurality of page elements, a first page element corresponding to each of the page element identifiers;

[0067] In the method provided by an embodiment of the present invention, if each page element does not correspond one-to-one to each page element identifier, that is, there is at least one page element that does not have a corresponding page element identifier in the target page profile, that is, the target page profile does not configure all page elements in the target page template, then among each page element, the first page element corresponding to each page element identifier is determined, that is, the page element among each page element that has a page element identifier that matches it is taken as the first page element.

[0068] S105: Determine each page element among the plurality of page elements except each of the first page elements as a second page element;

[0069] In the method provided by the embodiment of the present invention, each page element among the various page elements that is not determined as the first page element is used as the second page element, that is, the page element among the various page elements that is not configured in the target page profile is used as the second page element.

[0070] S106: Determine configuration data corresponding to each of the first page elements according to the target page profile file;

[0071] In the method provided by the embodiment of the present invention, the configuration data corresponding to each first page element can be determined based on the configuration data corresponding to each page element identifier contained in the target page profile file, and the configuration data corresponding to each first page element is the configuration data corresponding to its corresponding page element identifier.

[0072] S107: Determine configuration data corresponding to each of the second page elements according to the target default configuration file;

[0073] In the method provided by the embodiment of the present invention, the configuration data corresponding to each second page element can be determined according to the default configuration data of each page element contained in the target default configuration file, and the configuration data corresponding to each second page element is its corresponding default configuration data.

[0074] S108: performing data configuration on the target page template according to the configuration data corresponding to each of the first page elements and the configuration data corresponding to each of the second page elements, to obtain a target page template with completed data configuration;

[0075] In the method provided by the embodiment of the present invention, the configuration data of each first page element and the configuration data of each second page element can be imported into the target page template to perform data configuration on each page element in the target page template to obtain a target page template with completed data configuration.

[0076] S109: Rendering the target page based on the target page template that has completed data configuration to display a front-end interface corresponding to the target page.

[0077] In the method provided by the embodiment of the present invention, page rendering is performed according to the relevant information in the target page template after completing the data configuration, and the front-end interface corresponding to the target page can be displayed on the front-end.

[0078] Based on the method provided by the embodiment of the present invention, when it is necessary to render a target page for displaying statistical data, in the constructed page template library, the target page template and the target default configuration file corresponding to the current target page are determined. In the constructed profile library, the target page profile corresponding to the current target page is determined. It is judged whether each page element matches each page element identifier one by one. If each page element does not match each page element identifier one by one, then in each page element, the first page element corresponding to each page element identifier is determined, and each page element except each first page element in each page element is determined as a second page element. According to the target page profile, the configuration data corresponding to each first page element is determined, and according to the target default configuration file, the configuration data corresponding to each second page element is determined. According to the configuration data corresponding to each first page element and the configuration data corresponding to each second page element, the target page template is configured with data, and the target page is rendered based on the target page template after the data configuration is completed. By applying the method provided by the embodiment of the present invention, each page template can be set based on the common page structure of the statistical data page. For each specific page, the corresponding page template is specified, and the configuration data in the template is configured according to its page requirements to obtain the corresponding page profile. When a target page needs to be rendered, the target page template is configured with data through its corresponding target page profile and the default configuration file of the target page template, and the page is rendered through the template with completed data configuration. When new page requirements are generated or existing page requirements change, the page template corresponding to the page can be reset or the configuration data in the page profile corresponding to the page can be modified, without the need to redevelop the page, which can save a lot of human resources and development resources.

[0079] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of determining the configuration data corresponding to each first page element according to the target page profile mentioned in step S106 includes:

[0080] For each of the first page elements, the configuration data corresponding to the page element identifier corresponding to the first page element is read from the target page profile file, and the configuration data is used as the configuration data corresponding to the first page element.

[0081] In the method provided by the embodiment of the present invention, the configuration data corresponding to each page element identifier in the target page profile file can be read as the configuration data corresponding to the first page element corresponding to each page element identifier.

[0082] exist Figure 1On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of determining the configuration data corresponding to each of the second page elements according to the target default configuration file mentioned in step S107 includes:

[0083] The default configuration data corresponding to each of the second page elements is read from the default configuration data corresponding to each of the page elements contained in the target default configuration file, and the default configuration data corresponding to each of the second page elements is used as the configuration data corresponding to each of the second page elements.

[0084] In the method provided by the embodiment of the present invention, the target default configuration file includes the default configuration data corresponding to each page element, which can also be set by identifying the corresponding configuration data of the page element. The default configuration data corresponding to each page element determined as the second page element can be read from the target default configuration file as the configuration data corresponding to the second page element.

[0085] exist Figure 1 On the basis of the method shown, the method provided in the embodiment of the present invention further includes:

[0086] If the plurality of page elements and the plurality of page element identifiers are matched one-to-one, then determining configuration data corresponding to each of the page elements according to the target page profile file;

[0087] In the method provided by the embodiment of the present invention, during the judgment process of step S103, if it is determined that each page element matches each page element identifier one by one, that is, the target page profile file has configured each page element in the target page template, then the configuration data corresponding to each page element is determined based on the target page profile file, and the configuration data corresponding to each page element is the configuration data corresponding to the page element identifier corresponding to the page element.

[0088] The target page template is configured with data according to the configuration data corresponding to each of the page elements to render the target page.

[0089] In the method provided by the embodiment of the present invention, the configuration data of each page element is imported into the target page template to perform data configuration on each page element in the target page template, and page rendering is performed based on the target page template with completed data configuration.

[0090] In order to better illustrate the method provided by the embodiment of the present invention, Figure 1 Based on the method shown, the embodiment of the present invention provides another page rendering method, referring to Figure 2 As shown in the flow chart, the method provided by the embodiment of the present invention further includes:

[0091] S201: Determine the page operation logic function and the general response strategy corresponding to the target page template;

[0092] In the method provided by the embodiment of the present invention, the page operation logic function and the general response strategy corresponding to each page template can be preset, the page operation logic function refers to the function for collecting data and identifying operations of the user's page operations, and the general response strategy refers to the response strategy for certain page operations of the user. The page operation logic function and the general response strategy corresponding to the target page template can be determined based on the configuration information.

[0093] S202: In response to a page operation performed by a user in the front-end interface, determining operation data corresponding to the page operation through the page operation logic function;

[0094] In the method provided by the embodiment of the present invention, after the front-end interface corresponding to the target page is displayed, the user's operation in the front-end interface can be monitored. In response to the page operation performed by the user in the front-end interface, such as clicking a certain control, etc., the operation data corresponding to the page operation can be determined through the page operation logic function. For example, when the user clicks a certain position, it can be determined that the corresponding operation data is clicking a certain control with an interactive effect.

[0095] S203: Determine a general response operation according to the operation data and the general response strategy, and execute the general response operation.

[0096] In the method provided by the embodiment of the present invention, a general response operation is determined based on the general response strategy and operation data, and the operation is performed. For example, when a user clicks a control with an interactive effect, and the corresponding response operation is to display related data in another control, the related control is triggered to display the related data.

[0097] On the basis of the method provided in the above embodiment, the method provided in the embodiment of the present invention further includes:

[0098] Determining a special response strategy corresponding to the target page according to the target page profile;

[0099] In the method provided by the embodiment of the present invention, in the page profile of each page, a special response strategy corresponding to each page can be set according to the requirements. For example, if a certain type of page needs to collect certain operation data for use by a data analysis plug-in, a corresponding special response strategy can be set. Based on the target page profile, the special response strategy corresponding to the target page can be determined.

[0100] A special response operation is determined according to the operation data and the special response strategy, and the special response operation is executed.

[0101] In the method provided by the embodiment of the present invention, when obtaining operation data in response to a page operation performed by a user, a special response operation can be determined based on the operation data and a special response strategy, and the operation can be performed.

[0102] In order to better illustrate the method provided by the embodiment of the present invention, the embodiment of the present invention provides another page rendering method. In combination with actual application scenarios, a brief overall summary of the method provided by the embodiment of the present invention is given.

[0103] The page rendering method provided by the embodiment of the present invention can be specifically configured as a core rendering component during a specific implementation process.

[0104] The application process provided by the embodiment of the present invention can be specifically summarized as follows: generating summary data of each page, connecting to the core rendering component, and the core rendering component rendering the page according to the summary data of each page.

[0105] In the method provided by the embodiment of the present invention, after the initial product requirements are determined and the back-end development determines the docking interface fields, the front-end developers will batch generate each page profile file based on the status of each page component of the system. Each page profile file contains the page profile data, such as search area search items, default values ​​and other information.

[0106] The core rendering component introduces internal front-end public resources, connects to various pages, reads internal summary data, provides general page operation logic functions, and provides page action data collection for use by other extension plug-ins in the future. According to the summary data of the docking page, the display and default value configuration of each front-end component are determined. The operation response of each page element is connected and collected, and page interaction is provided according to the page summary data configuration and combined with the general page operation logic function. At the same time, action data is collected for use by plug-ins such as system data analysis.

[0107] Based on the method provided by the embodiment of the present invention, the manpower cost and time cost of front-end developers can be effectively reduced, the complexity of maintenance can be reduced, and personnel handover can be simpler and faster. Front-end developers can be freed from modifying a specific page, and only need to continuously improve the core rendering component according to the needs of later products. Bug troubleshooting only needs to confirm whether the summary data of each page is correctly configured as agreed. Later personnel docking only needs to understand the working principle of the rendering component, and no longer need to understand the specific needs of a specific page.

[0108] and Figure 1 Corresponding to the page rendering method shown in FIG. 1 , an embodiment of the present invention further provides a page rendering device for Figure 1 The specific implementation of the method shown in is shown in the structural diagram Figure 3 As shown, including:

[0109] The first determining unit 301 is used to determine, in the constructed page template library, a target page template corresponding to the current target page and a target default configuration file corresponding to the target page template when a target page for displaying statistical data needs to be rendered; the target page template includes a plurality of page elements; the page template library includes a plurality of page templates and a default configuration file corresponding to each of the page templates;

[0110] The second determining unit 302 is used to determine the target page profile corresponding to the current target page in the constructed profile library; the target page profile includes multiple page element identifiers and configuration data corresponding to each of the page element identifiers; the profile library includes multiple page profiles;

[0111] A judging unit 303 is used to judge whether the plurality of page elements and the plurality of page element identifiers are matched one-to-one;

[0112] A third determining unit 304 is configured to determine, if the plurality of page elements and the plurality of page element identifiers are not matched one-to-one, a first page element corresponding to each of the plurality of page element identifiers among the plurality of page elements;

[0113] A fourth determining unit 305 is configured to determine each page element among the plurality of page elements except each of the first page elements as a second page element;

[0114] A fifth determining unit 306, configured to determine configuration data corresponding to each of the first page elements according to the target page profile;

[0115] A sixth determining unit 307, configured to determine configuration data corresponding to each of the second page elements according to the target default configuration file;

[0116] A configuration unit 308, configured to perform data configuration on the target page template according to the configuration data corresponding to each of the first page elements and the configuration data corresponding to each of the second page elements, to obtain a target page template with completed data configuration;

[0117] The first rendering unit 309 is used to render the target page based on the target page template configured with the completion data, so as to display the front-end interface corresponding to the target page.

[0118] Based on the device provided by the embodiment of the present invention, when it is necessary to render a target page for displaying statistical data, in the constructed page template library, the target page template and the target default configuration file corresponding to the current target page are determined. In the constructed profile library, the target page profile corresponding to the current target page is determined. It is judged whether each page element matches each page element identifier one by one. If each page element does not match each page element identifier one by one, then in each page element, the first page element corresponding to each page element identifier is determined, and each page element except each first page element in each page element is determined as a second page element. According to the target page profile, the configuration data corresponding to each first page element is determined, and according to the target default configuration file, the configuration data corresponding to each second page element is determined. According to the configuration data corresponding to each first page element and the configuration data corresponding to each second page element, the target page template is configured with data, and the target page is rendered based on the target page template after the data configuration is completed. By applying the device provided by the embodiment of the present invention, each page template can be set based on the common page structure of the statistical data page. For each specific page, the corresponding page template is specified, and the configuration data in the template is configured according to its page requirements to obtain the corresponding page profile. When a target page needs to be rendered, the target page template is configured with data through its corresponding target page profile and the default configuration file of the target page template, and the page is rendered through the template with completed data configuration. When new page requirements are generated or existing page requirements change, the page template corresponding to the page can be reset or the configuration data in the page profile corresponding to the page can be modified, without the need to redevelop the page, which can save a lot of human resources and development resources.

[0119] On the basis of the device provided in the above embodiment, in the device provided in the embodiment of the present invention, the fifth determining unit 306 includes:

[0120] The first reading subunit is used to read, for each of the first page elements, configuration data corresponding to the page element identifier corresponding to the first page element from the target page profile file, and use the configuration data as the configuration data corresponding to the first page element.

[0121] On the basis of the device provided in the above embodiment, in the device provided in the embodiment of the present invention, the sixth determining unit 307 includes:

[0122] The second reading subunit is used to read the default configuration data corresponding to each of the second page elements from the default configuration data corresponding to each of the page elements contained in the target default configuration file, and use the default configuration data corresponding to each of the second page elements as the configuration data corresponding to each of the second page elements.

[0123] On the basis of the device provided in the above embodiment, the device provided in the embodiment of the present invention further includes:

[0124] a seventh determining unit, configured to determine configuration data corresponding to each of the page elements according to the target page profile file if the plurality of page elements and the plurality of page element identifiers are matched one-to-one;

[0125] The second rendering unit is used to perform data configuration on the target page template according to the configuration data corresponding to each of the page elements, so as to perform page rendering on the target page.

[0126] The embodiment of the present invention provides another page rendering device, the structural diagram of which is as follows: Figure 4 As shown, in Figure 3 On the basis of the device shown, the device provided in the embodiment of the present invention further includes:

[0127] An eighth determining unit 310 is used to determine a page operation logic function and a general response strategy corresponding to the target page template;

[0128] A response unit 311 is used to respond to a page operation performed by a user in the front-end interface and determine operation data corresponding to the page operation through the page operation logic function;

[0129] The first execution unit 312 is used to determine a general response operation according to the operation data and the general response strategy, and execute the general response operation.

[0130] On the basis of the device provided in the above embodiment, the device provided in the embodiment of the present invention further includes:

[0131] a ninth determining unit, configured to determine a special response strategy corresponding to the target page according to the target page profile;

[0132] The second execution unit is used to determine a special response operation according to the operation data and the special response strategy, and execute the special response operation.

[0133] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the page rendering method as described above.

[0134] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 5As shown, it specifically includes a memory 401 and one or more instructions 402, wherein the one or more instructions 402 are stored in the memory 401 and are configured to be executed by one or more processors 403 to perform the following operations:

[0135] In the case where a target page for displaying statistical data needs to be rendered, a target page template corresponding to the current target page and a target default configuration file corresponding to the target page template are determined in the constructed page template library; the target page template includes a plurality of page elements; the page template library includes a plurality of page templates and a default configuration file corresponding to each of the page templates;

[0136] In the constructed profile library, a target page profile corresponding to the current target page is determined; the target page profile includes a plurality of page element identifiers and configuration data corresponding to each of the page element identifiers; the profile library includes a plurality of page profiles;

[0137] Determining whether the plurality of page elements and the plurality of page element identifiers match one-to-one;

[0138] If the plurality of page elements and the plurality of page element identifiers do not have a one-to-one correspondence, then determining, among the plurality of page elements, a first page element corresponding to each of the page element identifiers;

[0139] Determine each page element among the plurality of page elements except each of the first page elements as a second page element;

[0140] Determining configuration data corresponding to each of the first page elements according to the target page profile;

[0141] Determining configuration data corresponding to each of the second page elements according to the target default configuration file;

[0142] According to the configuration data corresponding to each of the first page elements and the configuration data corresponding to each of the second page elements, data configuration is performed on the target page template to obtain a target page template with completed data configuration;

[0143] The target page is rendered based on the target page template configured with the completion data to display the front-end interface corresponding to the target page.

[0144] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0145] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0146] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A page rendering method, characterized in that: include: In the case where a target page for displaying statistical data needs to be rendered, a target page template corresponding to the current target page and a target default configuration file corresponding to the target page template are determined in the constructed page template library; The target page template includes multiple page elements; The page template library includes multiple page templates and a default configuration file corresponding to each of the page templates; Determine the target page profile corresponding to the current target page in the constructed profile library; The target page profile file includes a plurality of page element identifiers and configuration data corresponding to each of the page element identifiers; The profile library contains a plurality of page profiles; Determining whether the plurality of page elements and the plurality of page element identifiers match one-to-one; If the plurality of page elements and the plurality of page element identifiers do not have a one-to-one correspondence, then determining, among the plurality of page elements, a first page element corresponding to each of the page element identifiers; Determine each page element among the plurality of page elements except each of the first page elements as a second page element; Determining configuration data corresponding to each of the first page elements according to the target page profile; Determining configuration data corresponding to each of the second page elements according to the target default configuration file; According to the configuration data corresponding to each of the first page elements and the configuration data corresponding to each of the second page elements, data configuration is performed on the target page template to obtain a target page template with completed data configuration; The target page is rendered based on the target page template configured with the completion data to display the front-end interface corresponding to the target page.

2. The method according to claim 1, characterized in that The step of determining configuration data corresponding to each of the first page elements according to the target page profile file includes: For each of the first page elements, the configuration data corresponding to the page element identifier corresponding to the first page element is read from the target page profile file, and the configuration data is used as the configuration data corresponding to the first page element.

3. The method according to claim 1, characterized in that The determining, according to the target default configuration file, configuration data corresponding to each of the second page elements includes: The default configuration data corresponding to each of the second page elements is read from the default configuration data corresponding to each of the page elements contained in the target default configuration file, and the default configuration data corresponding to each of the second page elements is used as the configuration data corresponding to each of the second page elements.

4. The method according to claim 1, characterized in that: Also includes: If the plurality of page elements and the plurality of page element identifiers are matched one-to-one, then determining configuration data corresponding to each of the page elements according to the target page profile file; The target page template is configured with data according to the configuration data corresponding to each of the page elements to render the target page.

5. The method according to claim 1, characterized in that Also includes: Determine the page operation logic function and general response strategy corresponding to the target page template; In response to a page operation performed by a user in the front-end interface, determining operation data corresponding to the page operation through the page operation logic function; A general response operation is determined according to the operation data and the general response strategy, and the general response operation is executed.

6. The method according to claim 5, characterized in that Also includes: Determining a special response strategy corresponding to the target page according to the target page profile; A special response operation is determined according to the operation data and the special response strategy, and the special response operation is executed.

7. A page rendering device, characterized in that: include: A first determining unit is used to determine, in a constructed page template library, a target page template corresponding to the current target page and a target default configuration file corresponding to the target page template when a target page for displaying statistical data needs to be rendered; The target page template includes multiple page elements; The page template library includes multiple page templates and a default configuration file corresponding to each of the page templates; A second determining unit is used to determine a target page profile corresponding to the current target page in the constructed profile library; The target page profile file includes a plurality of page element identifiers and configuration data corresponding to each of the page element identifiers; The profile library contains a plurality of page profiles; A judging unit, used to judge whether the plurality of page elements and the plurality of page element identifiers match one-to-one; A third determining unit is configured to determine, if the plurality of page elements and the plurality of page element identifiers do not have a one-to-one correspondence, a first page element corresponding to each of the plurality of page element identifiers among the plurality of page elements; a fourth determining unit, configured to determine each page element among the plurality of page elements except each of the first page elements as a second page element; a fifth determining unit, configured to determine configuration data corresponding to each of the first page elements according to the target page profile; a sixth determining unit, configured to determine configuration data corresponding to each of the second page elements according to the target default configuration file; a configuration unit, configured to perform data configuration on the target page template according to the configuration data corresponding to each of the first page elements and the configuration data corresponding to each of the second page elements, so as to obtain a target page template with completed data configuration; The first rendering unit is used to render the target page based on the target page template configured with the completion data, so as to display a front-end interface corresponding to the target page.

8. The device according to claim 7, characterized in that The fifth determining unit includes: The first reading subunit is used to read, for each of the first page elements, configuration data corresponding to the page element identifier corresponding to the first page element from the target page profile file, and use the configuration data as the configuration data corresponding to the first page element.

9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the page rendering method according to any one of claims 1 to 6.

10. An electronic device, characterized in that: The system comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the page rendering method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and device and computing equipment

    CN112631580A

  • Dynamic product configuration user interface

    US20090150773A1