Low-code management method, device and equipment supporting secondary development and repeated generation

By separating the generated code into immutable and mutable parts, and adopting component nesting and base class inheritance mechanisms, the problem of repeated code generation on low-code platforms is solved, adapting to the front-end and back-end separation architecture, and improving development efficiency and code quality.

CN121879732APending Publication Date: 2026-04-17ADVANCED SYST DEV
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ADVANCED SYST DEV
Filing Date
2025-12-24
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Low-code platforms struggle to generate code repeatedly, especially in front-end and back-end separation architectures where there is a lack of effective solutions, leading to inefficient development iterations and a high risk of introducing errors.

Method used

The generated code is physically separated into a non-modifiable part within an immutable directory and a modifiable part outside the directory. Through component nesting and logic delegation mechanisms (front-end) and base class inheritance mechanisms (back-end), only the code within the immutable directory is overwritten during regeneration, while the modifiable part outside the directory remains unchanged.

Benefits of technology

It enables low-code platforms to be repeatedly generated after secondary development without overwriting existing results, adapts to front-end and back-end separation architectures, significantly reduces development and maintenance costs, and improves iteration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121879732A_ABST
    Figure CN121879732A_ABST
Patent Text Reader

Abstract

The invention provides a low-code management method, device and equipment supporting secondary development and repeated generation, and relates to the technical field of computer software development, and the method comprises the steps: when a code is generated, dividing the generated code into a part which cannot be secondarily developed and a part which can be secondarily developed, storing the part which cannot be secondarily developed in a preset immutable directory, and storing the part which can be secondarily developed in the immutable directory; the secondary development part is stored outside the immutable directory; establishing an incidence relation between the part which cannot be developed for the second time and the part which can be developed for the second time, and enabling codes of the two parts to cooperatively work to realize business logic; when a code regeneration operation is triggered, codes in the immutable directory are completely covered, and for a part capable of being developed for the second time outside the immutable directory, if a file exists, the part is kept unchanged, and if the file does not exist, the part is created. According to the method, the problem that the low-code platform generated codes are difficult to repeatedly generate after secondary development is solved; different characteristics of a front-end and rear-end separation framework are adapted; and the development and maintenance cost is obviously reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software development technology, and more specifically to a low-code management method, apparatus, and device that supports secondary development and iterative generation. Background Technology

[0002] Low-code or no-code development platforms significantly improve software application development efficiency through visual drag-and-drop and configuration methods, enabling developers to quickly build applications. However, these platforms have significant limitations when dealing with complex and personalized business needs, and cannot fully meet the diverse customization requirements of enterprises.

[0003] To address these shortcomings, some low-code platforms offer source code export functionality, allowing developers to perform secondary development based on the platform-generated code. While this expands the platform's applicability, it introduces a core pain point: once the code is exported and further developed, it is removed from the original platform's visual development system. When subsequent business requirements change, developers cannot return to the platform for visual modifications and code regeneration, as the newly generated code directly overwrites the completed secondary development. At this point, developers are forced to manually compare and merge the old and new code, a process that is not only extremely labor-intensive and inefficient but also highly prone to introducing errors, severely hindering development iteration efficiency and software quality.

[0004] Several solutions exist in the current technology to address the aforementioned problems. One type of solution pre-defines hook methods in the original code, retrieves configuration files from a specified directory at runtime, parses them into extension code, and injects it into the source code to achieve functional extension. While this solution avoids direct modification of the original code, it is essentially a runtime dynamic embedding mechanism and does not fundamentally solve the problem of secondary development results being overwritten when the code is repeatedly generated. Another type of solution divides the code template into a generation layer and an extension layer, using class inheritance to achieve separation. The generation layer is set to read-only and can be repeatedly overridden, while the extension layer enables secondary development through inheritance. This solution solves the problem of repeated generation to some extent, but it mainly focuses on the backend based on inheritance patterns and lacks effective solutions for frontend implementations in modern frontend-backend separation architectures. Furthermore, the extension layer still needs to be merged using version control tools after regeneration, posing a risk of merge conflicts.

[0005] Chinese patent document CN117873466A discloses a code management method for secondary development, which discloses a technical solution to obtain secondary development configuration files through a hook method and embed extended code into the original code. This achieves the technical effect of functional expansion without exporting source code, but still has the problem of not being able to support repeated code generation and deep coupling between secondary development code and source code.

