System migration compatibility evaluation method and device based on migration strategy
By parsing the binary files and symbol information in the source operating system, combined with the retention policy of the system migration tool, it directly evaluates whether the target operating system has the required basic library files and symbol information, solving the problem of poor compatibility evaluation accuracy in the existing technology. issues, enabling a more accurate system migration compatibility assessment.
Patent Information
- Application Number
- CN202410590741.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-05-13
AI Technical Summary
In the existing technology, the accuracy of compatibility assessment during system migration is poor, mainly because when building a virtual environment that is the same as the destination operating system for evaluation, the system migration tool may include some rpm packages in the source operating system in the destination operating system. retained, resulting in inaccurate assessment results.
By obtaining the binary files related to the business software in the source operating system, parsing the dependent basic library files and symbol information, determining the rpm package to which it belongs, and removing unnecessary rpm packages according to the retention policy of the system migration tool, only for The remaining part is evaluated for compatibility, using whether the target operating system has the required basic library files and symbol information to evaluate the compatibility between the business software and the target operating system.
It improves the evaluation accuracy of system migration tools in the rpm package migration process, avoids the need to build a virtual environment, enhances the accuracy of compatibility evaluation, and satisfies the compatibility analysis of business software in the target operating system.
Smart Images

Figure CN118363658B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a system migration compatibility evaluation method and device based on migration strategy. Background Art
[0002] After using the server operating system for a period of time, such as 5 years, enterprise users will face the need to update the operating system. However, due to the characteristics of the business software itself, such as long development cycle and many iterations, it is difficult to redeploy it in the new operating system environment. Therefore, it is required to change the operating system by in-place migration of the operating system. The principle of in-place migration of the operating system is: keep the hardware platform and upper-layer business software unchanged, and only replace the basic components of the operating system. In-place migration of the operating system needs to ensure that the target operating system after migration is compatible with the business software before migration.
[0003] In the related art, a virtual environment identical to the target operating system after migration is constructed, and then the business software is simulated to run in the virtual environment to evaluate whether the two are compatible. However, during the migration process, the system migration tool may retain some rpm packages in the source operating system in the target operating system. Therefore, the compatibility evaluation method of constructing a virtual environment identical to the target operating system has poor evaluation accuracy. Summary of the invention
[0004] The present invention provides a system migration compatibility assessment method and device based on migration strategy, which can solve the problem of poor compatibility assessment accuracy in related technologies. The technical solution is as follows:
[0005] In one aspect, a system migration compatibility assessment method based on a migration strategy is provided, the method comprising:
[0006] Obtaining a binary file related to the business software in the source operating system, and obtaining a first basic library file on which the business software depends and first symbol information called for the first basic library file by parsing the binary file;
[0007] Determine a first rpm package to which the first basic library file belongs;
[0008] According to the retention policy set by the system migration tool for the rpm package, determining a second rpm package in the first rpm package that is retained during the system migration process, removing the second rpm package from the first rpm package, and obtaining a remaining third rpm package;
[0009] Determine a second basic library file in the first basic library file that belongs to the third rpm package;
[0010] Determine whether the target operating system has the second basic library file and the first symbol information called for the second basic library file, and obtain an evaluation result of whether the business software is compatible with the target operating system based on the determination result.
[0011] On the other hand, a system migration compatibility assessment device based on a migration strategy is provided, the device comprising:
[0012] An acquisition and parsing unit is used to acquire a binary file related to the business software in the source operating system, and obtain a first basic library file on which the business software depends and first symbol information called for the first basic library file by parsing the binary file;
[0013] A first determining unit, configured to determine a first rpm package to which the first basic library file belongs;
[0014] a second determining unit, configured to determine, according to a retention policy set by the system migration tool for the rpm package, a second rpm package retained in the first rpm package during the system migration process, and remove the second rpm package from the first rpm package to obtain a remaining third rpm package;
[0015] A third determining unit, configured to determine a second basic library file belonging to the third rpm package in the first basic library file;
[0016] The evaluation and determination unit is used to determine whether the target operating system has the second basic library file and the first symbol information called for the second basic library file, and obtain an evaluation result of whether the business software is compatible with the target operating system based on the determination result.
[0017] On the other hand, a computer device is provided, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of the above-mentioned system migration compatibility assessment method based on migration strategy.
[0018] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned system migration compatibility assessment method based on migration strategy are implemented.
[0019] On the other hand, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned system migration compatibility assessment method based on migration strategy when executed by a processor.
[0020] The technical solution provided by the present invention can at least bring the following beneficial effects:
[0021] During the migration of the rpm package, the system migration tool will consider retaining some basic library files in the source operating system that comply with the retention policy in the target operating system. If some basic library files that the business software depends on are retained basic library files, then these basic library files do not need to be analyzed for compatibility, and only the remaining basic library files need to be evaluated for compatibility. This solution does not require the construction of a virtual environment, and can implement compatibility evaluation using the basic library files that the business software depends on and the symbol information called for the basic library files. This solution also takes into account the retention policy set by the system migration tool, which can improve the accuracy of the evaluation results when performing compatibility evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 This is a flow chart of a system migration compatibility assessment method based on a migration strategy provided by an embodiment of the present invention;
[0024] Figure 2 to Figure 5 is a schematic diagram of a migration retention strategy provided by an embodiment of the present invention;
[0025] Figure 6 It is a structural diagram of a system migration compatibility assessment device based on migration strategy provided by an embodiment of the present invention;
[0026] Figure 7 It is a hardware architecture diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0028] As mentioned above, the related technology is to evaluate whether the two are compatible by building a virtual environment that is the same as the target operating system after migration, and then simulating the operation of the business software in the virtual environment. However, during the migration process, the system migration tool may retain some rpm packages in the source operating system in the target operating system to enhance the compatibility between the business software and the target operating system. Therefore, the evaluation accuracy of compatibility by building a virtual environment that is the same as the target operating system is poor.
[0029] The inventive concept of the present invention is that: the business software can run compatibly in the target operating system, which is related to the basic library files provided by the target operating system, and the business software needs to call the symbol information in the basic library files when running. Based on this, when evaluating whether the business software is compatible with the target operating system, it is not necessary to build a virtual environment, but to determine whether the target operating system has the basic library files that the business software depends on and the symbol information called for the basic library files to achieve compatibility evaluation; and the system migration tool sets a retention policy for the rpm package, that is, the part of the rpm package that meets the retention policy in the source operating system is retained in the target operating system. In this way, when analyzing the compatibility, the part of the retained rpm package needs to be screened out to ensure the accuracy of the evaluation result.
[0030] The specific implementation of the above concept is described below.
[0031] Please refer to Figure 1 , an embodiment of the present invention provides a system migration compatibility assessment method based on a migration strategy, the method comprising:
[0032] Step 100, obtaining a binary file related to the business software in the source operating system, and obtaining a first basic library file on which the business software depends and first symbol information called for the first basic library file by parsing the binary file;
[0033] Step 102, determining the first rpm package to which the first basic library file belongs;
[0034] Step 104: determining a second rpm package retained in the first rpm package during the system migration process according to a retention policy set for the rpm package by the system migration tool, removing the second rpm package from the first rpm package, and obtaining a remaining third rpm package;
[0035] Step 106, determining a second basic library file in the first basic library file that belongs to the third rpm package;
[0036] Step 108, determining whether the target operating system has the second basic library file and the first symbol information called for the second basic library file, and obtaining an evaluation result of whether the business software is compatible with the target operating system based on the determination result.
[0037] In the embodiment of the present invention, the system migration tool will consider retaining a part of the basic library files in the source operating system that comply with the retention policy in the target operating system during the migration of the rpm package. If the part of the basic library files that the business software depends on belongs to the retained basic library files, then there is no need to perform compatibility analysis on the part of the basic library files, and only the compatibility assessment needs to be performed on the remaining basic library files. This solution does not require the construction of a virtual environment, and can implement compatibility assessment using the basic library files that the business software depends on and the symbol information called for the basic library files. In addition, this solution takes into account the retention policy set by the system migration tool, and can improve the accuracy of the assessment result when performing the compatibility assessment.
[0038] Described below Figure 1 How the various steps are performed.
[0039] First, for step 100, a binary file related to the business software in the source operating system is obtained, and a first basic library file on which the business software depends and first symbol information called for the first basic library file are obtained by parsing the binary file.
[0040] In the embodiment of the present invention, the binary files related to the business software need to be obtained in the source operating system environment of the customer. In the embodiment of the present invention, the binary files can be obtained at least in the following ways (S11-S14):
[0041] S11: Traverse the process services running in the source operating system to obtain a binary file corresponding to each process service;
[0042] The business software runs in the source operating system. The process services running in the source operating system must contain process services of the business software. Therefore, binary files related to the business software can be obtained by traversing the process services running in the source operating system.
[0043] S12: Filter out the binary file executed by the source operating system basic service from the binary files corresponding to each process service obtained through traversal, obtain the first binary file related to the business software, and record the obtained first binary file into a list to obtain a list A1;
[0044] Since not all process services running in the source operating system are process services of the business software, but there are binary files executed by some basic services, among which the binary files of the source operating system's basic services can be obtained in the official software release package released for the source operating system, the binary files executed by this part of the basic services can be filtered out from the traversed binary files to obtain the first binary file related to the business software.
[0045] S13: Acquire the designated business software input by the user, and traverse the designated business software in the source operating system to obtain a second binary file corresponding to the designated business software, and record the second binary file in a list to obtain a list A2;
[0046] Since not all business software in the operating system may be in operation, the first binary file obtained may not overwrite the business software that is not in operation. In an embodiment of the present invention, the user is familiar with the business software deployed in the operating system, and the user can input the specified business software to obtain the binary file related to the specified business software.
[0047] S14: performing a union operation on the first binary file A1 and the second binary file A2 to obtain a binary file A3 related to the business software in the source operating system.
[0048] Since the first binary file may miss some non-running business software, and the user only cares about a single business software in the second binary file, some business software may be missed. Therefore, the first binary file and the second binary file can be merged to make up for their respective shortcomings. The merged binary file covers a wider range of business software and is more accurate, thereby further improving the accuracy of the compatibility assessment results.
[0049] It should be noted that, in addition to the above-mentioned method, only the first binary file or the second binary file may be used as a binary file related to the business software.
[0050] After obtaining the binary file related to the business software in the source operating system, the binary file needs to be parsed to obtain the basic library file in the binary file, and the obtained basic library file is determined as the first basic library file that the business software depends on; continue to parse the first basic library file to obtain all the symbol information contained in the first basic library file. Not all the symbol information in the first basic library file needs to be called by the business software, and the first symbol information called by the business software for the first basic library file is filtered out from all the symbol information. Among them, the system command "readelf()" can be used to obtain the symbol information called by the business software in the system for a binary file.
[0051] It can be understood that in order for the business software to run normally in the target operating system, the target operating system needs to have a first basic library file and the first basic library file needs to have the first symbol information called by the business software. It can also be understood that the number of first basic library files can be at least one, and each first basic library file has at least one first symbol information. For example, the first basic library files are file 11, file 12, file 13, file 21, file 22 and file 31, respectively. The first symbol information called in file 11 is symbol information 111 and symbol information 112. The first symbol information called in file 12 is symbol information 211, symbol information 212 and symbol information 213, and so on.
[0052] Then, step 102 , step 104 , and step 106 are described simultaneously.
[0053] Since the system migration tool sets a retention policy for the rpm package when migrating the basic rpm package of the operating system, if the rpm package meets the retention policy, the rpm package will be retained during the migration process. Therefore, it is necessary to determine whether there is a retained rpm package in the rpm package belonging to the first basic library file.
[0054] In the embodiment of the present invention, after obtaining the first basic library file, the rpm package to which the first basic library file belongs can be inferred. For example, file 11, file 12, and file 13 belong to rpm1, file 21 and file 22 belong to rpm2, and file 31 belongs to rpm3. The inferred rpm packages are sorted to obtain an rpm package list, which is recorded as A4.
[0055] Since the basic components of different operating systems are stored in their respective software repositories in the form of rpm packages, comparing whether the basic components provided by two operating systems are the same is essentially comparing the differences between the rpm packages in the two software repositories. In the actual migration process, it is almost impossible for the software packages of the software repositories of the two operating systems to correspond one to one, and there are dependencies between the rpm packages in the operating system software repositories, which means that during the replacement process, a certain rpm package of the source operating system will have at least the following problems in the target operating system:
[0056] 1. Another rpm package that the rpm package depends on is missing in the target operating system; 2. The rpm package is missing in the target operating system; 3. The rpm package is split into multiple rpm packages in the target operating system; 4. The rpm package is merged with other rpm packages in the target operating system.
[0057] In view of the above problems, when migrating the basic components of the target operating system to the hardware architecture of the source operating system, the system migration tool will consider whether the business software will be compatible after the migration. Therefore, a retention policy will be set for the rpm package based on the above problems. The retention policy may at least include the following contents:
[0058] 1. If another rpm package that the rpm package depends on is missing in the target operating system, keep these two rpm packages in the target operating system during migration. Figure 2 , is a schematic diagram of the migration retention strategy. The left side is a partial schematic diagram of the source dependency tree, and the right side is a partial schematic diagram of the target dependency tree. In the source dependency tree, rpmC depends on rpmA. In the target operating system, rpmA is replaced by rpmB, so that rpmC has no dependency on rpmA in the target operating system. The system migration tool retains rpmC and rpmA during the migration process.
[0059] 2. If the rpm package is missing in the target operating system, it means that the rpm package has been eliminated in the software library of the target operating system. In this case, the rpm package should be retained in the target operating system during migration. Figure 3 , is a schematic diagram of the migration retention strategy. The left side is a partial schematic diagram of the source dependency tree, and the right side is a partial schematic diagram of the destination dependency tree. RpmA in the source dependency tree does not exist in the destination operating system, indicating that RpmA has been eliminated by the destination operating system. The system migration tool retains RpmA during the migration process.
[0060] 3. If the rpm package is split into multiple rpm packages in the target operating system, the rpm package should be retained in the target operating system during migration. Figure 4, is a schematic diagram of the migration retention strategy. The left side is a partial schematic diagram of the source dependency tree, and the right side is a partial schematic diagram of the destination dependency tree. RpmA in the source dependency tree is split into rpmB1 and rpmB2 in the destination operating system. The system migration tool retains rpmA during the migration process.
[0061] 4. If the rpm package is merged with other rpm packages in the target operating system, the rpm package and other rpm packages will be retained in the target operating system during migration. Figure 5 , is a schematic diagram of the migration retention strategy. The left side is a partial schematic diagram of the source dependency tree, and the right side is a partial schematic diagram of the destination dependency tree. In the source dependency tree, rpmA1 and rpmA2 are merged into rpmB in the destination operating system. The system migration tool retains rpmA1 and rpmA2 during the migration process.
[0062] According to the above retention policy, in step 102 of the embodiment of the present invention, the second rpm to be retained in the first rpm package during the system migration process needs to be determined using the retention policy, including:
[0063] S21, generating a source dependency tree and a destination dependency tree corresponding to the source operating system and the destination operating system one by one according to the dependency relationship between the rpm packages in the software library provided by the operating system;
[0064] S22, determining the rpm difference data of the target operating system relative to the source operating system according to the positions of the rpm packages in the source dependency tree and the target dependency tree;
[0065] S23. For each of the first rpm packages, the following steps are performed: determining whether the target operating system has made changes to the first rpm package based on the rpm difference data; if so, determining whether the change method satisfies the retention policy set for the rpm package by the system migration tool; if so, determining the first rpm package as the retained second rpm package.
[0066] Each node in the dependency tree corresponds to an rpm package, and there is a dependency relationship between two nodes that are connected in the dependency tree. The rpm difference data of the target operating system relative to the source operating system can be determined based on the position of the rpm packages in the source dependency tree and the target dependency tree. The rpm difference data refers to the changes that have occurred in the rpm in the source operating system in the target operating system.
[0067] In the embodiment of the present invention, we only need to care about what changes have occurred in the first rpm package that the business software depends on in the target operating system, and we do not need to care about whether other rpm packages have changed.
[0068] In step S23, if the change mode of the first rpm package meets the retention policy set by the system migration tool for the rpm package, the first rpm package is retained. In this way, the second rpm package retained in the system migration process can be determined in the first rpm package. Assuming that rpm3 is retained, the remaining third rpm packages are rpm1 and rpm2. The rpm package list A4 is updated to obtain the rpm package list A5.
[0069] Furthermore, since the second rpm package will be retained in the target operating system during system migration, there is no need to perform compatibility analysis on the first basic library files contained in the rpm package. Instead, it is necessary to analyze the first basic library files contained in the third rpm package and use the basic library files in the first basic library files belonging to the third rpm package as the second basic library files.
[0070] It can be seen that the embodiment of the present invention takes into account the retention policy set by the system migration tool for the rpm package, removes the first basic library files that will be retained during the system migration process, and only analyzes the remaining second basic library files, thereby improving the accuracy of the compatibility analysis results.
[0071] Finally, for step 108, it is determined whether the target operating system has the second basic library file and the first symbol information called for the second basic library file, and an evaluation result of whether the business software is compatible with the target operating system is obtained based on the determination result.
[0072] In an embodiment of the present invention, if the target operating system has a second basic library file and the first symbol information called for the second basic library file, then the evaluation result can be that the business software is compatible with the target operating system; otherwise, the evaluation result is that the business software is incompatible with the target operating system.
[0073] In the embodiment of the present invention, whether the target operating system has the second basic library file and the first symbol information called for the second basic library file can be determined at least in the following manner:
[0074] S81, obtaining difference comparison data of the target operating system relative to the source operating system at a difference granularity of symbol information; the difference types include same, added, removed and changed;
[0075] S82. Determine, based on the difference comparison data, whether the target operating system has removed and / or changed the first symbol information called by the business software for the second basic library file relative to the source operating system; if so, determine that the business software is incompatible with the target operating system.
[0076] In step S81, the difference comparison data is generated in advance based on the official software release package and software debugging package for the source operating system and the target operating system. After determining the source operating system version and the target operating system version that the customer needs to migrate on-site, the difference comparison data of the target operating system relative to the source operating system is obtained, and the difference granularity of the difference comparison data is the level of symbol information. Among them, the difference granularity can be rpm package level, basic library file level, and symbol information level from high level to low level. Since the business software needs to call the function interface during operation, and the function interface belongs to the symbol information level, therefore, only using the basic library file for compatibility analysis and evaluation, the accuracy of the evaluation result is poor.
[0077] In order to obtain the difference comparison data of the target operating system with respect to the source operating system in the difference granularity of symbol information, it is necessary to collect the symbol information of the source operating system and the target operating system respectively in advance. In the embodiment of the present invention, the symbol information of the operating system can be collected at least in the following manner (S811-S814):
[0078] S811: Obtain the official software release package and software debugging package for the corresponding version of the operating system.
[0079] In this step, the software release package is a software package officially released for the operating system, and the software release package includes multiple rpm packages; the software debugging package is a software package corresponding to the debugging information of the software release package, and the name of the software debugging package generally has the word debuginfo after it.
[0080] S812: Parse the basic library files provided by the version of the operating system from the software release package, and parse the software debugging files provided by the version of the operating system from the software debugging package.
[0081] For Linux systems, the name of the basic library file parsed from the software release package usually has the word ".so.". The software debugging file parsed from the software debugging package has the same name as the basic library file, but the suffix of the software debugging file is usually ".dubug". The software debugging file records the symbol information provided by the corresponding basic file in the software release package.
[0082] S813: The basic library file and the software debugging file with the same file name are taken as a pair to obtain multiple file pairs.
[0083] S814: For each file pair, perform function matching using the basic library file and the software debugging file in the file pair to determine the symbol information in the basic library file in the file pair.
[0084] Since the basic library file of the software release package is a compiled binary file, the binary file is unreadable, while the software debugging file is a text file, which is equivalent to the source code and comment information before compilation. In an embodiment of the present invention, multiple function symbols can be retrieved from the software debugging file of the file pair by text retrieval, and then each function symbol is used to verify whether the function symbol exists in the basic library file of the file pair. If it exists, it is determined that the function symbol is the symbol information in the basic library file. If it does not exist, it is determined that the function symbol is not the symbol information in the basic library file.
[0085] By using the above method, the rpm package, the basic library file in the rpm package, and the symbol information in the basic library file can be obtained from both the source operating system and the target operating system. Then, the information obtained from the two operating systems is compared to obtain the difference comparison data. Among them, the difference types in the difference comparison data can include same, added, removed, and changed.
[0086] In one implementation, the difference comparison data at least includes a first difference comparison table whose difference granularity is a basic library file and a second difference comparison table whose difference granularity is symbol information; the second difference comparison table is a statistical analysis of the symbol information differences in the basic library files that exist in both the source operating system and the target operating system and whose difference type is a change;
[0087] Among them, the first difference comparison table records the differences between the basic library files of the target operating system and the source operating system, and the first difference comparison table includes multiple first difference items, each of which has a difference type, and the difference type may include same, added, removed and changed. For example, a first difference item includes the basic library file A1 of the source operating system and the basic library file A1 of the target operating system, and its difference type is same, indicating that the basic library file A1 exists in both the source operating system and the target operating system; for another example, a first difference item includes the basic library file A2 of the target operating system, and its difference type is added, indicating that the target operating system has added the basic library file A2 relative to the source operating system; for another example, a first difference item includes the basic library file A3 of the source operating system, and its difference type is removed, indicating that the target operating system has removed the basic library file A3 relative to the source operating system; for another example, a first difference item includes the basic library file A4 of the source operating system and the basic library file A5 of the target operating system, and its difference type is changed, indicating that the target operating system has changed the basic library file A4 in the source operating system to the basic library file A5.
[0088] For the basic library files whose difference types are same, removed, and added in the first difference comparison table, the corresponding difference types of the symbol information in the basic library files are also same, removed, and added. Therefore, in the second difference comparison table, there is no need to explain the symbol information in the basic library files whose difference types are same, removed, and added. Only the symbol information differences in the basic library files whose difference types are changed can be counted. In this way, the use of these two difference comparison tables can reduce the amount of difference comparison data and improve the evaluation speed of compatibility evaluation.
[0089] In order to further reduce the data volume of the symbol information in the second difference comparison table, the difference types of the symbol information in the second difference comparison table include removal, addition and change, and there is no need to count the symbol information with the same difference type. Among them, the second difference comparison table includes multiple second difference items, and the second difference items may include the identifier of the basic library file in the source operating system, the identifier of the basic library file in the target operating system, the difference type, the symbol information in the source operating system, and the symbol information in the target operating system. For example, a second difference item includes the identifier B11 of the basic library file in the source operating system, the identifier B21 of the basic library file in the target operating system, the difference type is addition, the symbol information in the source operating system is none, and the symbol information in the target operating system is symbol information B2111.
[0090] Based on the first difference comparison table and the second difference comparison table, step S82 may specifically include:
[0091] Determine, according to the first difference comparison table, whether there is a third basic library file whose difference type is removal and / or a fourth basic library file whose difference type is change in the second basic library file;
[0092] If the third basic library file exists, determining that the business software is incompatible with the target operating system;
[0093] If the fourth basic library file exists, determine whether there is removed and / or changed second symbol information in the first symbol information called for the fourth basic library file according to the second difference comparison table. If so, determine that the business software is incompatible with the target operating system.
[0094] The first step is to determine: if there is a third basic library file whose difference type is removed, it means that all symbol information in the third basic library file has been removed, which means that the third basic library file that the business software depends on and the first symbol information called for the third basic library file do not exist, so the business software is incompatible with the target operating system; if there is no third basic library file whose difference type is removed, it is necessary to determine the compatibility evaluation result in conjunction with the result of the second step.
[0095] The second step is to determine: if there is a fourth basic library file with a difference type of change, then locate the second difference item in the second difference comparison table according to the identifier of the fourth basic library file in the source operating system. The second difference item can be at least one, and then determine whether the second difference item contains the first symbol information called for the fourth basic library file, and the first symbol information is removed and / or changed. If it exists, the first symbol information is used as the second symbol information, so that the evaluation result can be obtained that the business software is incompatible with the target operating system. If it does not exist, it is necessary to determine the compatibility evaluation result in conjunction with the first step determination result.
[0096] If at least one of the above two determination results is incompatible, the evaluation result is incompatible; if the above two determination results are both compatible, the evaluation result is compatible.
[0097] In the above embodiments, the system migration tool will consider retaining a part of the basic library files in the source operating system that comply with the retention policy in the target operating system during the migration of the rpm package. If some of the basic library files that the business software depends on belong to the retained basic library files, then these basic library files do not need to be analyzed for compatibility, and only the remaining basic library files need to be evaluated for compatibility. This solution does not require the construction of a virtual environment, and can implement compatibility evaluation using the basic library files that the business software depends on and the symbol information called for the basic library files. This solution takes into account the retention policy set by the system migration tool, and can improve the accuracy of the evaluation results when performing compatibility evaluation.
[0098] Furthermore, when performing compatibility analysis on the remaining basic library files, whether the business software can run normally is not simply determined by whether the basic library files it depends on exist in the target operating system, but whether the symbol information in the basic library files called by the business software exists in the corresponding basic library files in the target operating system. Therefore, by analyzing the differences in symbol granularity, a more accurate evaluation result of whether the business software is compatible with the target operating system can be obtained.
[0099] Please refer to Figure 6The embodiment of the present invention provides a system migration compatibility assessment device based on a migration strategy, the device comprising:
[0100] An acquisition and parsing unit 601 is used to acquire a binary file related to the business software in the source operating system, and obtain a first basic library file on which the business software depends and first symbol information called for the first basic library file by parsing the binary file;
[0101] A first determining unit 602 is used to determine a first rpm package to which the first basic library file belongs;
[0102] The second determining unit 603 is used to determine the second rpm package retained in the system migration process in the first rpm package according to the retention policy set by the system migration tool for the rpm package, remove the second rpm package from the first rpm package, and obtain the remaining third rpm package;
[0103] A third determining unit 604 is used to determine a second basic library file belonging to the third rpm package in the first basic library file;
[0104] The evaluation and determination unit 605 is used to determine whether the target operating system has the second basic library file and the first symbol information called for the second basic library file, and obtain an evaluation result of whether the business software is compatible with the target operating system based on the determination result.
[0105] In one embodiment of the present invention, when the obtaining and parsing unit executes the step of obtaining the binary file related to the business software in the source operating system, the step specifically includes:
[0106] Traverse the process services running in the source operating system to obtain the binary file corresponding to each process service;
[0107] The binary file executed by the source operating system basic service is filtered out from the binary file corresponding to each process service obtained through traversal, so as to obtain a first binary file related to the business software;
[0108] Acquire the designated business software input by the user, and traverse the designated business software in the source operating system to obtain a second binary file corresponding to the designated business software;
[0109] The first binary file and the second binary file are combined to obtain a binary file related to the business software in the source operating system.
[0110] In one embodiment of the present invention, when the second determining unit executes the retention policy set for the rpm package according to the system migration tool to determine the second rpm package retained in the first rpm package during the system migration process, it specifically includes:
[0111] Generate a source dependency tree and a destination dependency tree corresponding to the source operating system and the destination operating system one by one according to the dependency relationship between the rpm packages in the software library provided by the operating system;
[0112] Determine the rpm difference data of the target operating system relative to the source operating system according to the positions of the rpm packages in the source dependency tree and the target dependency tree;
[0113] For each of the first rpm packages, the following steps are performed: determining whether the target operating system has made changes to the first rpm package based on the rpm difference data; if so, determining whether the change method meets the retention policy set for the rpm package by the system migration tool; if so, determining the first rpm package as the retained second rpm package.
[0114] In one embodiment of the present invention, the retention policy set for the rpm package includes at least one of the following:
[0115] If another rpm package that the rpm depends on is missing in the target operating system, the two rpm packages are retained in the target operating system during migration;
[0116] If the rpm package is missing in the target operating system, the rpm package is retained in the target operating system during migration;
[0117] If the rpm package is split into multiple rpm packages in the target operating system, the rpm package is retained in the target operating system during migration;
[0118] The rpm package and other rpm packages are merged in the target operating system, and the rpm package and other rpm packages are retained in the target operating system during migration.
[0119] In one embodiment of the present invention, the evaluation and determination unit is specifically configured to:
[0120] Obtaining difference comparison data of the target operating system relative to the source operating system at a difference granularity of symbol information; the difference types include identical, added, removed, and changed;
[0121] Based on the difference comparison data, determine whether the target operating system has removed and / or changed the first symbol information called by the business software for the second basic library file relative to the source operating system; if so, determine that the business software is incompatible with the target operating system.
[0122] In one embodiment of the present invention, the difference comparison data is generated in advance based on the software release package and software debugging package officially provided for the source operating system and the target operating system.
[0123] It should be noted that the system migration compatibility assessment device based on migration strategy provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system migration compatibility assessment device based on migration strategy provided in the above embodiment and the system migration compatibility assessment method embodiment based on migration strategy belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0124] The embodiment of the present application also provides a computer device, please refer to Figure 7 The computer device includes a processor and a memory, in which at least one instruction, at least one program, code set or instruction set is stored, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the system migration compatibility assessment method based on migration strategy provided by the above-mentioned method embodiments.
[0125] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the system migration compatibility assessment method based on migration strategy provided in the above-mentioned method embodiments.
[0126] An embodiment of the present application also provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the system migration compatibility assessment method based on migration strategy described in any of the above embodiments.
[0127] For the convenience of description, the above system or device is described as being divided into various modules or units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0128] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0129] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0130] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A system migration compatibility assessment method based on migration strategy, characterized in that: The method comprises: Obtaining a binary file related to the business software in the source operating system, and obtaining a first basic library file on which the business software depends and first symbol information called for the first basic library file by parsing the binary file; Determine a first rpm package to which the first basic library file belongs; According to the dependency relationship between the rpm packages in the software library provided by the operating system, a source dependency tree and a destination dependency tree corresponding to the source operating system and the destination operating system are generated; according to the positions of the rpm packages in the source dependency tree and the destination dependency tree, the rpm difference data of the destination operating system relative to the source operating system is determined; for each of the first rpm packages, the following is performed: according to the rpm difference data, whether the destination operating system has made changes to the first rpm package; if so, whether the change method satisfies the retention policy set for the rpm package by the system migration tool; if so, the first rpm package is determined as the retained second rpm package; removing the second rpm package from the first rpm package to obtain a remaining third rpm package; Determine a second basic library file in the first basic library file that belongs to the third rpm package; Obtain difference comparison data of the target operating system relative to the source operating system at a difference granularity of symbol information; difference types include identical, added, removed and changed; based on the difference comparison data, determine whether the target operating system has removed and / or changed the first symbol information called by the business software for the second basic library file relative to the source operating system; if so, determine that the business software is incompatible with the target operating system.
2. The method according to claim 1, characterized in that The step of obtaining binary files related to the business software in the source operating system includes: Traverse the process services running in the source operating system to obtain the binary file corresponding to each process service; The binary file executed by the source operating system basic service is filtered out from the binary file corresponding to each process service obtained through traversal, so as to obtain a first binary file related to the business software; Acquire the designated business software input by the user, and traverse the designated business software in the source operating system to obtain a second binary file corresponding to the designated business software; The first binary file and the second binary file are combined to obtain a binary file related to the business software in the source operating system.
3. The method according to claim 1, characterized in that The retention policy set for the rpm package includes at least one of the following: If another rpm package that the rpm package depends on is missing in the target operating system, the two rpm packages are retained in the target operating system during migration; If the rpm package is missing in the target operating system, the rpm package is retained in the target operating system during migration; If the rpm package is split into multiple rpm packages in the target operating system, the rpm package is retained in the target operating system during migration; The rpm package and other rpm packages are merged in the target operating system, and the rpm package and other rpm packages are retained in the target operating system during migration.
4. The method according to claim 1, characterized in that The difference comparison data is generated in advance based on the software release package and software debugging package officially provided for the source operating system and the target operating system.
5. A system migration compatibility assessment device based on migration strategy, characterized in that: The device comprises: An acquisition and parsing unit is used to acquire a binary file related to the business software in the source operating system, and obtain a first basic library file on which the business software depends and first symbol information called for the first basic library file by parsing the binary file; A first determining unit, configured to determine a first rpm package to which the first basic library file belongs; The second determination unit is used to generate a source dependency tree and a destination dependency tree corresponding to the source operating system and the destination operating system according to the dependency relationship between the rpm packages in the software library provided by the operating system; determine the rpm difference data of the destination operating system relative to the source operating system according to the positions of the rpm packages in the source dependency tree and the destination dependency tree; for each of the first rpm packages, perform the following steps: determine whether the destination operating system has made changes to the first rpm package according to the rpm difference data; if so, determine whether the change method satisfies the retention policy set by the system migration tool for the rpm package; if so, determine the first rpm package as the retained second rpm package; remove the second rpm package from the first rpm package to obtain the remaining third rpm package; A third determining unit, configured to determine a second basic library file belonging to the third rpm package in the first basic library file; An evaluation and determination unit is used to obtain difference comparison data of the target operating system relative to the source operating system at a difference granularity of symbol information; the difference types include identical, added, removed and changed; based on the difference comparison data, determine whether the target operating system has removed and / or changed the first symbol information called by the business software for the second basic library file relative to the source operating system; if so, determine that the business software is incompatible with the target operating system.
6. The device according to claim 5, characterized in that When the acquisition and parsing unit executes the acquisition of binary files related to the business software in the source operating system, the method specifically includes: Traverse the process services running in the source operating system to obtain the binary file corresponding to each process service; The binary file executed by the source operating system basic service is filtered out from the binary file corresponding to each process service obtained through traversal, so as to obtain a first binary file related to the business software; Acquire the designated business software input by the user, and traverse the designated business software in the source operating system to obtain a second binary file corresponding to the designated business software; The first binary file and the second binary file are combined to obtain a binary file related to the business software in the source operating system.
7. The device according to claim 5, characterized in that The retention policy set for the rpm package includes at least one of the following: If another rpm package that the rpm package depends on is missing in the target operating system, the two rpm packages are retained in the target operating system during migration; If the rpm package is missing in the target operating system, the rpm package is retained in the target operating system during migration; If the rpm package is split into multiple rpm packages in the target operating system, the rpm package is retained in the target operating system during migration; The rpm package and other rpm packages are merged in the target operating system, and the rpm package and other rpm packages are retained in the target operating system during migration.
8. The device according to claim 5, characterized in that The difference comparison data is generated in advance based on the software release package and software debugging package officially provided for the source operating system and the target operating system.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of any one of the methods described in claims 1-4.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
11. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
