WO2021174830A1 - 多模块系统代码版本的管理方法、装置和计算机设备 - Google Patents

多模块系统代码版本的管理方法、装置和计算机设备 Download PDF

Info

Publication number
WO2021174830A1
WO2021174830A1 PCT/CN2020/118544 CN2020118544W WO2021174830A1 WO 2021174830 A1 WO2021174830 A1 WO 2021174830A1 CN 2020118544 W CN2020118544 W CN 2020118544W WO 2021174830 A1 WO2021174830 A1 WO 2021174830A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
version number
version
information
updated
Prior art date
Application number
PCT/CN2020/118544
Other languages
English (en)
French (fr)
Inventor
皮浩
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021174830A1 publication Critical patent/WO2021174830A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • This application relates to the field of data processing technology, and in particular to a method, device and computer equipment for managing code versions of a multi-module system.
  • the computer software system in the prior art usually includes multiple functional modules.
  • the code version of each module needs to be managed so that the system can release a specified version of the code at any time.
  • code version management of a multi-module system there are currently two main methods:
  • different permissions cannot be set according to different modules, and the code blocks of different departments cannot be managed separately, and the exposure scope of different module codes cannot be effectively controlled, which increases the risk of operation management.
  • each module is divided into different warehouses for management, and the version numbers are independent of each other, which solves the authority problem of centralized management and the coupling problem between code blocks.
  • the inventor found that the version number between the code blocks of each module in this method Without correlation, it is impossible to roll back the entire system to a certain historical function point.
  • a multi-module system code version management method, device, and computer equipment are provided to better manage the multi-module system code version, so that the management between the modules can be independent of each other and can be easily rolled back. It has become a technical problem that needs to be solved urgently in this field.
  • the purpose of this application is to provide a multi-module system code version management method, device, and computer equipment, which are used to solve the inconvenience of the code version management method of the separated multi-module system in the prior art to make the entire system roll back to the same historical node. technical problem.
  • this application provides a method for managing code versions of a multi-module system.
  • the multi-module system includes at least a first module and a second module
  • the management method includes: when the first module is updated, determining the version number of the first version number and the second version number with the newer version sequence, wherein the first version The number is the current version number of the first module, and the second version number is the current version number of the second module; update the newer version number in the version order according to the version order rules to obtain the third version number; and determine the updated version number of the first module
  • the version number is the third version number.
  • this application provides a device for managing code versions of a multi-module system.
  • the multi-module system includes at least a first module and a second module
  • the management device includes: a first determining module, configured to determine the newer version of the first version number and the second version number when the first module is updated Version number, where the first version number is the current version number of the first module, and the second version number is the current version number of the second module; the update module is used to update the newer version number in the version order according to the version order rule to obtain The third version number; and the second determining module, configured to determine that the updated version number of the first module is the third version number.
  • the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor implements a multi-module system when the computer program is executed.
  • a code version management method wherein the system includes at least a first module and a second module, and the management method includes: when the first module is updated, determining the version number of the first version number and the second version number with the newer version sequence, wherein , The first version number is the current version number of the first module, and the second version number is the current version number of the second module; update the newer version number in the version order according to the version order rule to obtain the third version number; and determine the first The updated version number of the module is the third version number.
  • this application also provides a computer-readable storage medium on which a computer program is stored.
  • the management method of the first module and the second module includes: when the first module is updated, determining the version number of the first version number and the second version number in the order of the newer version, where the first version number is the current version of the first module
  • the second version number is the current version number of the second module
  • the newer version number is updated according to the version order rule to obtain the third version number
  • the updated version number of the first module is determined to be the third version number.
  • the code version management method, device and computer equipment of a multi-module system provided in this application.
  • the version number corresponding to the module is checked. renew.
  • the latest version number of the version sequence is determined from the current version numbers of all modules, and then on the basis of the latest version number of the version sequence, the update is performed according to the version sequence update rule, and the obtained update
  • the version number of the update module it can be seen that each module of the system has its own version number, and each module can be managed independently of each other.
  • the version number of each module is related to each other.
  • the obtained version numbers are all updated on the basis of the latest version number in the current version sequence, so when the system needs to roll back to a certain node, for example, when a certain module of the system is rolled back to the node where a certain version number is located , You can use this version number as a benchmark, and obtain the version of other modules that is not higher than this version number and closest to this version number, and you can get the versions of all modules of the system at the rollback node, which facilitates the rollback of the system.
  • FIG. 1 is a flowchart of a method for managing code versions of a multi-module system provided in Embodiment 1 of this application;
  • FIG. 2 is a flowchart of a method for managing code versions of a multi-module system provided in Embodiment 2 of the application;
  • FIG. 3 is a flowchart of a method for managing code versions of a multi-module system provided in Embodiment 3 of this application;
  • FIG. 4 is a flowchart of a method for managing code versions of a multi-module system provided in Embodiment 4 of this application;
  • FIG. 5 is a flowchart of a method for managing code versions of a multi-module system provided in Embodiment 5 of the application;
  • FIG. 6 is a flowchart of a method for managing code versions of a multi-module system provided by Embodiment 6 of this application;
  • Fig. 7 is a block diagram of a device for managing code versions of a multi-module system provided in the seventh embodiment of the application;
  • FIG. 8 is a hardware structure diagram of a computer device provided in Embodiment 8 of this application.
  • the system code version management includes at least two modules.
  • the latest version number in the version sequence find the latest version number in the version sequence, and then update the latest version number in the version sequence according to the version sequence rules to obtain the updated version number, and use the updated version number as the update module Version number.
  • Each module of the system has a version number.
  • Each module can be managed independently.
  • the version number of each module is related to each other. When any module is updated, it will be based on the latest version number in the current version sequence.
  • the first embodiment of the present application provides a method for managing code versions of a multi-module system.
  • the management method is aimed at system code version management including at least two modules.
  • a system including a first module and a second module is taken as an example Description, it should be noted that the system is not limited to include two modules, and the "first" and "second" in the first module and the second module are only used to distinguish the two modules, and do not constitute a restriction on the order .
  • the first module and the second module have their own version numbers, so that the first module and the second module can be managed independently, and at the same time, only if the module is updated, the module will get a new version number.
  • FIG. 1 is a flowchart of a method for managing code versions of a multi-module system provided in the first embodiment of this application.
  • the method for managing code versions of a multi-module system provided in this embodiment includes the following steps S101 to Step S103.
  • Step S101 When the first module is updated, determine the version number with the newer version sequence among the first version number and the second version number.
  • the initial version number of each module in the system can be set to a unified initial version number.
  • a module in the system is updated, its version number will be updated accordingly.
  • the updated version number of the module and the corresponding updated code block are recorded.
  • a management table is set to record each update. For different modules, set the code warehouse to store the updated code blocks.
  • the first version number is the current version number of the first module
  • the second version number is the current version number of the second module
  • the first module when the first module is updated, obtain the current version numbers of the first module and the second module, that is, obtain the latest version of the first module and the second module so far
  • the number is defined as the first version number and the second version number respectively, and then according to the version sequence rules, the version number of the first version number and the second version number, which is the newer version sequence, is determined.
  • the version order rules can be predefined, for example, the version number includes a single natural number, the larger the number, the newer the version; another example, the version number includes a single letter, according to the sorting method from a to z, the lower the letter, the version
  • the version number includes at least two sub-information, and each sub-information corresponds to an update level.
  • the sub-information corresponding to the same update level can be a single natural number or a single letter.
  • each module of the system uses the version sequence rule to update the version number.
  • the version sequence rule is used to compare the first version number and the second version number to determine the version number with the newer version sequence.
  • Step S102 Update the newer version number in the version order according to the version order rule to obtain the third version number.
  • a certain version number includes four sub-information, each sub-information includes a letter, and the initial version number is a.a.a.a. From left to right, they correspond to the first to fourth update levels, where the first update level is the highest level, and the fourth update level is the lowest level.
  • the updated update level is updated in sequence, the update level higher than the updated update level is not changed, and the update level lower than the updated update level is set to a.
  • the first version number is a.a.a.c
  • the second version number is a.a.b.a
  • the version number with the newer version sequence of the first version number and the second version number is the second version number, that is, a.a.b.a.
  • the third version number is obtained as a.b.a.a.
  • Step S103 Determine that the updated version number of the first module is the third version number.
  • the version number corresponding to the module is updated.
  • the latest version number of the version sequence is determined from the current version numbers of all modules, and then on the basis of the latest version number of the version sequence, the update is performed according to the version sequence update rule, and the obtained update
  • the version number of the update module it can be seen that each module of the system has its own version number, and each module can be managed independently of each other. At the same time, the version number of each module is related to each other.
  • the obtained version numbers are all updated on the basis of the latest version number in the current version sequence, so when the system needs to roll back to a certain node, for example, when a certain module of the system is rolled back to the node where a certain version number is located , You can use this version number as a benchmark, and obtain the version of other modules that is not higher than this version number and closest to this version number, and you can get the versions of all modules of the system at the rollback node, which facilitates the rollback of the system.
  • FIG. 2 is a flowchart of a method for managing code versions of a multi-module system provided in the second embodiment of the application. As shown in FIG. 2, the method for managing code versions of a multi-module system provided in the second embodiment includes the following step S201 Go to step S208.
  • Step S201 When the first module is updated, the current version number of the first module is obtained to obtain the first version number, and the current version number of the second module is obtained to obtain the second version number.
  • Step S202 Determine the version number of the first version number and the second version number that is the newer in the version order according to the version order rule.
  • the version number includes at least two sub-information, and each sub-information corresponds to an update level. Different update levels can be updated at the same time, or only part of the update levels can be updated.
  • a separator is set between the sub-information, that is, between two adjacent separators is a sub-information.
  • the version number includes n separators
  • the version number includes n+1 sub-information
  • the version number has n+1 update levels
  • the data format of the sub-information is predefined, and the number of sub-information included in the version number is determined according to the data format, so that the update level included in the version number can be determined, for example, the data format of the predefined sub-information
  • the data format is a single letter, and when the version number includes 5 letters, it can be determined that the version number includes 5 sub-information, and then the 5 update levels included in the version number can be determined.
  • Step S203 Determine the update level of the first module update.
  • the corresponding relationship between update content and update level is preset, and different update content can correspond to different update levels.
  • the update content is the first content
  • the first content in the corresponding version number An update level, so when the first content in the first module is updated, the first update level is the update level that needs to be updated;
  • the update content is the second content, it corresponds to the second update level in the version number, so that the first update level is the second update level in the version number.
  • the second update level is the update level that needs to be updated; through the update content updated by the first module, the update level of the first module update can be determined in the correspondence relationship; or, optionally After the first module is updated, the original name of the code block includes the update identifier, and the update identifier includes the update level.
  • the update level of the first module can be determined by reading the original name of the code block after the update of the first module.
  • Step S204 Obtain the sub-information corresponding to the determined update level in the version number with the newer version sequence to obtain the sub-information to be updated.
  • the sub-information corresponding to the determined update level can be obtained in the version number with the newer version sequence.
  • the version number includes three sub-information, the value of each sub-information is a number, the first sub-information corresponds to the first update level, the second sub-information corresponds to the second update level, and the third sub-information corresponds to the third update level.
  • the version number with the newer version sequence is 2.1.3, and the determined update level is the second update level.
  • the sub-information corresponding to the second update level is 1, that is, to be updated
  • the sub information is 1.
  • Step S205 The sub-information to be updated is increased by a preset increment to obtain the updated sub-information.
  • the preset increment is 1, when the sub-information to be updated is 1, after the preset increment is increased, the updated sub-information obtained is 2.
  • Step S206 If the sub-information to be updated is the lowest update level, the sub-information to be updated in the version number with the newer version sequence is replaced with the update sub-information to obtain the third version number.
  • Step S207 If the sub-information to be updated is not the lowest update level, replace the sub-information to be updated in the newer version number with the updated sub-information, and set all the sub-information whose update level is lower than the sub-information to be updated For the initial sub-information, get the third version number.
  • the sub-information to be updated is the intermediate update level, not the lowest update level.
  • the initial sub-information is set to 1
  • the third version number is 2.2.1, which is the intermediate update level. Update to 2 and set the lowest update level to 1.
  • the sub-information to be updated is the highest update level, not the lowest update level.
  • the initial sub-information is set to 1
  • the third version number is 3.1.1, that is, the highest update level Update to 3, set both the middle update level and the lowest update level to 1.
  • Step S208 Determine that the updated version number of the first module is the third version number.
  • the set version number includes multiple sub-information corresponding to multiple update levels, and the association relationship between the version numbers of each module can not only facilitate the rollback of the system, but also reflect Show the updated level of each version relative to the previous version.
  • FIG. 3 is a flowchart of a method for managing code versions of a multi-module system provided in the third embodiment of the application. As shown in FIG. 3, the method for managing code versions of a multi-module system provided in the third embodiment includes the following step S301 Go to step S309.
  • Step S301 When the first module and the second module are updated at the same time, obtain the information in the last version record in the management table, and create a new version record in the management table.
  • the management table of the preset code version will form a version record in the management table every time there is an update in the system.
  • the version record includes the version number corresponding to each module and the version number corresponding to the system as a whole.
  • the version record includes the version number of the first module, the version number of the second module, and the version number of the system.
  • the version number of the first module is defined as the first information
  • the version number of the second module is defined as the second information
  • the version number of the system is defined as the third information.
  • the simultaneous update of the first module and the second module is taken as an example for description.
  • a write operation can be performed on the management table to create a new version record in the management table.
  • the step of creating a new version record in the management table can be set at any position before the following step S306, which is not limited in this application.
  • Step S302 Obtain the third information in the last version record, and obtain the newer version number in the first version number and the second version number.
  • the first information obtained that is, the current version number of the first module
  • the second obtained Information that is, the current version number of the second module
  • the version number of the system will be updated to the highest version number of all modules. Therefore, in the same version record, The version number of the system is also the latest version number in the current version number of all modules. Therefore, in this step, the third information in the last version record is obtained, and the version number of the first version number and the second version number, which is the newer in the version order, can be obtained.
  • Step S303 Update the newer version number in the version order according to the version order rule to obtain the third version number.
  • Step S304 Determine whether the first module and the second module meet the preset association relationship.
  • an association relationship or an independent relationship between the first module and the second module is preset, for example, the functions of the first module and the second module are dependent on each other, When one of them is updated, the other must be updated at the same time based on functional dependency, then the first module and the second module meet the association relationship; another example, the functions of the first module and the second module are completely independent of each other, and there is no overlap. Impact, the first module and the second module do not satisfy the association relationship.
  • preset a pair of module identifications that meet the association relationship and when determining whether the first module and the second module meet the preset association relationship, determine whether the module identification of the first module and the module bid of the second module belong to If a certain module identification pair belongs to, the first module and the second module satisfy the preset association relationship, otherwise they are not satisfied.
  • Step S305 When the first module and the second module meet the preset association relationship, it is determined that the updated version numbers of the first module and the second module are both the third version number.
  • Step S306 In the newly created version record, set the first information, the second information and the third information to be the third version number.
  • the version number of the system is the highest version number of all modules currently.
  • Step S307 When the first module and the second module do not satisfy the preset association relationship, the third version number is updated according to the version order rule to obtain the fourth version number.
  • step S303 when two updates in the system do not meet the preset association relationship, an update is performed in step S303, and the third version number is obtained as the updated version number of the first module, and then in step S307, the third version is updated. The number is updated once, and the fourth version number is obtained as the updated version number of the second module.
  • the version number is updated, an update level is required to determine which sub-information to update, the module that determines the update level during the update is the module to which the updated version number belongs, for example, when the update is performed first in step S303 According to the update level of the first module, the obtained third version number is the updated version number of the first module.
  • the update in step S307 is based on the update level of the second module, and the obtained fourth version is The version number is the updated version number of the second module.
  • Step S308 Determine that the updated version number of the first module is the third version number, and determine that the updated version number of the second module is the fourth version number.
  • Step S309 In the newly created version record, set the first information as the third version number, and set both the second information and the third information as the fourth version number.
  • the version number can reflect the update process of different code blocks.
  • the version number can not only reflect the sequential update process of different modules, but also reflect whether mutually dependent modules are updated at the same time. .
  • a version record corresponds to a system version, which can further facilitate the system to roll back to the node where a certain version number is located.
  • FIG. 4 is a flowchart of a method for managing code versions of a multi-module system provided in the fourth embodiment of the application. As shown in FIG. 4, the method for managing code versions of a multi-module system provided in the fourth embodiment includes the following step S401 Go to step S405.
  • Step S401 When the first module is updated, obtain the information in the last version record in the management table, and create a new version record in the management table.
  • the current version number of the first module obtains the first version number
  • the current version number of the second module obtains the second version number
  • Step S402 Obtain the third information in the last version record, and obtain the version number with the newer version sequence among the first version number and the second version number.
  • Step S403 Update the newer version number in the version order according to the version order rule to obtain the third version number.
  • Step S404 Determine that the updated version number of the first module is the third version number.
  • Step S405 In the newly created version record, the first information and the third information are respectively set as the third version number, and the second information is set as the second version number.
  • the management table is set, and the version record is set in the management table for each update, so that a version record corresponds to a system version, which can further facilitate the system rollback to The node where a certain version number is located.
  • the latest version number in the version sequence of the current version numbers of each module can be obtained through the management table.
  • the fifth embodiment of the present application provides a method for managing code versions of a multi-module system. Some steps of the method for managing code versions of a multi-module system correspond to the steps in the above-mentioned embodiment. These steps are described in this embodiment. It will not be repeated, and for details, please refer to the above-mentioned various embodiments.
  • the execution body of the method may be a management platform of a multi-module system code version, which provides a front end for interacting with users, a server back end for data processing, and a storage device for data storage.
  • the execution body of the method is At the back end of the server, the storage device can be used to store version numbers and code warehouses. Specifically, FIG.
  • the method for managing code versions of a multi-module system provided in the fifth embodiment includes the following steps S501 Go to step S509.
  • Step S501 Receive a code block to be stored.
  • the management platform provides a receiving channel for receiving the code block to be stored through the interactive front end. Based on the receiving channel, the system developer can upload the code block to be stored to the management platform, and the server backend receives the stored code block through the interactive front end.
  • Step S502 Determine the module corresponding to the code block to be stored in the system.
  • the management platform provides a module selection interface through the interactive front end, and multiple option controls are set on the module selection interface.
  • Each option control corresponds to a module, and the user can select the corresponding code block to be stored.
  • the back end of the server can determine the module corresponding to the code block to be stored in the system according to the module selection operation received by the module selection interface.
  • the corresponding relationship between the server back-end preset module and the identification information, the code block to be stored uploaded by the user includes the identification information, when the user uploads the code block to be stored, the server post The terminal obtains the identification information of the code block to be stored, so that the module corresponding to the code block to be stored can be determined in the system according to the identification information.
  • Step S503 When the module corresponding to the code block to be stored is the first module, it is determined that the first module is updated.
  • Step S504 Obtain the current version number of the first module to obtain the first version number, and obtain the current version number of the second module to obtain the second version number.
  • Step S505 Determine the version number of the first version number and the second version number, which is newer in the version order according to the version order rule.
  • Step S506 Update the newer version number in the version order according to the version order rule to obtain the third version number.
  • Step S507 Determine that the updated version number of the first module is the third version number.
  • Step S508 Name the code block to be stored according to the third version number.
  • Step S509 Store the code block to be stored in the code warehouse corresponding to the first module.
  • the sixth embodiment of the present application provides a method for managing code versions of a multi-module system. Some steps of the method for managing code versions of a multi-module system are the same as those in the above-mentioned embodiment. These steps are described in this embodiment. It will not be repeated, and for details, please refer to the above-mentioned various embodiments.
  • the execution body of the method may be a management platform of a multi-module system code version, which provides a front end for interacting with users, a server back end for data processing, and a storage device for data storage.
  • the execution body of the method is At the back end of the server, the storage device can be used to store version numbers and code warehouses. Specifically, FIG.
  • FIG. 6 is a flowchart of a method for managing code versions of a multi-module system provided in the sixth embodiment of the application. As shown in FIG. 6, the method for managing code versions of a multi-module system provided in the sixth embodiment includes the following step S601 Go to step S615.
  • Step S601 Receive the code block to be stored.
  • Step S602 Obtain the last version record in the management table, and obtain the version number of the system in the last version record to obtain the latest version number in the version sequence of each module of the system, and create a new version record in the management table.
  • Step S603 Determine the module corresponding to the code block to be stored in the system.
  • Step S604 When the to-be-stored code block is single and the module corresponding to the to-be-stored code block is the first module, update the newer version number in the version order according to the version order rule to obtain the third version number.
  • Step S6041 Determine the update level of the code block update of the first module.
  • Step S6042 Obtain the sub-information corresponding to the determined update level in the version number with the newer version sequence, and obtain the sub-information to be updated.
  • Step S6043 The sub-information to be updated is increased by a preset increment to obtain the updated sub-information.
  • Step S6044 If the sub-information to be updated is the lowest update level, the sub-information to be updated in the version number with the newer version sequence is replaced with the update sub-information to obtain the third version number.
  • Step S6045 If the sub-information to be updated is not the lowest update level, use the update sub-information to replace the sub-information to be updated in the version number with the newer version sequence, and set all the sub-information whose update level is lower than the sub-information to be updated For the initial sub-information, get the third version number.
  • Step S605 Determine that the updated version number of the first module is the third version number.
  • Step S606 In the newly created version record, set the version number of the first module and the system version number as the third version number respectively, and set the version numbers of other modules to correspond to the version numbers in the last version record.
  • Step S607 Name the code block to be stored according to the third version number, and store the code block to be stored in the code warehouse corresponding to the first module.
  • Step S608 When there are two code blocks to be stored, the module corresponding to the first code block to be stored is the first module, and the module corresponding to the second module to be stored is the second module, it is determined whether the first module and the second module meet the requirements The preset association relationship.
  • Step S609 When the first module and the second module meet the preset association relationship, update the version number with the newer version sequence according to the version sequence rule to obtain the third version number.
  • step S609 the process of obtaining the third version number in this step S609 is the same as the process of obtaining the third version number in the foregoing step S604, which will not be repeated here.
  • Step S610 Determine that the updated version numbers of the first module and the second module are both the third version number.
  • Step S611 In the newly created version record, set the version numbers of the first module, the second module and the system to be the third version number.
  • Step S612 Name the first to-be-stored code block and the second to-be-stored code block according to the third version number, store the first to-be-stored code block in the code warehouse corresponding to the first module, and store the second to-be-stored code block in the first The code warehouse corresponding to the second module.
  • Step S613 When the first module and the second module do not satisfy the preset association relationship, update the newer version number in the version order according to the version order rule to obtain the third version number, and then update the third version number according to the version order rule.
  • the fourth version number is obtained, the updated version number of the first module is determined to be the third version number, and the updated version number of the second module is determined to be the fourth version number.
  • step S613 the process of obtaining the third version number in this step S613 is the same as the process of obtaining the third version number in the foregoing step S604, and will not be repeated here.
  • the step of obtaining the fourth version number in step S613 includes:
  • Step S6131 Determine the update level of the code block update of the second module.
  • Step S6132 In the third version number, obtain the sub-information corresponding to the determined update level, and obtain the sub-information to be updated.
  • Step S6133 The sub-information to be updated is increased by a preset increment to obtain the updated sub-information.
  • Step S6134 If the sub-information to be updated is the lowest update level, replace the sub-information to be updated in the third version number with the update sub-information to obtain the fourth version number.
  • Step S6135 If the sub-information to be updated is not the lowest update level, replace the sub-information to be updated in the third version number with the update sub-information, and set all the sub-information whose update level is lower than the sub-information to be updated as the initial sub-information Information, get the fourth version number.
  • the system includes three modules A, B, and C.
  • the update history of the version numbers of the code blocks of the three modules should be as follows.
  • the description for each update in the following table is as follows:
  • a module is updated, and the version number is 1.1.1.
  • the version number of the BC module remains unchanged.
  • a module is updated, and the version number is 1.1.2.
  • the version number of the BC module remains unchanged.
  • the C module is updated, and the version number is 1.3.0.
  • the version number of the AB module remains unchanged.
  • the AB module has interdependent updates, and the version number is 1.4.0.
  • the version number of the C module remains unchanged.
  • Step S614 In the newly created version record, the first information is set as the third version number, and both the second information and the third information are set as the fourth version number.
  • Step S615 Name the first code block to be stored according to the third version number, name the second code block to be stored according to the fourth version number, store the first code block to be stored in the code warehouse corresponding to the first module, and store the second code block to be stored.
  • the stored code block is stored in the code warehouse corresponding to the second module.
  • the version numbers of all modules are in order, that is, the version number assigned next time must be greater than the latest version number in the current version number of all modules, for example , The latest version order among the current version numbers of all modules is 1.4.8, then the version number assigned next time must be greater than 1.4.8.
  • the version numbers of all modules are uniformly allocated, so as to ensure that the version numbers between the modules are in order, and prevent different allocations from assigning the same version number to different modules and causing version conflicts.
  • the version number will be updated once, which can ensure that the module has a corresponding version number for each update.
  • each module can get the same version number.
  • the version number when each update, the latest version number in the current version number of all modules is used as the version number of the entire system.
  • the code version management method of the multi-module system inherits the advantages of flexible rights management when the modules are managed separately, and effectively controls the operational risks of non-module owners.
  • the department where the module is located only needs to update its own module. Independent update and release can be carried out without relying on other departments, which improves production efficiency. It also solves the problem that the version numbers are not uniform when the modules are managed separately, which is not conducive to the issue of the specified version code by the system.
  • FIG. 7 is a block diagram of an apparatus for managing code versions of a multi-module system provided in Embodiment 7 of the application. As shown in FIG. 7, the apparatus includes: a first determining module 701, an updating module 702, and a second determining module 703.
  • the multi-module system includes at least a first module and a second module.
  • the first determining module 701 is used to determine the version number with the newer version sequence among the first version number and the second version number when the first module is updated, where the first version number is the current version number of the first module, and the first version number is the current version number of the first module.
  • the second version number is the current version number of the second module;
  • the update module 702 is used to update the newer version number in the version order according to the version order rule to obtain the third version number; and the second determination module 703 is used to determine after the first module is updated
  • the version number is the third version number.
  • the version number includes at least two sub-information, and each sub-information corresponds to an update level.
  • the update module 702 includes a first determination unit, a first acquisition unit, a first processing unit, and a first update unit. And the second update unit.
  • the first determining unit is used to determine the update level of the code block update of the first module; the first obtaining unit is used to obtain the sub-information corresponding to the determined update level in the version number with the newer version sequence to obtain the Update the sub-information; the first processing unit is used to increase the sub-information to be updated by a preset increment to obtain the updated sub-information; the first update unit is used to replace the version with the updated sub-information when the sub-information to be updated is the lowest update level The sub-information to be updated in the newer version number obtains the third version number; the second update unit is used to replace the sub-information with the updated sub-information in the version number with the newer version when the sub-information to be updated is not at the lowest update level The sub-information to be updated is set as the initial sub-information to obtain the third version number.
  • the management device further includes a judging module, a third determining module, and a fourth determining module, wherein the judging module is used for judging the first module when the first module and the second module are updated at the same time Whether the second module meets the preset association relationship; the third determining module is configured to determine that the updated version number of the second module is the third version number when the first module and the second module meet the preset association relationship; The fourth determining module is used to update the third version number according to the version order rule when the first module and the second module do not meet the preset association relationship to obtain the fourth version number, and determine that the updated version number of the second module is fourth version number.
  • a code version management table is preset, and the management table includes a number of version records, and each version record includes the first information corresponding to the first module, the second information corresponding to the second module, and the system corresponding
  • the third information the management device also includes a new module, a first processing module, a second processing module, and a third processing module.
  • the new module is used to create a new version record in the management table;
  • the first processing module is used to act as the first When the module is updated and the second module is not updated, in the version record, set the first information and the third information to be the third version number, and set the second information to the second version number;
  • the second processing module is used to act as the first module When the second module is updated at the same time and the first module and the second module meet the preset association relationship, in the version record, set the first information, the second information, and the third information to be the third version number;
  • the third processing module When the first module and the second module are updated at the same time and the first module and the second module do not meet the preset association relationship, in the version record, set the first information as the third version number, and set the second information and the second information
  • the three information is the fourth version number.
  • the management device further includes a receiving module and a fifth determining module, where the receiving module is configured to determine the version number of the first version number and the second version number with the newer version order, Receiving the code block to be stored, the fifth determining module is used to determine the module corresponding to the code block to be stored in the system, wherein, when the module corresponding to the code block to be stored is the first module, it is determined that the first module is updated;
  • the module 701 includes a second obtaining unit, which is used to obtain the third information in the last version record in the management table before the step of creating a new version record in the management table, and obtain the comparison of the version order between the first version number and the second version number.
  • the management device also includes a storage module for naming the code block to be stored according to the third version number after the step of determining that the updated version number of the first module is the third version number, and storing the code block to be stored To the code repository corresponding to the first module.
  • the specific steps performed include: providing a module selection interface; obtaining the module selection received by the module selection interface Operation; confirm the module selected by the module selection operation in the system.
  • the specific steps performed include: obtaining identification information of the code block to be stored; Information module.
  • the eighth embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including independent servers, Or a server cluster composed of multiple servers) and so on.
  • the computer device 01 of this embodiment at least includes but is not limited to: a memory 011 and a processor 012 that can be communicatively connected to each other through a system bus, as shown in FIG. 8. It should be pointed out that FIG. 8 only shows the computer device 01 having the component memory 011 and the processor 012, but it should be understood that it is not required to implement all the illustrated components, and more or less may be implemented instead. Components.
  • the memory 011 (readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), Read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 011 may be an internal storage unit of the computer device 01, such as a hard disk or a memory of the computer device 01.
  • the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SMC) equipped on the computer device 01. SD) card, flash card (Flash Card), etc.
  • the memory 011 may also include both an internal storage unit of the computer device 01 and an external storage device thereof.
  • the memory 011 is generally used to store the operating system and various application software installed in the computer device 01, such as the program code of the management device of the multi-module system code version of the seventh embodiment.
  • the memory 011 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 012 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 012 is generally used to control the overall operation of the computer device 01.
  • the processor 012 is configured to run program codes or process data stored in the memory 011, for example, a method for managing code versions of a multi-module system.
  • the ninth embodiment also provides a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic Memory, magnetic disks, optical disks, servers, App application malls, etc., have computer programs stored thereon, and corresponding functions are realized when the programs are executed by the processor.
  • the computer-readable storage medium of this embodiment is used to store a management device of a multi-module system code version, and when executed by a processor, it implements the method for managing a multi-module system code version of the first embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供了一种多模块系统代码版本的管理方法、装置和计算机设备。该系统至少包括第一模块和第二模块,该管理方法包括:当第一模块更新时,确定第一版本号与第二版本号中版本顺序较新的版本号,其中,第一版本号为第一模块当前的版本号,第二版本号为第二模块当前的版本号;按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号;以及确定第一模块更新后的版本号为第三版本号。通过本申请,能够更好的进行多模块系统代码版本的管理,使得各模块之间的管理既能够相互独立又能够方便的回滚。

