Dynamic page configuration method and system

By reading back-end configuration data on the front-end and dynamically rendering page elements in a low-code platform, it solves the shortcomings of business personalization and complex logic processing, achieves multi-language and permission control, and improves page development efficiency and scenario support.

CN118656111APending Publication Date: 2024-09-17SHENZHEN LANYOU TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410687971.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Existing low-code platforms cannot effectively build personalized business pages in different scenarios, and are incapable of complex logic processing, especially in terms of multi-language support and permission control.

Method used

By reading the back-end configuration data when the front-end page is initialized, splitting and dynamically rendering page elements according to the specified data structure, and using the element configuration table to associate the organization, permissions and language configuration tables to achieve personalized configuration and permission control, and through the underlying Logic components support multi-language and complex interaction logic.

Benefits of technology

It realizes the dynamic configuration of page effects in different scenarios, supports multi-language and complex logic, improves the efficiency of business page development and supported business scenarios, and avoids the bloated problem of complex front-end logic control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656111A
    Figure CN118656111A
Patent Text Reader

Abstract

The invention discloses a dynamic page configuration method and system. When page initialization is carried out at the front end, configuration data from the rear end are read; then, splitting the read configuration data according to a specified data structure; and finally, performing dynamic rendering on the split data by utilizing a bottom layer logic component. Therefore, the data configuration of all pages is performed at the rear end, and the front end renders the front-end page by packaging the bottom layer logic and reading the background configuration when the page is initialized, so that the demand configuration for different scenes can be completed; by means of the bottom layer packaging mode, the dynamic page effect is supported, meanwhile, the original development mode is supported, the efficiency of complex service page development is higher, and more service scenes are supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software technology, and in particular to a dynamic page configuration method and system. Background Art

[0002] As low-code becomes more and more popular, dynamic page technologies emerge in an endless stream. The emergence of these technologies means that pages can be highly configurable. Scenarios that previously required writing code and publishing can now be implemented through drag-and-drop. For example, when a business report needs to be implemented, a simple report can be implemented by dragging a table, obtaining a data source, and configuring display fields. However, the existing low-code technology considers how to reduce the workload of development, and does not address the needs of business personalization. For example, different organizations, business roles, or individuals need to display different page effects, and low-code platforms cannot meet this need. However, this need is also common in business systems, such as the content of a report will be presented differently in different departments, and there may be scenarios of permission control, such as the content of a report to be displayed for different roles will be different. Therefore, from the perspective of the business, more attention is paid to the ability to implement these personalized differences. In addition, there are many unavoidable problems with the current low-code platform, such as poor support for multiple languages, and another point is that low-code is highly encapsulated, and it seems powerless with more complex interaction logic. Even if there is a js slot, it is also troublesome to integrate interaction scenarios.

[0003] Based on this, a new solution is needed. Summary of the invention

[0004] The main purpose of the present invention is to provide a dynamic page configuration method to address the shortcomings of the current low-code on the market that it is unable to build personalized business pages in different scenarios and has difficulty completing complex logic.

[0005] To achieve the above object, the present invention provides a dynamic page configuration method, comprising:

[0006] When the front end performs page initialization, configuration data from the back end is read, and the configuration data includes page element configuration;

[0007] Split the read configuration data according to the specified data structure; and

[0008] Use the underlying logic components to dynamically render the split data.

[0009] The dynamic page configuration method provided by the present invention also includes:

[0010] By associating the page organization relationship table and the page table through the page organization ID of the element configuration table, the relationship between the organization and the page is configured;

[0011] According to the relationship between the organization and the page, enter the page element fields and configure the element attributes.

[0012] The dynamic page configuration method provided by the present invention also includes:

[0013] The permission control table is associated with the permission ID of the element configuration table to configure the permission, wherein the permission type includes role and / or user;

