Project-based application management method and device, application secondary development method and device and medium

By creating agile R&D project space in software development and using GitLab and Kubernetes, combining low-code platforms and automated code generation tools, the problem of difficult to iterate quickly and adapt to traditional software development models is solved, and efficient and secure application management is achieved. Secondary development ensures application independence and data security.

CN118885169APending Publication Date: 2024-11-01SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411001366.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

Traditional software development models are difficult to meet the needs of rapid iteration and flexible response. Low-code platforms have limitations in complex business logic and specific functions customization, and application deployment, operation and maintenance and monitoring are complex. How to achieve efficient application management and secondary development Become a challenge.

Method used

By creating an agile R&D project space, combining GitLab and Kubernetes, version control and environment isolation are achieved, and symmetric encryption algorithms are used to encrypt and store database passwords to ensure data security, use low-code platforms and automated code generation tools to generate application code and perform Continuous integration.

Benefits of technology

It provides an efficient, secure and flexible application development and management environment, improves development efficiency, ensures code traceability and controllability, avoids the impact of data interaction, and enhances data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885169A_ABST
    Figure CN118885169A_ABST
Patent Text Reader

Abstract

The invention provides a project-based application management and application secondary development method and device and a medium, and belongs to the technical field of software agile research and development. The method comprises the following steps: creating an agile research and development project space which comprises a public space and a standard space, and synchronizing the standard space with a GitLab working space; configuring a project environment which comprises a data source and a Kubernetes namespace during application operation, and ensuring the independence of the application; security configuration is implemented, a database password is encrypted and stored by using a symmetric encryption algorithm Blowfish, and a secret key is managed and stored through Nacos configuration; the method comprises the following steps: generating an application code after finishing application design on a low-code platform, creating a code warehouse for the application code generated for the first time through a GitLab API, and storing an association relationship between the code warehouse and an application; after codes are generated according to the applications, the applications are continuously integrated. Through a low-code platform and an automatic code generation tool, a developer can quickly generate an application code framework, repeated coding work is reduced, and the development efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a project-based application management and application secondary development method, device and medium, belonging to the technical field of software agile research and development. Background Art

[0002] In today's software development field, with the increasing complexity and diversity of business needs, traditional software development models can no longer meet the needs of rapid iteration and flexible response. To this end, low-code platforms have emerged. By providing a graphical interface and drag-and-drop operations, they have greatly lowered the threshold for application development and improved development efficiency. However, although low-code platforms perform well in quickly building application prototypes and simple applications, their limitations gradually emerge when dealing with complex business logic and specific function customization.

[0003] In addition, with the popularization of microservice architecture and containerization technology, application deployment, operation, maintenance and monitoring have become more complicated. How to achieve efficient application management and secondary development while ensuring application independence and security has become an urgent problem to be solved in the current software development field. Summary of the invention

[0004] The purpose of the present invention is to provide a project-based application management and application secondary development method, device and medium, providing an efficient, safe and flexible application development and management environment.