Description

多模块系统代码版本的管理方法、装置和计算机设备
本申请要求于2020年3月4日提交中国专利局、申请号为202010142301.3,发明名称为“多模块系统代码版本的管理方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,尤其涉及一种多模块系统代码版本的管理方法、装置和计算机设备。
背景技术
随着计算机软件系统功能的集成规模越来越大,现有技术中的计算机软件系统通常会包括多个功能模块。而当一个系统由多个功能模块组成时,就需要对各个模块的代码版本进行管理,以便于使系统随时可以发布某个指定版本的代码。针对多模块系统的代码版本管理,当前主要有两种方法:
一种是集中式。即所有模块的代码块置于同一个代码仓库中,这些模块的代码块共享一个版本号,一起打包发布。发明人发现,当系统规模增长,模块的代码块增多,不同模块分别属于不同的部门时,这种集中管理的方式会增加代码块之间的耦合。因为所有模块的代码块在同一个仓库中,每次某个模块的代码块的变动都会影响这个统一的仓库。这对于其它不需要更新的模块是一个风险。另外,在同一个代码仓库中,不能根据不同模块来设置不同的权限,便无法为不同部门的代码块进行分开管理,无法有效控制不同模块代码的暴露范围,增加了运营管理的风险。
另一种是分离式。即各模块分成不同仓库进行管理,版本号相互独立,解决了集中式管理的权限问题以及代码块之间的耦合问题,但是,发明人发现,这种方法各模块的代码块之间的版本号没有关联关系,无法做到让整个系统回滚到某个历史的功能点。
因此,提供一种多模块系统代码版本的管理方法、装置和计算机设备,以更好的进行多模块系统代码版本的管理,使得各模块之间的管理既能够相互独立又能够方便的回滚,成为本领域亟需解决的技术问题。
发明内容
本申请的目的是提供一种多模块系统代码版本的管理方法、装置和计算机设备,用于解决现有技术中分离式多模块系统的代码版本管理方法不便使整个系统回滚到同一历史节点的技术问题。
一方面,为实现上述目的,本申请提供了一种多模块系统代码版本的管理方法。
该多模块系统至少包括第一模块和第二模块,该管理方法包括:当第一模块更新时,确定第一版本号与第二版本号中版本顺序较新的版本号,其中,第一版本号为第一模块当前的版本号,第二版本号为第二模块当前的版本号;按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号;以及确定第一模块更新后的版本号为第三版本号。
另一方面,为实现上述目的,本申请提供了一种多模块系统代码版本的管理装置。
该多模块系统至少包括第一模块和第二模块,该管理装置包括:第一确定模块,用于当第一模块更新时,确定第一版本号与第二版本号中,版本顺序较新的版本号,其中,第一版本号为第一模块当前的版本号,第二版本号为第二模块当前的版本号;更新模块,用于按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号;以及第二确定模块,用于确定第一模块更新后的版本号为第三版本号。
又一方面,为实现上述目的,本申请还提供一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,该处理器执行计算机程序时实现多模块系统代码版本的管理方法,其中,系统至少包括第一模块和第二模块,管理方法包括:当第一模块更新时,确定第一版本号与第二版本号中版本顺序较新的版本号,其中,第一 版本号为第一模块当前的版本号,第二版本号为第二模块当前的版本号;按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号;以及确定第一模块更新后的版本号为第三版本号。
又一方面,为实现上述目的,本申请还提供计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现多模块系统代码版本的管理方法,其中,系统至少包括第一模块和第二模块,管理方法包括:当第一模块更新时,确定第一版本号与第二版本号中版本顺序较新的版本号,其中,第一版本号为第一模块当前的版本号,第二版本号为第二模块当前的版本号;按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号;以及确定第一模块更新后的版本号为第三版本号。
本申请提供的多模块系统代码版本的管理方法、装置和计算机设备,对于包括多个模块的系统,在系统代码开发的过程中,当其中的模块需要更新时,将该模块对应的版本号进行更新。其中,在更新版本号时,从所有模块当前的版本号中确定出版本顺序最新的版本号,然后在该版本顺序最新的版本号的基础上,按版本顺序更新规则进行更新,得到的更新后的版本号作为更新模块的版本号,从中可以看出,系统的各个模块分别具有各自的版本号,各个模块可以相互独立管理,同时,各个模块的版本号又相互关联,任何一个模块发生更新后得到的版本号,均在当前版本顺序最新的版本号的基础上更新得到,从而当系统需要回滚到某一节点时,例如回滚到系统某一模块为某一版本号所处的节点时,均可以该版本号为基准,获取其他模块不高于该版本号且最接近该版本号的版本,便可得到回滚节点处系统的所有模块的版本,方便了系统的回滚。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1为本申请实施例一提供的多模块系统代码版本的管理方法的流程图;
图2为本申请实施例二提供的多模块系统代码版本的管理方法的流程图;
图3为本申请实施例三提供的多模块系统代码版本的管理方法的流程图;
图4为本申请实施例四提供的多模块系统代码版本的管理方法的流程图;
图5为本申请实施例五提供的多模块系统代码版本的管理方法的流程图;
图6为本申请实施例六提供的多模块系统代码版本的管理方法的流程图;
图7为本申请实施例七提供的多模块系统代码版本的管理装置的框图;
图8为本申请实施例八提供的计算机设备的硬件结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供了一种多模块系统代码版本的管理方法、装置和计算机设备,在该多模块系统代码版本的管理方法中,针对包括至少两个模块的系统代码版本管理,当其中的一个模块更新时,在所有模块当前的版本号中找出版本顺序最新的版本号,然后按照版本顺序规则更新该版本顺序最新的版本号,得到更新后的版本号,将更新后的版本号作为更新模块的版本号,系统的各个模块分别具有版本号,各个模块可以相互独立管理,同时,各个模块的版本号又相互关联,任何一个模块更新时,均会在当前版本顺序最新的版本号的基础上,按照相同的版本顺序规则进行更新,从而当系统需要回滚到某一节点时,例如回滚到系统某一模块为某一版本号所处的节点时,均可以该版本号为基准,获取其他模块不高于该版本号且最接近该版本号的版本,即可得到该模块的该版本号所处节点时系统的所有模块,方便系统回滚。
关于本申请提供的多模块系统代码版本的管理方法、装置和计算机设备的实施例,将在下文中详细描述。
实施例一
本申请实施例一提供了一种多模块系统代码版本的管理方法,该管理方法针对包括至少两个模块的系统代码版本管理,在实施例中,以系统包括第一模块和第二模块为例描述,需要说明的是,系统并不限于包括两个模块,且第一模块和第二模块中的“第一”和“第二”仅用于区分两个模块,并不构成次序上的限定。通过该方法,第一模块和第二模块分别具有各自的版本号,使得第一模块和第二模块可分别各自独立管理,同时,只有要模块发生更新,该模块即会得到新的版本号,并且该新的版本号是在所有模块当前最新的版本号的基础上进行更新,使得第一模块和第二模块的版本号之间具有关联关系,方便系统回滚。具体地,图1为本申请实施例一提供的多模块系统代码版本的管理方法的流程图,如图1所示,该实施例提供的多模块系统代码版本的管理方法包括如下的步骤S101至步骤S103。
步骤S101:当第一模块更新时,确定第一版本号与第二版本号中,版本顺序较新的版本号。
系统中各模块初始的版本号可以设置为统一的初始版本号。系统中的模块发生更新时,其版本号会相应更新,在该实施例中,记录模块更新后的版本号以及对应的更新后的代码块,可选地,设置一管理表记录每次更新后的版本号,针对不同的模块,分别设置代码仓库存储更新后的代码块。
在该实施例中,第一版本号为第一模块当前的版本号,第二版本号为第二模块当前的版本号。
可选地,在一种实施例中,当第一模块更新时,获取第一模块和第二模块当前的版本号,也即,获取截至目前第一模块和第二模块已有的最新的版本号,分别依次定义为第一版本号和第二版本号,然后按照版本顺序规则,确定第一版本号与第二版本号中,版本顺序较新的版本号。
其中,可预定义版本顺序规则,例如,版本号包括单个自然数,数字越大,版本越新;又如,版本号包括单个字母,按照从a开始至z的排序方式,字母越靠后,版本越新;再如,版本号包括至少两个子信息,每个子信息对应一个更新级别,同一更新级别对应的子信息可以为单个自然数,也可以为单个字母,其中,在判断版本号的高低顺序时,从最高的更新级别进行比对,同一更新级别的数字越大(或字母越靠后),版本越新,若同一更新级别的数字(或字母)相同,则继续比对下一个更新级别。需要说明的是,以上仅例举出部分版本顺序规则,本申请并不限定于此,还可采用其他的版本顺序规则。
针对一种确定的版本顺序规则,系统各模块均使用该版本顺序规则更新版本号。在该步骤中,采用该版本顺序规则,将第一版本号和第二版本号进行比对,确定出版本顺序较新的版本号。
步骤S102:按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号。
例如,某版本号包括四个子信息,每个子信息均包括一个字母,初始版本号为a.a.a.a。由左至右,分别对应第一至第四更新级别,其中,第一更新级别为最高级别,第四更新级别为最低级别。在更新任一更新级别时,被更新的更新级别按顺序更新,比被更新的更新级别高的更新级别不做变化,比被更新的更新级别低的更新级别均置为a。
第一版本号为a.a.a.c,第二版本号为a.a.b.a,则第一版本号与第二版本号中版本顺序较新的版本号为第二版本号,也即a.a.b.a。设第一模块更新的是第二更新级别,则在该步骤中,按照版本顺序规则更新版本号a.a.b.a后,得到第三版本号为a.b.a.a。
步骤S103:确定第一模块更新后的版本号为第三版本号。
采用该实施例提供的多模块系统代码版本的管理方法,对于包括多个模块的系统,在系统代码开发的过程中,当其中的模块需要更新时,将该模块对应的版本号进行更新。其 中,在更新版本号时,从所有模块当前的版本号中确定出版本顺序最新的版本号,然后在该版本顺序最新的版本号的基础上,按版本顺序更新规则进行更新,得到的更新后的版本号作为更新模块的版本号,从中可以看出,系统的各个模块分别具有各自的版本号,各个模块可以相互独立管理,同时,各个模块的版本号又相互关联,任何一个模块发生更新后得到的版本号,均在当前版本顺序最新的版本号的基础上更新得到,从而当系统需要回滚到某一节点时,例如回滚到系统某一模块为某一版本号所处的节点时,均可以该版本号为基准,获取其他模块不高于该版本号且最接近该版本号的版本,便可得到回滚节点处系统的所有模块的版本,方便了系统的回滚。
实施例二
本申请实施例二提供了一种优选地多模块系统代码版本的管理方法,该多模块系统代码版本的管理方法的部分步骤与上述实施例一中的步骤对应相同,这部分步骤在该实施例中不再赘述,具体可参考上述实施例一。具体地,图2为本申请实施例二提供的多模块系统代码版本的管理方法的流程图,如图2所示,该实施例二提供的多模块系统代码版本的管理方法包括如下的步骤S201至步骤S208。
步骤S201:当第一模块更新时,获取第一模块当前的版本号得到第一版本号,获取第二模块当前的版本号得到第二版本号。
步骤S202:按照版本顺序规则,确定第一版本号与第二版本号中,版本顺序较新的版本号。
其中,在该实施例提供的多模块系统代码版本的管理方法中,版本号包括至少两个子信息,每个子信息对应一个更新级别,不同的更新级别可以同时更新,也可以仅更新部分更新级别。可选地,在子信息之间设置分隔符,也即相邻的两个分隔符之间为一个子信息,版本号包括n个分隔符时,版本号包括n+1个子信息,版本号具有n+1个更新级别;可选地,预定义子信息的数据格式,根据该数据格式确定版本号中包括的子信息数量,进而可确定版本号包括的更新级别,例如,预定义子信息的数据格式为单个字母,版本号包括5个字母时,即可确定版本号中包括5个子信息,进而可确定版本号包括的5个更新级别。
步骤S203:确定第一模块更新的更新级别。
可选地,在一种实施例中,预设更新内容和更新级别的对应关系,不同的更新内容可对应不同的更新级别,例如,当更新内容为第一内容时,对应版本号中的第一更新级别,从而当第一模块中的第一内容更新时,第一更新级别为需要更新的更新级别;当更新内容为第二内容时,对应版本号中的第二更新级别,从而当第一模块中的第二内容更新时,第二更新级别为需要更新的更新级别;通过第一模块更新的更新内容,在对应关系中可确定出第一模块更新的更新级别;或者,可选地,第一模块更新后,代码块的原始命名包括更新标识,该更新标识包括更新级别,则通过读取第一模块更新后代码块的原始命名即可确定第一模块更新的更新级别。
步骤S204:在版本顺序较新的版本号中,获取与确定的更新级别所对应的子信息,得到待更新子信息。
在确定更新级别后,根据子信息和更新级别的对应关系,能够在版本顺序较新的版本号中,得到与确定的更新级别所对应的子信息。例如,版本号包括三个子信息,每个子信息的值均为数字,第一位子信息对应第一更新级别,第二位子信息对应第二更新级别,第三位子信息对应第三更新级别。版本顺序较新的版本号为2.1.3,确定的更新级别为第二更新级别,则在版本号为2.1.3中,与第二更新级别所对应的子信息为1,也即,待更新子信息为1。
步骤S205:将待更新子信息增加预设增量,得到更新子信息。
例如,预设增量为1,则待更新子信息为1时,增加预设增量后,得到的更新子信息为2。
步骤S206:若待更新子信息为最低的更新级别,则利用更新子信息替换版本顺序较新 的版本号中的待更新子信息,得到第三版本号。
步骤S207:若待更新子信息不为最低的更新级别,则利用更新子信息替换版本顺序较新的版本号中的待更新子信息,并将更新级别低于待更新子信息的子信息全部设置为初始子信息,得到第三版本号。
例如,版本号为2.1.3中,待更新子信息为中间的更新级别,不为最低的更新级别,初始子信息设置为1,则第三版本号为2.2.1,也即将中间的更新级别更新为2,将最低的更新级别设置为1。版本号为2.1.2时,待更新子信息为最高的更新级别,不为最低的更新级别,初始子信息设置为1,则第三版本号为3.1.1,也即,将最高的更新级别更新为3,将中间的更新级别和最低的更新级别均设置为1。
步骤S208:确定第一模块更新后的版本号为第三版本号。
采用该实施例提供的多模块系统代码版本的管理方法,设置版本号包括对应多个更新级别的多个子信息,各个模块版本号之间的关联关系不仅能够有利于系统的回滚,而且能够体现出每一版本相对上一版本更新的级别。
实施例三
本申请实施例三提供了一种优选地多模块系统代码版本的管理方法,该多模块系统代码版本的管理方法的部分步骤与上述实施例中的步骤对应相同,这部分步骤在该实施例中不再赘述,具体可参考上述各个实施例。具体地,图3为本申请实施例三提供的多模块系统代码版本的管理方法的流程图,如图3所示,该实施例三提供的多模块系统代码版本的管理方法包括如下的步骤S301至步骤S309。
步骤S301:当第一模块和第二模块同时更新时,在管理表中获取最后一条版本记录中的信息,并在管理表中新建一条版本记录。
其中,预设代码版本的管理表,系统中每发生一次更新,均会在管理表中形成一条版本记录,该版本记录包括每个模块对应的版本号和系统整体对应的版本号。在该实施例中,以系统包括第一模块和第二模块为例,版本记录包括第一模块的版本号、第二模块的版本号和系统的版本号。其中,在管理表中,第一模块的版本号定义为第一信息,第二模块的版本号定义为第二信息,系统的版本号定义为第三信息。
当发生模块更新时,首先在管理表中获取最后一条版本记录的信息,以得到各个模块当前已有的最新的版本号以及系统当前的版本号。在该实施例中,以第一模块和第二模块同时更新为例进行说明。
可选地,在读管理表中版本记录之后,可对管理表进行写操作,在管理表中新建一条版本记录。当然,在管理表中新建版本记录的步骤可设置于下述步骤S306之前的任意位置,本申请对此并不限定。
步骤S302:获取最后一条版本记录中的第三信息,得到第一版本号与第二版本号中,版本顺序较新的版本号。
当第一模块和第二模块同时更新时,在管理表的最后一条版本记录中,获取到的第一信息,也即第一模块当前的版本号,作为第一版本号;获取到的第二信息,也即第二模块当前的版本号,作为第二版本号,而由于任意模块发生更新时,系统的版本号均会更新为所有模块最高的版本号,因而,在同一条版本记录中,系统的版本号也即所有模块当前版本号中版本顺序最新的版本号。因此,在该步骤中,获取最后一条版本记录中的第三信息,即可得到第一版本号与第二版本号中,版本顺序较新的版本号。
步骤S303:按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号。
步骤S304:判断第一模块与第二模块是否满足预设的关联关系。
可选地,根据第一模块和第二模块的业务功能,预置第一模块和第二模块之间属于关联关系或相互独立的关系,例如,第一模块和第二模块的功能相互依赖,其中之一发生更新时,另一必然基于功能依赖而同时需要更新,则第一模块和第二模块满足关联关系;又如,第一模块和第二模块的功能相互完全独立,没有交集互不影响,则第一模块与第二模 块不满足关联关系。
或者,可选地,预设满足关联关系的模块标识对,在判断第一模块与第二模块是否满足预设的关联关系时,判断第一模块的模块标识和第二模块的模块标书是否属于某一模块标识对,若属于,则第一模块与第二模块满足预设的关联关系,否则不满足。
步骤S305:当第一模块与第二模块满足预设的关联关系时,确定第一模块和第二模块更新后的版本号均为第三版本号。
通过该步骤,针对相互具有依赖关系而同时更新的模块,更新后的版本号相同。
步骤S306:在新建的版本记录中,设置第一信息、第二信息和第三信息均为第三版本号。
通过该步骤,使得系统的版本号为所有模块当前最高的版本号。
步骤S307:当第一模块与第二模块不满足预设的关联关系时,按照版本顺序规则更新第三版本号,得到第四版本号。
通过该步骤,针对相互没有依赖而同时更新的模块,先在管理表中系统的版本号的基础上更新,得到其中一个模块更新后的版本号,然后再在该更新后的版本号的基础上进一步更新,得到其中另一个模块更新后的版本号,以此类推,使得所有模块均获得更新后的版本号。
例如系统中两个不满足预设的关联关系更新时,在步骤S303中先进行一次更新,得到第三版本号作为第一模块更新后的版本号,然后在步骤S307中,再对第三版本号进行一次更新,得到第四版本号作为第二模块更新后的版本号。需要说明的是,当版本号更新时需要一句更新级别来确定更新哪一子信息时,更新时判定更新级别的模块即为更新后版本号所属的模块,例如,在步骤S303中先进行更新时依据的是第一模块的更新级别,则得到的第三版本号即为第一模块更新后的版本号,在步骤S307中进行更新时依据的是第二模块的更新级别,则得到的第四版本号即为第二模块更新后的版本号。
步骤S308:确定第一模块更新后的版本号为第三版本号,确定第二模块更新后的版本号为第四版本号。
步骤S309:在新建的版本记录中,设置第一信息为第三版本号,设置第二信息和第三信息均为第四版本号。
采用该实施例提供的多模块系统代码版本的管理方法,当系统中的两个或两个以上模块更新时,需要考虑更新模块之间的关系,如果更新模块相互依赖,也即满足预设的关联关系,则更新的模块具有相同的更新后的版本号,如果更新模块互不依赖,也即不满足预设的关联关系,则分别依次对应更新版本号,获得不同的版本号,因而,针对单个模块而言,版本号能够体现出不同代码块的更新进程,对于多个模块而言,版本号不仅能够体现出不同模块的先后更新进程,而且还能够体现出相互依赖的模块是否同时进行更新。此外,通过设置管理表,并针对每一次更新在管理表中设置版本记录,从而一条版本记录即对应一个系统的版本,能够进一步方便系统回滚至某一版本号所处的节点。
实施例四
本申请实施例四提供了一种优选地多模块系统代码版本的管理方法,该多模块系统代码版本的管理方法的部分步骤与上述实施例中的步骤对应相同,这部分步骤在该实施例中不再赘述,具体可参考上述各个实施例。具体地,图4为本申请实施例四提供的多模块系统代码版本的管理方法的流程图,如图4所示,该实施例四提供的多模块系统代码版本的管理方法包括如下的步骤S401至步骤S405。
步骤S401:当第一模块更新时,在管理表中获取最后一条版本记录中的信息,并在管理表中新建一条版本记录。
其中,在该最后一条版本记录中,第一模块当前的版本号得到第一版本号,获取第二模块当前的版本号得到第二版本号。
步骤S402:获取最后一条版本记录中的第三信息,得到第一版本号与第二版本号中, 版本顺序较新的版本号。
步骤S403:按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号。
步骤S404:确定第一模块更新后的版本号为第三版本号。
步骤S405:在新建的版本记录中,设置第一信息和第三信息分别为第三版本号,设置第二信息为第二版本号。
采用该实施例提供的多模块系统代码版本的管理方法,设置管理表,并针对每一次更新在管理表中设置版本记录,从而一条版本记录即对应一个系统的版本,能够进一步方便系统回滚至某一版本号所处的节点。同时,当系统中的单个模块更新时,可通过管理表来获得当前各个模块的版本号中版本顺序最新的版本号。
实施例五
本申请实施例五提供了一种优选地多模块系统代码版本的管理方法,该多模块系统代码版本的管理方法的部分步骤与上述实施例中的步骤对应相同,这部分步骤在该实施例中不再赘述,具体可参考上述各个实施例。该方法的执行主体可以为一种多模块系统代码版本的管理平台,该平台提供与用户交互的前端、进行数据处理的服务器后端以及实现数据存储的存储装置,其中,该方法的执行主体为服务器后端,存储装置可以用于存储版本号以及代码仓库等。具体地,图5为本申请实施例五提供的多模块系统代码版本的管理方法的流程图,如图5所示,该实施例五提供的多模块系统代码版本的管理方法包括如下的步骤S501至步骤S509。
步骤S501:接收待存储代码块。
管理平台通过交互前端提供接收待存储代码块的接收通道,系统开发人员可基于该接收通道,向管理平台上传待存储的代码块,服务器后端通过交互前端接收到该存储的代码块。
步骤S502:在系统中确定与待存储代码块对应的模块。
可选地,在一种实施例中,管理平台通过交互前端提供一模块选择界面,在模块选择界面上设置多个选项控件,每个选项控件对应一个模块,用户可选择待存储代码块所对应的模块,从而服务器后端能够根据模块选择界面接收到的模块选择操作,在系统中确定与待存储代码块对应的模块。
可选地,在另一种实施例中,服务器后端预置模块和标识信息的对应关系,用户上传的待存储代码块均包括有标识信息,当用户上传待存储的代码块后,服务器后端获取待存储代码块的标识信息,从而能够根据标识信息在系统中确定与待存储代码块对应的模块。
步骤S503:当待存储代码块对应的模块为第一模块时,确定第一模块更新。
步骤S504:获取第一模块当前的版本号得到第一版本号,获取第二模块当前的版本号得到第二版本号。
步骤S505:按照版本顺序规则,确定第一版本号与第二版本号中,版本顺序较新的版本号。
步骤S506:按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号。
步骤S507:确定第一模块更新后的版本号为第三版本号。
步骤S508:根据第三版本号命名待存储代码块。
步骤S509:将待存储代码块存储至第一模块对应的代码仓库。
实施例六
本申请实施例六提供了一种优选地多模块系统代码版本的管理方法,该多模块系统代码版本的管理方法的部分步骤与上述实施例中的步骤对应相同,这部分步骤在该实施例中不再赘述,具体可参考上述各个实施例。该方法的执行主体可以为一种多模块系统代码版本的管理平台,该平台提供与用户交互的前端、进行数据处理的服务器后端以及实现数据存储的存储装置,其中,该方法的执行主体为服务器后端,存储装置可以用于存储版本号以及代码仓库等。具体地,图6为本申请实施例六提供的多模块系统代码版本的管理方法 的流程图,如图6所示,该实施例六提供的多模块系统代码版本的管理方法包括如下的步骤S601至步骤S615。
步骤S601:接收待存储代码块。
步骤S602:在管理表中获取最后一条版本记录,并获取该最后一条版本记录中的系统的版本号得到系统各模块中版本顺序最新的版本号,在管理表中新建一条版本记录。
步骤S603:在系统中确定与待存储代码块对应的模块。
步骤S604:当待存储代码块为单个,且待存储代码块对应的模块为第一模块时,按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号。
其中,在按照版本顺序规则更新版本顺序较新的版本号,具体可采用如下的步骤:
步骤S6041:确定第一模块的代码块更新的更新级别。
步骤S6042:在版本顺序较新的版本号中,获取与确定的更新级别所对应的子信息,得到待更新子信息。
步骤S6043:将待更新子信息增加预设增量,得到更新子信息。
步骤S6044:若待更新子信息为最低的更新级别,则利用更新子信息替换版本顺序较新的版本号中的待更新子信息,得到第三版本号。
步骤S6045:若待更新子信息不为最低的更新级别,则利用更新子信息替换版本顺序较新的版本号中的待更新子信息,并将更新级别低于待更新子信息的子信息全部设置为初始子信息,得到第三版本号。
步骤S605:确定第一模块更新后的版本号为第三版本号。
步骤S606:在新建的版本记录中,设置第一模块的版本号和系统的版本号分别为第三版本号,设置其他模块的版本号对应与最后一条版本记录中的版本号相同。
步骤S607:根据第三版本号命名待存储代码块,将待存储代码块存储至第一模块对应的代码仓库。
步骤S608:当待存储代码块为两个,第一待存储代码块对应的模块为第一模块,第二待存储模块对应的模块为第二模块时,判断第一模块与第二模块是否满足预设的关联关系。
步骤S609:当第一模块与第二模块满足预设的关联关系时,按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号。
其中,该步骤S609中得到第三版本号的过程与上述步骤S604中得到第三版本号的过程相同,该处不再赘述。
步骤S610:确定第一模块和第二模块更新后的版本号均为第三版本号。
步骤S611:在新建的版本记录中,设置第一模块、第二模块和系统的版本号均为第三版本号。
步骤S612:根据第三版本号命名第一待存储代码块和第二待存储代码块,将第一待存储代码块存储至第一模块对应的代码仓库,将第二待存储代码块存储至第二模块对应的代码仓库。
步骤S613:当第一模块与第二模块不满足预设的关联关系时,按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号,再按照版本顺序规则更新第三版本号,得到第四版本号,确定第一模块更新后的版本号为第三版本号,确定第二模块更新后的版本号为第四版本号。
其中,该步骤S613中得到第三版本号的过程与上述步骤S604中得到第三版本号的过程相同,该处不再赘述。
该步骤S613中得到第四版本号的步骤包括:
步骤S6131:确定第二模块的代码块更新的更新级别。
步骤S6132:在第三版本号中,获取与确定的更新级别所对应的子信息,得到待更新子信息。
步骤S6133:将待更新子信息增加预设增量,得到更新子信息。
步骤S6134:若待更新子信息为最低的更新级别,则利用更新子信息替换第三版本号中的待更新子信息,得到第四版本号。
步骤S6135:若待更新子信息不为最低的更新级别,则利用更新子信息替换第三版本号中的待更新子信息,并将更新级别低于待更新子信息的子信息全部设置为初始子信息,得到第四版本号。
在一种实施例中,系统包括A,B,C三个模块,三个模块的代码块的版本号的更新历史应该如下表,同时,针对下表的每一次更新说明如下:
1)ABC三个模块都有相互依赖的更新,共同取得版本号1.0.0。
2)A模块更新,取得版本号1.0.1。BC模块版本号不变。
3)AB模块有相互依赖的更新,取得版本号1.1.0。C模块版本号不变。
4)A模块更新,取得版本号1.1.1。BC模块版本号不变。
5)A模块更新,取得版本号1.1.2。BC模块版本号不变。
6)ABC三个模块都有相互依赖的更新,共同取得版本号1.2.0。
7)C模块更新,取得版本号1.3.0。AB模块版本号不变。
8)C模块更新,取得版本号1.3.1。AB模块版本号不变。
9)AB模块有相互依赖的更新,取得版本号1.4.0。C模块版本号不变。
  A B C 系统