[0014] According to the permission configuration, the corresponding personalized configuration is selected, wherein when the permission type includes users and roles, the corresponding user configuration is loaded; when the permission type is role, the corresponding role configuration is loaded; when the permission type does not include user and role configuration, the element configuration under the current organization is loaded.

[0015] The dynamic page configuration method provided by the present invention also includes:

[0016] Language configuration is performed by associating the multi-language configuration table with the multi-language ID of the element configuration table.

[0017] The dynamic page configuration method provided by the present invention also includes:

[0018] The data configured on the backend is compressed and cached before being passed to the frontend.

[0019] In the dynamic page configuration method provided by the present invention, the step of splitting the read configuration data according to the specified data structure includes:

[0020] Generate a function to obtain the data source according to the configuration data;

[0021] Filter data based on the configuration of visible and hidden fields to decide whether to display the field;.

[0022] Generate multilingual titles and validation logic based on configuration data;

[0023] Combines a component name and a component extension configuration.

[0024] In addition, to achieve the above object, the present invention also provides a dynamic page configuration system, comprising:

[0025] A configuration data reading module is used to read configuration data from the back end when the front end performs page initialization, wherein the configuration data includes page element configuration;

[0026] A data parsing module, used to split the read configuration data according to a specified data structure; and

[0027] The rendering module is used to dynamically render the split data using the underlying logic components.

[0028] The dynamic page configuration system provided by the present invention also includes a back-end configuration module, which is used to configure the relationship between the organization and the page by associating the page organization relationship table and the page table through the page organization ID of the element configuration table; to perform permission configuration by associating the permission control table through the permission ID of the element configuration table, wherein the permission type includes role and / or user; and to perform language configuration by associating the multi-language configuration table through the multi-language ID of the element configuration table.

[0029] The dynamic page configuration system provided by the present invention also includes a personalized configuration module, which is used to select the corresponding personalized configuration according to the permission configuration, wherein when the permission type includes users and roles, the corresponding user configuration is loaded; when the permission type is role, the corresponding role configuration is loaded; when the permission type does not include user and role configuration, the element configuration under the current organization is loaded.

[0030] The present invention also provides a dynamic page configuration device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the dynamic page configuration method described above are implemented.

[0031] The dynamic page configuration system and method provided by the present invention have the following beneficial effects: in the present invention, when the page is initialized at the front end, the configuration data from the back end is read; then, the read configuration data is split according to the specified data structure; finally, the split data is dynamically rendered using the underlying logic component; thus, the data configuration of all pages is performed at the back end, and the front end encapsulates the underlying logic and renders the front end page by reading the background configuration when the page is initialized to complete the configuration required for different scenarios; through the underlying encapsulation mode, it supports both dynamic page effects and the original development method, which is more efficient in complex business page development and supports more business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] 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 are briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative work:

[0033] Figure 1 FIG. 1 is a flow chart of a dynamic page configuration method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0036] In order to display different page effects in different scenarios, that is, to realize dynamic pages, the traditional approach is to write judgment conditions in the front-end js, and render different effects according to different data. For example, when entering a purchase application form, organization A only needs to fill in 20 pieces of information, and organization B needs to fill in 30 pieces of information. Some information is required under organization A, and is not required under organization B, so it is necessary to process it with similar if A, else if B logic. This pseudo-dynamic processing method cannot really meet the ever-changing business needs. For example, at this time, organization C has proposed the same different needs, so there is a need for another else if logic. This approach requires redevelopment of code, and as more and more requirements are required, the code will become more and more bloated and difficult to manage and maintain. Therefore, in the present invention, the data configuration of all pages is carried out in the back end, and the front end encapsulates the underlying logic, and renders the front end page by reading the background configuration when the page is initialized to complete the demand configuration for different scenes. Since the page is completely controlled and rendered by the background configuration, the front end does not need to control different scenes according to if esle, and if you want different display effects, you only need to modify or add configurations to achieve completely different page effects.