[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions: Create agile R&D project spaces, including public spaces and standard spaces. The public spaces allow developers to view and export applications, but prohibit modification. The standard spaces manage members and divide roles, including project administrators and ordinary members. Project administrators are responsible for configuring the environment, managing members and applications, and ordinary members are responsible for application design and editing. Synchronize the standard space with the GitLab workspace, create and manage project members and code repositories through the GitLab API interface, and implement version control; Configure the project environment, including the application runtime data source and Kubernetes namespace, to ensure application independence; Implement security configuration, use the symmetric encryption algorithm Blowfish to encrypt and store database passwords, and save keys through Nacos configuration management to improve data security; After the application design is completed on the low-code platform, the application code is generated. The first generated application code creates a code repository through the GitLab API and saves the association between the code repository and the application. After generating code based on the application, continuously integrate the application.

[0006] Preferably, the specific method of using the symmetric encryption algorithm Blowfish to encrypt and store the database password is as follows: Use the static method getInstance of KeyGenerator to get a key generator instance; Use Base64 encoder to encode the generated binary key into a string, and save the encoded key string through Nacos configuration management; When the program starts, get the saved key string through the configuration management interface of Nacos, and use the Base64 decoder to decode the key string back to binary format; Use the static method getInstance of Cipher to obtain the encryption tool class instance, and use the Cipher instance to encrypt the password based on the key binary code; When building a third-party data source connection, the Cipher instance is used to perform decryption based on the key binary code.

[0007] Preferably, the specific method for generating application code after completing application design on the low-code platform is as follows: Create a database connection: Use the FastAutoGenerator tool provided by Mybatis Plus to first establish a connection with the target database through its create static method. This step ensures that FastAutoGenerator can read the required table structure information from the database during the subsequent code generation process; Configure the template engine: Use Velocity as the template engine, and adapt the VM template technology by setting the template engine of the generator to VelocityTemplateEngine; Read form information and configure code generation strategy: Read application form information and determine the database tables corresponding to all forms under the application; use the packageConfig method of the generator instance to configure the generated code package structure and path; set the database tables that need to be included in the code generation through strategyConfig and define the specific generation strategy; use the injectionConfig method to further refine the specific path of the generated file; Execute code generation: Call the execute method of the generator instance to automatically generate the application code structure based on the configuration and database table structure information.

[0008] Preferably, the generated application code creates a code repository through the GitLab API in the following specific way: Initialize Git repository: Use JGit client to initialize a new Git repository in the directory containing the generated code; Add files to the workspace: Use the add command of the Git instance to add all the files in the code directory generated by the application to the Git workspace; Submit files: Use the commit command of the Git instance to submit the files added to the workspace to the local repository; Push code to the remote repository: Use the push command of the Git instance to push changes in the local repository to the remote repository.

[0009] Preferably, the application continuous integration is as follows: Configure CI / CD jobs in GitLab and use Runners agents to execute jobs; Plan the CI / CD pipeline into four tasks: compile project code, execute test cases, package Docker images, and deploy applications in the specified Docker environment.

[0010] The advantages of the present invention are: through the low-code platform and automated code generation tools, developers can quickly generate application code frameworks, reduce repeated coding work, and significantly improve development efficiency. The application templates in the public space allow developers to perform secondary development based on existing results, avoiding the tedious process of starting from scratch, and further accelerating the development process.

[0011] By connecting the standard project space with version management tools such as GitLab, we can achieve version management of application-generated code, ensuring the traceability and controllability of the code. The Git version control mechanism enables team members to work together, facilitates code merging, conflict resolution, and version rollback, and improves the efficiency and security of code management.

[0012] Through environment configuration, an independent operating environment is provided for each project application, effectively isolating the data interaction between different applications, avoiding mutual influence and potential data security risks. This environment isolation mechanism ensures that each application can run stably and reduces failures and downtime caused by changes in the external environment.

[0013] Symmetric encryption algorithms (such as Blowfish) are used to encrypt and store sensitive information such as database passwords, which enhances data security and prevents data leakage and illegal access. Combined with Nacos configuration management, Https data transmission and username and password access control further ensure the security of the key. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0015] Figure 1It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0016] 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.

[0017] like Figure 1 As shown, a project-based application management and application secondary development method provides developers with an efficient, secure and flexible application development and management environment by dividing project space, integrating version management tools, configuring application operating environment and security settings.

[0018] Specifically, the project space is divided into public space and standard space. The public space is used to store reusable application templates, while the standard space is used for the development and management of specific projects. The standard space is connected with version management tools such as GitLab to achieve version management of application generated code, ensuring the traceability and controllability of the code. At the same time, by configuring environment isolation and security settings, the independence of applications under the project and the security of data are guaranteed.

[0019] On this basis, this method also introduces low-code platforms and automated code generation tools, such as FastAutoGenerator and VM template technology provided by MybatisPlus, to achieve automatic generation and customized development of application code. This not only improves development efficiency, but also lowers the development threshold, allowing more non-professional developers to participate in application development.

[0020] In summary, the project-based application management and application secondary development method proposed in this project aims to solve the challenges faced by the current software development field and provide developers with more efficient, secure and flexible application development and management solutions.

[0021] Specifically, they include: S1: Create an agile R&D project space, including a public space and a standard space. The public space allows developers to view and export applications, but prohibits modification. The standard space manages members and divides roles, including project administrators and ordinary members. Project administrators are responsible for configuring the environment, managing members and applications, and ordinary members design and edit applications.

[0022] S2: Synchronize the standard space with the GitLab workspace, create and manage project members and code repositories through the GitLab API interface, and implement version control.

[0023] S3: Configure the project environment, including the application runtime data source and Kubernetes namespace, to ensure the independence of the application.

[0024] S4: Implement security configuration, use the symmetric encryption algorithm Blowfish to encrypt and store database passwords, and save keys through Nacos configuration management to improve data security.

[0025] S5: After the application design is completed on the low-code platform, the application code is generated. The first generated application code creates a code repository through the GitLab API and saves the association between the code repository and the application.

[0026] S6: After generating code based on the application, continuously integrate the application.