[0006] Chinese patent document CN119311256A discloses a code generation method that supports multiple generation. It discloses a technical solution that divides the code template into a generation layer and an extension layer and separates them through an inheritance mechanism. This method simplifies the workload of code merging, but it still has the problems of being only applicable to backend scenarios, lacking frontend solutions, and requiring version tools to merge the extension layer. Summary of the Invention

[0007] The purpose of this invention is to provide a low-code management method, apparatus, and device that supports secondary development and repeated generation, solving the problem that low-code platform-generated code is difficult to repeatedly generate after secondary development; adapting to the different characteristics of front-end and back-end separation architectures; and significantly reducing development and maintenance costs.

[0008] To achieve the above objectives, the present invention provides the following technical solution: A low-code management method that supports secondary development and iterative generation includes the following steps: S1: During code generation, the generated code is divided into a non-refactorable part and a refactorable part. The non-refactorable part is stored in a preset immutable directory, and the refactorable part is stored outside the immutable directory. S2: Establish the association between the non-redevelopable part and the redevelopable part, so that the two parts of code work together to realize the business logic; S3: When the code regeneration operation is triggered, the code in the immutable directory is completely overwritten. For the parts outside the immutable directory that can be further developed, if the file already exists, it remains unchanged; if the file does not exist, it is created.

[0009] Furthermore: the aforementioned associations include associations related to the front-end code, and the specific establishment process is as follows: Generate an outer page component located outside the immutable directory, the outer page component referencing and rendering the inner component located within the immutable directory; The internal components are generated by a low-code platform based on visual design, defining the page layout and UI element structure.

[0010] Furthermore: the internal component includes sub-components, which delegate the implementation of business logic to logic units located outside the immutable directory, where developers write business logic code.

[0011] Furthermore: the sub-component is introduced into the logic unit through a mix-in mechanism. The logic unit is an independent logic file, and the logic unit contains data definitions and method definitions.

[0012] Furthermore: the aforementioned associations include associations with backend code, and the specific establishment process is as follows: A base class is generated within the immutable directory, and the base class contains the standard business logic implementation. A subclass inheriting from the base class is generated outside the immutable directory, and the subclass file is not overwritten after its initial generation; Developers can perform secondary development by overriding or adding methods in the subclasses.

[0013] Furthermore, the base class includes at least one of entity base class, service base class, data mapping base class and controller base class, and each base class generates a corresponding subclass.

[0014] Furthermore, pre-compiled generic code files are dynamically loaded at runtime via a class loader, achieving hot reloading after code generation.

[0015] A low-code management device that supports secondary development and iterative generation includes: The code separation module is used to divide the generated code into a non-refactorable part and a refactorable part. The non-refactorable part is stored in a preset immutable directory, and the refactorable part is stored outside the immutable directory. The association establishment module is used to establish the association relationship between the non-redevelopable part and the redevelopable part; The generation control module is used to completely overwrite the code in the immutable directory when the code regeneration operation is triggered. For the secondary development parts outside the immutable directory, if the file already exists, it remains unchanged; if the file does not exist, it is created.

[0016] Furthermore: the association establishment module includes: The front-end association unit is used to generate an outer page component located outside the immutable directory to reference the inner component within the immutable directory, and to enable the sub-components in the inner component to delegate business logic to the logic unit outside the immutable directory. The backend association unit is used to generate a base class containing standard business logic within the immutable directory, and to generate subclasses that inherit from the base class outside the immutable directory.

[0017] An electronic device is characterized by comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.

[0018] Compared with the prior art, the present invention has the following advantages: I. This invention completely solves the problem of secondary development code being overwritten by physically separating the generated code into a non-renewable part within an immutable directory and a renewable part outside the directory, and by adopting a generation strategy that completely covers the immutable directory and skips existing files. This allows developers to freely switch between visual design and manual coding and iterate repeatedly.

[0019] Second, this invention adopts a component nesting and logic delegation mechanism for the front end and a base class inheritance mechanism for the back end, which respectively adapts to the different characteristics of front-end UI-intensive and back-end logic-intensive, making the code structure clear and in line with the development habits of their respective domains under the front-end and back-end separation architecture.

[0020] Third, developers of this invention only need to focus on the business logic that can be further developed, without needing to understand the underlying code generated by the platform; when the platform is upgraded or the data model is changed, it can be directly regenerated without the need for tedious code comparison and merging work, which significantly reduces development and maintenance costs. Attached Figure Description