[0037] In order to better understand the above-mentioned technical scheme, the above-mentioned technical scheme will be described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical scheme of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0038] Figure 1 FIG. 1 is a flow chart of a dynamic page configuration method provided by an embodiment of the present invention. Figure 1 As shown, the dynamic page configuration method includes the following steps:

[0039] Step S1, when the front end performs page initialization, reads configuration data from the back end, wherein the configuration data includes page element configuration;

[0040] Specifically, in one embodiment of the present invention, when the front-end page needs to be initialized, the configured data from the back-end is first read. The back-end stores an element configuration table, a page organization relationship table, a page table, a permission control table, and a multi-language configuration table. By associating the relevant parameters in the element configuration table with other tables, the relationship between the organization and the page, the permission configuration, and the multi-language configuration can be set to achieve dynamic configuration of data. Among them:

[0041] Element configuration table: The core contains information such as organization, authority, and dynamic field attributes. Among them, the authority ID is used to associate the authority control table; the page organization ID is used to associate the page and organization information; the multi-language ID is used to associate the multi-language information of the bound element; the element code represents the page element identifier, which is generally bound with the field-related identifier; the display name represents the text displayed by the page element; the element type is used to control whether the page element is a drop-down box, text box, etc.; whether the element is visible is used to control whether the element is displayed or hidden; the element attributes are used to limit the relevant parameters of the element type, such as the maximum length of the text box, whether it can be cleared, etc., which are stored in JSON format;

[0042] Permission control table: includes permission ID, permission type and permission identifier; among them, permission types include roles and users. If there are other types, they can be further expanded. The permission identifier is determined according to the permission type. For example, when the permission type is user, the permission identifier is the user ID, and when the permission type is role, the permission identifier is the role code;

[0043] Page organization table: includes page organization ID, page ID and organization ID; used to associate organizations with pages. In the present invention, pages are distinguished by organization. If a page is common to different organizations, it can be configured to the common organization. The common organization also has a fallback logic. Organizations that do not have page organization relationships are deemed to not require personalized page configuration, so the fallback logic is used, that is, dynamic pages under the common organization are configured.

[0044] Page table: includes page ID, page name and page route, which is mainly used to configure page route to find the specified page;

[0045] Multi-language configuration table: includes multi-language ID, language type and language content. The language type includes different languages ​​such as Chinese, English and Japanese. Any language can be configured. The language content is the copywriting content of the corresponding language version.

[0046] Therefore, before step S1, the relationship between the organization and the page is also configured in the back end according to the scenario requirements, and the relationship between the organization and the page is configured by associating the page organization relationship table and the page table through the page organization ID of the element configuration table; according to the relationship between the organization and the page, the page element fields are entered and the element attributes are configured.

[0047] Therefore, before step S1, it also includes configuring the relevant permissions according to the scene requirements at the back end, and performing permission configuration by associating the permission control table with the permission ID of the element configuration table, wherein the permission type includes role and / or user; according to the permission configuration, the corresponding personalized configuration is selected, wherein when the permission type includes user and role, the corresponding user configuration is loaded, when the permission type is role, the corresponding role configuration is loaded, and when the permission type does not include user and role configuration, the element configuration under the current organization is loaded. In the present invention, the configuration of the organization-associated element is necessary as basic data. Therefore, when selecting elements for personalized configuration according to the permissions of roles and users, it is necessary to first select the organization, then select the role or user, and then load and select the element data under the organization, and bind the permission information after batch modification for saving. Further, when calculating the permission timing of the element, user>role>organization, that is, when the user and role configuration do not exist, the element configuration under the current organization is loaded, and when the permission type is user, the configuration of the other two items is not loaded. Such permission control follows the principle of from general to detailed, and can better achieve personalization.

[0048] Therefore, before step S1, the backend is also required to configure relevant permissions according to scenario requirements, and the language configuration is performed by associating the multi-language configuration table with the multi-language ID of the element configuration table, thereby supporting configuration of all languages.