1 1.0.0 1.0.0 1.0.0 1.0.0
2 1.0.1 1.0.0 1.0.0 1.0.1
3 1.1.0 1.1.0 1.0.0 1.1.0
4 1.1.1 1.1.0 1.0.0 1.1.1
5 1.1.2 1.1.0 1.0.0 1.1.2
6 1.2.0 1.2.0 1.2.0 1.2.0
7 1.2.0 1.2.0 1.3.0 1.3.0
8 1.2.0 1.2.0 1.3.1 1.3.1
9 1.4.0 1.2.0 1.3.1 1.4.0
步骤S614:在新建的版本记录中,设置第一信息为第三版本号,设置第二信息和第三信息均为第四版本号。
步骤S615:根据第三版本号命名第一待存储代码块,根据第四版本号命名第二待存储代码块,将第一待存储代码块存储至第一模块对应的代码仓库,将第二待存储代码块存储至第二模块对应的代码仓库。
采用该实施例提供的多模块系统代码版本的管理方法,所有模块的版本号均是有序的,即下次分配的版本号必须大于所有模块的当前版本号中版本顺序最新的版本号,例如,所有模块的当前版本号中版本顺序最新的是1.4.8,那么下次分配的版本号必须大于1.4.8。同时,所有模块的版本号统一分配,从而确保各模块之间的版本号是有序的,防止不同的分配将相同版本号分配给不同的模块而出现版本冲突。并且,只要模块有更新,就会更新一次版本号,能够保证模块每次更新都有对应的版本号,当多个模块的更新是相互依赖的,那么各个模块能够得到相同版本号,对于系统的版本号,在每次更新时,将所有模块当前的版本号中版本顺序最新的版本号作为整个系统的版本号。该实施例提供的多模块系统代码版本的管理方法继承了模块分开管理时,权限管理灵活的优点,有效的控制了非模块所有者的操作风险,模块所在的部门在只需要更新自己的模块,可以不依赖其它部门而进行独立的更新发布,提高了生产效率。也解决了模块分开管理时版本号不统一,不利于系统发布指定版本代码的问题。当系统需要发布某个版本的代码时,能够方便的找到各模块对应的版本号,使用确定的版本号对应的代码块进行部署即可,无需担心模块间的依赖无法对应,而导致的部署失败问题。
实施例七
对应于上述各个实施例提供的多模块系统代码版本的管理方法,本申请实施例七提供了一种多模块系统代码版本的管理装置,相关技术特征和对应的技术效果可参考上述各个实施例,该实施例仅做简要描述。图7为本申请实施例七提供的多模块系统代码版本的管理装置的框图,如图7所示,该装置包括:第一确定模块701、更新模块702和第二确定模块703。
该多模块系统至少包括第一模块和第二模块。第一确定模块701用于当第一模块更新时,确定第一版本号与第二版本号中,版本顺序较新的版本号,其中,第一版本号为第一模块当前的版本号,第二版本号为第二模块当前的版本号;更新模块702用于按照版本顺序规则更新版本顺序较新的版本号,得到第三版本号;以及第二确定模块703用于确定第一模块更新后的版本号为第三版本号。
可选地,在一种实施例中,版本号包括至少两个子信息,每个子信息对应一个更新级别,更新模块702包括第一确定单元、第一获取单元、第一处理单元、第一更新单元和第二更新单元。其中,第一确定单元用于确定第一模块的代码块更新的更新级别;第一获取单元用于在版本顺序较新的版本号中,获取与确定的更新级别所对应的子信息,得到待更新子信息;第一处理单元用于将待更新子信息增加预设增量,得到更新子信息;第一更新单元用于当待更新子信息为最低的更新级别时,利用更新子信息替换版本顺序较新的版本号中的待更新子信息,得到第三版本号;第二更新单元用于待更新子信息不为最低的更新级别时,利用更新子信息替换版本顺序较新的版本号中的待更新子信息,并将更新级别低于待更新子信息的子信息全部设置为初始子信息,得到第三版本号。
可选地,在一种实施例中,管理装置还包括判断模块、第三确定模块和第四确定模块,其中,判断模块用于当第一模块和第二模块同时更新时,判断第一模块与第二模块是否满足预设的关联关系;第三确定模块用于当第一模块与第二模块满足预设的关联关系时,确定第二模块更新后的版本号为第三版本号;第四确定模块用于当第一模块与第二模块不满足预设的关联关系时,按照版本顺序规则更新第三版本号,得到第四版本号,确定第二模块更新后的版本号为第四版本号。
可选地,在一种实施例中,预设代码版本管理表,管理表包括若干版本记录,每个版本记录包括第一模块对应第一信息、第二模块对应的第二信息和系统对应的第三信息,管理装置还包括新建模块、第一处理模块、第二处理模块和第三处理模块,其中,新建模块用于在管理表中新建一条版本记录;第一处理模块用于当第一模块更新且第二模块不更新时,在版本记录中,设置第一信息和第三信息均为第三版本号,设置第二信息为第二版本号;第二处理模块用于当第一模块和第二模块同时更新且第一模块与第二模块满足预设的关联关系时,在版本记录中,设置第一信息、第二信息和第三信息均为第三版本号;第三处理模块用于当第一模块和第二模块同时更新且第一模块与第二模块不满足预设的关联关系时,在版本记录中,设置第一信息为第三版本号,设置第二信息和第三信息均为第四版本号。
可选地,在一种实施例中,管理装置还包括接收模块和第五确定模块,其中,接收模块用于在确定第一版本号与第二版本号中版本顺序较新的版本号之前,接收待存储代码块,第五确定模块用于在系统中确定与待存储代码块对应的模块,其中,当待存储代码块对应的模块为第一模块时,确定第一模块更新;第一确定模块701包括第二获取单元,用于在管理表中新建一条版本记录的步骤之前,获取管理表中最后一条版本记录中的第三信息,得到第一版本号与第二版本号中版本顺序较新的版本号;管理装置还包括存储模块,用于在确定第一模块更新后的版本号为第三版本号的步骤之后,根据第三版本号命名待存储代码块,将待存储代码块存储至第一模块对应的代码仓库。
可选地,在一种实施例中,第五确定模块在确定系统中确定待存储代码块对应的模块时,具体执行的步骤包括:提供一模块选择界面;获取模块选择界面接收到的模块选择操作;在系统中确定模块选择操作所选定的模块。
可选地,在一种实施例中,第五确定模块在确定系统中确定待存储代码块对应的模块时,具体执行的步骤包括:获取待存储代码块的标识信息;在系统中查找具有标识信息的模块。
实施例八
本实施例八还提供一种计算机设备,如可以执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图8所示,本实施例的计算机设备01至少包括但不限于:可通过系统总线相互通信连接的存储器011、处理器012,如图8所示。需要指出的是,图8仅示出了具有组件存储器011和处理器012的计算机设备01,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
本实施例中,存储器011(即可读存储介质)包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器011可以是计算机设备01的内部存储单元,例如该计算机设备01的硬盘或内存。在另一些实施例中,存储器011也可以是计算机设备01的外部存储设备,例如该计算机设备01上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器011还可以既包括计算机设备01的内部存储单元也包括其外部存储设备。本实施例中,存储器011通常用于存储安装于计算机设备01的操作系统和各类应用软件,例如实施例七的多模块系统代码版本的管理装置的程序代码等。此外,存储器011还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器012在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器012通常用于控制计算机设备01的总体操作。本实施例中,处理器012用于运行存储器011中存储的程序代码或者处理数据,例如多模块系统代码版本的管理方法等。
实施例九
本实施例九还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机程序,程序被处理器执行时实现相应功能。本实施例的计算机可读存储介质用于存储多模块系统代码版本的管理装置,被处理器执行时实现实施例一的多模块系统代码版本的管理方法。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种多模块系统代码版本的管理方法,其中,所述系统至少包括第一模块和第二模块,所述管理方法包括:
    当所述第一模块更新时,确定第一版本号与第二版本号中版本顺序较新的版本号,其中,所述第一版本号为所述第一模块当前的版本号,所述第二版本号为所述第二模块当前的版本号;
    按照版本顺序规则更新所述版本顺序较新的版本号,得到第三版本号;以及
    确定所述第一模块更新后的版本号为所述第三版本号。
  2. 根据权利要求1所述的多模块系统代码版本的管理方法,其中,所述版本号包括至少两个子信息,每个所述子信息对应一个更新级别,按照版本顺序规则更新所述版本顺序较新的版本号得到第三版本号的步骤包括:
    确定所述第一模块的代码块更新的更新级别;
    在所述版本顺序较新的版本号中,获取与确定的所述更新级别所对应的子信息,得到待更新子信息;
    将所述待更新子信息增加预设增量,得到更新子信息;
    若所述待更新子信息为最低的更新级别,则利用所述更新子信息替换所述版本顺序较新的版本号中的所述待更新子信息,得到所述第三版本号;
    若所述待更新子信息不为最低的更新级别,则利用所述更新子信息替换所述版本顺序较新的版本号中的所述待更新子信息,并将更新级别低于所述待更新子信息的子信息全部设置为初始子信息,得到所述第三版本号。
  3. 根据权利要求1所述的多模块系统代码版本的管理方法,其中,所述管理方法还包括:
    当所述第一模块和所述第二模块同时更新时,判断所述第一模块与所述第二模块是否满足预设的关联关系;
    当所述第一模块与所述第二模块满足预设的关联关系时,确定所述第二模块更新后的版本号为所述第三版本号;
    当所述第一模块与所述第二模块不满足预设的关联关系时,按照所述版本顺序规则更新所述第三版本号,得到第四版本号,确定所述第二模块更新后的版本号为所述第四版本号。
  4. 根据权利要求3所述的多模块系统代码版本的管理方法,其中,预设代码版本管理表,所述管理表包括若干版本记录,每个所述版本记录包括所述第一模块对应第一信息、所述第二模块对应的第二信息和所述系统对应的第三信息,所述管理方法还包括:
    在所述管理表中新建一条版本记录;
    当所述第一模块更新且所述第二模块不更新时,在所述版本记录中,设置所述第一信息和所述第三信息均为所述第三版本号,设置所述第二信息为所述第二版本号;
    当所述第一模块和所述第二模块同时更新且所述第一模块与所述第二模块满足预设的关联关系时,在所述版本记录中,设置所述第一信息、所述第二信息和所述第三信息均为所述第三版本号;
    当所述第一模块和所述第二模块同时更新且所述第一模块与所述第二模块不满足预设的关联关系时,在所述版本记录中,设置所述第一信息为所述第三版本号,设置所述第二信息和所述第三信息均为所述第四版本号。
  5. 根据权利要求4所述的多模块系统代码版本的管理方法,其中,
    在确定第一版本号与第二版本号中版本顺序较新的版本号的步骤之前,所述管理方法包括:接收待存储代码块,并在所述系统中确定与所述待存储代码块对应的模块,其中,当所述待存储代码块对应的模块为所述第一模块时,确定所述第一模块更新;
    确定第一版本号与第二版本号中版本顺序较新的版本号的步骤包括:在所述管理表中 新建一条版本记录的步骤之前,获取所述管理表中最后一条版本记录中的第三信息,得到所述第一版本号与所述第二版本号中版本顺序较新的版本号;
    在确定所述第一模块更新后的版本号为所述第三版本号的步骤之后,所述管理方法还包括:根据所述第三版本号命名所述待存储代码块,将所述待存储代码块存储至所述第一模块对应的代码仓库。
  6. 根据权利要求5所述的多模块系统代码版本的管理方法,其中,在所述系统中确定与所述待存储代码块对应的模块的步骤包括:
    提供一模块选择界面;
    获取所述模块选择界面接收到的模块选择操作;
    在所述系统中确定所述模块选择操作所选定的模块。
  7. 根据权利要求5所述的多模块系统代码版本的管理方法,其中,在所述系统中确定与所述待存储代码块对应的模块的步骤包括:
    获取所述待存储代码块的标识信息;
    在所述系统中查找具有所述标识信息的模块。
  8. 一种多模块系统代码版本的管理装置,其中,所述系统至少包括第一模块和第二模块,所述管理装置包括:
    第一确定模块,用于当所述第一模块更新时,确定第一版本号与第二版本号中,版本顺序较新的版本号,其中,所述第一版本号为所述第一模块当前的版本号,所述第二版本号为所述第二模块当前的版本号;
    更新模块,用于按照所述版本顺序规则更新所述版本顺序较新的版本号,得到第三版本号;以及
    第二确定模块,用于确定所述第一模块更新后的版本号为所述第三版本号。
  9. 一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现多模块系统代码版本的管理方法,其中,所述系统至少包括第一模块和第二模块,所述管理方法包括:
    当所述第一模块更新时,确定第一版本号与第二版本号中版本顺序较新的版本号,其中,所述第一版本号为所述第一模块当前的版本号,所述第二版本号为所述第二模块当前的版本号;
    按照版本顺序规则更新所述版本顺序较新的版本号,得到第三版本号;以及
    确定所述第一模块更新后的版本号为所述第三版本号。
  10. 根据权利要求9所述的计算机设备,其中,所述版本号包括至少两个子信息,每个所述子信息对应一个更新级别,按照版本顺序规则更新所述版本顺序较新的版本号得到第三版本号的步骤包括:
    确定所述第一模块的代码块更新的更新级别;
    在所述版本顺序较新的版本号中,获取与确定的所述更新级别所对应的子信息,得到待更新子信息;
    将所述待更新子信息增加预设增量,得到更新子信息;
    若所述待更新子信息为最低的更新级别,则利用所述更新子信息替换所述版本顺序较新的版本号中的所述待更新子信息,得到所述第三版本号;
    若所述待更新子信息不为最低的更新级别,则利用所述更新子信息替换所述版本顺序较新的版本号中的所述待更新子信息,并将更新级别低于所述待更新子信息的子信息全部设置为初始子信息,得到所述第三版本号。
  11. 根据权利要求9所述的计算机设备,其中,所述管理方法还包括:
    当所述第一模块和所述第二模块同时更新时,判断所述第一模块与所述第二模块是否满足预设的关联关系;
    当所述第一模块与所述第二模块满足预设的关联关系时,确定所述第二模块更新后的 版本号为所述第三版本号;
    当所述第一模块与所述第二模块不满足预设的关联关系时,按照所述版本顺序规则更新所述第三版本号,得到第四版本号,确定所述第二模块更新后的版本号为所述第四版本号。
  12. 根据权利要求11所述的计算机设备,其中,预设代码版本管理表,所述管理表包括若干版本记录,每个所述版本记录包括所述第一模块对应第一信息、所述第二模块对应的第二信息和所述系统对应的第三信息,所述管理方法还包括:
    在所述管理表中新建一条版本记录;
    当所述第一模块更新且所述第二模块不更新时,在所述版本记录中,设置所述第一信息和所述第三信息均为所述第三版本号,设置所述第二信息为所述第二版本号;
    当所述第一模块和所述第二模块同时更新且所述第一模块与所述第二模块满足预设的关联关系时,在所述版本记录中,设置所述第一信息、所述第二信息和所述第三信息均为所述第三版本号;
    当所述第一模块和所述第二模块同时更新且所述第一模块与所述第二模块不满足预设的关联关系时,在所述版本记录中,设置所述第一信息为所述第三版本号,设置所述第二信息和所述第三信息均为所述第四版本号。
  13. 根据权利要求12所述的计算机设备,其中,
    在确定第一版本号与第二版本号中版本顺序较新的版本号的步骤之前,所述管理方法包括:接收待存储代码块,并在所述系统中确定与所述待存储代码块对应的模块,其中,当所述待存储代码块对应的模块为所述第一模块时,确定所述第一模块更新;
    确定第一版本号与第二版本号中版本顺序较新的版本号的步骤包括:在所述管理表中新建一条版本记录的步骤之前,获取所述管理表中最后一条版本记录中的第三信息,得到所述第一版本号与所述第二版本号中版本顺序较新的版本号;
    在确定所述第一模块更新后的版本号为所述第三版本号的步骤之后,所述管理方法还包括:根据所述第三版本号命名所述待存储代码块,将所述待存储代码块存储至所述第一模块对应的代码仓库。
  14. 根据权利要求13所述的计算机设备,其中,在所述系统中确定与所述待存储代码块对应的模块的步骤包括:
    提供一模块选择界面;
    获取所述模块选择界面接收到的模块选择操作;
    在所述系统中确定所述模块选择操作所选定的模块。
  15. 根据权利要求13所述的计算机设备,其中,在所述系统中确定与所述待存储代码块对应的模块的步骤包括:
    获取所述待存储代码块的标识信息;
    在所述系统中查找具有所述标识信息的模块。
  16. 一种计算机可读存储介质,其上存储有计算机程序,其中:所述计算机程序被处理器执行时实现多模块系统代码版本的管理方法,其中,所述系统至少包括第一模块和第二模块,所述管理方法包括:
    当所述第一模块更新时,确定第一版本号与第二版本号中版本顺序较新的版本号,其中,所述第一版本号为所述第一模块当前的版本号,所述第二版本号为所述第二模块当前的版本号;
    按照版本顺序规则更新所述版本顺序较新的版本号,得到第三版本号;以及
    确定所述第一模块更新后的版本号为所述第三版本号。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述版本号包括至少两个子信息,每个所述子信息对应一个更新级别,按照版本顺序规则更新所述版本顺序较新的版本号得到第三版本号的步骤包括:
    确定所述第一模块的代码块更新的更新级别;
    在所述版本顺序较新的版本号中,获取与确定的所述更新级别所对应的子信息,得到待更新子信息;
    将所述待更新子信息增加预设增量,得到更新子信息;
    若所述待更新子信息为最低的更新级别,则利用所述更新子信息替换所述版本顺序较新的版本号中的所述待更新子信息,得到所述第三版本号;
    若所述待更新子信息不为最低的更新级别,则利用所述更新子信息替换所述版本顺序较新的版本号中的所述待更新子信息,并将更新级别低于所述待更新子信息的子信息全部设置为初始子信息,得到所述第三版本号。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述管理方法还包括:
    当所述第一模块和所述第二模块同时更新时,判断所述第一模块与所述第二模块是否满足预设的关联关系;
    当所述第一模块与所述第二模块满足预设的关联关系时,确定所述第二模块更新后的版本号为所述第三版本号;
    当所述第一模块与所述第二模块不满足预设的关联关系时,按照所述版本顺序规则更新所述第三版本号,得到第四版本号,确定所述第二模块更新后的版本号为所述第四版本号。
  19. 根据权利要求18所述的计算机可读存储介质,其中,预设代码版本管理表,所述管理表包括若干版本记录,每个所述版本记录包括所述第一模块对应第一信息、所述第二模块对应的第二信息和所述系统对应的第三信息,所述管理方法还包括:
    在所述管理表中新建一条版本记录;
    当所述第一模块更新且所述第二模块不更新时,在所述版本记录中,设置所述第一信息和所述第三信息均为所述第三版本号,设置所述第二信息为所述第二版本号;
    当所述第一模块和所述第二模块同时更新且所述第一模块与所述第二模块满足预设的关联关系时,在所述版本记录中,设置所述第一信息、所述第二信息和所述第三信息均为所述第三版本号;
    当所述第一模块和所述第二模块同时更新且所述第一模块与所述第二模块不满足预设的关联关系时,在所述版本记录中,设置所述第一信息为所述第三版本号,设置所述第二信息和所述第三信息均为所述第四版本号。
  20. 根据权利要求19所述的计算机可读存储介质,其中,
    在确定第一版本号与第二版本号中版本顺序较新的版本号的步骤之前,所述管理方法包括:接收待存储代码块,并在所述系统中确定与所述待存储代码块对应的模块,其中,当所述待存储代码块对应的模块为所述第一模块时,确定所述第一模块更新;
    确定第一版本号与第二版本号中版本顺序较新的版本号的步骤包括:在所述管理表中新建一条版本记录的步骤之前,获取所述管理表中最后一条版本记录中的第三信息,得到所述第一版本号与所述第二版本号中版本顺序较新的版本号;
    在确定所述第一模块更新后的版本号为所述第三版本号的步骤之后,所述管理方法还包括:根据所述第三版本号命名所述待存储代码块,将所述待存储代码块存储至所述第一模块对应的代码仓库。