[0021] Figure 1 A flowchart illustrating a low-code management method that supports secondary development and iterative generation, provided by this invention; Figure 2 A schematic diagram of a low-code management device that supports secondary development and repeated generation is provided by the present invention; Figure 3 A flowchart illustrating a low-code management method that supports secondary development and iterative generation, provided as an embodiment of the present invention; Figure 4 This is a schematic diagram of the front-end code combination and execution mechanism in an embodiment of the present invention; Figure 5 This is a schematic diagram of the backend code combination and operation mechanism in an embodiment of the present invention. Detailed Implementation

[0022] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] Example 1 like Figure 1 As shown, this invention provides a low-code management method that supports secondary development and iterative generation, comprising the following steps: S1, During code generation, the generated code is divided into non-refactorable parts and refactorable parts. The non-refactorable parts are stored in a preset immutable directory, while the refactorable parts are stored outside the immutable directory. S2 establishes the relationship between the non-redevelopable parts and the redevelopable parts, enabling the two parts of code to work together to achieve business logic; S3, when the code regeneration operation is triggered, completely overwrites the code in the immutable directory. For the parts outside the immutable directory that can be further developed, if the file already exists, it remains unchanged; if the file does not exist, it is created.

[0024] Specifically, the immutable directory stores code dynamically generated by the low-code platform based on visual configuration, and is completely overwritten each time a new code is generated. The code outside the immutable directory is the part that can be further developed, where developers can write custom business logic, and it will not be modified after the initial generation. By separating the physical directories, the platform-generated code and the secondary development code are isolated, allowing developers to return to the platform for visual design and repeatedly generate code after secondary development without destroying existing secondary development results.

[0025] In one specific implementation of this embodiment, the association relationship includes association relationships for the front-end code. The specific establishment process is as follows: an outer page component is generated outside the immutable directory. This outer page component references and renders the inner component located within the immutable directory. The inner component is generated by the low-code platform based on a visual design, defining the page layout and UI element structure. That is, the outer component acts as the entry point, only responsible for referencing the inner component, while the inner component carries the UI structure generated by the platform. When the platform regenerates, only the inner component under the immutable directory is updated; the outer component remains unchanged.

[0026] In one specific implementation of this embodiment, the internal component includes sub-components. The sub-components delegate the implementation of business logic to logic units located outside the immutable directory. Developers write the business logic code within these logic units. Through this logic delegation mechanism, the UI structure is separated from the business logic, ensuring that UI updates do not affect the logic code written by the developers.

[0027] In one specific implementation of this embodiment, the sub-component introduces a logic unit through a mixin mechanism. The logic unit is an independent logic file containing data definitions and method definitions. The mixin mechanism enables the sub-component to access the data and methods defined in the logic unit, achieving collaborative work between the UI component and the business logic.

[0028] In one specific implementation of this embodiment, the association relationship includes the association relationship for backend code. The specific establishment process is as follows: a base class is generated within an immutable directory, containing the standard business logic implementation; subclasses inheriting from the base class are generated outside the immutable directory, and the subclass files are not overwritten after the initial generation; developers implement secondary development in the subclasses by overriding or adding methods. Through the inheritance mechanism, the subclass automatically obtains the functionality of the base class, and can also extend or modify the default behavior. When the platform regenerates, only the base class is updated, and the secondary development logic in the subclasses is fully preserved.

[0029] In one specific implementation of this embodiment, the base class includes at least one of an entity base class, a service base class, a data mapping base class, and a controller base class, with each base class generating corresponding subclasses. Setting separate base classes and subclasses for different business layers ensures a clear code structure and conforms to the development habits of a layered architecture.

[0030] In one specific implementation of this embodiment, the pre-compiled generic code file is dynamically loaded at runtime via a class loader, achieving hot reloading after code generation. Through this hot reloading mechanism, developers can view the results without restarting the service after code generation, improving development efficiency.

[0031] Example 2 like Figure 2 As shown, this invention also provides a low-code management device that supports secondary development and iterative generation, including a code separation module, an association establishment module, and a generation control module. The code separation module divides the generated code into non-refactorable and refactorable parts. The non-refactorable parts are stored in a preset immutable directory, while the refactorable parts are stored outside the immutable directory. The association establishment module establishes the association between the non-refactorable and refactorable parts. The generation control module, when triggering a code regeneration operation, completely overwrites the code within the immutable directory. For the refactorable parts outside the immutable directory, if the file already exists, it remains unchanged; if the file does not exist, it is created.