[0027] As a refinement of the above embodiment, the project space types in step S1 are divided into public space and standard space. Developers can design applications based on applications in the public space to improve application development efficiency. Therefore, all application design developers can view and export applications under the public space, but have no right to design or modify applications under the public space. Such authority division is to ensure the consistency of applications seen by all developers. Compared with the public space, the standard space needs to manage project members and assign roles to project members. There are two types of project member roles in this article: ordinary members and project administrators, which correspond to the project manager and project members of the project group respectively. There can be only one project administrator, but there can be multiple project members. Project administrators can add or delete project members, configure the application running environment, and delete applications; ordinary project members can design and edit applications according to business needs but have no right to delete applications.

[0028] As a refinement of the above embodiment, the standard space in step S2 is connected to gitlab. In order to facilitate the management of application code version generation, the standard project space and gitlab workspace need to be synchronized, that is, when creating a project space, a workspace with the same name is created through the API interface provided by gitlab. At the same time, changes to project members are also passed to workspace members through the API interface provided by gitlab. When creating a new application, you must first select the standard project space and then select the environment.

[0029] As a refinement of the above embodiment, the environment configuration in step S3 is to ensure the independence of the application under the project as much as possible, isolate the operating environment of the application under the project, and avoid unnecessary trouble caused by the mutual influence of data project application data. The environment configuration mainly includes the application runtime data source and Kubernetes namespace. The specific data of the data source is shown in the following table: As a refinement of the above embodiment, the database password in step S4 is highly sensitive information. If it is directly stored as a string, it may cause high-security accidents such as data leakage and data loss. In this paper, the database password is encrypted and stored using the symmetric encryption algorithm Blowfish.

[0030] First, get the KeyGenerator instance through the static method getInstance provided by KeyGenerator, then generate a binary key through the KeyGenerator instance generateKey, and finally encode the binary key into a string through the Base64 encoder. The string at this time can be understood as the private key of the encryption algorithm and needs to be saved carefully. This article uses Nacos configuration management to save the key. Nacos provides Https data transmission and provides username and password access to further ensure the security of the key.

[0031] When the program starts, it obtains the key from Nacos and converts the key into binary code. The encryption process is to obtain the tool class instance through the static method getInstance of the encryption tool class Cipher provided by javax, and then encrypt the password based on the key binary code through the Cipher instance. When building a third-party data source connection, the Cipher instance is used to decrypt the key binary code.

[0032] As a refinement of the above embodiment, in step S5, after the designer completes the application design on the low-code platform by dragging, dropping, and pulling according to business needs, the application can be deployed through the platform's one-click publishing function. However, many edge needs in real business often cannot be fully solved by the basic components and functions provided by the low-code platform. At this time, the user needs to generate code according to the application and perform secondary development.

[0033] As shown in the project space architecture diagram, applications belong to projects, and projects are mapped one-to-one to gitlab workspaces. The low-code platform saves the mapping relationship between the code base under the workspace corresponding to the standard space. When the application code is generated for the first time, the code repository will be created through the API interface provided by gitlab, and the association between the code repository and the application will be saved.

[0034] Generate application code based on the open source tool FastAutoGenerator and VM template technology provided by Mybatis plus: 1. Create the database connection where the application is located through the static method create provided by FastAutoGenerator. When generating the application code later, FastAutoGenerator will read the database table structure corresponding to the form from the database.

[0035] 2. FastAutoGenerator supports FreeMarker, Beetl, Velocity and other template engines. This article chooses to use VM template, so the template engine of the generator is set to VelocityTemplateEngine.

[0036] 3. Read the application form information to obtain the database table to which the form belongs under the current application. Set the application generation code package structure and path through the static method packageConfig provided by the generator instance. Set the included database table name and generation strategy through strategyConfig. Set the specific path of the generated file through injectionConfig.

[0037] 4. Generate the application code structure through the execute method provided by the generator instance. The generated code is stored in the server file system in the form of files and is not visible to other users. You need to initialize the code directory generated by the application through the Jgit client, and then use the add command of the Git instance to add all the files in the code directory generated by the application to the workspace, and use the commit command of the Git instance and the push command of the Git instance to push the code to the workspace code repository mapped to the project.

[0038] As a refinement of the above embodiment, after the code is generated according to the application in step S6, the developer can analyze, plan, and code according to business needs. After the coding is completed, the application code is constructed, tested, released, deployed, operated, maintained, and monitored.

[0039] In GitLab, Runners are agents that run CI / CD jobs. There may already be Runners available for your project, including shared Runners, which are available to all projects in your instance. To see the available Runners, go to Settings > CI / CD and expand Runners. If there are no Runners listed on the Runners page in the UI, the developer must install GitLab Runner and register at least one Runner.

