Page generation method, device, computer equipment and storage medium
By obtaining and rendering the page component configuration information corresponding to the user role, dynamic pages are generated, which solves the problems of low page development efficiency and poor maintainability in traditional methods, and achieves efficient and maintainable page generation.
Patent Information
- Application Number
- CN202111101409.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-09-18
AI Technical Summary
In the traditional method, different Web pages need to be redeveloped for different user roles, resulting in a heavy workload and low efficiency in page development, making it difficult to achieve high efficiency and maintainability.
By obtaining the page component configuration information corresponding to the user role, obtaining the target page components according to the page component configuration information, and rendering them, generating dynamic pages for different role displays, achieving page customization and maintainability.
It achieves efficient generation of pages required for different roles, expands the scope of user customization, ensures page maintainability, and avoids the risk of data information leakage.
Smart Images

Figure CN113806652B
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a page generation method, apparatus, computer device, and storage medium. Background Technology
[0002] With the rapid development of internet technology, various types of websites based on internet technology are also increasing, and World Wide Web (WWW) pages are ubiquitous. To provide different interactive experiences for users with different roles, websites typically display different types of web pages to users with different roles.
[0003] Traditional methods typically involve redeveloping separate pages for different user roles, resulting in a large workload and low efficiency in page development. Summary of the Invention
[0004] Therefore, it is necessary to provide a page generation method, apparatus, computer equipment, and storage medium that can generate pages with high efficiency and high maintainability, in order to address the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a page generation method, the method comprising:
[0006] Retrieve the page component configuration information corresponding to the user role;
[0007] Based on the page component configuration information, obtain the target page component;
[0008] The target page component is rendered to obtain the target page.
[0009] In one embodiment, obtaining the target page component based on the page component configuration information includes:
[0010] Based on the page component configuration information, the routing information corresponding to the user role and the page index information corresponding to the routing information are obtained.
[0011] Based on the routing information and the page index information, obtain the target page component.
[0012] In one embodiment, before the step of obtaining the page component configuration information corresponding to the user role, the method further includes:
[0013] Based on the user role, determine the target permissions corresponding to the user role;
[0014] Based on the preset correspondence between permissions and page components, determine the page components corresponding to the target permissions;
[0015] Based on the routing information corresponding to each page component and the page index information corresponding to the routing information, the page component configuration information corresponding to the user role is generated.
[0016] In one embodiment, before the step of obtaining the page component configuration information corresponding to the user role, the method further includes:
[0017] A configuration page that displays the configuration information of the page components, the configuration page including a field for entering configuration parameters;
[0018] In response to an input operation for configuration parameters, the configuration parameters are obtained;
[0019] Based on the configuration parameters and the preset configuration file template, the page component configuration information corresponding to the user role is synthesized.
[0020] In one embodiment, the page generation method further includes:
[0021] Determine the multiple page components contained in the initial page;
[0022] Based on the preset routing rules, generate routing information for each page component and configure page index information for each page component.
[0023] In one embodiment, the page generation method further includes:
[0024] The page display interface includes a page entry point;
[0025] The step of obtaining the target page component based on the routing information and the page index information includes:
[0026] In response to a trigger operation targeting the page entry point, the target page component is retrieved from a preset page component library based on the page index information corresponding to the routing information.
[0027] In one embodiment, the page generation method further includes:
[0028] Obtain the identifier of the user role;
[0029] Based on the identifier of the user role, the target page corresponding to the identifier is queried in a preset page database. The page database stores the identifiers of multiple user roles and the target pages corresponding to the identifiers.
[0030] The target page is displayed within the page display interface.
[0031] Secondly, the present invention provides a page generation apparatus, the apparatus comprising:
[0032] The information acquisition module is used to acquire the page component configuration information corresponding to the user role;
[0033] The page component acquisition module is used to acquire the target page component based on the page component configuration information;
[0034] The target page generation module is used to render the target page components to obtain the target page.
[0035] In one embodiment, the device further includes:
[0036] The target permission determination module is used to determine the target permissions corresponding to the user role based on the user role.
[0037] The page component determination module is used to determine each page component corresponding to the target permission based on a preset correspondence between permissions and page components.
[0038] The page component configuration information generation module is used to generate page component configuration information corresponding to the user role based on the routing information corresponding to each page component and the page index information corresponding to the routing information.
[0039] In one embodiment, the device further includes:
[0040] The display module is used to display a configuration page for the configuration information of the page components, and the configuration page includes a field for filling in configuration parameters;
[0041] A configuration parameter acquisition module is used to acquire the configuration parameters in response to the input operation of configuration parameters;
[0042] The synthesis module is used to synthesize the page component configuration information corresponding to the user role based on the configuration parameters and the preset configuration file template.
[0043] In one embodiment, the page generation apparatus further includes:
[0044] The initial page splitting module is used to determine the multiple page components contained in the initial page;
[0045] The configuration module is used to generate routing information for each page component according to preset routing rules, and to configure page index information for each page component.
[0046] In one embodiment, the page generation apparatus further includes:
[0047] The page display interface module is used to display the page display interface, which includes a page entry point;
[0048] The page component acquisition module is specifically used to: in response to a trigger operation for the page entry, acquire the target page component from a preset page component library based on the page index information corresponding to the routing information.
[0049] In one embodiment, the page generation apparatus further includes:
[0050] The user role identifier acquisition module is used to acquire the identifier of the user role;
[0051] The query module is used to query the target page corresponding to the identifier of the user role in a preset page database. The page database stores the identifiers of multiple user roles and the target pages corresponding to the identifiers.
[0052] The target page display module is used to display the target page within the page display interface.
[0053] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0054] Retrieve the page component configuration information corresponding to the user role;
[0055] Based on the page component configuration information, obtain the target page component;
[0056] The target page component is rendered to obtain the target page.
[0057] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the following steps:
[0058] Retrieve the page component configuration information corresponding to the user role;
[0059] Based on the page component configuration information, obtain the target page component;
[0060] The target page component is rendered to obtain the target page.
[0061] The aforementioned page generation method, apparatus, computer equipment, and storage medium obtain page component configuration information corresponding to user roles; obtain target page components based on the page component configuration information; and render the target page components to obtain the target page. By obtaining page component configuration information corresponding to user roles, the scope of user customization of pages can be expanded, enabling dynamic page configuration for user roles. That is, to meet the needs of displaying different pages for different roles, different page components can be extracted through different page component configuration information, ensuring the maintainability of the page. Attached Figure Description
[0062] Figure 1 This is a flowchart illustrating a page generation method in one embodiment;
[0063] Figure 2 This is a flowchart illustrating the steps of obtaining the target page component in one embodiment;
[0064] Figure 3 This is a flowchart illustrating the steps for generating page component configuration information in one embodiment.
[0065] Figure 4A A flowchart illustrating the steps for generating page component configuration information in another embodiment;
[0066] Figure 4B A schematic diagram of the configuration interface for page component configuration information in another embodiment;
[0067] Figure 5 This is a flowchart illustrating the steps for generating each page component in one embodiment.
[0068] Figure 6 This is a flowchart illustrating the steps for displaying the target page in one embodiment;
[0069] Figure 7 This is a schematic diagram of a page generation method in another embodiment;
[0070] Figure 8 This is a structural block diagram of a page generation device in one embodiment;
[0071] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0072] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0073] In one embodiment, such as Figure 1As shown, a page generation method is provided. This embodiment illustrates the application of this method to a page generation device. It is understood that this method can also be applied to a server, and further to a system including both a page generation device and a server, and is implemented through the interaction between the page generation device and the server. The page generation device can be, but is not limited to, various personal computers, browsers on computers, laptops, smartphones, tablets, and portable wearable devices. The server can be a standalone server or a server cluster consisting of multiple servers. In this embodiment, the page generation method includes the following steps:
[0074] Step 101: Obtain the page component configuration information corresponding to the user role.
[0075] Specifically, user roles can be different user types, such as trial users, junior users, and senior users in an internet product, or user types with different functions, such as administrators and managed users. Page component configuration information can be page configuration files used to distinguish different page components. The page generation device can obtain the page component configuration information corresponding to the user roles. This configuration information can include page component routing information and / or page component index information.
[0076] Optionally, when a user accesses a target product (website), the page generation device responds to the user's trigger action on the target product and obtains the user's user role. In this way, the page generation device can obtain the page component configuration information corresponding to that user role. The page generation device can also obtain pre-stored page component configuration information corresponding to user roles.
[0077] Step 102: Obtain the target page component based on the page component configuration information.
[0078] Specifically, a target page component is an element used to compose a target page. The page generation device can extract the page component corresponding to the page component configuration information (i.e., the target page component) from a pre-configured page component library based on the obtained page component configuration information corresponding to the user role.
[0079] Optionally, the page configuration component information can be the routing information of the page component. The page generation device can determine the page component corresponding to the routing information, i.e., the target page component, based on the routing information of the page component. The routing information of the page component can be URL (Uniform Resource Locator) information. The page generation device can obtain the target page component corresponding to the routing information through this routing information. This URL information is actually a unique address in a uniform format for each information resource on the Internet. It is a Uniform Resource Locator identifier on the Internet, which refers to the network address.
[0080] Step 103: Render the target page components to obtain the target page.
[0081] Specifically, the page generation device renders target page components. In practice, the page generation device uses its rendering engine to combine multiple target page components to generate a visual page. For example, the page generation device can input each target page component into a pre-set page image generation model to obtain a target page composed of these components. The page generation device can then display this target page at a preset location. Each target page component can be a variety of resources on the target page corresponding to the page's URL, including text resources, image resources, video resources, etc. The target page can be a visual image.
[0082] In one possible implementation, the specific process of obtaining the target page may include: the rendering engine in the page generation device triggers the URL information in the page component configuration information through a pre-set browser triggering mechanism. In this way, the page generation device can find the page component corresponding to the URL information in the page component library, assemble the page component, and generate a visual target page.
[0083] In the above page generation method, the page component configuration information corresponding to the user role is obtained; the target page component is obtained based on the page component configuration information; and the target page component is rendered to obtain the target page. By obtaining the page component configuration information corresponding to the user role, the scope of user customization of the page can be expanded, realizing dynamic page configuration for user roles. That is, for the need to display different pages for different roles, different page components can be extracted through different page component configuration information, ensuring the maintainability of the page and avoiding the risk of data leakage.
[0084] In one embodiment, such as Figure 2 As shown, the specific processing steps of step 102, "obtain the target page component based on the page component configuration information," include:
[0085] Step 201: Based on the page component configuration information, obtain the routing information corresponding to the user role and the page index information corresponding to the routing information.
[0086] Specifically, the page component configuration information can be the configuration data of the display page corresponding to each user role, and the carrier of this configuration data can be a configuration file. The routing information can be the URL of the page component. The page index information can be identification information (key), such as 01, 02, etc. The page generation device parses the configuration file to obtain the page component configuration information corresponding to the user role contained in the configuration file. This page component configuration information can include the routing information of the target page corresponding to the user role, and the page index information corresponding to the routing information.
[0087] Step 202: Obtain the target page component based on the routing information and page index information.
[0088] Specifically, the page generation device triggers the obtained routing information, allowing it to retrieve the target page component using the page index information corresponding to that routing information. The triggering process can involve the page generation device accessing the network address pointed to by the routing information to obtain the target page component. In other words, after triggering the routing information using a pre-defined browser triggering mechanism, the page generation device retrieves the target page component corresponding to the page index information from a pre-defined page component library.
[0089] In this embodiment, by parsing the page component configuration information, the routing information corresponding to the user role and the page index information corresponding to the routing information are obtained. Since each page component is pre-configured with a unique page index in the page component library, the page generation device can accurately extract the target page component suitable for the user role using the page index information corresponding to the routing information. Combined with the dynamic loading of page components, this greatly improves the performance of loading page resources and avoids the risk of information leakage.
[0090] In one embodiment, the page component configuration information for the user role can be pre-generated or generated in real-time by the page generation device after receiving the user's role identifier. Thus, as... Figure 3 As shown, before the step of obtaining the page component configuration information corresponding to the user role, the page generation method further includes:
[0091] Step 301: Determine the target permissions corresponding to the user role based on the user role.
[0092] Specifically, a user role can be a user identifier of different types, or an identifier of different users. The target permissions corresponding to a user role can be executable functions pre-configured for that user role by the page generation device based on the business requirements corresponding to that user role.
[0093] In one possible implementation, user roles can be identifiers of different users, such as User 1 and User 2. The page generating device determines that User 1's target permission is "view" based on User 1's identifier, and determines that User 2's target permission is "add, delete, modify" based on User 2's identifier.
[0094] In another possible implementation, user roles can be different types of user identifiers. For example, administrators and users. The page generating device can determine the administrator's target permissions as "add, delete, modify" based on the administrator's identifier, and determine the user's target permissions as simply "view" based on the user's identifier.
[0095] Step 302: Determine the page components corresponding to the target permissions based on the preset correspondence between permissions and page components.
[0096] Specifically, in the target business scenario, the page generation device predetermines various permissions corresponding to the target business, then determines the page component corresponding to each permission, and statistically obtains the correspondence between each permission and the corresponding page component. For example, in database business, the corresponding page could be the database display interface. The permissions corresponding to this database business could include add, delete, modify, and view. Thus, the page component corresponding to the add permission could include an add button, an input box for adding data, etc.
[0097] In this way, the page generation device can determine the page components corresponding to the target permissions of the user role based on the pre-configured correspondence between preset permissions and page components.
[0098] Step 303: Generate page component configuration information corresponding to user roles based on the routing information corresponding to each page component and the page index information corresponding to the routing information.
[0099] The page generation device can configure corresponding routing information for each page component in the display page corresponding to the target service, and configure unique identification information, namely page index information, for the routing information. In other words, it can configure page index information for each page component.
[0100] Specifically, the page generation device determines the page components corresponding to the target permissions of the user role. In this way, the page generation device can encapsulate all page components corresponding to the target permissions, the routing information of the page components, and the page index information corresponding to the page components to generate page component configuration information, i.e., a page configuration file.
[0101] Optionally, the page generation device can also encapsulate the page component and its corresponding page index information into page component configuration information, i.e., page configuration file, which is the page configuration file corresponding to the user, based on the page component selected by the user.
[0102] In this embodiment, by configuring multiple dynamic pages for a user role based on the permissions corresponding to that user role, the user's scope of page customization is greatly improved.
[0103] In one embodiment, users can also be provided with a way to customize configuration files in real time, such as... Figure 4A As shown, before the step of obtaining the page component configuration information corresponding to the user role, the page generation method further includes:
[0104] Step 401: Display the configuration page for page component configuration information. The configuration page includes a field for entering configuration parameters.
[0105] Specifically, the configuration page for page component configuration information can be as follows: Figure 4B As shown, the configuration page includes areas for entering configuration parameters and areas for displaying the names of configuration parameters. The configuration page is the interface displayed on the device that generated the page.
[0106] Optionally, configuration parameters may include permission name, permission code, and access route. The permission name is the name of the page component, which can be a user-defined name, such as page 1. The permission code is the page index information of the page component, i.e., the key of the page component, such as 01, 02, etc. The access route is the routing information of the page component, such as / home.
[0107] Step 402: In response to the input operation of configuration parameters, obtain the configuration parameters.
[0108] Specifically, since the configuration parameters include page component name information, page index information, and routing information, the steps for obtaining the configuration parameters may include: the page generation device responding to the input operation in the page component name field to obtain the page component name; the page generation device responding to the input operation in the page index information field to obtain the page index information; and the page generation device responding to the input operation in the routing information field to obtain the routing information.
[0109] Optionally, the name of a page component is associated with the page's routing information through page index information. That is, the page generation device configures page index information for the page component and configures the same index information as the page index information for the routing information that can access the page component.
[0110] Step 403: Based on the configuration parameters and the preset configuration file template, synthesize the page component configuration information corresponding to the user role.
[0111] Specifically, the preset configuration file template can be a blank file to be filled in, including fields for each configuration parameter to be filled in. When the page generation device obtains the input information for each configuration parameter, it combines the input information of each configuration parameter with the preset configuration file template to generate page component configuration information, i.e., the page component configuration file.
[0112] In one possible implementation, the page generation device stores a configuration parameter table, which may include sub-tables for page component name information, page index information, and routing information. The page generation device can then generate page component configuration information corresponding to each user role based on this configuration parameter table and a preset configuration file template.
[0113] In one embodiment, such as Figure 5 As shown, the page generation method also includes:
[0114] Step 501: Determine the multiple page components contained in the initial page.
[0115] Specifically, the initial page can be a page that displays different types of subpages based on user roles.
[0116] Optionally, the page generation device can divide the initial page into multiple levels based on preset page display dependencies. For example, the user list can be a single level, and the detail pages of each user in the user list can be a second level, with the second level depending on the first level. In other words, when the current page displays a user list, and a display control in the user list receives a trigger action from a user, it can display the detail pages of each user in the user list.
[0117] Step 502: Generate routing information for each page component according to the preset routing allocation rules, and configure page index information for each page component.
[0118] Specifically, the preset routing rules can be determined based on the actual business scenario or configured by the user. The page generation device can configure routing information for each page component in the initial page and page index information for each page according to the routing rules corresponding to the actual business, i.e., the routing definition rules.
[0119] Optionally, the initial page can be the main page. The page generation device can split page 1 and page 2 from the main page, configuring page index information 01 for page 1 and page index information 02 for page 2. Based on the routing rules of the business corresponding to the main page—that is, the hierarchical relationship of the pages that need to be split into dynamic routes—a first-level route (' / :kingdownName') is configured for the main page, page 2 can be configured as a second-level dynamic route (' / :kingdownName / :classMenuName'), and page 3 can be configured as a third-level dynamic route (' / :kingdownName / :classMenuName / :systemId'). The specific splitting process can be as follows:
[0120] {path:' / :kingdownName',component:'Main page entry',routes:[{path:' / :kingdownName / :x',component:'File entry for parsing dynamic configuration'},{path:' / :kingdownName / :x / :y',component:'File entry for parsing dynamic configuration'}]}
[0121] In this embodiment, anonymous routing expands the scope of dynamic routing, resulting in multiple dynamic pages that can be dynamically displayed to a user role based on its needs.
[0122] In one embodiment, the page generation method further includes: displaying a page display interface, the page display interface containing a page entry point.
[0123] Accordingly, the specific processing procedure of step 202, "obtain the target page component based on the routing information and page index information", includes: in response to the trigger operation for the page entry, obtaining the target page component from the preset page component library based on the page index information corresponding to the routing information.
[0124] Specifically, for the initial page—the page that needs to differentiate between logged-in users' roles—the page generation device can encapsulate the initial page through dynamic routing based on preset routing rules. That is, firstly, the page generation device needs to use the common page components in each display level of the initial page as the content of the parent route. In other words, it encapsulates the page components that can be displayed to all users on the initial page through the parent route, and encapsulates other page components that need to be displayed differently based on user roles using different child routes. In this way, the page generation device can abstract the encapsulated parent route and each child route to obtain anonymous routes. For example, a first-level route (' / :kingdownName'), a second-level route (' / :kingdownName / :classMenuName'), a third-level route (' / :kingdownName / :classMenuName / :systemId'), etc., can be created according to actual business needs.
[0125] In this way, the page generation device can define a unique identifier for each page component, that is, configure unique page index information for each page component. Each page component, its corresponding routing information, and its corresponding page index information can all be stored in a pre-configured page component library. Correspondingly, when the page generation device obtains a configuration file containing page routing information and page index information pre-configured by the administrator for a target user role, it can parse the configuration file and display the page entry on the current page. The page generation device can respond to a user device's trigger operation on the page entry, obtain the routing information from the configuration file, and open the aforementioned routing information in a manner similar to opening a webpage link. Using the aforementioned page index information, it can determine the corresponding target page component. Thus, the page generation device can dynamically load the page component on the current page, generating a target page that can be displayed to that user role. In other words, it achieves the effect of displaying different pages for different user roles.
[0126] In one embodiment, such as Figure 6 As shown, the page generation method also includes:
[0127] Step 601: Obtain the identifier of the user role.
[0128] Step 602: Based on the user role identifier, query the target page corresponding to the identifier in the preset page database. The page database stores multiple user role identifiers and their corresponding target pages.
[0129] Step 603: Display the target page within the page display interface.
[0130] For example, a page generation device can pre-generate pages corresponding to various user roles based on pre-configured user role profiles, and add the user role identifier and the corresponding page to the page database. When the page generation device receives the identifier of any user role, it can query the pre-configured page database for the page corresponding to that identifier and display that page within the page display page. This can shorten the user's waiting time for page display, improve page generation efficiency, and enhance the user's page access experience.
[0131] It should be understood that, although Figure 1-6 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-6 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0132] The following is a specific illustration. Figure 7 The page generation method described above is as follows: User A's page configuration file can be configuration file 1, and User B's page configuration file can be configuration file 2. The page generation device obtains the configuration file corresponding to the user role and parses it. For example, the page generation device can parse configuration file 1 to obtain the page routes and page index information (page keys) of each page to be displayed to User A. Then, the page generation device can extract page component 1 and page component 4 to be displayed to User A from the preset page component database based on the page routes and page index information. Similarly, the page generation device can extract page component 2 and page component 3 to be displayed to User B from the preset page component database based on the page routes and page index information. Thus, the page generation device can generate the target page to be displayed to User A based on page component 1 and page component 4, and generate the target page to be displayed to User B based on page component 2 and page component 3.
[0133] In one embodiment, such as Figure 8 As shown, a page generation device is provided, including: an information acquisition module 701, a page component acquisition module 702, and a target page generation module 703, wherein:
[0134] The information acquisition module 701 is used to acquire the page component configuration information corresponding to the user role.
[0135] The page component acquisition module 702 is used to acquire the target page component based on the page component configuration information.
[0136] The target page generation module 703 is used to render the target page components to obtain the target page.
[0137] In one embodiment, the device further includes:
[0138] The target permission determination module is used to determine the target permissions corresponding to the user role based on the user role.
[0139] The page component determination module is used to determine each page component corresponding to the target permission based on a preset correspondence between permissions and page components.
[0140] The page component configuration information generation module is used to generate page component configuration information corresponding to the user role based on the routing information corresponding to each page component and the page index information corresponding to the routing information.
[0141] In one embodiment, the device further includes:
[0142] The display module is used to display a configuration page for the configuration information of the page components, and the configuration page includes a field for filling in configuration parameters;
[0143] A configuration parameter acquisition module is used to acquire the configuration parameters in response to the input operation of configuration parameters;
[0144] The synthesis module is used to synthesize the page component configuration information corresponding to the user role based on the configuration parameters and the preset configuration file template.
[0145] In one embodiment, the page generation apparatus further includes:
[0146] The initial page splitting module is used to determine the multiple page components contained in the initial page;
[0147] The configuration module is used to generate routing information for each page component according to preset routing rules, and to configure page index information for each page component.
[0148] In one embodiment, the page generation apparatus further includes:
[0149] The page display interface module is used to display the page display interface, which includes a page entry point;
[0150] The page component acquisition module is specifically used to: in response to a trigger operation for the page entry, acquire the target page component from a preset page component library based on the page index information corresponding to the routing information.
[0151] In one embodiment, the page generation apparatus further includes:
[0152] The user role identifier acquisition module is used to acquire the identifier of the user role;
[0153] The query module is used to query the target page corresponding to the identifier of the user role in a preset page database. The page database stores the identifiers of multiple user roles and the target pages corresponding to the identifiers.
[0154] The target page display module is used to display the target page within the page display interface.
[0155] For specific limitations regarding the page generation device, please refer to the limitations on the page generation method above, which will not be repeated here. Each module in the aforementioned page generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0156] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data related to page generation. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a page generation method.
[0157] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0158] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0159] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0160] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0161] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A page generation method, characterized in that: The method comprises: Get the page component configuration information corresponding to the user role; According to the routing information in the page component configuration information, the target page component is obtained; the content encapsulated by the parent route includes: the public page component displayed to all logged-in users in the initial page; the content encapsulated by the child route includes: the page component that needs to be displayed in the initial page according to the role of the logged-in user; The target page component is rendered to obtain a target page.
2. The method according to claim 1, characterized in that The step of obtaining the target page component according to the routing information in the page component configuration information includes: According to the page component configuration information, obtain routing information corresponding to the user role and page index information corresponding to the routing information; The target page component is obtained according to the routing information and the page index information.
3. The method according to claim 2, characterized in that Before the step of obtaining the page component configuration information corresponding to the user role, the method further includes: Based on the user role, Determine the target permissions corresponding to the user role; Determine the page components corresponding to the target permissions according to the correspondence between the preset permissions and the page components; The page component configuration information corresponding to the user role is generated according to the routing information corresponding to each page component and the page index information corresponding to the routing information.
4. The method according to claim 1, characterized in that Before the step of obtaining the page component configuration information corresponding to the user role, the method further includes: Display a configuration page of the page component configuration information, the configuration page including a filling area for configuration parameters; In response to an input operation of a configuration parameter, acquiring the configuration parameter; The page component configuration information corresponding to the user role is synthesized according to the configuration parameters and the preset configuration file template.
5. The method according to claim 2, characterized in that: The method further comprises: Determine the multiple page components included in the initial page; According to the preset routing allocation rules, the routing information corresponding to each page component is generated respectively, and the page index information is configured for each page component.
6. The method according to claim 2, characterized in that The method further comprises: Display a page display interface, wherein the page display interface includes a page entrance; The acquiring the target page component according to the routing information and the page index information includes: In response to a trigger operation on the page entry, a target page component is obtained from a preset page component library according to page index information corresponding to the routing information.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Obtaining an identifier of the user role; According to the identifier of the user role, a target page corresponding to the identifier is searched in a preset page database, wherein the page database stores identifiers of multiple user roles and target pages corresponding to the identifiers; The target page is displayed in the page display interface.
8. A page generating device, characterized in that: The device comprises: The information acquisition module is used to obtain the page component configuration information corresponding to the user role; The page component acquisition module is used to acquire the target page component according to the routing information in the page component configuration information; the content encapsulated by the parent route includes: the public page components displayed to all logged-in users in the initial page; the content encapsulated by the child route includes: the page components that need to be displayed in the initial page according to the roles of the logged-in users; The target page generation module is used to render the target page component to obtain the target page.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