[0032] In one specific implementation of this embodiment, the association establishment module includes a front-end association unit and a back-end association unit. The front-end association unit generates an outer page component located outside the immutable directory to reference internal components within the immutable directory, and allows sub-components within the internal components to delegate business logic to logic units outside the immutable directory. The back-end association unit generates a base class containing standard business logic within the immutable directory and generates subclasses inheriting from the base class outside the immutable directory. Through the collaborative work of the front-end and back-end association units, complete code management under a front-end / back-end separation architecture is achieved.

[0033] Example 3 The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.

[0034] Example 4 The technical solution of the present invention will be further described below with reference to the accompanying drawings of a specific embodiment of the present invention.

[0035] Step 1: Please refer to Figure 3 The present invention provides a low-code composition method that supports secondary development and iterative generation. First, the user performs visual design on the low-code platform.

[0036] Step 2: After completing the design, the user triggers the code generation operation.

[0037] Step 3: When generating code, the system executes the core separation strategy. It divides the generated code into two parts: one part is code that cannot be further developed, which is generated in the _immutable folder under the project's specified directory; the other part is code that can be further developed, which is generated outside the _immutable folder.

[0038] Step 4: If this is the first generation, the system will generate the code inside _immutable and the code framework outside _immutable at the same time.

[0039] Step 5: If this is not the first generation, the system will only overwrite and update the code in the _immutable folder, while the external files remain unchanged.

[0040] Step 6: After code generation, developers can perform secondary development in files outside the _immutable folder, writing custom business logic. When business requirements change, developers can return to the low-code platform for visual design (return to Step 1).

[0041] Step 7: Repeat the above generation process; existing secondary development code will not be lost.

[0042] Step 8: Finally, the two parts of the code are compiled and run together to form a complete application.

[0043] Detailed description of front-end implementation method (refer to) Figure 4 ); Step 1: Let's assume we are developing a "User Management" page. After designing the interface by dragging and dropping in the low-code platform, click "Generate Code".

[0044] Step 2: The system generates a modifiable UserManagement.vue file in the src / views / directory. Figure 4Component A in the document. This component serves as the page entry point. Its template section only contains a reference tag to the immutable component, and the script section imports and registers the immutable component. The overall structure is simple and only serves as a bridge.

[0045] Step 3: At the same time, an unmodifiable UserManagement.vue file will be generated in the src / views / _immutable / directory. Figure 4 (Component A in the document). This file contains the complete layout and UI components generated by the platform. Its template section defines the page title and the nested structure of sub-components, the script section imports and references the form and table sub-components, and the configuration of lifecycle hooks automatically generated by the platform.

[0046] Step 4: For child components, such as the UserForm, the implementation logic is further separated. UserForm.vue (A1) located in the _immutable directory defines the UI elements of the form, but its data binding and event handling logic is implemented by importing external logic files through the mixins mechanism. The script part imports the modifiable logic units and mixes them into the current component.

[0047] Step 5: Developers then write all form-related business logic in the file src / views / UserForm.logic.js (A1). This logic file exports an object containing a data function that returns the initial state of the form fields (such as empty strings for username and password), and a methods object that defines business methods such as form submission.

[0048] Step 6: In this way, when the platform updates the UI (for example, by adding an input box to the form), only all the .vue files in the _immutable directory will be regenerated, while the logic code written by the developer in UserForm.logic.js will be perfectly preserved.

[0049] Detailed description of backend implementation method (refer to) Figure 5 ); Step 1: Suppose we have a User entity.

[0050] Step 2: The platform generates BaseUserService.java in the com / example / service / _immutable / directory. Figure 5 The base class (in the database). This base class obtains a Mapper instance through dependency injection and implements standard CRUD methods such as querying users by ID. The methods internally call the corresponding database operations of the Mapper and return the results.

[0051] Step 3: The platform generates UserService.java in the com / example / service / directory. Figure 5 This is a subclass of the base class (and is only generated once). This class is marked with the `@Service` annotation and declares that it inherits from the base class. The class body is initially empty, leaving room for developers to perform secondary development.

