Dynamic page generation method and device, equipment and storage medium
By setting parent identity value in page generation and obtaining configuration files step by step, the problems of slow loading of page configuration files and difficulty in optimization are solved, the page generation efficiency and independence are improved, and the web page is quickly rendered and flexible updates are realized. .
Patent Information
- Application Number
- CN202410369455.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2025-01-17
AI Technical Summary
In the prior art, page configuration files are loading slowly and page optimization is difficult, especially when pages increase, resulting in slower web page loading speed and redundant requests and rendering problems.
By receiving page generation instructions, set the parent identity value of the child page is equal to the current page's identity value, and obtain the pages and configuration files of the parent-child relationship step by step, render them according to the obtained configuration files to realize the dynamics of the page Generate and optimize.
Improve page generation efficiency, decouple configuration files, enhance page independence, facilitate update and optimization, and reduce the reading and parsing of unnecessary configuration files.
Smart Images

Figure CN119322897A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for dynamically generating pages. Background Art
[0002] In front-end web design, low-code platforms or other configuration platforms are usually used to generate configuration files in JSON or XML format through visual operations such as dragging, dropping, and pulling. The configuration files record the relevant information of the page nodes, and the pages can be dynamically generated through the configuration files. In the content management system, there are multiple page data that are related to each other, and it is usually necessary to configure multiple related pages to realize internal system functions.
[0003] In the existing page generation method, a new configuration item can be added to the page to realize that a single configuration item can display and hide multiple pages. It is also possible to disperse the content by configuring multiple pop-up windows in the page to meet the needs of multiple contents. However, as the number of pages increases, the content of the page configuration file in the existing technology increases, the web page loading speed is slow, and there are problems such as generating redundant requests and page rendering, making page optimization difficult. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for dynamically generating pages, which are used to solve the technical problems of slow configuration file loading speed and great difficulty in page optimization in the prior art.
[0005] In order to solve the above technical problems, in a first aspect, the present invention provides a method for dynamically generating a page, the method comprising:
[0006] Receive a page generation instruction for generating a subpage on the current page;
[0007] In response to the page generation instruction, a parent identity value is set for the child page, the parent identity value of the child page is equal to the identity value of the current page, wherein the identity value is used to uniquely identify the page, and the parent identity value is used to represent the parent-child association relationship between the two pages;
[0008] Through the parent identity value, starting from the child page, each level page with a parent-child relationship and the configuration file corresponding to the identity value of each level page are obtained step by step, and the child page is rendered according to the obtained configuration file.
[0009] Optionally, the obtaining, starting from the child page, level by level of pages having a parent-child relationship and configuration files corresponding to the identity values of the level pages by using the parent identity value; and rendering the child page according to the obtained configuration file includes:
[0010] Starting from the child page, according to the parent identity value of the child page, the parent page with a parent-child relationship is obtained, and the operation is performed recursively level by level until the parent identity value of the current level page obtained is empty;
[0011] The configuration files corresponding to the identity values of the pages at each level having the parent-child relationship are obtained, and the page navigation components of the sub-pages are rendered according to the obtained configuration files.
[0012] Optionally, rendering a page navigation component of the sub-page according to the acquired configuration file includes:
[0013] Rendering the corresponding hierarchical pages according to the acquired configuration file;
[0014] The page title and page link of each of the hierarchical pages are extracted, and the page navigation component of the sub-page is rendered.
[0015] Optionally, the page generation instruction is generated by operating an action object set for the current page, the action object is set with an independent component configuration file, and the operation includes execution for page jump, pop-up window and data drilling.
[0016] Optionally, after responding to the page generation instruction, the method further comprises:
[0017] Determine whether the identity value of the sub-page exists in the back-end interface;
[0018] If it does not exist, obtain a default configuration file, and randomly generate an identity value for the default configuration file, and set the randomly generated identity value equal to the identity value of the sub-page;
[0019] If it exists, the configuration file of the sub-page is obtained through the back-end interface.
[0020] Optionally, obtaining the configuration file of the sub-page through the back-end interface includes:
[0021] Determine whether the backend interface has a configuration file corresponding to the identity value of the sub-page;
[0022] If it exists, directly obtain the configuration file corresponding to the identity value of the sub-page;
[0023] If it does not exist, a local configuration file corresponding to the identity value of the sub-page is obtained, and the local configuration file is set as the configuration file corresponding to the identity value of the sub-page.
[0024] Optionally, after responding to the page generation instruction, the method further includes setting a routing value for the sub-page that is equal to the identity value of the sub-page, and the routing value is used for page positioning.
[0025] In a second aspect, the present invention provides a device for dynamically generating a page, comprising a button module, an association module and a rendering module, wherein:
[0026] The button module is used to receive a page generation instruction for generating a sub-page on the current page;
[0027] The association module is used to set a parent identity value for the sub-page in response to the page generation instruction, the parent identity value of the sub-page is equal to the identity value of the current page, wherein the identity value is used to uniquely represent the page, and the parent identity value is used to represent the parent-child association relationship between the two pages;
[0028] The rendering module is used to obtain, starting from the child page, the configuration files corresponding to the identity values of the pages at each level and the identity values of the pages at each level through the parent identity value, and render the child page according to the obtained configuration files.
[0029] In a third aspect, the present invention provides a device for dynamically generating pages, including a memory and a processor, wherein:
[0030] The memory is used to store computer programs;
[0031] The processor is used to read the program in the memory and execute the steps of a method for dynamically generating pages provided in the first aspect above.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having a readable computer program stored thereon, which, when executed by a processor, implements the steps of a method for dynamically generating pages as provided in the first aspect above.
[0033] Compared with the prior art, the method, device, equipment and storage medium for dynamically generating pages provided by the present invention have the following beneficial effects:
[0034] By receiving a page generation instruction for generating a subpage on the current page; in response to the page generation instruction, setting a parent identity value for the subpage, the parent identity value of the subpage is equal to the identity value of the current page, wherein the identity value is used to uniquely characterize the page, and the parent identity value is used to characterize the parent-child relationship between the two pages; through the parent identity value, starting from the subpage, the configuration files corresponding to the pages of each level and the identity values of each level of the pages with parent-child relationships are obtained step by step, and the subpage is rendered according to the obtained configuration file. In the embodiment of the present invention, an identity value uniquely identifying the page configuration file is configured for each page, and a parent identity value identifying the parent-child relationship is set for each page. Therefore, in the process of generating a subpage, only the subpage and the pages of each level with parent-child relationships and their corresponding configuration files are obtained through the parent identity value of the page, without adding redundant configuration files, and the page rendering only needs to read and parse the obtained configuration file, thereby improving the efficiency of page generation, and also realizing the decoupling of the configuration files of each page, improving the independence of the page, and facilitating page update and optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] 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 part of the embodiments of the present invention, rather than all of the embodiments. For ordinary technicians in this field, without paying creative work, other drawings obtained based on these drawings all fall within the scope of protection of this application.
[0036] Figure 1 It is a flowchart of a method for dynamically generating pages provided by an embodiment of the present invention;
[0037] Figure 2 It is a schematic diagram of pages of various levels with a parent-child relationship provided by an embodiment of the present invention;
[0038] Figure 3 It is a schematic diagram of a flow chart of obtaining a configuration file of a sub-page provided by an embodiment of the present invention;
[0039] Figure 4 It is a structural schematic diagram of a device for dynamically generating pages provided by an embodiment of the present invention;
[0040] Figure 5 It is a structural schematic diagram of a dynamic page generation device provided by an embodiment of the present invention;
[0041] Figure 6 It is a structural schematic diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0043] In order to make the description of the disclosed content more detailed and complete, the following is an illustrative description of the implementation mode and specific examples of the present invention; however, this is not the only form of implementing or applying the specific embodiments of the present invention. The implementation mode covers the features of multiple specific embodiments and the method steps and their sequence for constructing and operating these specific embodiments. However, other specific embodiments can also be used to achieve the same or equal functions and step sequences. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0045] In the description of the embodiments of the present invention, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two, and other quantifiers are similar. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention, and the embodiments of the present application and the features in the embodiments may be combined with each other without conflict.
[0046] Example 1
[0047] like Figure 1 The above is a flow chart of a method for dynamically generating pages provided by an embodiment of the present invention, which includes the following steps.
[0048] Step S101, receiving a page generation instruction for generating a sub-page on a current page.
[0049] Exemplarily, an action object for generating a sub-page is configured on the current page. If the current page needs to open or create a sub-page, a page generation instruction of the current page is received by operating the action object.
[0050] As an optional implementation, the page generation instruction is generated by operating an action object set for the current page, the action object is set with an independent component configuration file, and the operation includes execution for page jump, pop-up window and data drilling.
[0051] Exemplarily, the action object corresponding to the operation may be a preset button or preset module for executing page jump, pop-up window and data drilling operation. When the preset button or preset module is clicked, the page jump, pop-up window and data drilling operation are generated, and a page generation instruction is generated. In addition, an independent component configuration file is set for the operation object, which can reduce the size of the configuration file of the current page.
[0052] In the embodiment of the present invention, a component configuration file is set for the action object on the current page, which is beneficial to upgrading the version of the operation object later and reduces the size of the configuration file corresponding to the current page.
[0053] Step S102, in response to the page generation instruction, set a parent identity value for the child page, the parent identity value of the child page is equal to the identity value of the current page, wherein the identity value is used to uniquely represent the page, and the parent identity value is used to represent the parent-child association relationship between the two pages.
[0054] In response to the page generation instruction, the parent identity value is set for the generated sub-page, and the parent identity value of the sub-page is set equal to the identity value of the current page, that is, the current page is the parent page of the sub-page. Each page has a unique corresponding configuration file, and the identity value is used to uniquely characterize the configuration file corresponding to the page. The identity value and parent identity value of the page are saved as attribute values in the configuration file corresponding to the page.
[0055] For example, Figure 2 The figure shows a schematic diagram of pages of various levels with a parent-child relationship in an embodiment of the present invention. In the main page, sub-page 1, sub-page 2, sub-page 3, sub-page 4 and sub-page 5, from left to right, the adjacent previous page is the parent page of the next page. When the current page is the main page, for the main page and sub-page 1, the parent identity value of sub-page 1 is equal to the identity value of the main page, and the main page and sub-page 1 have a parent-child relationship; when the current page is sub-page 1, for sub-page 1 and sub-page 2, the parent identity value of sub-page 2 is equal to the identity value of sub-page 1, and sub-page 1 and sub-page 2 have a parent-child relationship.
[0056] Step S103, starting from the child page, the pages of each level with a parent-child relationship and the configuration files corresponding to the identity values of the pages of each level are obtained step by step through the parent identity value, and the child page is rendered according to the obtained configuration files.
[0057] Exemplarily, each page corresponds to a separate configuration file, which contains the identity value and parent identity value corresponding to the page, and records the page node information. The configuration file can be in JSON file format or XML format; and the configuration files of each page are separate, even if there are two pages with a parent-child relationship, their configuration files are not coupled to each other. Starting from the child page, according to the parent identity value of the child page, the parent page of the child page is found. Since the parent identity value of the child page is equal to the identity value of its parent page, the configuration file corresponding to its parent page is quickly obtained at the same time; if there is also a parent page above its parent page, the configuration page of the parent page above it is obtained according to its parent identity value; obtain level by level, so as to obtain the pages of each level with a parent-child relationship starting from the child page and the configuration files of each level page, and finally render the child page according to the obtained configuration file. For example, the identity value in the configuration file of the main page is 111, and the parent identity value is empty; the identity value of the configuration file of subpage 1 is 222, and the parent identity value is 111. The parent identity value of subpage 1 is equal to the identity value of the main page. The main page is the child parent page of subpage 1, and the two pages have their own configuration files and are not coupled to each other.
[0058] The embodiment of the present invention provides a method for dynamically generating a page, which receives a page generation instruction for generating a subpage on the current page; in response to the page generation instruction, sets a parent identity value for the subpage, the parent identity value of the subpage is equal to the identity value of the current page, wherein the identity value is used to uniquely characterize the page, and the parent identity value is used to characterize the parent-child relationship between the two pages; through the parent identity value, starting from the subpage, the pages of each level with a parent-child relationship and the configuration files corresponding to the identity values of the pages of each level are obtained step by step, and the subpage is rendered according to the obtained configuration files. In the embodiment of the present invention, an identity value uniquely identifying the page configuration file is configured for each page, and a parent identity value identifying the parent-child relationship is set for each page. Therefore, in the process of generating the subpage, only the subpage and the pages of each level with a parent-child relationship and their corresponding configuration files are obtained through the parent identity value of the page, without adding redundant configuration files, and the page rendering only needs to read and parse the obtained configuration files, thereby improving the efficiency of page generation, and also realizing the decoupling of the configuration files of each page, improving the independence of the page, and facilitating page update and optimization.
[0059] As an optional implementation, the parent identity value is used to obtain, starting from the child page, the configuration files corresponding to the identity values of the pages at each level and the pages at each level having a parent-child relationship; and the child page is rendered according to the obtained configuration file, including:
[0060] Starting from the child page, the parent page with a parent-child relationship is obtained according to the parent identity value of the child page, and the operation is recursively performed level by level until the parent identity value of the current level page obtained is empty; the configuration file corresponding to the identity value of each level page with a parent-child relationship is obtained, and the page navigation component of the child page is rendered according to the obtained configuration file.
[0061] The parent identity value is used to represent the parent-child relationship between two pages, and the parent identity value of a page is equal to the identity value of its parent page. If a page is a main page, that is, it does not have a parent page, its parent identity value is set to null. In some other embodiments, the parent identity value of the main page may not be set to null, but may be set to other values that represent that it does not have a parent page.
[0062] Exemplarily, the configuration files of the subpage and the parent pages of several levels with which the subpage has a parent-child relationship are obtained. First, the corresponding configuration file is obtained according to the identity value of the subpage and saved in a mapping table; then, a recursive operation is performed to obtain the configuration file of its parent page through the parent identity value in the configuration file of the subpage and save it in a mapping table; if the parent identity value also exists in the configuration file of its parent page, the recursion continues until the parent identity value of the configuration file of the obtained page is empty, that is, the page is the main page; finally, according to the configuration files of the subpage and the parent pages of several levels obtained in the mapping table, the page navigation component of the subpage is rendered. Among them, the page navigation component is used to clarify the hierarchical position of the current subpage under the main page, so that visitors can understand the information and how to return.
[0063] like Figure 2 As shown, assuming that the current page is attached Figure 2Take subpage 4 in as an example, the generated subpage is subpage 5, and the parent identity value of subpage 5 is set equal to the identity value of subpage 4. Starting from subpage 5, obtain the parent page of subpage 5, that is, subpage 4; the parent identity value of subpage 4 is not empty, and subpage 3 is determined to be the parent page of subpage 4 according to the parent identity value of subpage 4; the parent identity value of subpage 3 is not empty, and continue to recurse until the main page with an empty parent identity value is recursively reached, and the recursive operation is stopped. Determine that the parent pages of each level of subpage 5 include subpage 4, subpage 3, subpage 2, subpage 1 and the main page; render subpage 5 according to the configuration files corresponding to subpages 5, 4, 3, 2, 1 and the main page, and render the page navigation component of subpage 5.
[0064] The embodiment of the present invention generates an identity value as an index unique ID for the configuration file corresponding to each page, and connects the configuration files in series through the parent identity value, thereby ensuring that complex content configuration requirements under page generation operations such as pop-up windows, data drill-down and page jumps are achieved without reducing page rendering performance and without re-refreshing the page.
[0065] As an optional implementation manner, rendering the page navigation component of the sub-page according to the acquired configuration file includes:
[0066] According to the acquired configuration file, the corresponding hierarchical pages are rendered; the page titles and page links of the hierarchical pages are extracted, and the page navigation components of the sub-pages are rendered.
[0067] Exemplarily, a configuration file corresponding to each level of page is obtained, each level of page is rendered using the configuration file, and the page title and page link of each level of page are extracted for rendering, thereby obtaining a page navigation component of the subpage.
[0068] In the embodiment of the present invention, a page navigation component is rendered through the configuration files of each level of pages, and the page titles and page links of each level of pages are provided through the page navigation component, which is conducive to fast browsing and navigation to the page of interest.
[0069] like Figure 3 FIG. 1 is a flow chart of obtaining a configuration file of a sub-page provided by an embodiment of the present invention. As an optional implementation, in step S101, after responding to the page generation instruction, the following steps are included:
[0070] Step S111, determining whether the backend interface has the identity value of the sub-page;
[0071] The backend interface refers to the interface on the router.
[0072] Exemplarily, the subpage to be generated may be a page that has been saved or a newly created page. If the subpage is a page that has been saved and is being edited again, then the identity value of the subpage exists on the route, and the identity value of the subpage can be directly obtained by searching; if the subpage is a newly created page, then the identity value of the subpage does not exist on the route. Based on this, when the back-end interface receives a page generation instruction to generate a subpage on the current page, the back-end interface determines whether the identity value of the subpage exists.
[0073] Step S112, if it does not exist, obtain a default configuration file, and randomly generate an identity value for the default configuration file, and set the randomly generated identity value equal to the identity value of the sub-page;
[0074] Exemplarily, if the identity value of the subpage does not exist in the backend interface, a default configuration file is obtained. At the same time, an identity value is randomly generated for the default configuration file, and the randomly generated identity value is set as the identity value of the subpage, thereby associating the subpage with the default configuration file.
[0075] Step S113: if it exists, obtain the configuration file of the sub-page through the back-end interface.
[0076] Exemplarily, if there is an identity value of the sub-page in the back-end interface, data is read in the back-end interface according to the identity value to obtain a configuration file corresponding to the identity value.
[0077] As an optional implementation manner, if present, obtaining the configuration file of the sub-page through the back-end interface includes:
[0078] Determine whether the back-end interface has a configuration file corresponding to the identity value of the sub-page; if so, directly obtain the configuration file corresponding to the identity value of the sub-page; if not, obtain a local configuration file corresponding to the identity value of the sub-page, and set the local configuration file to the configuration file corresponding to the identity value of the sub-page.
[0079] Exemplarily, when the back-end interface has an identity value of a sub-page, it is further determined whether the back-end interface can obtain the configuration file corresponding to the identity value. If so, the configuration file corresponding to the sub-page can be directly obtained based on the identity value. If not, it means that the sub-page did not complete the page generation steps during the last page generation operation, but directly exited the sub-page without saving the configuration file of the sub-page. Therefore, although the back-end interface does not have a configuration file corresponding to the identity value, the locally cached configuration file of the last page operation can be obtained based on the identity value, and the local configuration file can be obtained as the configuration file corresponding to the sub-page.
[0080] In addition, after the current page generates a page generation instruction, the identity value of the sub-page will also be used as an attribute and value of the operation object of the current page, so that the operation object of the current page is associated with the identity value of the sub-page.
[0081] As an optional implementation, after responding to the page generation instruction, the method further includes setting a routing value equal to the identity value of the sub-page for the sub-page, wherein the routing value is used for page positioning.
[0082] Exemplarily, the routing value represents the unique identity value of the page on the routing, and the routing value is equal to the identity value of the page. The routing value is the routing parameter value of the page on the routing, and the identity value is the attribute value in the configuration file corresponding to the page. During the page generation process, according to the needs of page testing and page problem location, the page configuration parameters are customized to facilitate the location of the problem page data. If there is a routing value of the page on the routing, the page configuration parameters can be awakened according to the routing value to perform page problem location or page testing. Specifically, after the page is rendered according to the configuration file corresponding to the identity value of the page, when it is necessary to perform page testing and problem location on the page, since the routing value of the page is equal to the identity value of the page, the configuration file corresponding to the page can be directly located according to the routing value, and the trigger condition pre-set in the configuration file is triggered, and the page configuration parameters are executed and exposed to the global variables, so as to perform page testing and page location on the page according to the page configuration parameters.
[0083] In the embodiment of the present invention, the page configuration parameters of the custom settings of the page can be awakened through the routing value and identity value corresponding to the page, which is conducive to quickly locating problems and performing page testing, and improving the flexibility and performance of the page.
[0084] Example 2
[0085] Based on the above-mentioned method for dynamically generating pages, an embodiment of the present invention provides a structural diagram of a device 400 for dynamically generating pages, as shown in FIG. Figure 4 As shown, the dynamic page generation device includes a button module 410, an association module 420 and a rendering module 430, wherein:
[0086] The button module 410 is used to receive a page generation instruction for generating a sub-page on the current page;
[0087] The association module 420 is used to set a parent identity value for the sub-page in response to the page generation instruction, the parent identity value of the sub-page is equal to the identity value of the current page, wherein the identity value is used to uniquely represent the page, and the parent identity value is used to represent the parent-child association relationship between the two pages;
[0088] The rendering module 430 is used to obtain, starting from the child page, the configuration files corresponding to the identity values of the pages at each level and the identity values of the pages at each level through the parent identity value, and render the child page according to the obtained configuration files.
[0089] For other details about how the modules in the above-mentioned dynamic page generation device implement the above-mentioned technical solution, please refer to the description of the dynamic page generation method provided in the above-mentioned invention embodiment, which will not be repeated here.
[0090] Based on the above dynamic page generation method, such as Figure 5 As shown, an embodiment of the present invention further provides a structural schematic diagram of a dynamic page generation device, the recognition device includes a processor 51 and a memory 52 coupled to the processor 51. The memory 52 stores a computer program, and when the computer program is executed by the processor 51, the processor 51 executes the steps of the dynamic page generation method in the above embodiment.
[0091] For other details about how the processor 51 in the above-mentioned dynamic page generation device implements the above-mentioned technical solution, please refer to the description of the dynamic page generation method provided in the above-mentioned invention embodiment, which will not be repeated here.
[0092] like Figure 6 As shown, the embodiment of the present invention also provides a schematic diagram of the structure of a computer-readable storage medium, on which a readable computer program 61 is stored; wherein the computer program 61 can be stored in the above storage medium in the form of a software product, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, magnetic disk or optical disk, ROM (Read-Only Memory), RAM (Random Access Memory) and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.
[0093] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0094] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0095] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0096] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0097] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0098] The technical solution provided by the present application is introduced in detail above. The principles and implementation methods of the present application are explained by using specific examples in the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1process or processes and / or
[0101] or Box Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0104] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for dynamically generating a page, characterized in that: include: Receive a page generation instruction for generating a subpage on the current page; In response to the page generation instruction, a parent identity value is set for the child page, the parent identity value of the child page is equal to the identity value of the current page, wherein the identity value is used to uniquely identify the page, and the parent identity value is used to represent the parent-child association relationship between the two pages; Through the parent identity value, starting from the child page, each level page with a parent-child relationship and the configuration file corresponding to the identity value of each level page are obtained step by step, and the child page is rendered according to the obtained configuration file.
2. The method for dynamically generating pages according to claim 1, characterized in that: The method of obtaining, starting from the child page, the pages of each level having a parent-child relationship and the configuration files corresponding to the identity values of the pages of each level by using the parent identity value, and rendering the child page according to the obtained configuration files includes: Starting from the child page, according to the parent identity value of the child page, the parent page with a parent-child relationship is obtained, and the operation is performed recursively level by level until the parent identity value of the current level page obtained is empty; The configuration files corresponding to the identity values of the pages at each level having the parent-child relationship are obtained, and the page navigation components of the sub-pages are rendered according to the obtained configuration files.
3. The method for dynamically generating pages according to claim 2, characterized in that: The rendering of the page navigation component of the sub-page according to the acquired configuration file includes: Rendering the corresponding hierarchical pages according to the acquired configuration file; The page title and page link of each of the hierarchical pages are extracted, and the page navigation component of the sub-page is rendered.
4. The method for dynamically generating pages according to claim 1, characterized in that: The page generation instruction is generated by operating the action object set on the current page, the action object is set with an independent component configuration file, and the operation includes execution for page jump, pop-up window and data drilling.
5. The method for dynamically generating pages according to claim 1, characterized in that: After the page generation instruction is responded to, the method further comprises: Determine whether the identity value of the sub-page exists in the back-end interface; If it does not exist, obtain a default configuration file, and randomly generate an identity value for the default configuration file, and set the randomly generated identity value equal to the identity value of the sub-page; If it exists, the configuration file of the sub-page is obtained through the back-end interface.
6. The method for dynamically generating pages according to claim 5, characterized in that: If the subpage exists, obtaining the configuration file of the subpage through the backend interface includes: Determine whether the backend interface has a configuration file corresponding to the identity value of the sub-page; If it exists, directly obtain the configuration file corresponding to the identity value of the sub-page; If it does not exist, a local configuration file corresponding to the identity value of the sub-page is obtained, and the local configuration file is set as the configuration file corresponding to the identity value of the sub-page.
7. The method for dynamically generating pages according to claim 5, characterized in that: After responding to the page generation instruction, the method further includes setting a routing value equal to the identity value of the sub-page for the sub-page, wherein the routing value is used for page positioning.
8. A device for dynamically generating pages, characterized in that: It includes button module, association module and rendering module, among which: The button module is used to receive a page generation instruction for generating a sub-page on the current page; The association module is used to set a parent identity value for the sub-page in response to the page generation instruction, the parent identity value of the sub-page is equal to the identity value of the current page, wherein the identity value is used to uniquely represent the page, and the parent identity value is used to represent the parent-child association relationship between the two pages; The rendering module is used to obtain, starting from the child page, the configuration files corresponding to the identity values of the pages at each level and the identity values of the pages at each level through the parent identity value, and render the child page according to the obtained configuration files.
9. A device for dynamically generating pages, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to read the computer program in the memory and execute the steps of the method for dynamically generating pages according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A readable computer program is stored thereon, and when the program is executed by a processor, the steps of the method for dynamically generating pages as claimed in any one of claims 1 to 7 are implemented.