[0049] Furthermore, the dynamic page rendering speed depends largely on the transmission speed of the back-end configuration. If the transmission data is too large and the bandwidth is too slow, the page rendering will be very slow. In addition, when the configuration is increasing, the query of data will also become slow. Therefore, in the present invention, after completing the data configuration, it also includes compressing and caching the data configured in the back-end and then passing it to the front end. By using high-performance redis cache and mysql storage engine to store data structure, and using GZIP to compress data, the present invention supports data caching and data compression transmission, ensuring high performance of data rendering.

[0050] Step S2, splitting the read configuration data according to the specified data structure;

[0051] Specifically, in one embodiment of the present invention, after decompressing the configuration data from the backend, the data needs to be split on the frontend, and then parsed through the underlying encapsulation mode based on vue to facilitate subsequent rendering. Therefore, step S2 includes:

[0052] Step S21, generating a function for obtaining a data source according to configuration data;

[0053] Step S22: Filter data according to the configuration of the visible and invisible fields to determine whether to display the field;

[0054] Step S23: Generate multilingual titles and verification logic according to the configuration data;

[0055] Step S24: Combine component name and component extension configuration.

[0056] By generating a function to obtain the data source based on the configuration data, the reliability and real-time nature of the data are ensured. By filtering the data based on the configuration of visible and hidden fields, it is decided whether to display the field. By generating multilingual titles, it is ensured that the system has good internationalization support. By generating verification logic based on the configured regular expression, the legitimacy and integrity of the data are guaranteed. Finally, the component name and component extension configuration are combined to ensure the correct rendering and functional extension of the component.

[0057] Existing low-code platforms are highly encapsulated, and visual configuration is often limited, which makes it difficult to interact with complex page interaction logic or components. This invention supports the native Vue development method. Through the underlying encapsulation mode, it supports both dynamic page effects and the original development method. It is more efficient in complex business page development and supports more business scenarios.

[0058] Step S3: dynamically render the split data using the underlying logic components;

[0059] Specifically, in one embodiment of the present invention, when rendering, Element UI is used as a UI framework for component rendering. First, parse the incoming JSON data and monitor the data structure changes. Then, traverse the parsed template instructions, generate the instruction use object required for the rendering function according to the instructions, and use a specific object merging logic to achieve it, wherein, it is necessary to distinguish between native attributes and component attributes, and for native attributes (such as class and style), perform corresponding rendering processing according to the attribute type, which can be achieved by conditional judgment or object mapping; for component attributes, after the system default logic is transformed, props is directly used for rendering, which can be completed during the definition and rendering process of the component. For dynamic attributes (such as linkage attributes), corresponding logic functions can be generated according to the attributes, and listening and rendering can be performed during rendering, which can be achieved through event binding or state management. For some syntactic sugar attributes, they are transformed and re-parsed to ensure the correctness and scalability of their functions, which may require custom parsing functions or middleware to achieve. At the same time, it is also necessary to control the display and hiding of components, which can be controlled according to the configured logic, and can be achieved by conditional rendering or dynamic component loading. Finally, the render function is used to render the page to ensure efficient rendering and performance optimization of the page. .

[0060] The front-end of the present invention encapsulates the underlying logic and renders the front-end page by reading the background configuration when the page is initialized. Therefore, it can support native writing while supporting page dynamics, has better compatibility, and solves the problem that it is difficult to embed native code in low-code platforms, thereby supporting more business scenarios.