[0052] Step 4: The developer needs to add a custom "user login" logic. They can directly add a new method in UserService.java that accepts username and password parameters, executes the custom login verification logic, and returns a boolean verification result.

[0053] Step 5: If the behavior of "Find User" needs to be modified, such as adding caching logic, developers can override the parent class method. In the subclass, use the override annotation and the cache annotation to decorate the findById method. Inside the method, the original implementation of the parent class is called using the super keyword, thus adding caching functionality without modifying the original logic.

[0054] Step 6: When a field named age is added to the User data model, the platform regenerates the code. BaseUserService.java and BaseUserMapper.java will be updated to support the new field, but the login method in UserService.java and the cache overwrite logic of findById will remain intact.

[0055] In summary, this invention, by structurally separating the generated code and designing different collaboration mechanisms for the front-end and back-end, successfully resolves the core contradiction between low-code and secondary development, providing a new, efficient, flexible, and sustainably iterative model for software development.

[0056] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A low-code management method that supports secondary development and iterative generation, characterized in that, Includes the following steps: S1: During code generation, the generated code is divided into a non-refactorable part and a refactorable part. The non-refactorable part is stored in a preset immutable directory, and the refactorable part is stored outside the immutable directory. S2: Establish the association between the non-redevelopable part and the redevelopable part, so that the two parts of code work together to realize the business logic; S3: When the code regeneration operation is triggered, the code in the immutable directory is completely overwritten. For the parts outside the immutable directory that can be further developed, if the file already exists, it remains unchanged; if the file does not exist, it is created.

2. The low-code management method supporting secondary development and iterative generation according to claim 1, characterized in that: The association relationships include those relating to the front-end code, and the specific process for establishing them is as follows: Generate an outer page component located outside the immutable directory, the outer page component referencing and rendering the inner component located within the immutable directory; The internal components are generated by a low-code platform based on visual design, defining the page layout and UI element structure.

3. The low-code management method supporting secondary development and iterative generation according to claim 2, characterized in that: The internal component contains sub-components, which delegate the implementation of business logic to logic units located outside the immutable directory, where developers write business logic code.

4. The low-code management method supporting secondary development and iterative generation according to claim 3, characterized in that: The sub-components are introduced into the logic unit through a mix-in mechanism. The logic unit is an independent logic file, which contains data definitions and method definitions.

5. A low-code management method supporting secondary development and iterative generation according to claim 1, characterized in that: The association relationships include those related to the backend code, and the specific establishment process is as follows: A base class is generated within the immutable directory, and the base class contains the standard business logic implementation. A subclass inheriting from the base class is generated outside the immutable directory, and the subclass file is not overwritten after its initial generation; Developers can perform secondary development by overriding or adding methods in the subclasses.

6. The low-code management method supporting secondary development and iterative generation according to claim 5, characterized in that: The base class includes at least one of entity base class, service base class, data mapping base class and controller base class, and each base class generates a corresponding subclass.

7. A low-code management method supporting secondary development and iterative generation according to any one of claims 1-6, characterized in that, Also includes: The pre-compiled generic code files are dynamically loaded at runtime through the class loader, achieving hot reloading after code generation.

8. A low-code management device that supports secondary development and iterative generation, characterized in that, include: The code separation module is used to divide the generated code into a non-refactorable part and a refactorable part. The non-refactorable part is stored in a preset immutable directory, and the refactorable part is stored outside the immutable directory. The association establishment module is used to establish the association relationship between the non-redevelopable part and the redevelopable part; The generation control module is used to completely overwrite the code in the immutable directory when the code regeneration operation is triggered. For the secondary development parts outside the immutable directory, if the file already exists, it remains unchanged; if the file does not exist, it is created.

9. A low-code management device supporting secondary development and iterative generation according to claim 8, characterized in that: The association establishment module includes: The front-end association unit is used to generate an outer page component located outside the immutable directory to reference the inner component within the immutable directory, and to enable the sub-components in the inner component to delegate business logic to the logic unit outside the immutable directory. The backend association unit is used to generate a base class containing standard business logic within the immutable directory, and to generate subclasses that inherit from the base class outside the immutable directory.

10. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Code management method and device for secondary development, equipment and storage medium

    CN117873466A

  • Code generation method and device, electronic equipment and medium

    CN116185389A

  • Method and device for secondarily developing software on low-code platform and electronic equipment

    CN116450107A

  • Code generation method supporting multiple generation

    CN119311256A