[0040] According to the code word code.gitlab-ci.yml file generated by the application, this article plans the pipeline into four tasks. The first task is to execute the Maven command to compile the project to avoid introducing basic errors; the second task is to execute test cases to further avoid introducing business type errors; the third stage is to package the image, which is mainly used to package the Docker image; the fourth task is deployment, which first deploys the Docker image of the project generated by the application in the specified Docker environment.

[0041] The disclosed embodiment also provides a project-based application management and application secondary development device, including a processor and a memory. Optionally, the device may also include a communication interface and a bus. The processor, the communication interface, and the memory may communicate with each other through the bus. The communication interface may be used for information transmission. The processor may call the logic instructions in the memory to execute the project-based application management and application secondary development method of the above embodiment.

[0042] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0043] The memory, as a computer-readable storage medium, can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes the functional application and data processing by running the program instructions / modules stored in the memory, that is, realizing the project-based application management and application secondary development method in the above embodiment.

[0044] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory.

[0045] The embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned project-based application management and application secondary development method.

[0046] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0047] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0048] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A project-based application management and application secondary development method, characterized in that: The following steps are involved: Create agile R&D project spaces, including public spaces and standard spaces. The public space allows developers to view and export applications, but prohibits modification. The standard space manages members and divides roles, including project administrators and ordinary members. Project administrators are responsible for configuring the environment and managing members and applications, while ordinary members design and edit applications. Synchronize the standard space with the GitLab workspace, create and manage project members and code repositories through the GitLab API interface, and implement version control; Configure the project environment, including the application runtime data source and Kubernetes namespace, to ensure application independence; Implement security configuration, use the symmetric encryption algorithm Blowfish to encrypt and store database passwords, and save keys through Nacos configuration management to improve data security; After the application design is completed on the low-code platform, the application code is generated. The first generated application code creates a code repository through the GitLab API and saves the association between the code repository and the application. After generating code based on the application, continuously integrate the application.

2. The project-based application management and application secondary development method according to claim 1, characterized in that: The specific method of using the symmetric encryption algorithm Blowfish to encrypt and store database passwords is as follows: Use the static method getInstance of KeyGenerator to obtain a key generator instance; Use the Base64 encoder to encode the generated binary key into a string, and save the encoded key string through the Nacos configuration management; When the program starts, obtain the saved key string through the Nacos configuration management interface and use the Base64 decoder to decode the key string back to binary format; Use the static method getInstance of Cipher to obtain the encryption tool class instance, and use the Cipher instance to encrypt the password based on the key binary code; When building a connection to a third-party data source, decryption is performed based on the key binary code through a Cipher instance.

3. The project-based application management and application secondary development method according to claim 1, characterized in that: The specific method for generating application code after completing application design on the low-code platform is as follows: Create a database connection: Using the FastAutoGenerator tool provided by Mybatis Plus, first establish a connection to the target database through its create static method. This step ensures that FastAutoGenerator can read the required table structure information from the database during the subsequent code generation process. Configure the template engine: Use Velocity as the template engine, and adapt the VM template technology by setting the generator's template engine to VelocityTemplateEngine; Read form information and configure code generation strategy: Read application form information and determine the database tables corresponding to all forms in the application; use the packageConfig method of the generator instance to configure the generated code package structure and path; use strategyConfig to set the database tables to be included in the code generation and define the specific generation strategy; use the injectionConfig method to further refine the specific path of the generated file; Execute code generation: Call the execute method of the generator instance to automatically generate the application code structure based on the configuration and database table structure information.

4. The project-based application management and application secondary development method according to claim 3, characterized in that: The specific method for creating a code repository through the GitLab API using the generated application code is as follows: Initialize Git repository: Use JGit client to initialize a new Git repository in the directory containing the generated code; Add files to the workspace: Use the add command of the Git instance to add all files in the code directory generated by the application to the Git workspace; Submit files: Use the commit command of the Git instance to submit the files added to the workspace to the local repository; Push code to the remote repository: Use the push command of the Git instance to push changes in the local repository to the remote repository.

5. The project-based application management and application secondary development method according to claim 1, characterized in that: The specific implementation of continuous integration of applications is as follows: Configure CI / CD jobs in GitLab and use Runners agents to execute jobs; Plan the CI / CD pipeline into four tasks: compile project code, execute test cases, package Docker images, and deploy applications in a specified Docker environment.

6. A project-based application management and application secondary development device, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the project-based application management and application secondary development method according to any one of claims 1 to 5 when running the program instructions.

7. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.