Incremental development method and system for modular software
By using incremental development methods and systems, the high cost of code maintenance and baseline upgrades in communication module software development has been solved, enabling efficient code reuse and multi-customer synchronous management, thereby reducing enterprise maintenance costs and baseline upgrade workload.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG LIERDA INTERNET OF THINGS TECH
- Filing Date
- 2022-10-18
- Publication Date
- 2026-07-31
AI Technical Summary
In the existing communication module software development model, the workload of code maintenance is large, the maintenance cost of customer-customized projects is high, and the workload of baseline upgrades is enormous.
By adopting an incremental development approach, we create incremental development code repositories and original baseline code repositories, use the Git code version control system, and combine compilation management scripts and macro control management files to achieve incremental code management and automatic compilation, reducing the need for manual merging.
It improves code reusability, reduces enterprise maintenance costs and development workload, enables synchronous maintenance and management for multiple customers, and reduces the workload during baseline upgrades.
Smart Images

Figure CN116257279B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer software development technology, and in particular to an incremental development method and system for modular software. Background Technology
[0002] The communication module is a core component of IoT terminals, responsible for network access and data transmission. Its downstream applications cover multiple IoT scenarios, making it the most critical foundational communication module in the IoT era. A communication module generally consists of two parts: a hardware PCBA board and embedded software containing the protocol stack. The embedded software includes the running software environment and the protocol stack. As the complexity of communication module software increases and demand grows daily, enterprises and developers are paying more attention to more efficient and convenient software engineering management and code reuse. Therefore, an efficient development architecture that facilitates maintenance, management, and code reuse is needed.
[0003] Existing communication module software development models are all based on the original manufacturer's baseline framework. This approach, especially when developing customized solutions for different customers, involves a large workload of code maintenance and presents significant maintenance risks and high maintenance costs in terms of internal code maintenance and management of customer customization. Summary of the Invention
[0004] The purpose of this invention is to overcome the problems of large workload in module software development code maintenance, high maintenance cost of customer-customized projects, and huge workload in baseline upgrades in the prior art. It provides an incremental development method and system for module software, which uses a code management system different from the original manufacturer's to perform incremental management of code development, which greatly improves code reusability and development efficiency, reduces various maintenance costs for enterprises, realizes synchronous maintenance management for multiple customers, and reduces the huge workload of baseline upgrades by the original chip manufacturer.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: S1: Based on the new chip platform, create incremental development code repositories and original manufacturer baseline code repositories; S2: Obtain the original manufacturer's baseline code from the chip manufacturer and upload the obtained original manufacturer's baseline code to the original manufacturer's baseline repository; S3: In the incremental development repository, add compilation management scripts and macro control management files, and divide the directory into platforms and derivative projects; S4: Through the compilation management script, the incremental development code is automatically copied to the original baseline code and compiled to generate the final target version file.
[0006] The original manufacturer's baseline (original manufacturer baseline code) is an SDK code package provided by the chip manufacturer to module manufacturers for secondary development. After a new project is initiated, the first step is to create a code repository (a code management system used to manage and store code). This invention primarily uses a Git (GIT is a code version control system used to manage code) code repository. The development process of platform-derived projects involved in this invention involves incremental customization development based on the platform, maximizing code reuse and development efficiency. After iterating on the original manufacturer's baseline, an evaluation is conducted based on project needs and the original manufacturer's change log. If an upgrade is determined, the new baseline code is directly pushed to the repository storing the original manufacturer's baseline code without manual merging. Incremental code merging is performed on the code in the incremental development repository, greatly improving baseline upgrade efficiency. The software development method involved in this invention is for embedded cross-compilation; therefore, the code needs to be cross-compiled to be converted into an executable program that can be recognized and run by the device. This invention achieves high code reuse for a wide variety of customer customizations and significantly reduces code maintenance costs for enterprises and developers. This invention significantly reduces the enormous workload associated with baseline upgrades by chip manufacturers. Different customer-customized codes can be managed and maintained in a unified manner, and controlled through a macro-control module, thereby reducing development and maintenance workload.
[0007] Preferably, the specific steps of step S1 are as follows: S1.1: New project approval; S1.2: Create a platform general function catalog in the incremental development repository for function development; S1.3: Determine whether the sub-function modifies the original factory baseline code, create a directory based on the determination result, and add macro control code.
[0008] The incremental development repository is used for development, while the original baseline repository remains unchanged. The two code repositories are managed separately, enabling incremental code development management; and macro control provides unified and convenient management of numerous customer customizations. Macro control is a method used in embedded software development to manage code. The sub-functions in S1.3 refer to the software functions within the module, not a specific function, and could be any software function of the module.
[0009] Preferably, step S1.3 is further expressed as follows: A: If the sub-function modifies the original factory baseline code, create a directory identical to the original factory baseline code, copy the original factory baseline code to be modified to the same directory as the original factory baseline code, make incremental modifications to the original factory baseline code, add macro control code in the incremental development repository, and the development is complete; B: If the sub-function does not modify the original factory baseline code, create the corresponding functional module directory, carry out new functional development, add macro control code to the new function, and the development is complete.
[0010] Depending on whether the original factory baseline code is modified, different directories are created, and macro controls are added to provide unified and convenient management of numerous customer customizations. Because the incremental development code and the original factory baseline code are two different code management repositories, to facilitate one-click copying and compilation via scripts and ensure path consistency on both sides, macro control files are added to the directories corresponding to the platform or derivative projects in the incremental development repository, and code macros are used in the corresponding customized code. The sub-functions here refer to the software functions involved in the platform or derivative projects. If they do not involve modifying the original factory baseline code, a functional module directory is created in the corresponding project directory.
[0011] Preferably, the specific steps of step S2 are as follows: S2.1: Platform-derived customized project initiation; S2.2: Analyze project requirements and list the customized content for incremental development; S2.3: Determine whether project customization needs to be retrieved. If not, use the platform's general code and development ends. S2.4: If project customization is required, create a customization directory named after the project, develop customized functions and modify customized configurations. Non-customized functions use the platform's general function directory, and development is complete.
[0012] Custom projects derived from new projects are all incrementally customized developments based on the platform, greatly improving code reuse and development efficiency. If there is no need to pull a custom project, the platform's general code can be used directly; if a custom project is required, new code needs to be written based on the customized functions.
[0013] Preferably, the specific steps of step S4 are as follows: S4.1: Compilation management script, select the target project to be compiled; S4.2: Copy all code from the platform's general function directory to the original factory baseline code directory, and copy all contents of the selected project directory to the original factory baseline code directory to obtain the new baseline code; S4.3: Expand the new baseline code using macros and compile it using the original compiler framework to generate the final target version file.
[0014] A one-click compilation management script triggers a visual interface, allowing users to select a project. The background script then automatically selects the corresponding project, expands macro-control management, copies incrementally developed or modified code to the original manufacturer's baseline code, and compiles it using the original manufacturer's compilation framework to ultimately generate the target version file. Only through compilation can the generated code be transformed into an executable program that the device can recognize and run.
[0015] An incremental development system for modular software, comprising: The Git code hosting module is used for the maintenance and management of software code. The compilation management module calls the visualization plugin module to select projects and compile code, generating the final target version file; The visualization plugin module displays the corresponding operation interface based on the commands from the compilation management module; The platform module stores all code and files common to the platform. The minimum system module enables the baseline version to run normally on the project hardware; The project customization module is a customized project derived from the storage platform project.
[0016] The minimum system module contains minimal adaptations to the baseline code, ensuring the baseline version runs correctly on the project's hardware. This module facilitates comparison and verification of the original and developed functionalities. The project customization module is a customer-customized project derived from the platform project (customized modular software projects often involve incremental customization on top of the platform). This application employs a code management system distinct from the original manufacturer's, implementing incremental code development and using macro control for unified and convenient management of numerous customer customizations. It also provides a visual operation and compilation interface, improving code reusability and reducing various maintenance costs for the enterprise.
[0017] Preferably, the Git code hosting module includes: An incremental development repository, used for incremental development; The original factory baseline repository is used to store the original baseline code without any modifications.
[0018] In the development of modular software, Git is usually used as the code management method. In this invention, in order to achieve incremental development and facilitate maintenance, two Git repositories are used to maintain and manage the software code.
[0019] Preferably, the compilation management module includes: The visualization management module is used to call visualization plugin modules and select projects; The incremental code copy module is used to copy the macro control and function code of the selected project and send the copied code to the original baseline repository. The macro control management module compiles the baseline code and generates the final target version file.
[0020] The compilation management module is responsible for calling the visual plugin, presenting a visual interface for project selection, and copying the macro control and function code of the corresponding project after selection. Finally, it enters the original baseline, compiles the relevant baseline code, and generates the target version file.
[0021] Preferably, the code stored within the platform includes functional module code, kernel development code, and baseline incremental modification code, and the stored files include functional module macro control files and platform project general configuration files; the code stored in the project customization module includes functional module code developed for customer customization, and the stored files include project customization macro control management files and project customization configuration files.
[0022] The content stored in the custom project module does not include platform-wide general configurations and functions. Unmodified parts of the custom project will be based on the platform's specifications.
[0023] Therefore, the present invention has the following beneficial effects: for a wide variety of customer customizations, a macro control management mechanism is used to achieve high code reuse, which can unify the management and maintenance of different customer customization codes and control them through the macro control management module, thereby reducing the workload of development and maintenance, greatly reducing the code maintenance costs for enterprises and developers, and greatly reducing the huge workload when upgrading the chip manufacturer's baseline. Attached Figure Description
[0024] Figure 1 This is a flowchart of the incremental development method in this invention.
[0025] Figure 2 This is a flowchart of the steps involved in developing a new project in this invention.
[0026] Figure 3 This is a flowchart of the steps involved in developing derivative projects in this invention.
[0027] Figure 4 This is a flowchart of the code compilation steps in this invention.
[0028] Figure 5 This is the process flow for original factory baseline upgrade in this invention.
[0029] Figure 6 This is a schematic diagram of the incremental development system in this invention.
[0030] In the diagram: 1. Compilation Management Module; 2. Visual Plugin Module; 3. Platform Module; 4. Minimal System Module; 5. Project Customization Module; 6. Visual Management Module; 7. Incremental Code Copy Module; 8. Macro Control Management Module; 9. Development System Architecture. Detailed Implementation
[0031] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: Example 1: This embodiment describes an incremental development method for module software, such as... Figure 1 As shown, the process includes the following steps: First, based on the new chip platform, create an incremental development code repository and an original manufacturer baseline code repository; second, obtain the original manufacturer baseline code from the chip manufacturer and upload the obtained original manufacturer baseline code to the original manufacturer baseline repository; third, add a compilation management script and a macro control management file to the incremental development repository, and perform directory division for the platform and derivative projects; fourth, automatically copy the incremental development code to the original manufacturer baseline code using the compilation management script, compile it, and generate the final target version file.
[0032] After a new project is initiated, the first step is to create a code repository. This invention primarily uses a Git code repository. The development process for platform-derived projects involved in this invention involves incremental customization based on the platform, maximizing code reuse and development efficiency. After iterating on the original manufacturer's baseline, an evaluation is conducted based on project needs and the original manufacturer's change log. If an upgrade is determined, the new baseline code is directly pushed to the repository storing the original manufacturer's baseline code, eliminating the need for manual merging. The software development method involved in this invention is for embedded cross-compilation; therefore, the code must be cross-compiled to be converted into an executable program that can be recognized and run by the device. This invention achieves high code reuse for a wide variety of customer customizations, allowing for unified management and maintenance of different customer-customized codes, controlled through a macro-control management module. This reduces development and maintenance workload, significantly lowering code maintenance costs for enterprises and developers, and greatly reducing the enormous workload of upgrading the chip manufacturer's baseline.
[0033] The incremental development method of this application will be further explained below: Step 1: Based on the new chip platform, create an incremental development code repository and an original manufacturer baseline code repository.
[0034] In this embodiment, after a new project is initiated, a Git code repository will be created first. The incremental development repository will be used for development, while the original baseline repository will not be modified.
[0035] Specific steps are as follows Figure 2As shown, the first step is to initiate the new platform project and create two code repositories: one for incremental development and one for the original baseline repository.
[0036] Perform incremental development of new platform projects in the incremental development repository: Create a general function directory for platform development (write code based on functions, including multiple functions), determine whether the sub-function has modified the original baseline code. If not, create a directory for the corresponding function module, develop a completely new function, and add macro control code to the new function. If it has been modified, create a directory that is exactly the same as the original baseline code, copy the original code file to be modified to the directory with the same path, make incremental modifications to the original file, and add macro control code as needed.
[0037] With this, the incremental development of the new platform project has been completed.
[0038] Step 2: Obtain the original manufacturer's baseline code from the chip manufacturer and upload the obtained original manufacturer's baseline code to the original manufacturer's baseline repository.
[0039] Step 3: In the incremental development repository, add compilation management scripts and macro control management files, and divide the directory into platforms and derivative projects. At the same time, add corresponding configuration items, macro control management files and other files in their respective directories.
[0040] The development process of platform-derived projects involved in the method of this invention, and the derived customized projects, are all based on the created platform and involve incremental customized development, which greatly improves code reuse and development efficiency.
[0041] Specific steps are as follows Figure 3 As shown, the new platform derivative project is initiated, project requirements are analyzed, and the customized content for incremental development is listed; it is determined whether it is necessary to pull the project customization. If not, the platform's general code is used and development ends; if so, a customization directory is created and named after the project name, and customized function development and customization configuration modification are carried out. Non-customized functions are based on the platform's general function directory, and development ends.
[0042] Step 4: The incremental development code is automatically copied to the original baseline code using the compilation management script, and then compiled to generate the final target version file.
[0043] The software development method involved in this invention is cross-compilation for embedded systems. Therefore, the code needs to be cross-compiled to be transformed into an executable program that can be recognized and run by the device.
[0044] The compilation management script selects the target project to be compiled; copies all code from the platform's general function directory to the original baseline code directory, and copies all contents of the selected project directory to the original baseline code directory to obtain the new baseline code; the new baseline code is macro-expanded and compiled using the original compilation framework to generate the final target version file.
[0045] Specifically, such as Figure 4 As shown: 1. Compile and manage scripts in the incremental code repository, present them in a visual interface, select the target project to be compiled, and select project A in this example.
[0046] 2. First, copy the incremental management code. When copying, copy the platform directory first, because this directory contains all the functions supported by the platform.
[0047] 3. Next, copy the selected Project A directory. At this time, the customized functions and configurations of Project A will be copied to the baseline code directory, and the platform configuration will be overwritten. This will ensure that the configuration in the baseline code directory is based on the project customization. At the same time, the baseline directory contains all the incremental development functions supported by the platform, thus obtaining the new baseline code.
[0048] 4. In the original baseline directory, translate and expand the configuration of project A, mainly focusing on macro expansion. Using the original compilation framework, through shell and Python scripts, translate the configuration file into code-recognizable header files and compilation-recognizable files to obtain the final target file version.
[0049] At this point, the original factory baseline code directory contains all the platform's functions and all the customized functions and configurations of Project A. Any modifications not made to Project A will also be based on the platform.
[0050] The process of upgrading the original factory baseline using the method of this invention involves iterating the original factory baseline, evaluating it based on project needs and the original factory's change log, and determining which parts need to be upgraded. The new baseline code is then directly pushed to the repository storing the original factory baseline code without manual merging. Subsequently, the new baseline and the incremental development code repository are compared, and the modifications are merged. As can be seen, only the incrementally modified parts are identified during the comparison, thus greatly improving merging efficiency.
[0051] Specific steps are as follows Figure 5 As shown: 1. Determine if the baseline code needs to be upgraded. If not, end the baseline upgrade process. 2. If it is necessary to upgrade the baseline code, push the new baseline code to the original baseline repository and compare the original baseline repository with the incremental development repository; 3. Determine if the original factory modification points have been merged. If so, merge the original factory incremental changes. If not, proceed to the next step. 4. Determine if the original factory modification points have been merged. If yes, end the baseline upgrade process. If not, return to step 3 and repeat steps 3 and 4 until the original factory modification points have been merged.
[0052] That is, the incremental development method of the present invention can reduce the workload when upgrading the baseline.
[0053] The method of this invention improves code reusability, reduces various maintenance costs for enterprises, and enables unified and convenient management of numerous customer customizations through macro control.
[0054] This embodiment also provides an incremental development system for modular software. In terms of code management, it provides a Git code hosting module. Modular software typically uses Git as a code management method during development. In this invention, in order to achieve incremental development and facilitate maintenance, two Git repositories are used to maintain and manage the software code.
[0055] In this invention, the Git code hosting module includes two separately managed code repositories: an incremental development repository and a factory baseline repository. The incremental development repository is used for incremental development, while the factory baseline repository is used to store the original code baseline without any modifications.
[0056] like Figure 6 As shown, this incremental development system architecture 9 also includes: The compilation management module 1 includes a visual management module 6, an incremental code copying module 7, and a macro control management module 8. The visual management module is responsible for calling the visual plugin and presenting a visual interface for project selection. After selecting a project, the incremental code copying module performs a copying operation on the macro control and function code of the corresponding project and sends the copied code to the original baseline repository. The macro control management module compiles the relevant baseline code and generates the target version file.
[0057] Visualization plugin module 2 is used to display the corresponding operation interface according to the commands of the compilation management module.
[0058] Platform Module 3 contains all the platform's common functional module code, kernel development code, baseline incremental modification code, functional module macro control files, platform project common configuration files, etc.
[0059] Minimal system module 4 contains minimal adaptations to the baseline code (including platform adaptation development code, macro control files, and project-customized configuration files) to ensure that the baseline version can run normally on the project hardware. This minimal system version facilitates the comparison and verification of the original and developed functions.
[0060] Project Customization Module 5 is a customer-customized project derived from the platform project (customized modular software projects are often incrementally customized on top of the platform). It includes custom-developed functional module code, project-customized macro control management files, and project-customized configuration files. This module does not include platform-wide general configurations and functions; the unmodified parts of the customized project will conform to the platform's specifications.
[0061] The incremental development method and system architecture proposed in this application for communication module software development bring the following benefits: 1. It can greatly improve code reusability, enabling synchronous maintenance and management for multiple clients with a single codebase; for customized projects for multiple clients, it can increase management and maintenance costs by at least 50%.
[0062] 2. Visualized compilation reduces the error rate of manual operation; for multi-customer customized projects, it reduces the error rate of manual operation by at least 30%.
[0063] 3. Reduces the enormous workload of upgrading the chip manufacturer's baseline; improves work efficiency by at least 80% and reduces code risk by more than 70% when upgrading the baseline.
[0064] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Other variations and modifications are possible without departing from the technical solutions described in the claims.
Claims
1. A method of incremental development of modular software, characterized by, Includes the following steps: S1: Based on the new chip platform, create an incremental development repository and an original manufacturer baseline repository. Develop in the incremental development repository and leave the original manufacturer baseline repository unchanged. S2: Obtain the original manufacturer's baseline code from the chip manufacturer and upload the obtained original manufacturer's baseline code to the original manufacturer's baseline repository; S3: In the incremental development repository, add compilation management scripts and macro control management files, and divide the directory into platforms and derivative projects; S4: Automatically copy the incrementally developed code to the original factory baseline code using the compilation management script, and compile it: First, copy the platform directory, copy the customized functions and configurations of the selected project to the baseline code directory, and overwrite the platform configuration. In the original factory baseline directory, translate and expand the project configuration, and use the original factory compilation framework to translate the configuration file into a code-recognizable header file and a compilation-recognizable file to obtain the final target file version. After iterating on the original manufacturer's baseline, an evaluation is conducted in conjunction with the original manufacturer's change log: S4.1: If the baseline code needs to be upgraded, push the new baseline code to the original baseline repository and compare the original baseline repository with the incremental development repository: S4.2: Determine whether the original factory modification points have been merged. If so, merge the original factory incremental changes; otherwise, execute S4.
3. S4.3: Determine whether the original factory modification points have been merged. If yes, end the baseline upgrade process; otherwise, repeat S4.2 and S4.3 until the original factory modification points have been merged.
2. The incremental development method for module software according to claim 1, characterized in that, The specific steps of step S1 are as follows: S1.1: New project approval; S1.2: Create a platform general function catalog in the incremental development repository for function development; S1.3: Determine whether the sub-function modifies the original factory baseline code, create a directory based on the determination result, and add macro control code.
3. The incremental development method for module software according to claim 2, characterized in that, Step S1.3 is further expressed as follows: A: If the sub-function modifies the original factory baseline code, create a directory identical to the original factory baseline code, copy the original factory baseline code to be modified to the same directory as the original factory baseline code, make incremental modifications to the original factory baseline code, add macro control code in the incremental development repository, and the development is complete; B: If the sub-function does not modify the original factory baseline code, create the corresponding functional module directory, carry out new functional development, add macro control code to the new function, and the development is complete.
4. The incremental development method for module software according to claim 1, 2, or 3, characterized in that, Step S3 further includes: S3.1: Platform-derived customized project initiation; S3.2: Analyze project requirements and list the customized content for incremental development; S3.3: Determine whether project customization needs to be retrieved. If not, use the platform's general code and development ends. S3.4: If project customization is required, create a customization directory named after the project, develop customized functions and modify customized configurations. Non-customized functions use the platform's general function directory, and development is complete.
5. The incremental development method for module software according to claim 1, characterized in that, The specific steps of step S4 are as follows: S4.1: Compilation management script, select the target project to be compiled; S4.2: Copy all code from the platform's general function directory to the original factory baseline code directory, and copy all contents of the selected project directory to the original factory baseline code directory to obtain the new baseline code; S4.3: Expand the new baseline code using macros and compile it using the original compiler framework to generate the final target version file.
6. An incremental development system for modular software, employing the incremental development method for modular software as described in any one of claims 1-5, characterized in that, include: The Git code hosting module is used for the maintenance and management of software code. The compilation management module calls the visualization plugin module to select projects and compile code, generating the final target version file; The visualization plugin module displays the corresponding operation interface based on the commands from the compilation management module; The platform module stores all code and files common to the platform. The minimum system module contains minimal adaptations to the baseline code, including platform adaptation development code, macro control files, and project-customized configuration files; To ensure the baseline version runs normally on the project hardware, and to compare and verify the original and developed functions; The project customization module is a customized project derived from the storage platform project.
7. The incremental development system for module software according to claim 6, characterized in that, The Git code hosting module includes an incremental development repository for incremental development and a factory baseline repository for storing the original baseline code without any modifications.
8. The incremental development system for module software according to claim 7, characterized in that, The compilation management module includes: The visual management module allows for the invocation of visual plugin modules and the selection of projects. The incremental code copying module copies the macro control and function code of the selected project and sends the copied code to the original baseline repository. The macro control management module compiles the baseline code and generates the final target version file.
9. An incremental development system for module software according to claim 6, 7, or 8, characterized in that, The code stored within the platform includes functional module code, kernel development code, and baseline incremental modification code. The stored files include functional module macro control files and platform project general configuration files. The code stored in the project customization module includes functional module code developed for customer customization. The stored files include project customization macro control management files and project customization configuration files.