PCT/CN2020/118544 2020-03-04 2020-09-28 多模块系统代码版本的管理方法、装置和计算机设备 WO2021174830A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010142301.3 2020-03-04
CN202010142301.3A CN111399898B (zh) 2020-03-04 2020-03-04 多模块系统代码版本的管理方法、装置和计算机设备

Publications (1)

Publication Number Publication Date
WO2021174830A1 true WO2021174830A1 (zh) 2021-09-10

Family

ID=71436024

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/118544 WO2021174830A1 (zh) 2020-03-04 2020-09-28 多模块系统代码版本的管理方法、装置和计算机设备

Country Status (2)

Country Link
CN (1) CN111399898B (zh)
WO (1) WO2021174830A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111399898B (zh) * 2020-03-04 2023-09-05 平安科技(深圳)有限公司 多模块系统代码版本的管理方法、装置和计算机设备
CN112667283A (zh) * 2020-12-30 2021-04-16 深圳证券交易所 框架数据的引用方法、装置及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090144703A1 (en) * 2007-11-30 2009-06-04 Vallieswaran Vairavan Method and system for versioning a software system
CN104820676A (zh) * 2015-04-14 2015-08-05 天脉聚源(北京)教育科技有限公司 一种判断版本号大小的方法及装置
CN107193616A (zh) * 2017-06-30 2017-09-22 广州云移信息科技有限公司 一种应用程序升级方法及终端
CN110515637A (zh) * 2019-07-12 2019-11-29 湖南新云网科技有限公司 一种程序升级方法、系统及终端设备
CN111399898A (zh) * 2020-03-04 2020-07-10 平安科技(深圳)有限公司 多模块系统代码版本的管理方法、装置和计算机设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5881292A (en) * 1996-09-26 1999-03-09 Microsoft Corporation Dynamic versioning system for multiple users of multi-module software system
TW518513B (en) * 2001-03-28 2003-01-21 Synq Technology Inc System and method to update an executing application software by modular way
JP5293522B2 (ja) * 2009-09-14 2013-09-18 株式会社リコー 管理システム、管理方法、及び管理プログラム
US8762980B1 (en) * 2010-09-09 2014-06-24 Symantec Corporation Rolling incremental updates
CN107678776A (zh) * 2017-08-09 2018-02-09 上海壹账通金融科技有限公司 多模块版本依赖关系构建方法、装置、服务器和存储介质
CN108768726A (zh) * 2018-05-30 2018-11-06 郑州云海信息技术有限公司 一种服务器集群的升级方法及装置
CN109445839A (zh) * 2018-09-25 2019-03-08 平安普惠企业管理有限公司 一种模块管理包发布方法、装置及终端设备
CN109783135A (zh) * 2019-01-30 2019-05-21 深圳琥珀虚颜智能科技有限公司 多模块软件版本管理系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090144703A1 (en) * 2007-11-30 2009-06-04 Vallieswaran Vairavan Method and system for versioning a software system
CN104820676A (zh) * 2015-04-14 2015-08-05 天脉聚源(北京)教育科技有限公司 一种判断版本号大小的方法及装置
CN107193616A (zh) * 2017-06-30 2017-09-22 广州云移信息科技有限公司 一种应用程序升级方法及终端
CN110515637A (zh) * 2019-07-12 2019-11-29 湖南新云网科技有限公司 一种程序升级方法、系统及终端设备
CN111399898A (zh) * 2020-03-04 2020-07-10 平安科技(深圳)有限公司 多模块系统代码版本的管理方法、装置和计算机设备

