Method, device, equipment and storage medium for identifying modules to be upgraded
By identifying the management module to be upgraded in the distributed storage system, building the version upgrade package, and gradually upgrading the module, the performance impact and time increase caused by upgrading all modules in the existing technology is solved, and efficient version upgrade is achieved.
Patent Information
- Application Number
- CN202211052500.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-08-31
AI Technical Summary
In the existing distributed storage system upgrade solution, upgrading all modules will have a significant impact on the performance of the storage business and increase the upgrade time.
By obtaining the full code files and file-service-module trees of the current and target version of the distributed storage system, determining the difference points, identifying the management module to be upgraded, building the version upgrade package, and gradually upgrading the module to be upgraded.
It reduces the actual upgrade time of distributed storage systems and reduces the impact of the upgrade process on business performance.
Smart Images

Figure CN115421764B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed storage system management, and in particular to a method, device, equipment and storage medium for identifying a module to be upgraded. Background Art
[0002] Currently, the upgrade approach used in existing distributed storage systems is to upgrade all modules involved. While this approach fundamentally ensures that all modules in distributed storage are updated to the latest version, upgrading all modules at once can significantly impact storage performance. Furthermore, the upgrade process significantly increases upgrade time by also upgrading unnecessary modules. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, apparatus, device, and storage medium for identifying modules to be upgraded, which can reduce the time of the actual upgrade process and reduce the impact of the upgrade process on service performance. The specific solution is as follows:
[0004] In a first aspect, the present application discloses a method for identifying a module to be upgraded, comprising:
[0005] Obtaining a first full code file corresponding to a current system version of the distributed storage system, a second full code file corresponding to a target system version, and a file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the association relationship between a service, a file associated with restarting the service, and a management module associated with the file;
[0006] Determining differences between the first full code file and the second full code file, and generating a difference file list between the current system version and the target system version based on the differences;
[0007] The management module to be upgraded in the current system version is identified according to the difference file list and the file-service-module tree.
[0008] Optionally, before generating the multi-level relationship tree based on the association relationship between the service, the file associated with the service restart, and the management module associated with the file, the method further includes:
[0009] The file associated with the service restart is taken as a unit, and each module of the distributed storage system is divided according to each unit to obtain a plurality of management modules associated with the file.
[0010] Optionally, the method for identifying a module to be upgraded further includes:
[0011] Constructing a version upgrade package for upgrading the distributed storage system; the version upgrade package stores the second full code file corresponding to the target system version and the file-service-module tree;
[0012] Accordingly, the step of obtaining a first full code file corresponding to the current system version of the distributed storage system, a second full code file corresponding to the target system version, and a file-service-module tree corresponding to the target version includes:
[0013] Acquire a first full code file corresponding to the current system version of the distributed storage system from the current environment of the distributed storage system;
[0014] The second full code file corresponding to the target version and the file-service-module tree corresponding to the target version are obtained from the version upgrade package corresponding to the target version.
[0015] Optionally, determining the differences between the first full code file and the second full code file includes:
[0016] The first full code file is compared with the second full code file to determine differences between the first full code file and the second full code file.
[0017] Optionally, comparing the first full code file with the second full code file to determine differences between the first full code file and the second full code file includes:
[0018] Processing the first full code file and the second full code file using a preset MD5 algorithm to obtain a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file;
[0019] The first hash value is compared with the second hash value to determine the difference between the first full code file and the second full code file.
[0020] Optionally, identifying the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree includes:
[0021] The files in the difference file list are traversed, and the services to be restarted and the management modules to be upgraded associated with each of the files in the current system version are identified according to the file-service-module tree.
[0022] Optionally, after identifying the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree, the method further includes:
[0023] The file to be updated in the management module to be upgraded is updated, and after the file to be updated is updated, the service to be restarted associated with the file to be updated is restarted to upgrade the management module to be upgraded.
[0024] In a second aspect, the present application discloses a device for identifying a module to be upgraded, comprising:
[0025] A code file acquisition module is configured to acquire a first full code file corresponding to the current system version of the distributed storage system, a second full code file corresponding to the target system version, and a file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the relationship between a service, a file associated with restarting the service, and a management module associated with the file;
[0026] a difference determination module, configured to determine the difference between the first full code file and the second full code file;
[0027] A file list generating module, configured to generate a difference file list between the current system version and the target system version based on the difference points;
[0028] An identification module is used to identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree.
[0029] In a third aspect, the present application discloses an electronic device, comprising:
[0030] Memory, used to store computer programs;
[0031] The processor is used to execute the computer program to implement the steps of the aforementioned method for identifying the module to be upgraded.
[0032] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for identifying a module to be upgraded are implemented.
[0033] It can be seen that the present application provides a method for identifying modules to be upgraded, including: obtaining a first full code file corresponding to the current system version of the distributed storage system, a second full code file corresponding to the target system version, and a file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the relationship between the service, the file associated with the service restart, and the management module associated with the file; determining the difference points between the first full code file and the second full code file, and generating a difference file list between the current system version and the target system version based on the difference points; identifying the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree. It can be seen that the present application automatically identifies the management module to be upgraded in the current system version based on the difference points by determining the difference points between the full code files of the current system version and the target system version, thereby avoiding upgrading all modules in the distributed storage system, reducing the time of the actual upgrade process of the distributed storage system, and reducing the impact of the upgrade process on business performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0035] Figure 1 This is a flow chart of a method for identifying modules to be upgraded disclosed in this application;
[0036] Figure 2 This is a flow chart of a specific method for identifying modules to be upgraded disclosed in this application;
[0037] Figure 3 This is a flow chart of a specific method for identifying modules to be upgraded disclosed in this application;
[0038] Figure 4 This is a flow chart of a specific method for identifying modules to be upgraded disclosed in this application;
[0039] Figure 5 This is a flow chart of a specific method for identifying modules to be upgraded disclosed in this application;
[0040] Figure 6 This is a schematic structural diagram of a device for identifying modules to be upgraded disclosed in this application;
[0041] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0043] Currently, in existing distributed storage, the upgrade solution generally involves upgrading all modules involved in the storage. While this fundamentally ensures that all modules in the distributed storage are upgraded to the latest version, upgrading all modules at once can significantly impact storage service performance. Furthermore, during the upgrade process, unnecessary modules are also upgraded, significantly increasing the upgrade time. To address this issue, the present application provides a solution for identifying modules to be upgraded, which can reduce the actual upgrade process time and minimize the impact of the upgrade process on service performance.
[0044] The embodiment of the present invention discloses a method for identifying a module to be upgraded. Figure 1 As shown, the method includes:
[0045] Step S11: Obtain the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the association relationship between the service, the file associated with the service restart, and the management module associated with the file.
[0046] In this embodiment, for the distributed storage system version upgrade, the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version are obtained. It can be understood that the file-service-module tree is a multi-level relationship tree generated based on the relationship between the service, the file associated with the restart of the service, and the management module associated with the file. That is to say, if a file is known, the service to be restarted and the corresponding module to be upgraded corresponding to the file are determined according to the file-service-module tree.
[0047] Before upgrading the version of the distributed storage system, the files associated with the service restart are taken as units, and the modules of the distributed storage system are divided according to the units to obtain a plurality of management modules associated with the files. That is, the business modules of the distributed storage system are divided into several management modules according to the correlation between the parts, and the functions within each management module are independent, and a unified interface is provided to the outside. When dividing the modules, the above-mentioned file-service-module tree is generated based on the relationship between the divided services, the files associated with the service restart, and the management modules associated with the files. In addition, a version upgrade package for upgrading the distributed storage system is constructed; the version upgrade package stores the second full code file corresponding to the target system version and the file-service-module tree, so the second full code file corresponding to the target version and the file-service-module tree corresponding to the target version can be obtained from the version upgrade package corresponding to the target version, and the first full code file corresponding to the current system version of the distributed storage system can be obtained from the current environment of the distributed storage system. That is to say, when building the target system version, the files associated with service restart are taken as units, the upgrade modules are divided according to the units, and a multi-level file-service-module tree is formed and stored in the upgrade package. Moreover, when the version is built, the full code files corresponding to the target system version are pulled from the code library and stored as allCode and stored in the upgrade package. Then, when obtaining the second full code file corresponding to the target system version, the allCode of the target system version and the file-service-module tree corresponding to the target system version can be found in the upgrade package, and the allCode of the current system version can be found in the system environment that needs to be upgraded.
[0048] Step S12: determining the differences between the first full code file and the second full code file, and generating a difference file list between the current system version and the target system version based on the differences.
[0049] It should be pointed out that if the system environment needs to be upgraded, preparatory work before the upgrade is required first. That is, at this stage, the modules to be upgraded need to be identified, and the identification of the modules to be upgraded requires the determination of the differences in the full code.
[0050] In this embodiment, after obtaining the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version, the difference points between the first full code file and the second full code file are determined by a preset difference point determination method, and then a difference file list between the current system version and the target system version is generated based on the difference points. That is to say, with allCode in the upgrade package (i.e., the code in the second full code file) as the basic code, the difference points between the code in the above-mentioned first full code file and the code in the above-mentioned second full code file are determined, and the code that needs to be modified, added, and deleted in the code in the first code file in the current system version is obtained, and then these codes that need to be modified, added, and deleted in the first code file are stored in the modifyCode directory according to the modification type, thereby obtaining a difference file list between the current system version and the target system version.
[0051] Step S13: Identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree.
[0052] In this embodiment, after generating a list of difference files between the current system version and the target system version based on the difference points, the modules to which each difference file in the difference file list belongs are determined from the file-service-module tree, and the management module to be upgraded in the current system version is obtained. Specifically, the files in the difference file list are traversed, and the services to be restarted and the management modules to be upgraded associated with each file in the current system version are identified according to the file-service-module tree. For example, the files in the modifyCode directory are traversed, and the services to be restarted and the management modules to be upgraded are obtained according to the file-service-module tree.
[0053] It can be seen that the embodiment of the present application determines the differences between the full code files of the current system version and the target system version, and automatically identifies the management modules to be upgraded in the current system version based on the differences, thereby avoiding upgrading all modules in the distributed storage system, reducing the time of the actual upgrade process of the distributed storage system, and reducing the impact of the upgrade process on business performance.
[0054] See also Figure 2 As shown, the embodiment of the present invention discloses a specific method for identifying modules to be upgraded. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.
[0055] Step S21: Obtain the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the association relationship between the service, the file associated with the service restart, and the management module associated with the file.
[0056] Step S22: comparing the first full code file with the second full code file to determine differences between the first full code file and the second full code file.
[0057] In this embodiment, after obtaining the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version, the first full code file is compared with the second full code file to determine the differences between the first full code file and the second full code file. In other words, the code in the first full code file is compared with the code in the second full code file to determine the code differences between the first full code file and the second full code file.
[0058] Step S23: generating a difference file list between the current system version and the target system version based on the difference points.
[0059] Step S24: Identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree.
[0060] For the specific contents of the above-mentioned step S21 and steps S23 to S24, reference may be made to the corresponding contents disclosed in the above-mentioned embodiments, and no further details will be given here.
[0061] It can be seen that the embodiment of the present application compares the first full code file with the second full code file, and determines the difference points between the full code files of the current system version and the target system version based on the corresponding code comparison results, thereby automatically identifying the management module to be upgraded in the current system version based on the difference points, thereby avoiding upgrading all modules in the distributed storage system, reducing the time of the actual upgrade process of the distributed storage system, and reducing the impact of the upgrade process on business performance.
[0062] See also Figure 3 As shown, the embodiment of the present invention discloses a specific method for identifying modules to be upgraded. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.
[0063] Step S31: Obtain the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the association relationship between the service, the file associated with the service restart, and the management module associated with the file.
[0064] Step S32: using a preset MD5 algorithm to process the first full code file and the second full code file to obtain a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file.
[0065] In this embodiment, after obtaining the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version, the preset MD5 (Message-Digest Algorithm 5) can be used to process the first full code file and the second full code file to obtain a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file.
[0066] Step S33: Compare the first hash value with the second hash value to determine the differences between the first full code file and the second full code file.
[0067] In this embodiment, the first full code file and the second full code file are processed using a preset MD5 algorithm to obtain a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file. Then, the first hash value is compared with the second hash value to determine the differences between the first full code file and the second full code file. That is, after MD5 processing is performed on the first full code file and the second full code file to obtain corresponding MD5 values, the differences between the first full code file and the second full code file are determined based on the comparison of the MD5 values.
[0068] Step S34: generating a list of difference files between the current system version and the target system version based on the difference points.
[0069] Step S35: Identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree.
[0070] For the specific contents of the above-mentioned step S31 and steps S34 to S35, reference may be made to the corresponding contents disclosed in the above-mentioned embodiments, which will not be repeated here.
[0071] It can be seen that the embodiment of the present application uses the preset MD5 algorithm to process the first full code file corresponding to the current system version and the second full code file corresponding to the target system version, and obtains a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file, and then determines the difference points between the full code files of the current system version and the target system version based on the comparison results of the first hash value and the second hash value, so as to automatically identify the management module to be upgraded in the current system version based on the difference points, thereby avoiding upgrading all modules in the distributed storage system, reducing the time of the actual upgrade process of the distributed storage system, and reducing the impact of the upgrade process on business performance.
[0072] For example, Figure 4 As shown, the pre-upgrade preparation work begins, that is, defining the file-service-module relationship tree, and finding the currentAllCode (i.e., the current full code) of the current system version from the system environment of the current distributed storage system, and finding the targetAllCode (i.e., the target full code) of the target system version from the target upgrade package. Then, based on the targetAllCode, the MD5 value between the currentAllCode of the current system version and the targetAllCode of the target system version is compared to obtain the code to be modified, added, or deleted in the currentAllCode of the current system version. These codes to be modified, added, or deleted are stored in the modifyCode directory according to the modification type, that is, a list of difference files modifyCode between the current system version and the target system version is obtained. Then, the file-service-module tree corresponding to the target system version is found in the upgrade package, the files to be updated in the modifyCode are traversed, and the services to be restarted and the modules to be upgraded related to the files to be updated are searched level by level, and then each module to be upgraded is upgraded one by one, that is, the corresponding files in each module to be upgraded are updated, and the corresponding services are restarted after the file update is completed, that is, the upgrade work of the modules to be upgraded is completed. After the upgrade of each module to be upgraded is completed, the relevant services are successfully restarted, and the version upgrade work of the current distributed storage system is completed.
[0073] See also Figure 5 As shown, the embodiment of the present invention discloses a specific method for identifying modules to be upgraded. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.
[0074] Step S41: Obtain the first full code file corresponding to the current system version of the distributed storage system, the second full code file corresponding to the target system version, and the file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the association relationship between the service, the file associated with the service restart, and the management module associated with the file.
[0075] Step S42: determining the differences between the first full code file and the second full code file, and generating a difference file list between the current system version and the target system version based on the differences.
[0076] Step S43: Identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree.
[0077] Step S44: updating the files to be updated in the management module to be upgraded, and after the files to be updated are updated, restarting the service to be restarted associated with the files to be updated to upgrade the management module to be upgraded.
[0078] In this embodiment, after the management module to be upgraded in the current system version is identified, the corresponding upgrade operation can be performed to upgrade the distributed storage system from the current system version to the target system version, that is, the files to be updated in the management module to be upgraded are updated, and when the files to be updated are updated, the services to be restarted associated with the files to be updated are restarted to upgrade the management module to be upgraded. It can be understood that during the upgrade process, the identified management modules to be upgraded are upgraded one by one, and during the upgrade process, the files to be updated in the management module to be upgraded first need to be updated, and after the file update is completed, the restart operation of the related services to be restarted is performed. After the files to be updated in the management module to be upgraded are updated and the restart work of each service to be restarted is completed, the management module to be upgraded is upgraded. Therefore, after the upgrade work of each management module to be upgraded is completed one by one, the upgrade work of the current distributed storage system version is completed, thereby minimizing the files to be updated and the services to be restarted during the upgrade process, thereby reducing the time of the actual upgrade process of the distributed storage system and reducing the impact of the upgrade process on business performance.
[0079] For the specific contents of the above steps S41 to S43, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be repeated here.
[0080] It can be seen that the embodiment of the present application determines the difference points between the full code files of the current system version and the target system version, and thus automatically identifies the management module to be upgraded in the current system version based on the difference points, and then updates the files to be updated in the management module to be upgraded. After the files to be updated are updated, the restarted service associated with the files to be updated is restarted to upgrade the management module to be upgraded. The present application only upgrades the identified management module to be upgraded, thereby avoiding upgrading all modules in the distributed storage system, reducing the time of the actual upgrade process of the distributed storage system, and reducing the impact of the upgrade process on business performance.
[0081] Correspondingly, the embodiment of the present application also discloses a device for identifying a module to be upgraded, see Figure 6 As shown, the device includes:
[0082] A code file acquisition module 11 is configured to acquire a first full code file corresponding to the current system version of the distributed storage system, a second full code file corresponding to the target system version, and a file-service-module tree corresponding to the target version; the file-service-module tree is a multi-level relationship tree generated based on the relationship between a service, a file associated with restarting the service, and a management module associated with the file;
[0083] a difference determination module 12, configured to determine the difference between the first full code file and the second full code file;
[0084] A file list generating module 13 is configured to generate a difference file list between the current system version and the target system version based on the difference points;
[0085] The identification module 14 is configured to identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree.
[0086] As can be seen from the above, the embodiment of the present application determines the differences between the full code files of the current system version and the target system version, and automatically identifies the management modules to be upgraded in the current system version based on the differences, thereby avoiding upgrading all modules in the distributed storage system, reducing the time of the actual upgrade process of the distributed storage system, and reducing the impact of the upgrade process on business performance.
[0087] In some specific embodiments, the module identification device to be upgraded may specifically include:
[0088] A division module is used to take the file associated with the service restart as a unit, and divide each module of the distributed storage system according to each unit to obtain a plurality of management modules associated with the file.
[0089] In some specific embodiments, the module identification device to be upgraded may specifically include:
[0090] An upgrade package construction module, configured to construct a version upgrade package for upgrading the distributed storage system; the version upgrade package storing the second full code file corresponding to the target system version and the file-service-module tree;
[0091] Accordingly, the code file acquisition module 11 may specifically include:
[0092] A first file acquisition unit is configured to acquire, from a current environment of the distributed storage system, a first full code file corresponding to a current system version of the distributed storage system;
[0093] The second file acquisition unit is used to obtain the second full code file corresponding to the target version and the file-service-module tree corresponding to the target version from the version upgrade package corresponding to the target version.
[0094] In some specific embodiments, the difference determination module 12 may specifically include:
[0095] The file comparison module is configured to compare the first full code file with the second full code file to determine differences between the first full code file and the second full code file.
[0096] In some specific embodiments, the file comparison module may specifically include:
[0097] a file processing module, configured to process the first full code file and the second full code file using a preset MD5 algorithm to obtain a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file;
[0098] A hash value comparison module is configured to compare the first hash value with the second hash value to determine differences between the first full code file and the second full code file.
[0099] In some specific embodiments, the identification module 14 may specifically include:
[0100] The file traversal module is used to traverse the files in the difference file list and identify the services to be restarted and the management modules to be upgraded associated with each file in the current system version according to the file-service-module tree.
[0101] In some specific embodiments, the module identification device to be upgraded may specifically include:
[0102] A file updating module, used for updating the files to be updated in the management module to be upgraded;
[0103] The service starting module is used to restart the service to be restarted associated with the file to be updated to upgrade the management module to be upgraded after the file to be updated is updated.
[0104] Furthermore, an embodiment of the present application also provides an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.
[0105] Figure 7 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the method for identifying a module to be upgraded disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may be a computer.
[0106] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0107] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0108] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of implementing the method for identifying a module to be upgraded performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program capable of implementing other specific tasks.
[0109] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the method for identifying the module to be upgraded disclosed in any of the aforementioned embodiments are implemented.
[0110] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0111] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0112] The above is a detailed introduction to the method, device, equipment and storage medium for identifying modules to be upgraded provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for identifying a module to be upgraded, characterized in that: include: Obtain a first full code file corresponding to the current system version of the distributed storage system, a second full code file corresponding to the target system version, and a file-service-module tree corresponding to the target system version; The file-service-module tree is a multi-level relationship tree generated based on the relationship between the service, the file associated with the service restart, and the management module associated with the file; Determining differences between the first full code file and the second full code file, and generating a difference file list between the current system version and the target system version based on the differences; Identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree; Before the multi-level relationship tree is generated based on the association relationship between the service, the file associated with the service restart, and the management module associated with the file, the following is also included: Taking the file associated with the service restart as a unit, dividing the modules of the distributed storage system according to the units to obtain a plurality of management modules associated with the file; The determining of differences between the first full code file and the second full code file includes: The first full code file and the second full code file are processed using a preset MD5 algorithm to obtain a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file; the first hash value is compared with the second hash value to determine the differences between the first full code file and the second full code file.
2. The method for identifying a module to be upgraded according to claim 1, wherein: Also includes: Constructing a version upgrade package for upgrading the distributed storage system; the version upgrade package stores the second full code file corresponding to the target system version and the file-service-module tree; Accordingly, the step of obtaining a first full code file corresponding to the current system version of the distributed storage system, a second full code file corresponding to the target system version, and a file-service-module tree corresponding to the target system version includes: Acquire a first full code file corresponding to the current system version of the distributed storage system from the current environment of the distributed storage system; The second full code file corresponding to the target system version and the file-service-module tree corresponding to the target system version are obtained from the version upgrade package corresponding to the target system version.
3. The method for identifying a module to be upgraded according to claim 1, wherein: The step of identifying the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree includes: The files in the difference file list are traversed, and the services to be restarted and the management modules to be upgraded associated with each of the files in the current system version are identified according to the file-service-module tree.
4. The method for identifying a module to be upgraded according to claim 3, wherein: After identifying the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree, the method further includes: The file to be updated in the management module to be upgraded is updated, and after the file to be updated is updated, the service to be restarted associated with the file to be updated is restarted to upgrade the management module to be upgraded.
5. A device for identifying a module to be upgraded, characterized in that: include: A code file acquisition module is used to acquire a first full code file corresponding to the current system version of the distributed storage system, a second full code file corresponding to the target system version, and a file-service-module tree corresponding to the target system version; The file-service-module tree is a multi-level relationship tree generated based on the relationship between the service, the file associated with the service restart, and the management module associated with the file; a difference determination module, configured to determine the difference between the first full code file and the second full code file; A file list generating module, configured to generate a difference file list between the current system version and the target system version based on the difference points; an identification module, configured to identify the management module to be upgraded in the current system version according to the difference file list and the file-service-module tree; The module identification device to be upgraded is specifically used for: Taking the file associated with the service restart as a unit, dividing the modules of the distributed storage system according to the units to obtain a plurality of management modules associated with the file; The difference point determination module is specifically used to: Processing the first full code file and the second full code file using a preset MD5 algorithm to obtain a first hash value corresponding to the first full code file and a second hash value corresponding to the second full code file; The first hash value is compared with the second hash value to determine the difference between the first full code file and the second full code file.
6. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the method for identifying a module to be upgraded according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the steps of the method for identifying a module to be upgraded according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Software upgrading method and device, server and computer readable storage medium
CN114296777A
Firmware upgrading method and device, electronic equipment and storage medium
CN114546460A