[0061] The present invention also provides a dynamic page configuration system, including: a configuration data reading module, which is used to read the configuration data from the back end when the page is initialized at the front end, and the configuration data includes page element configuration; a data parsing module, which is used to split the read configuration data according to the specified data structure; and a rendering module, which is used to dynamically render the split data using the underlying logic component; a back-end configuration module, which is used to configure the relationship between the organization and the page by associating the page organization relationship table and the page table through the page organization ID of the element configuration table; to perform permission configuration by associating the permission control table through the permission ID of the element configuration table, wherein the permission type includes role and / or user; to perform language configuration by associating the multi-language configuration table through the multi-language ID of the element configuration table; a personalized configuration module, which is used to select the corresponding personalized configuration according to the permission configuration, wherein when the permission type includes user and role, the corresponding user configuration is loaded, when the permission type is role, the corresponding role configuration is loaded, and when the permission type does not include user and role configuration, the element configuration under the current organization is loaded.

[0062] The embodiment of the present invention further provides a dynamic page configuration device, which may include:

[0063] Memory for storing computer programs;

[0064] The processor can implement the following steps when executing the computer program stored in the above memory:

[0065] When the front end performs page initialization, the configuration data from the back end is read, the configuration data including the page element configuration; the read configuration data is split according to the specified data structure; and the split data is dynamically rendered using the underlying logic components.

[0066] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0067] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0068] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0069] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A dynamic page configuration method, characterized in that: The following steps are involved: When the front end performs page initialization, configuration data from the back end is read, and the configuration data includes page element configuration; Split the read configuration data according to the specified data structure; as well as Use the underlying logic components to dynamically render the split data.

2. The dynamic page configuration method according to claim 1, characterized in that: Also includes: By associating the page organization relationship table and the page table through the page organization ID of the element configuration table, the relationship between the organization and the page is configured; According to the relationship between the organization and the page, enter the page element fields and configure the element attributes.

3. The dynamic page configuration method according to claim 2, characterized in that: Also includes: The permission control table is associated with the permission ID of the element configuration table to configure the permission, wherein the permission type includes role and / or user; According to the permission configuration, the corresponding personalized configuration is selected, wherein when the permission type includes users and roles, the corresponding user configuration is loaded; when the permission type is role, the corresponding role configuration is loaded; when the permission type does not include user and role configuration, the element configuration under the current organization is loaded.

4. The dynamic page configuration method according to claim 3, characterized in that: Also includes: Language configuration is performed by associating the multi-language configuration table with the multi-language ID of the element configuration table.

5. The dynamic page configuration method according to claim 4, characterized in that: Also includes: The data configured on the backend is compressed and cached before being passed to the frontend.

6. The dynamic page configuration method according to claim 5, characterized in that: The steps of splitting the read configuration data according to the specified data structure include: Generate a function to obtain the data source according to the configuration data; Filter data based on the configuration of visible and hidden fields to decide whether to display the field; Generate multilingual titles and validation logic based on configuration data; Combines a component name and a component extension configuration.

7. A dynamic page configuration system, characterized in that: include: A configuration data reading module is used to read configuration data from the back end when the front end performs page initialization, wherein the configuration data includes page element configuration; The data splitting module is used to split the read configuration data according to the specified data structure; as well as The rendering module is used to dynamically render the split data using the underlying logic components.

8. The dynamic page configuration system according to claim 7, characterized in that: It also includes a backend configuration module, which is used to configure the relationship between the organization and the page by associating the page organization relationship table and the page table through the page organization ID of the element configuration table; to configure the permission by associating the permission control table through the permission ID of the element configuration table, wherein the permission type includes role and / or user; and to configure the language by associating the multi-language configuration table through the multi-language ID of the element configuration table.

9. The dynamic page configuration system according to claim 8, characterized in that: It also includes a personalized configuration module, which is used to select the corresponding personalized configuration according to the permission configuration, wherein when the permission type includes users and roles, the corresponding user configuration is loaded; when the permission type is role, the corresponding role configuration is loaded; when the permission type does not include user and role configuration, the element configuration under the current organization is loaded.

10. A dynamic page configuration device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the dynamic page configuration method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Configuration method and system for mobile reimbursement page in customized scene

    CN120407921A