A low-code platform secondary development method and system based on page metamodel
Patent Information
- Application Number
- CN202411045962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-01
AI Technical Summary
During the secondary development of low-code platforms, it is difficult to separate the standard page from the project customized page, resulting in difficulty in maintaining and upgrading. The hard-coded extension interface development experience is complex, and it is difficult to meet customized needs.
Using a page metamodel-based method, by creating differential patch packages and synthesis services, the project page requirements are stored separately from the standard product function page metamodel to realize the synthesis of project page metamodels, and supports automatic adaptation of new versions of function pages without the need for Change the code.
It realizes non-invasive, fast and scalable secondary customized development of low-code platforms to meet the project customization needs, and automatically adapts to the new version of the function page after the standard product functions are upgraded, simplifying the subsequent maintenance and upgrade process.
Smart Images

Figure CN118550572B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of secondary development of low-code platforms, and specifically relates to a low-code platform secondary development method and system based on a page metamodel. Background Art
[0002] With the development of Internet technology and the maturity of application software, low-code platform is a new trend in enterprise software development. It can solve the problems of traditional software development, which is too long, costly, and unable to respond quickly to changes in market demand. Based on the low-code platform, developers can build application software online through a visual interface with only a small amount of code or no code.
[0003] The underlying architecture of the low-code platform can help technicians quickly develop functions during product and project development. However, standard product suites often cannot meet the customized business needs of enterprises. For customized project requirements, software development companies often use the following problems when conducting secondary development on the low-code platform:
[0004] Direct modification based on standard pages causes the second development and standard product metamodel to be mixed together, making it impossible to distinguish the modified parts of the standard product and project second development, making subsequent maintenance and upgrades difficult. In addition, when the standard product suite version is upgraded, the project must be redeveloped.
[0005] Based on the extended interface, the function customization development is achieved in a hard-coded way, which has a high development experience and difficulty. It requires the low-code platform itself to be specially designed during the construction process so that it can meet the secondary development by reserving extended attributes and interfaces. This is too complicated for the design and implementation of the low-code platform itself. Summary of the invention
[0006] In view of the shortcomings of the prior art, the present invention provides a low-code platform secondary development method and system based on the page metamodel to meet the secondary customization demand scenarios, while meeting the separate storage of the project customized project page metamodel and the standard product function page metamodel, so that after the subsequent product standard page function is upgraded, the project customized function page can also automatically adapt to the new version of the product function page without any modification, and the requirement for smooth upgrade is achieved.
[0007] To achieve the above object, the present invention provides the following solutions:
[0008] A low-code platform secondary development method based on a page metamodel includes the following steps:
[0009] Create differential patch packages based on project page requirements;
[0010] Based on the synthesis service of the page metamodel, the differential patch package is applied to the standard product function page metamodel to synthesize a new project page metamodel;
[0011] Based on the new project page metamodel, a new page is obtained, and the secondary development of the low-code platform based on the page metamodel is completed.
[0012] Preferably, based on the project page requirements, the method for making a differential patch package includes:
[0013] For the requirements of a new project page, all components that need to be modified in the project page are visually configured to form the differential patch package; wherein the visual configuration includes component name modification, whether it is required, whether it is editable, whether it is hidden, and component type switching;
[0014] For the old functions of the developed project function page, a version comparison is performed between the developed project function page and the standard product function page to obtain the differential patch package; wherein the version comparison includes comparison of layout, components and attribute dimensions.
[0015] Preferably, the method for comparing the developed project function page with the standard product function page is:
[0016] Traverse and parse the JSON attributes of all layouts and components of the developed project function page and the standard product function page to obtain the parsing results;
[0017] Based on the analysis result, the values of different dimensions of the developed project function page are used as the final values of the difference JSON file to form a difference JSON file description, thereby completing the version comparison.
[0018] Preferably, the structure of the page meta-model includes layoutInfo for the overall page layout, layoutList for the specific layout details, subscribes for the page global events, and components for all page components.
[0019] Preferably, based on the synthesis service of the page metamodel, the method of applying the differential patch package to the standard product function page metamodel to synthesize a new project page metamodel is as follows:
[0020] The content of the differential patch package is read, and the standard product function page metamodel and the differential patch package are merged using JSONPath to obtain the new project page metamodel.
[0021] Preferably, the merged content includes the attributes and layout of the page.
[0022] The present invention also provides a low-code platform secondary development system based on a page metamodel using the low-code platform secondary development method based on a page metamodel, comprising:
[0023] Patch package production module, used to produce differential patch packages based on project page requirements;
[0024] A metamodel synthesis module, which is used for synthesis service based on page metamodel, applies the differential patch package to the standard product function page metamodel, and synthesizes a new project page metamodel;
[0025] The running engine module is used to obtain a new page based on the new project page metamodel and complete the secondary development of the low-code platform based on the page metamodel.
[0026] Preferably, the patch package making module includes:
[0027] A new project patch package production unit is used to visually configure all components that need to be modified in the project page according to the requirements of the new project page to form the difference patch package; wherein the visual configuration includes component name modification, whether it is required, whether it is editable, whether it is hidden, and component type switching;
[0028] The old function patch package production unit is used to compare the versions of the developed project function page with the standard product function page for the old functions of the developed project function page to obtain the differential patch package; wherein the version comparison includes comparison of layout, components and attribute dimensions.
[0029] Preferably, the old function patch package making unit includes:
[0030] The page parsing subunit is used to traverse and parse the JSON attributes of all layouts and components of the developed project function page and the standard product function page to obtain the parsing results;
[0031] The version comparison subunit is used to use the values of different dimensions of the developed project function page as the final value of the difference JSON file based on the analysis result to form a difference JSON file description and complete the version comparison.
[0032] Preferably, in the runtime engine module, the new project page metamodel is returned to the runtime engine front end and rendered to the page to obtain the new page.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows: through the technical solution of the present invention, the low-code platform of the page metamodel can realize secondary customized development based on the standard product function page under the conditions of non-intrusion, low technical requirements, fast development and scalability. It meets the requirements of separate storage and physical isolation of project customized patch packages and product standard page metamodels. It is also convenient for the subsequent standard product function upgrades, and the project customized patch package and different versions of standard product function page metamodels can be freely and dynamically synthesized to form the final project secondary function page requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 This is a flow chart of a low-code platform secondary development method based on a page metamodel according to an embodiment of the present invention;
[0036] Figure 2 This is a version comparison flow chart of an embodiment of the present invention;
[0037] Figure 3 The following is a flowchart of the system working process of an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] Explanation of some terms in the embodiments:
[0041] The low-code platform consists of two parts: the designer and the runtime engine. It is mainly based on a unified component description protocol (components can declare their own properties, events and methods). Developers use the designer to visually drag and drop components and configure component properties to form a page metamodel in JSON format, and quickly complete the functional development of the management page; the runtime engine parses the page metamodel in JSON format saved by the designer, traverses the metamodel information through JS parsing, and dynamically renders the front-end components. Including master pages, layout pages, form components, tables, trees, etc. Dynamically render front-end graphical components, such as: circles, lines, squares, complex business graphics, etc.
[0042] Standard products are designed based on market demand and contain rich experience and solutions for specific industries. They are relatively mature and stable when running because they have undergone a certain degree of accumulation and improvement and will not have major BUG problems. They are general product suites and software products that can meet the needs of most scenarios.
[0043] Software secondary development refers to development based on existing mature software systems. Generally, the existing software system cannot meet customer needs and needs to be supplemented and developed according to the needs. Secondary development requires a full understanding of the functions, technical architecture and design of the existing software.
[0044] JSONPath provides parsing capabilities for Json documents. By using JSONPath, you can easily find nodes and get the data you want. JSONPath is the Json version of XPath, just like XPath is for XML documents.
[0045] Embodiment 1
[0046] like Figure 1 As shown, a low-code platform secondary development method based on a page metamodel includes the following steps:
[0047] S1: Based on the requirements of the project page, a differential patch package is made; the differential patch package is in JSON format, which is a simplified abstraction of the core configuration of the page component (covering basic attributes and events. For example, attribute name, type, whether hidden, whether editable, sort number, regular validation rules, interface configuration), and often forms a differential patch package through two methods: dynamic configuration by secondary developers and metamodel comparison. Through the differential patch package, the metamodel replacement service developed based on JSONPATH technology can be used to change the metamodel of the standard product function page and perform non-invasive secondary page function development. The differential patch package can be synthesized multiple times with different versions of the standard product function page without changing the code to meet the needs of the secondary project and upgrade the underlying dependency on the standard product version. That is, after the standard product version is upgraded, we can use this differential upgrade package and the new version of the standard product to replace the metamodel again, so as to achieve the above-mentioned secondary developed function page and support the purpose of upgrading.
[0048] A further implementation method is that, based on the project page requirements, the method for making a differential patch package includes:
[0049] For the requirements of the new project page, all components that need to be modified in the project page are visually configured to form a JSON format difference patch package; the visual configuration includes component name modification, whether it is required, whether it is editable, whether it is hidden, and component type switching;
[0050] For the old functions of the developed project function page, the developed project function page (project page Project1.0) is compared with the standard product function page (standard product Product1.0) to obtain the JSON format difference patch package; the version comparison includes the comparison of layout, components and attribute dimensions. Figure 2 shown.
[0051] A further implementation method is that the method for comparing the versions of the developed project function page and the standard product function page is as follows:
[0052] Traverse and parse the JSON properties of all layouts and components of the developed project function page and the standard product function page (function page) to obtain the parsing results.
[0053] Based on the parsing results, the values of different dimensions of the developed project function page are used as the final values of the difference JSON file to form a difference JSON file description and complete the version comparison.
[0054] A further implementation method is that the structure of the page meta-model includes layoutInfo overall page layout, layoutList specific layout details, subscribes page global events, and components all page components. Among them, layoutInfo overall page layout includes LayoutMain, TopMain, RightMain, TitleSiderExtra, TitleSider, TitleTools, BottomLeft, BottomRight, and LeftMenuMain. The relevant terms are described as follows:
[0055] LayoutMain layout: The main layout structure of the page, including the top navigation bar, sidebar and main content area.
[0056] TopMain: The top area of the page, which usually includes elements such as the website or application logo, global navigation menu, and search bar.
[0057] RightMain: The main area on the right side of the page, which may contain additional information, tools, or navigation links related to the current content.
[0058] TitleSiderExtra: May be a title or label area attached to the sidebar to further subdivide the sidebar content.
[0059] TitleSider: The main title area of the sidebar, usually used to display the main content classification or function of the sidebar.
[0060] TitleTools: Toolbar title area, which may contain the main options or action buttons of the page toolbar.
[0061] BottomLeft: The lower left area of the page, which may be used to display secondary information or links related to the current page content.
[0062] BottomRight: The lower right area of the page, which usually contains auxiliary information, copyright notices, or other minor content at the bottom of the page.
[0063] LeftMenuMain: The main menu area on the left side of the page is used to display the main navigation menu or links to help users navigate and access different sections or features.
[0064] All page components include text, drop-down width, single selection, time component, table and other components as well as the page unique number. The specific layout details also include the page name.
[0065] Among them, this embodiment specifically introduces the page metamodel text box component data structure:
[0066] Component type: text box;
[0067] Is it a form component: yes;
[0068] Editable: Yes;
[0069] Field name, field;
[0070] Component association event configuration;
[0071] Whether to display the required * sign;
[0072] Is it visible?
[0073] The document has built-in prompt text;
[0074] The label name in front of the text component;
[0075] File component label style;
[0076] Text component id; description of the purpose of the text component;
[0077] The width of the text component itself;
[0078] Text component label width;
[0079] Verify expressions, such as mobile phone format and email format verification;
[0080] The page metamodel text box component involves some core elements and attributes as follows:
[0081] Component type (type): For example, the value of the TextHook text box is generally used to store the text entered or displayed by the user in the text box.
[0082] Unique ID (id): The identity of the component, which is globally unique on the page.
[0083] Text box size (wrapperSpan): The width of the text box.
[0084] Visible: Whether to display the text box.
[0085] Editability (enabled): Whether the user can edit the content in the text box.
[0086] Corresponding backend entity attributes (filed): The page saves and views the corresponding backend entity fields.
[0087] Label: The label on the left side of the text box.
[0088] Whether to display the required * sign (showRequiredStar): Whether to display the required * sign in the left title.
[0089] Other style attributes: such as border style, padding, margins, etc.
[0090] A further implementation method is that the differential patch package data structure is as follows:
[0091] {
[0092] "code": "Field code (actual field name, English name)",
[0093] "name": "Field name (description)",
[0094] "relationCode":"Relation Code",
[0095] "viewVisiable": "View Visible 1. Visible (default), 0. Invisible",
[0096] "addEditVisiable": "New edit visible 1. Visible (default), 0. Invisible",
[0097] "addable": "Add lock 1. On (default), 0. Off",
[0098] "editable": "Edit lock 1. On (default), 0. Off",
[0099] "partnersViewVisiable": "Partners View Visible 1. Visible (default), 0. Invisible",
[0100] "partnersAddEditVisiable": "Partners Add Edit Visible 1. Visible (default), 0. Invisible",
[0101] "partnersAddable": "Partner side add lock 1. On (default), 0. Off",
[0102] "partnersEditable": "Partner side edit lock 1. On (default), 0. Off",
[0103] "dataType": "Data type value data field (non-preset column values are empty)",
[0104] "properties": "JSON object of preset column configuration properties (non-preset column values are empty)",
[0105] "entityPath": "Bound entity",
[0106] "resourceKey": "Multi-language KEY",
[0107] "defaultValue": "Default value",
[0108] "order": "Sort",
[0109] "remark": "Description, Remarks",
[0110] "required": "Is it required? 1. Yes, 0. No",
[0111] "isPreset": "Whether to preset the column, 1. Yes, 0. No",
[0112] "columnWidth": "Column width integer type, the width of the field at the front end. The entire page is divided into 24 equal parts. Maintain the corresponding width. For example, if there are four columns, maintain 6. The default value is empty. Integer type, the width of the field at the front end. The entire page is divided into 24 equal parts. Maintain the corresponding width. For example, if there are four columns, maintain 6. The default value is empty.",
[0113] "isSecondary": "Is it a secondary field, 1. Yes, 0. No"
[0114] }
[0115] S2: Based on the synthesis service of page metamodel, the differential patch package is applied to the standard product function page metamodel to synthesize a new project page metamodel;
[0116] A further implementation method is to apply the differential patch package to the standard product function page metamodel based on the synthesis service of the page metamodel, and synthesize a new project page metamodel by:
[0117] The content of the differential patch package is read, and the standard product function page metamodel and the differential patch package are merged by using JSONPath to obtain a new project page metamodel.
[0118] A further embodiment is that the merged content includes attributes and layout of the page.
[0119] S3: Based on the new project page metamodel, obtain the new page and complete the secondary development of the low-code platform based on the page metamodel.
[0120] Embodiment 2
[0121] The present invention also provides a low-code platform secondary development system based on a page metamodel using a low-code platform secondary development method based on a page metamodel, comprising:
[0122] Patch package production module, used to produce differential patch packages based on project page requirements;
[0123] The metamodel synthesis module is used for synthesis services based on page metamodels. It applies differential patch packages to standard product function page metamodels to synthesize new project page metamodels.
[0124] The running engine module is used to obtain new pages based on the new project page metamodel and complete the secondary development of the low-code platform based on the page metamodel.
[0125] A further implementation method is that the patch package making module includes:
[0126] The new project patch package production unit is used to visually configure all components that need to be modified in the project page according to the requirements of the new project page to form a differential patch package; the visual configuration includes component name modification, whether it is required, whether it is editable, whether it is hidden, and component type switching;
[0127] The old function patch package production unit is used to compare the versions of the developed project function pages with the standard product function pages for the old functions of the developed project function pages to obtain differential patch packages; wherein the version comparison includes comparison of layout, components and attribute dimensions.
[0128] A further implementation method is that the old function patch package making unit includes:
[0129] The page parsing subunit is used to traverse and parse the JSON attributes of all layouts and components of the developed project function page and the standard product function page to obtain the parsing results;
[0130] The version comparison subunit is used to use the values of different dimensions of the developed project function page as the final value of the difference JSON file based on the parsing result, form a difference JSON file description, and complete the version comparison.
[0131] A further implementation method is that, in the runtime engine module, the new project page metamodel is returned to the runtime engine front end and rendered to the page to obtain a new page. The runtime engine module also includes a runtime engine back end.
[0132] In this embodiment, specifically Figure 3 As shown, the system workflow is as follows:
[0133] The command to read the page metamodel is triggered in the visual interface, and the page metamodel of the runtime engine front end is read remotely. At the runtime engine back end, the product metamodel is read first, and then 1) if there is a patch package ID parameter in the request address bar, the differential patch package produced will be read for fusion. The system automatically triggers the synthesis service, applies the differential patch package to the standard product function page metamodel, calls the metamodel synthesis service, and returns the synthesized new project page metamodel to the runtime engine back end, which returns it to the runtime engine front end to render the dynamic page. 2) If there is no patch package ID parameter in the request address bar, the product standard metamodel is directly read, and the runtime engine back end returns it to the runtime engine front end to render the dynamic page.
[0134] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A low-code platform secondary development method based on page metamodel, It is characterized in that The following steps are involved: Create differential patch packages based on project page requirements; Based on the requirements of the project page, the methods for making differential patch packages include: For the requirements of a new project page, all components that need to be modified in the project page are visually configured to form the differential patch package; wherein the visual configuration includes component name modification, whether it is required, whether it is editable, whether it is hidden, and component type switching; For the old functions of the developed project function page, the developed project function page is compared with the standard product function page to obtain the differential patch package; wherein the version comparison includes comparison of layout, components and attribute dimensions; Based on the synthesis service of the page metamodel, the differential patch package is applied to the standard product function page metamodel to synthesize a new project page metamodel; the method for synthesizing the new project page metamodel is as follows: Read the content of the differential patch package, and use JSONPath to merge the standard product function page metamodel and the differential patch package to obtain the new project page metamodel; Based on the new project page metamodel, a new page is obtained, and the secondary development of the low-code platform based on the page metamodel is completed.
2. According to the low-code platform secondary development method based on the page metamodel according to claim 1, It is characterized in that The method for comparing the developed project function page with the standard product function page is as follows: Traverse and parse the JSON attributes of all layouts and components of the developed project function page and the standard product function page to obtain the parsing results; Based on the analysis result, the values of different dimensions of the developed project function page are used as the final values of the difference JSON file to form a difference JSON file description, thereby completing the version comparison.
3. According to the low-code platform secondary development method based on the page metamodel according to claim 1, It is characterized in that The structure of the page meta-model includes layoutInfo overall page layout, layoutList specific layout details, subscribes page global events and components all page components.
4. According to the low-code platform secondary development method based on the page metamodel according to claim 1, It is characterized in that The merged content includes the page's properties and layout.
5. A low-code platform secondary development system based on a page metamodel that applies the low-code platform secondary development method based on a page metamodel as described in any one of claims 1 to 4, It is characterized in that include: Patch package production module, used to produce differential patch packages based on project page requirements; A metamodel synthesis module, which is used for synthesis service based on page metamodel, applies the differential patch package to the standard product function page metamodel, and synthesizes a new project page metamodel; The running engine module is used to obtain a new page based on the new project page metamodel and complete the secondary development of the low-code platform based on the page metamodel.
6. According to claim 5, the low-code platform secondary development system based on the page metamodel, It is characterized in that The patch package making module includes: A new project patch package production unit is used to visually configure all components that need to be modified in the project page according to the requirements of the new project page to form the difference patch package; wherein the visual configuration includes component name modification, whether it is required, whether it is editable, whether it is hidden, and component type switching; The old function patch package production unit is used to compare the versions of the developed project function page with the standard product function page for the old functions of the developed project function page to obtain the differential patch package; wherein the version comparison includes comparison of layout, components and attribute dimensions.
7. According to claim 6, the low-code platform secondary development system based on the page metamodel, It is characterized in that The old function patch package production unit includes: The page parsing subunit is used to traverse and parse the JSON attributes of all layouts and components of the developed project function page and the standard product function page to obtain the parsing results; The version comparison subunit is used to use the values of different dimensions of the developed project function page as the final value of the difference JSON file based on the analysis result to form a difference JSON file description and complete the version comparison.
8. The low-code platform secondary development system based on the page metamodel according to claim 6, It is characterized in that In the runtime engine module, the new project page metamodel is returned to the runtime engine front end and rendered to the page to obtain the new page.
Citation Information
Patent Citations
Low-code implementation method and device based on meta-model and electronic equipment
CN115033241A
Low-code application rapid construction method
CN116204168A
Method and device for secondarily developing software on low-code platform and electronic equipment
CN116450107A
