System software version management method, device and storage medium
By packaging and automated processing system software upgrade packages, the problems of low efficiency and high risk of manual upgrade scripts in the existing technology are solved, and software automation upgrades are realized, and security and efficiency are improved.
Patent Information
- Application Number
- CN202011199164.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-01
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-11-01
AI Technical Summary
The existing software version management relies on manual writing of upgrade scripts, resulting in different modules and operations when each version is released, which is inefficient and easy to introduce the risk of upgrade failure. The added module requires writing a new processing process, which is less efficient.
By encapsulating the system software upgrade package, determine the upgrade package information configuration file, obtain the baseline version of the system information configuration file, update and perform version upgrade operations, and automatically process file checksum encapsulation to avoid manual intervention and improve security and efficiency.
It realizes software automation upgrade processing, improves the security and efficiency of software upgrades, reduces the risk of manual errors, and improves the reliability of upgrades.
Smart Images

Figure CN112306552B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software, and in particular to a system software version management method, device and storage medium. Background Art
[0002] In the prior art, software version management usually relies on upgrade scripts or upgrade programs to install or perform specified operations on different software modules according to the expected processing method. The problem that may arise in this way is that the modules or files involved in each version release and the corresponding operations may be different, and the upgrade script needs to be rewritten manually each time, and manual processing may introduce the risk of upgrade failure; and the modules involved in the upgrade may be newly added, and each time a new module processing flow needs to be written, which is inefficient. Summary of the invention
[0003] In response to the above technical problems, the embodiments of the present application provide a software version management method, device and storage medium to realize automatic software upgrade processing, avoid manual intervention, and improve the security and efficiency of software upgrades.
[0004] In a first aspect, an embodiment of the present application provides a system software version management method, comprising:
[0005] Encapsulate the system software upgrade package and determine the upgrade package information configuration file;
[0006] Obtaining a system information configuration file of a baseline version, and updating the upgrade package information configuration file into the system information configuration file of the baseline version to obtain a second system information configuration file;
[0007] A version upgrade operation is performed on the software system according to the upgrade package information configuration file and the second system information configuration file.
[0008] Furthermore, before packaging the system software upgrade package and determining the upgrade package information configuration file, the method further includes:
[0009] Determine a module upgrade information configuration file, wherein the module upgrade information configuration file is used to record the names, MD5 values, relative paths and processing methods of all files involved in the module in this upgrade.
[0010] Furthermore, the step of packaging the system software upgrade package and determining the upgrade package information configuration file includes:
[0011] Verify the file name and relative path;
[0012] Calculate the MD5 value of the file in the upgrade package, and perform integrity verification and comparison based on the MD5 value in the module upgrade information configuration file to implement file integrity verification before encapsulating the upgrade package;
[0013] Package all upgraded modules of the current version into a compressed package;
[0014] The upgrade package information configuration file is determined according to the contents of the module upgrade information configuration files of all modules.
[0015] Preferably, the system information configuration file of the baseline version includes one or a combination of the following contents:
[0016] Operating system type and version number;
[0017] The names of all installed software in the system, the names of the corresponding dependent libraries, the version numbers of the installed software, and the version numbers of the installed dependent libraries;
[0018] System-related configuration information;
[0019] Information about the developed software or modules.
[0020] Preferably, the developed software or module related information includes:
[0021] Module name;
[0022] All file names contained in the module;
[0023] How to handle file upgrades;
[0024] The location where the file is installed;
[0025] File source location;
[0026] File MD5 value;
[0027] File permissions;
[0028] The group to which the file belongs;
[0029] Subsequent operations after file upgrade.
[0030] Further, the performing a version upgrade operation according to the upgrade package information configuration file and the second system information configuration file includes:
[0031] Back up the files that need to be replaced;
[0032] Updating the module that needs to be upgraded according to the module processing method recorded in the second system information configuration file;
[0033] Perform subsequent upgrade operations on a module-by-module basis;
[0034] Verify whether the MD5 value of the updated file is consistent with the MD5 value in the upgrade package information configuration file.
[0035] The software version management method provided by the present invention can avoid manual intervention through software automation processing, thereby improving the security and reliability of software upgrades.
[0036] In a second aspect, an embodiment of the present application further provides a system software version management device, including:
[0037] The automation system software upgrade package encapsulation module is used to encapsulate the system software upgrade package and determine the upgrade package information configuration file;
[0038] A system information reconstruction module, used to obtain a system information configuration file of a baseline version, and update the upgrade package information configuration file into the system information configuration file of the baseline version to obtain a second system information configuration file;
[0039] The software management module is used to perform a version upgrade operation on the software system according to the upgrade package information configuration file and the second system information configuration file.
[0040] In a third aspect, an embodiment of the present application further provides a system software version management device, including: a memory, a processor, and a user interface;
[0041] The memory is used to store computer programs;
[0042] The user interface is used to interact with the user;
[0043] The processor is used to read the computer program in the memory, and when the processor executes the computer program, the system software version management method provided by the present invention is implemented.
[0044] In a fourth aspect, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and when the processor executes the computer program, the system software version management method provided by the present invention is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A schematic diagram of a system software version management method provided in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of the system software packaging process provided in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of the upgrade process provided by the embodiment of the present application;
[0049] Figure 4 A schematic diagram of the structure of a system software version management device provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of the structure of another system software version management device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The following are explanations of some of the terms that appear in the text:
[0053] 1. In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0054] 2. In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0055] 3. MD5, or Message-Digest Algorithm 5, is a cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission content.
[0056] The software version upgrade in the system is processed in software modules. A module can be an installation software or a deployment software package, or a set of configuration files for open source software. Module upgrades can be full upgrades or partial file upgrades.
[0057] Software version management of complex systems refers to the updating of modules in the system. In addition to regular operations such as file replacement, file deletion, update installation, deletion and installation, there may also be operations for specific requirements such as configuration modification, command execution, and script execution. The updates of various modules may be interdependent and require collaborative updates for the functions to work.
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] It should be noted that the order in which the embodiments of the present application are presented only represents the order of precedence of the embodiments, and does not represent the advantages or disadvantages of the technical solutions provided by the embodiments.
[0060] Embodiment 1
[0061] See also Figure 1 , a schematic diagram of a system software version management method provided by an embodiment of the present application, as shown in the figure, the method includes steps S101 to S103:
[0062] S101, encapsulating a system software upgrade package and determining an upgrade package information configuration file;
[0063] S102, obtaining a system information configuration file of a baseline version, and updating the upgrade package information configuration file into the system information configuration file of the baseline version to obtain a second system information configuration file;
[0064] S103: Perform a version upgrade operation according to the upgrade package information configuration file and the second system information configuration file.
[0065] Through the above steps, the software automatically encapsulates the upgrade file, automatically verifies it, and automatically performs the upgrade operation, thereby avoiding the risks introduced by manual intervention and improving the security and efficiency of software upgrades.
[0066] As a preferred example, before the above step S101, it also includes:
[0067] Determine a module upgrade information configuration file, wherein the module upgrade information configuration file is used to record the names, MD5 values, relative paths and processing methods of all files involved in this upgrade.
[0068] It should be noted that the module upgrade information configuration file can be provided by module developers.
[0069] Preferably, the module upgrade information configuration file can be a .json file, such as a fileinfo.json file. Each upgrade module of the file is attached with a file for recording the names, MD5 values, relative paths, processing methods and other information of all files involved in the current module in this upgrade. As a preferred example, the processing method information can be left blank. If the processing method is not filled in, it is processed by replacement or installation by default.
[0070] It should be noted that the above-mentioned module upgrade information configuration file and all the files involved are submitted to the upgrade version library (the submission can be to generate new files or update the original files). Continuous integration software such as Jenkins will monitor the version update events in the upgrade version library and automatically trigger the execution of step S101. The execution of step S101 can also be triggered by a preset start button.
[0071] As a preferred example, the above step S101 specifically includes the following steps: Figure 2 As shown, including S201 to S204:
[0072] S201, verify the file name and relative path;
[0073] As an optional solution, if the verification passes, S202 is executed; if the verification fails, an alarm is triggered and an alarm message is sent to a preset target device or target software, or relevant personnel are notified by email.
[0074] S202, calculate the MD5 value, and perform integrity check according to the MD5 value in the module upgrade information configuration file; as a preferred example, the MD5 value of the file provided by the developer is calculated to be 20abe48e15deaf253a389062cf29df72, but the MD5 value of the file recorded in the module upgrade information configuration file is 11526c9bc771f38fd99fce7690d54bb2, and the comparison is inconsistent, so it can be determined that the file is damaged or tampered with.
[0075] In this step, the MD5 value is calculated for all files involved in the current module upgrade. After the calculation is completed, the MD5 value in the module upgrade information configuration file corresponding to the current module is read, and the two MD5s are verified (for example, comparing whether they are the same). It should be noted that the verification operation of this step is performed on all modules that need to be upgraded.
[0076] As an optional solution, if all modules pass the verification, continue to execute S203. If not all modules pass the verification, an alarm is triggered and the alarm message is sent to a preset target device or target software, or relevant personnel are notified by email.
[0077] S203, packaging all upgrade modules of the current version into a compressed package;
[0078] In this step, in order to reduce the risk of delays before and after the transfer of multiple files in a version or the risk of failure in the transfer of a certain file, the files related to all modules that need to be upgraded in the current version are packaged into a compressed package.
[0079] S204: Determine the upgrade package information configuration file according to the contents of the module upgrade information configuration files of all modules.
[0080] In this step, the module upgrade information configuration files of all modules (eg, fileInfo.json files of all modules) are merged into one file to form upgrade package information configuration files (Package InfoModel Files).
[0081] After the above steps S201 to S204, the packaging of the automation system software upgrade package is completed.
[0082] As another preferred example, in the above step S102, the system information configuration file of the baseline version is used to record the previous version and the full amount of information related to the system, and the full amount of information may include one or a combination of the following:
[0083] Operating system type and version number;
[0084] The names of all installed software in the system, the names of the corresponding dependent libraries of the installed software, the version numbers of the installed software, and the version numbers of the installed dependent libraries;
[0085] System-related configuration information; specifically, system-related configuration information may include network card information, routing information, network firewall information, system kernel parameters, system startup items, system scheduled tasks, etc.
[0086] Information about the developed software or modules.
[0087] It should be noted that the above-mentioned developed software or modules refer to software or modules developed by product developers other than the operating system, and the software that needs to be upgraded in this embodiment is included in the above-mentioned developed software or modules.
[0088] As a preferred example, the above-developed software or module-related information includes one or a combination of the following:
[0089] Module name;
[0090] All file names contained in the module;
[0091] The upgrade processing method of the file, which may include installation, replacement, deletion or addition;
[0092] The location where the file is installed;
[0093] File source location;
[0094] File MD5 value;
[0095] File permissions;
[0096] The group to which the file belongs;
[0097] Subsequent operations for file upgrades may include executing scripts or commands.
[0098] It should be noted that if multiple modules are involved, each module includes the software developed above or module-related information.
[0099] As another preferred example, in the above step S103, performing a version upgrade operation according to the upgrade package information configuration file and the second system information configuration file includes: Figure 3 Steps S301 to S304 are shown:
[0100] S301, back up the files that need to be replaced;
[0101] In this step, all files that will be replaced by the upgrade operation are backed up for the software version rollback operation. Different processing methods correspond to different backup methods. For example, if the module upgrade is upgraded by replacement, the backup operation is placed before the replacement; if the module upgrade is upgraded by installation, the backup operation is placed after the module upgrade is successful.
[0102] S302, updating the module that needs to be upgraded according to the module processing method;
[0103] The module processing method described in this step is to first search in the upgrade package information configuration file, and then search in the second system information configuration file if it is not found.
[0104] S303, performing subsequent upgrade operations in modules;
[0105] The subsequent operation described in this step is to search in the upgrade package information configuration file first, and then search in the second system information configuration file if it is not found.
[0106] S304, verifying whether the MD5 value of the updated file is consistent with the MD5 value in the upgrade package information configuration file.
[0107] In this step, if the MD5 value of the updated file is consistent with the MD5 value in the upgrade package information configuration file, the upgrade operation is successful, otherwise an error can be reported to the network server for record by triggering an http request.
[0108] Through the method of this embodiment, the software automatically verifies and packages the upgrade file, automatically reads the baseline version information, and generates a new system information configuration file based on the upgrade file and the baseline version information. It also verifies and packages the upgrade package and installs the upgrade package based on the developed software or module-related information recorded in the system information configuration file. No human intervention is required, thus avoiding the introduction of uncertain factors by human intervention and improving the security and reliability of software version management.
[0109] Embodiment 2
[0110] Based on the same inventive concept, the embodiment of the present invention also provides a system software version management device, such as Figure 4 As shown, the device comprises:
[0111] The automation system software upgrade package encapsulation module 401 is used to encapsulate the system software upgrade package and determine the upgrade package information configuration file;
[0112] The system information reconstruction module 402 is used to obtain a system information configuration file of a baseline version, and update the upgrade package information configuration file into the system information configuration file of the baseline version to obtain a second system information configuration file;
[0113] The software management module 403 is used to perform a version upgrade operation according to the upgrade package information configuration file and the second system information configuration file.
[0114] It should be noted that the automation system software upgrade package encapsulation module 401 provided in this embodiment can achieve Figure 1 All functions included in step S101 solve the same technical problem and achieve the same technical effect, and will not be repeated here;
[0115] Accordingly, the system information reconstruction module 402 provided in this embodiment can realize Figure 1 All functions included in step S102 solve the same technical problem and achieve the same technical effect, and will not be repeated here.
[0116] Accordingly, the software management module 403 provided in this embodiment can realize Figure 1 All functions included in step S103 solve the same technical problem and achieve the same technical effect, and will not be repeated here.
[0117] It should be noted that the device provided in Example 2 and the method provided in Example 1 belong to the same inventive concept, solve the same technical problems, and achieve the same technical effects. The device provided in Example 2 can implement all the methods of Example 1, and the similarities will not be repeated here.
[0118] Embodiment 3
[0119] Based on the same inventive concept, the embodiment of the present invention also provides a system software version management device, such as Figure 5 As shown, the device comprises:
[0120] It includes a memory 502, a processor 501 and a user interface 503;
[0121] The memory 502 is used to store computer programs;
[0122] The user interface 503 is used to interact with the user;
[0123] The processor 501 is configured to read the computer program in the memory 502. When the processor 501 executes the computer program, the following is achieved:
[0124] Encapsulate the system software upgrade package and determine the upgrade package information configuration file;
[0125] Obtaining a system information configuration file of a baseline version, and updating the upgrade package information configuration file into the system information configuration file of the baseline version to obtain a second system information configuration file;
[0126] A version upgrade operation is performed according to the upgrade package information configuration file and the second system information configuration file.
[0127] Among them, Figure 5 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 501 and memory represented by memory 502. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The processor 501 is responsible for managing the bus architecture and general processing, and the memory 502 may store data used by the processor 501 when performing operations.
[0128] The processor 501 may be a CPU, an ASIC, an FPGA or a CPLD, and the processor 501 may also adopt a multi-core architecture.
[0129] When the processor 501 executes the computer program stored in the memory 502, Figures 1 to 3 Any system software version management method shown.
[0130] It should be noted that the device provided in Example 3 and the method provided in Example 1 belong to the same inventive concept, solve the same technical problems, and achieve the same technical effects. The device provided in Example 3 can implement all the methods of Example 1, and the similarities will not be repeated here.
[0131] The present application also proposes a processor-readable storage medium. The processor-readable storage medium stores a computer program, and the processor executes the computer program to implement Figures 1 to 3 Any software version management method shown.
[0132] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0135] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0136] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A system software version management method, characterized in that: include: Encapsulate the system software upgrade package and determine the upgrade package information configuration file; Obtaining a system information configuration file of a baseline version, and updating the upgrade package information configuration file into the system information configuration file of the baseline version to obtain a second system information configuration file; Performing a version upgrade operation on the software system according to the upgrade package information configuration file and the second system information configuration file; The encapsulation of the system software upgrade package and determination of the upgrade package information configuration file includes: verifying the file name and relative path; calculating the MD5 value of the file in the upgrade package, and performing integrity verification and comparison according to the MD5 value in the upgrade package information configuration file to implement file integrity verification before the upgrade package is encapsulated; packaging all upgrade modules of the current version into a compressed package; determining the upgrade package information configuration file according to the contents of the module upgrade information configuration files of all modules; The version upgrade operation according to the upgrade package information configuration file and the second system information configuration file includes: backing up the files to be replaced; updating the modules to be upgraded according to the module processing mode recorded in the second system information configuration file; performing subsequent upgrade operations in units of modules; and verifying whether the MD5 value of the updated file is consistent with the MD5 value in the upgrade package information configuration file. Before packaging the system software upgrade package and determining the upgrade package information configuration file, the method further includes: Determine a module upgrade information configuration file, wherein the module upgrade information configuration file is used to record the names, MD5 values, relative paths and processing methods of all files involved in the module in this upgrade.
2. The method according to claim 1, characterized in that The system information configuration file of the baseline version includes one or a combination of the following: Operating system type and version number; The names of all installed software in the system, the names of the corresponding dependent libraries, the version numbers of the installed software, and the version numbers of the installed dependent libraries; System-related configuration information; Information about the developed software or modules.
3. The method according to claim 2, characterized in that The developed software or module related information includes one or a combination of the following: Module name; All file names contained in the module; How to handle file upgrades; The location where the file is installed; File source location; File MD5 value; File permissions; The group to which the file belongs; Subsequent operations for file upgrade.
4. The method according to claim 3, characterized in that The software upgrade processing method includes one of the following: Install, replace, remove, or add.
5. The method according to claim 4, characterized in that Subsequent operations of the file upgrade include: Execute a script or execute a command.
6. A system software version management device, characterized in that: include: The automation system software upgrade package encapsulation module is used to encapsulate the system software upgrade package and determine the upgrade package information configuration file; A system information reconstruction module, used to obtain a system information configuration file of a baseline version, and update the upgrade package information configuration file into the system information configuration file of the baseline version to obtain a second system information configuration file; A software management module, used to perform a version upgrade operation according to the upgrade package information configuration file and the second system information configuration file; Among them, the automation system software upgrade package encapsulation module is specifically used to verify the file name and relative path; calculate the MD5 value of the file in the upgrade package, and perform integrity verification and comparison according to the MD5 value in the upgrade package information configuration file to implement file integrity verification before the upgrade package is encapsulated; package all upgrade modules of the current version into a compressed package; determine the upgrade package information configuration file according to the contents of the module upgrade information configuration files of all modules; The software management module is specifically used to back up files that need to be replaced; update modules that need to be upgraded according to the module processing mode recorded in the second system information configuration file; perform subsequent upgrade operations in units of modules; and verify whether the MD5 value of the updated file is consistent with the MD5 value in the upgrade package information configuration file; Before packaging the system software upgrade package and determining the upgrade package information configuration file, the method further includes: Determine a module upgrade information configuration file, wherein the module upgrade information configuration file is used to record the names, MD5 values, relative paths and processing methods of all files involved in the module in this upgrade.
7. A system software version management device, characterized in that: including a memory, a processor and a user interface; The memory is used to store computer programs; The user interface is used to interact with the user; The processor is used to read the computer program in the memory, and when the processor executes the computer program, it implements the system software version management method as claimed in any one of claims 1 to 5.
8. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a computer program, and when the processor executes the computer program, the system software version management method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Automatic upgrading method and system of intranet server cluster
CN102045201A
Method and device for upgrading software
CN102148714A
Method and system of software upgrade
CN103136013A
Method and system for upgrading Android software
CN106528086A
Firmware upgrade method and device of integrative all-in-one machine
CN107479927A