Method for managing C + + software module based on time point
Patent Information
- Application Number
- CN202410872177.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-10-01
AI Technical Summary
[0004]在代码管理领域以及软件开发领域,已有不少对软件版本和模块依赖关系进行管理的工具和方法,但是结合我们使用的情况,没有完全合适的方法可以支持对我们的C++模块及其依赖关系进行有效的管理
1.通过统一的配置信息文件定义模块间的依赖关系,使用时,只指定直接使用的模块,仓库管理工具按照依赖关系获取对应的间接依赖模块。
Smart Images

Figure CN118733098A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software development, and in particular to a method for managing C++ software modules based on time points. Background Art
[0002] In the software development process, the rationality of software structure design and the reusability of software reflect the maturity of software design and development capabilities, and have a great impact on the efficiency and cost of development. For a company that mainly develops software, the accumulation, reuse and upgrade of completed functions are particularly important to the company's growth.
[0003] This patented method combines actual application situations to provide a method for effectively managing program function modules developed in C++ language, so as to realize application requirements such as accumulation, reuse and upgrade of software modules; C++ functional modules, in order to improve the reuse of modules and facilitate the accumulation and improvement of the company's software development capabilities, it is a good choice to design the software system according to multi-level modules. When there are many functional modules, how to effectively manage the update, creation and use of modules becomes a key issue.
[0004] In the field of code management and software development, there are already many tools and methods for managing software versions and module dependencies. However, considering our usage, there is no completely suitable method to support the effective management of our C++ modules and their dependencies. Summary of the invention
[0005] The main purpose of the present invention is to provide a method for managing C++ software modules based on time points.
[0006] To achieve the above object, the technical solution adopted by the present invention is: A method for managing C++ software modules based on time points, comprising the steps of: S1 modularization: the component modules used by multiple application projects involved in software development are divided into multiple independent C++ modules to form a C++ module component library. The modules are divided into three types: dynamic library, static library and data definition header file. The platform modules are also divided into dynamic library modules, static library modules and modules containing only header file definitions according to the different types of C++ modules. S2 creates dependencies. Each module configures its own directly dependent modules and uses an XML file to configure the module's dependencies. In the subsequent description, the XML file becomes the module information XML. S3 manages the module repository through the module repository tool to achieve fast updates and downloads.
[0007] Furthermore, each of the modules has its own version number, and a specific version number corresponds to an update of the module. After the update, the version number of the module is incremented, and the module repository tool uses a database to record the module number and the corresponding validity period.
[0008] Furthermore, the module information xml records information such as the module's ID, name, version number, etc.
[0009] Furthermore, the release programs, source codes, and instruction documents of different versions of the module are managed in the module repository and can be accessed and obtained according to the version number. The module content of one version includes module program release information, source code, and module documents.
[0010] Furthermore, different users of the module warehouse belong to different access permission groups, and different permission groups have different access permissions to the module programs and source codes. The access permission control of the warehouse is implemented through the access permission configuration of the module files and the upload and download permission control logic in the module tools.
[0011] Furthermore, the module updating method is as follows: after the module content is updated, a new version is formed, and after the version number in the module information xml is updated, the updated module is submitted to the module warehouse using a warehouse tool.
[0012] Furthermore, when the module is used, the module dependency information is configured according to the modules directly used, and the time point for using the platform module is specified. The time point corresponds to a set of versions of each module in the platform. The module warehouse tool can be used to download the module and dependent modules from the module warehouse for use. The module warehouse tool recursively downloads all dependent modules according to the dependency relationship.
[0013] Furthermore, the information of the warehouse module includes the released program, the released module document and the corresponding source code, which are all included in the content of the module, and are updated synchronously and correspond to each other.
[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. Define the dependencies between modules through a unified configuration information file. When using, only specify the modules to be used directly. The warehouse management tool obtains the corresponding indirect dependency modules according to the dependency relationship.
[0015] 2. Get all relevant modules of a warehouse status according to the time point. For a specific time point, the warehouse, including all modules, corresponds to a relevant status. Specifying the time point for using the warehouse in the configuration file specifies the warehouse that uses the status corresponding to the time point.
[0016] 3. The module release information also includes the corresponding source code information. This correspondence ensures the traceability of the program module and the ability to flexibly support branches.
[0017] 4. Module permission management. Use permission control to control module access rights and module source code access rights to ensure module security. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a schematic diagram of version number management in an embodiment of the present invention; Figure 2 A schematic diagram of a typical dynamic library module structure of an embodiment of the present invention; Figure 3 A schematic diagram of a typical static library module structure of an embodiment of the present invention; Figure 4 An example diagram of modules, module version numbers and effective dates stored and accessed in a database of an embodiment of the present invention; Figure 5 This is an example diagram of a module path stored in FTP in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention. Example
[0020] We first create a module management library system consisting of dynamic libraries, static libraries and data definition header files. Then we divide the platform modules into dynamic library modules, static library modules and modules that only contain header file definitions according to the different types of C++ modules.
[0021] It is required that each module of the system itself is relatively independent in function and can be combined with other modules with fewer interfaces to form a loosely coupled system structure.
[0022] In order to facilitate the management of system and platform modules, we number each module according to the version. The version number is accumulated according to the module update status. When a module is updated, the module will form a new version number and the entire platform will be updated to a new status.
[0023] Definition of module effective time: Each version number of a module is effective within the valid period, which starts from the module's version update time and ends with the next version update time. Each version number of a module is effective within the valid period, which starts from the module's version update time and ends with the next version update time.
[0024] Each version of a module includes the following: release program (dynamic library dll, lib; static library lib; data definition header file, none); header file and source code; module documentation (module test documentation, module interface, release notes); A typical dynamic library module includes a release program (.lib, .dll and header files "includes"), source code files "src_files" and module documentation "Docs".
[0025] Use MySQL database to record basic information of modules and module version effective time information, etc. Use FTP to record the content corresponding to each version of the module, and use the following method to organize the module content: content type / module name / version number / content file directory. Use FTP permission management to control access rights to different module contents.
[0026] The relationship between a module's direct dependency on other modules is defined in the pop.xml file. The module's name, ID, and version number are also defined in the file. groupId indicates the platform ID information, artifactId indicates the module's ID, version indicates the module's version number, and name indicates the module's name. dependencies indicates the list of modules that the module directly depends on, where each module is identified using groupId and the module's artifactId.
[0027] Contents of pop.xml file: <project> <groupid> NG_Platform< / groupid> <artifactid> Test_Repository< / artifactid> <version> 1.0.0< / version> <name> Test platform module< / name> <dependencies> <dependency> <groupid> NG_Platform< / groupid> <artifactid> IBaseStation< / artifactid> < / dependency> < / dependencies> < / project> The module is uploaded through the warehouse management tool. By default, all modules are uploaded. You can also specify a specific module to upload separately. The upload operation uploads the corresponding module content file according to the module version number. If it is a new version, the corresponding version directory is created. At the same time, the module version and validity date information are updated.
[0028] The download of modules requires the definition of the module usage configuration file, which specifies the time point of use. At the same time, the list of modules to be used directly needs to be specified. The warehouse management tool finds the corresponding effective module based on the time point of use and the list of dependent modules, downloads the release program and header files, and recursively downloads the indirectly dependent modules based on the dependency relationship.
[0029] Contents of the configuration file when the module is downloaded: [Version] versionTime=20211020162000 branchNo=0 It should be noted that the present invention first forms a module library including several independent modules, and then realizes rapid development or rapid update of corresponding modules in a platform composed of multiple independent modules through module library management tools and dependencies between module libraries.
[0030] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A method for managing C++ software modules based on time points, comprising the steps of: S1 modularization: modularization divides the component modules used in multiple application projects involved in software development into multiple independent C++ modules to form a C++ module component library. Modules are divided into three types: dynamic libraries, static libraries, and data definition header files. Platform modules are also divided into dynamic library modules, static library modules, and modules containing only header file definitions according to the different types of C++ modules. The module management library divides modules into three types: dynamic libraries, static libraries, and data definition header files; The platform modules are also divided into dynamic library modules, static library modules and modules that only contain header file definitions according to the different types of C++ modules; S2 creates dependencies. Each module in the module management library and the platform configures its own directly dependent modules and uses XML files to configure the module's dependencies. S3 manages the module repository through the module repository tool to achieve fast updates and downloads.
2. The method for managing C++ software modules based on time points according to claim 1, characterized in that: Each of the modules has its own version number. A specific version number corresponds to an update of the module. After the update, the version number of the module is incremented. The module warehouse tool uses a database to record the module number and the corresponding validity period.
3. The method for managing C++ software modules based on time points according to claim 1, characterized in that: The xml records the module's ID, name, version number and other information.
4. The method for managing C++ software modules based on time points according to claim 1, characterized in that: The release programs, source codes and instruction documents of different versions of the module are managed in the module repository and are accessed and obtained according to the version number. The module content of one version includes module program release information, source code and module documents.
5. The method for managing C++ software modules based on time points according to claim 1, characterized in that: Different users of the module warehouse belong to different access permission groups. Different permission groups have different access permissions to the module programs and source codes. The access permission control of the warehouse is implemented through the access permission configuration of the module files and the upload and download permission control logic in the module tools.
6. The method for managing C++ software modules based on time points according to claim 1, characterized in that: The module update method is as follows: after the module content is updated, a new version is formed, and after the version number in the module information xml is updated, the updated module is submitted to the module warehouse using a warehouse tool.
7. The method for managing C++ software modules based on time points according to claim 1, characterized in that: When the module is used, the module dependency information is configured according to the modules directly used, and the time point for using the platform module is specified. This time point corresponds to a set of versions of each module in the platform. The module warehouse tool can be used to download the module and dependent modules from the module warehouse for use. The module warehouse tool recursively downloads all dependent modules according to the dependency relationship.
8. The method for managing C++ software modules based on time points according to claim 1, characterized in that: The information of the warehouse module includes the released program, the released module document and the corresponding source code. These parts are all included in the content of the module, and are updated synchronously and correspond to each other.
Citation Information
Cited By
C + + software dependency management and automatic construction tool
CN119938124A
A C++ software dependency management and automatic build tool
CN119938124B