Also Published As

Publication number Publication date
CN111399898A (zh) 2020-07-10
CN111399898B (zh) 2023-09-05

Similar Documents

Publication Publication Date Title
US9928111B2 (en) System and method for configuration tagging in a multitenant application server environment
CN107608773B (zh) 任务并发处理方法、装置及计算设备
WO2021174830A1 (zh) 多模块系统代码版本的管理方法、装置和计算机设备
US20180189371A1 (en) Updating sqlite database
US20160210597A1 (en) System for efficient processing of transaction requests related to an account in a database
US20100077135A1 (en) Memory wear leveling method, system and device
CN102224492A (zh) 数据维护系统
US11289115B1 (en) Copying a storage tape
CN110019111B (zh) 数据处理方法、装置、存储介质以及处理器
CN110399333A (zh) 删除快照的方法、设备和计算机程序产品
CN112558868A (zh) 一种配置数据存储的方法和装置及设备
CN106557307A (zh) 业务数据的处理方法及处理系统
CN109241057B (zh) 一种用于分布式系统的数字id生成方法
CN113051229A (zh) 一种用户数据获取方法、装置、终端及可读存储介质
CN108646987B (zh) 一种文件卷的管理方法、装置、存储介质及终端
CN111897627B (zh) 一种云计算资源配额管理方法和系统
CN117349291A (zh) 一种数据库主键短id生成方法、电子设备和介质
CN115756955A (zh) 一种数据备份、数据恢复的方法、装置及计算机设备
CN111858049B (zh) 资源信息的分配方法、装置和计算机设备
CN106471486A (zh) 用于在事务中间件机器环境中支持自适应自调整锁定机制的系统和方法
CN110704501B (zh) 用户账号关联方法及装置
KR102214697B1 (ko) 데이터베이스 관리 시스템에서 데이터 저장을 위한 공간 관리를 제공하는 컴퓨터 프로그램
US20090276768A1 (en) Software Parameter Management
US20090037871A1 (en) Community-centric management of composite applications
JP2006343928A (ja) 情報処理装置およびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20923631

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20923631

Country of ref document: EP

Kind code of ref document: A1