[go: up one dir, main page]

CN118363658B - System migration compatibility evaluation method and device based on migration strategy - Google Patents

System migration compatibility evaluation method and device based on migration strategy Download PDF

Info

Publication number
CN118363658B
CN118363658B CN202410590741.3A CN202410590741A CN118363658B CN 118363658 B CN118363658 B CN 118363658B CN 202410590741 A CN202410590741 A CN 202410590741A CN 118363658 B CN118363658 B CN 118363658B
Authority
CN
China
Prior art keywords
operating system
rpm
software
migration
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410590741.3A
Other languages
Chinese (zh)
Other versions
CN118363658A (en
Inventor
秦志伟
李宇哲
徐宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Changqing Software Co ltd
Original Assignee
Beijing Changqing Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Changqing Software Co ltd filed Critical Beijing Changqing Software Co ltd
Priority to CN202410590741.3A priority Critical patent/CN118363658B/en
Publication of CN118363658A publication Critical patent/CN118363658A/en
Application granted granted Critical
Publication of CN118363658B publication Critical patent/CN118363658B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a migration policy-based system migration compatibility evaluation method and device, and belongs to the technical field of computers. The method comprises the following steps: acquiring a binary file related to service software in a source operating system, and analyzing to obtain a first base library file on which the service software depends and first symbol information called for the first base library file; determining a first rpm package to which a first base library file belongs; determining a second rpm packet which is reserved in the system migration process in the first rpm packet according to a reservation strategy set by the system migration tool for the rpm packet, and removing the second rpm packet to obtain a remaining third rpm packet; determining a second base library file belonging to a third rpm package in the first base library file; and determining whether the target operating system has a second basic library file and first symbol information called for the second basic library file, and obtaining an evaluation result of whether the service software is compatible with the target operating system according to the determination result. The invention can improve the accuracy of the evaluation result.

Description

System migration compatibility evaluation method and device based on migration strategy
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a migration policy-based system migration compatibility evaluation method and apparatus.
Background
After a period of use, such as 5 years, the enterprise user's server operating system is faced with a need to update the operating system. However, since the service software itself has the characteristics of long development period and multiple iterations, it is difficult to redeploy in a new operating system environment, and therefore, it is required to change the operating system by an on-site migration manner of the operating system. The operating system migration in place principle is: the hardware platform and the upper business software are kept unchanged, and only the basic components of the operating system are replaced. In-place migration of an operating system is required to ensure that the destination operating system after migration is compatible with the service software before migration.
In the related art, whether the two are compatible is evaluated by constructing the same virtual environment as the destination operating system after migration and then simulating the running of the business software in the virtual environment. However, the system migration tool may reserve a portion of the rpm package in the source operating system in the destination operating system during the migration process, so that the compatibility is evaluated by constructing the same virtual environment as the destination operating system, and the evaluation accuracy is poor.
Disclosure of Invention
The invention provides a migration policy-based system migration compatibility evaluation method and a migration policy-based system migration compatibility evaluation device, which can solve the problem of poor compatibility evaluation accuracy in the related technology. The technical proposal is as follows:
In one aspect, a migration policy-based system migration compatibility evaluation method is provided, and the method includes:
Acquiring a binary file related to service software in a source operating system, and obtaining a first basic library file on which the service software depends and first symbol information called for the first basic library file by analyzing the binary file;
Determining a first rpm package to which the first base library file belongs;
Determining a second rpm packet which is reserved in the system migration process in the first rpm packet according to a reservation strategy set by a system migration tool for the rpm packet, and removing the second rpm packet from the first rpm packet to obtain a remaining third rpm packet;
determining a second base library file belonging to the third rpm package in the first base library file;
And 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 service software is compatible with the target operating system according to the determination result.
In another aspect, there is provided a migration policy-based system migration compatibility evaluation apparatus, the apparatus including:
the system comprises an acquisition and analysis unit, a service software and a service software, wherein the acquisition and analysis unit is used for acquiring a binary file related to the service software in a source operating system, and acquiring a first basic library file relied by the service software and first symbol information called for the first basic library file by analyzing the binary file;
A first determining unit, configured to determine a first rpm package to which the first base library file belongs;
a second determining unit, configured to determine a second rpm packet that is reserved in a system migration process in the first rpm packet according to a reservation policy set by a system migration tool on the rpm packet, and remove the second rpm packet from the first rpm packet, so as to obtain a remaining third rpm packet;
a third determining unit, configured to determine a second base library file belonging to the third rpm package in the first base library file;
And the evaluation determining unit is used for determining whether the second basic library file and the first symbol information called for the second basic library file exist in the target operating system, and obtaining an evaluation result of whether the service software is compatible with the target operating system according to the determination result.
In another aspect, a computer device is provided, where the computer device includes a memory configured to store a computer program and a processor configured to execute the computer program stored on the memory, so as to implement the steps of the migration policy-based system migration compatibility evaluation method described above.
In another aspect, a computer readable storage medium is provided, in which a computer program is stored, the computer program implementing the steps of the migration policy-based system migration compatibility evaluation method described above when executed by a processor.
In another aspect, a computer program product is provided, comprising a computer program, which when executed by a processor, implements the steps of the migration policy based system migration compatibility evaluation method described above.
The technical scheme provided by the invention has at least the following beneficial effects:
The system migration tool considers a part of basic library files conforming to a retention policy in a target operating system in the migration process of the rpm package, if the part of basic library files relied by the service software belong to the reserved basic library files, the part of basic library files do not need to carry out compatibility analysis, and only the compatibility evaluation of the rest of basic library files is needed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a system migration compatibility evaluation method based on a migration policy according to an embodiment of the present invention;
FIGS. 2-5 are schematic diagrams illustrating migration reservation policies according to an embodiment of the present invention;
FIG. 6 is a block diagram of a migration policy-based system migration compatibility evaluation apparatus according to an embodiment of the present invention;
fig. 7 is a hardware architecture diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
As described above, the related art evaluates whether the two are compatible by constructing the same virtual environment as the migrated destination operating system and then simulating the operation of the business software in the virtual environment. However, the system migration tool may remain in the destination operating system for some rpm packages in the source operating system during the migration process, thereby enhancing compatibility between the business software and the destination operating system. Therefore, the compatibility is evaluated by constructing the same virtual environment as the target operating system, and the evaluation accuracy is poor.
The invention is characterized in that: the business software can run in a target operating system in a compatible way, is related to a basic library file provided by the target operating system, and the business software needs to call symbol information in the basic library file when running, based on the business software, when whether the business software is compatible with the target operating system or not is evaluated, a virtual environment can not be constructed, and whether the target operating system has the basic library file on which the business software depends and the symbol information called for the basic library file or not is determined, so that the compatibility is evaluated; the system migration tool sets a retention policy for the rpm package, namely, a part of the rpm package meeting the retention policy in the source operating system is retained in the destination operating system, so that the part of the retained rpm package needs to be screened out when compatibility is analyzed, and accuracy of an evaluation result is guaranteed.
Specific implementations of the above concepts are described below.
Referring to fig. 1, a migration policy-based system migration compatibility evaluation method provided by an embodiment of the present invention includes:
Step 100, obtaining a binary file related to service software in a source operating system, and obtaining a first base library file on which the service software depends and first symbol information called for the first base library file by analyzing the binary file;
step 102, determining a first rpm package to which the first base library file belongs;
Step 104, determining a second rpm packet which is reserved in the system migration process in the first rpm packet according to a reservation strategy set by a system migration tool for the rpm packet, and removing the second rpm packet from the first rpm packet to obtain a remaining third rpm packet;
Step 106, determining a second base library file belonging to the third rpm package in the first base library file;
Step 108, determining whether the target operating system has the second base library file and the first symbol information called for the second base library file, and obtaining an evaluation result of whether the service software is compatible with the target operating system according to the determination result.
In the embodiment of the invention, the system migration tool considers a part of basic library files conforming to a retention policy in a source operating system in a target operating system in the migration process of the rpm package, if the part of basic library files relied on by the service software belong to the reserved basic library files, the part of basic library files do not need to carry out compatibility analysis, and only the compatibility evaluation of the rest of basic library files is needed.
The manner in which the individual steps shown in fig. 1 are performed is described below.
Firstly, for step 100, a binary file related to service software in a source operating system is obtained, and a first base library file on which the service software depends and first symbol information called for the first base library file are obtained by analyzing the binary file.
In the embodiment of the present invention, the binary file related to the service software needs to be acquired in the source operating system environment of the client, and the embodiment of the present invention may be acquired at least by the following manners (S11-S14):
s11: traversing the process service running in the source operating system to obtain a binary file corresponding to each process service;
The business software runs in the source operating system, and the process service of the business software is necessarily present in the process service running in the source operating system, so that the binary file related to the business software can be acquired by traversing the process service running in the source operating system.
S12: screening out the binary files executed by the basic service of the source operating system in the binary files corresponding to each process service obtained through traversing to obtain a first binary file related to service software, and recording the obtained first binary file into a list to obtain a list A1;
Because the process services running in the source operating system are not all the process services of the business software, but a part of binary files for basic service execution exist, wherein the binary files of the basic service of the source operating system can be obtained from a software release package released by authorities for the source operating system, and therefore the binary files for basic service execution can be screened out from the binary files obtained by traversing, and the first binary files related to the business software can be obtained.
S13: acquiring appointed service software input by a user, traversing the appointed service software in the source operating system to obtain a second binary file corresponding to the appointed service software, and recording the second binary file in a list to obtain a list A2;
Since not all business software may be in operation in the operating system, the resulting first binary file may not be able to overlay the non-operational business software. In the embodiment of the invention, the user is familiar with the service software deployed in the operating system, and the user can input the specified service software, thereby acquiring the binary files related to the specified service software.
S14: and performing union operation on the first binary file A1 and the second binary file A2 to obtain a binary file A3 related to service software in the source operating system.
Because the first binary file may miss the service software which is not operated, and the user in the second binary file only concerns the single service software, a part of the service software may miss, the first binary file and the second binary file can be combined, so that the respective defects can be overcome, the service software covered by the binary file obtained after the combination is wider and more accurate, and the accuracy of the compatibility evaluation result can be further improved.
It should be noted that, in addition to the above manner, only the first binary file or the second binary file may be used as the binary file related to the service software.
After acquiring a binary file related to service software in a source operating system, analyzing the binary file to obtain a basic library file in the binary file, and determining the obtained basic library file as a first basic library file on which the service software depends; and continuing to analyze the first basic library file to obtain all the symbol information contained in the first basic library file, wherein not all the symbol information in the first basic library file needs to be called by service software, and screening the first symbol information called by the service software on the first basic library file from all the symbol information. Wherein, the symbol information called by the business software in the system to a certain binary file can be obtained through a system command 'readelf ()'.
It can be understood that the service software can normally run in the target operating system, and the target operating system needs to be provided with the first base library file and the first base library file needs to be provided with the first symbol information called by the service software. It is also understood that the number of the first base library files may be at least one, and each first base library file has at least one first symbol information therein. For example, the first base 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, symbol information 112, and the first symbol information called in file 12 is symbol information 211, symbol information 212 and symbol information 213, … ….
Then, the description will be made simultaneously with respect to step 102, step 104 and step 106.
Since the system migration tool sets a retention policy for the rpm package when migrating the underlying rpm package of the operating system, if the rpm package meets the retention policy, the rpm package will be retained during the migration. Therefore, it is necessary to determine whether there is a reserved rpm package among the rpm packages to which the first base library file belongs.
In the embodiment of the invention, after the first basic library file is obtained, the rpm package to which the first basic library file belongs can be reversely pushed out. For example, file 11, file 12, file 13 belong to rpm1, file 21, file 22 belong to rpm2, and file 31 belongs to rpm3. The reverse pushed rpm packets were sorted to give an rpm packet list, designated A4.
Since the base components of the different operating systems are all stored in the respective software libraries in the form of rpm packages, it is essentially a comparison of whether the base components provided by the two operating systems are identical or not to compare the differences in rpm packages in the two software libraries. In the actual migration process, the software packages of the software libraries of the two operating systems are almost impossible to be in one-to-one correspondence, and the rpm packages in the software libraries of the operating systems also have a dependency relationship, which means that the replacement process can cause at least the following problems in the destination operating system of a certain rpm package of the source operating system:
1. Another rpm package that the rpm package needs to rely on is missing in the destination operating system; 2. missing the rpm packet in the destination operating system; 3. the rpm package is split into a plurality of rpm packages in the destination operating system; 4. the rpm package is merged with other rpm packages in the destination operating system.
In view of the above problem, when migrating the basic component of the target operating system to the hardware architecture where the source operating system is located, the system migration tool considers whether the migrated business software is compatible, and therefore sets a retention policy for the rpm packet based on the problem, where the retention policy may at least include the following:
1. If another rpm package on which the rpm package needs to depend is missing in the destination operating system, both rpm packages are reserved in the destination operating system at the time of migration. Referring to fig. 2, for a migration reservation policy diagram, the left side is a partial diagram of a source dependency tree, the right side is a partial diagram of a destination dependency tree, rpmC depends rpmA in the source dependency tree, rpmA is replaced with rpmB in the destination operating system, so that rpmC is not dependent rpmA in the destination operating system, and the system migration tools reserve rpmC and rpmA during the migration process.
2. The rpm package is missing in the destination operating system, which indicates that the software library of the destination operating system has eliminated the rpm package, and the rpm package is reserved in the destination operating system during migration. Referring to fig. 3, in order to migrate a retention policy schematic, the left side is a partial schematic diagram of a source dependency tree, the right side is a partial schematic diagram of a destination dependency tree, rpmA in the source dependency tree is not present in the destination operating system, which indicates that the rpmA is eliminated by the destination operating system, and the rpmA is retained by a system migration tool during migration.
3. The rpm package is split into a plurality of rpm packages in the destination operating system, and the rpm package is reserved in the destination operating system at the time of migration. Referring to fig. 4, for a migration reservation policy diagram, the left side is a partial diagram of a source dependency tree, the right side is a partial diagram of a destination dependency tree, rpmA in the source dependency tree is split into rpmB1 and rpmB2 in the destination operating system, and the system migration tool reserves rpmA during the migration process.
4. The rpm package is merged with other rpm packages in the destination operating system, and the rpm package and the other rpm packages are reserved in the destination operating system at the time of migration. Referring to FIG. 5, for a migration reservation policy diagram, the left side is a partial diagram of a source dependency tree, the right side is a partial diagram of a destination dependency tree, rpmA and rpmA are merged into rpmB at the destination operating system in the source dependency tree, and the system migration tools reserve rpmA and rpmA2 during the migration process.
According to the above-mentioned reservation policy, in step 102 of the embodiment of the present invention, determining the second rpm to be reserved during the system migration in the first rpm packet using the reservation policy includes:
s21, generating a source dependency tree and a destination dependency tree which are in one-to-one correspondence with 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;
s22, determining rpm difference data of the target operating system relative to the source operating system according to the positions of rpm packets in the source dependency tree and the target dependency tree;
S23, for each of the first rpm packets, executing: and determining whether the first rpm packet is changed by the target operating system according to the rpm difference data, if so, determining whether a change mode meets a reservation policy set by a system migration tool for the rpm packet, and if so, determining the first rpm packet as a reserved second rpm packet.
Each node in the dependency tree corresponds to one rpm packet, a dependency relationship exists between two nodes with a connection relationship in the dependency tree, and rpm difference data of a target operating system relative to a source operating system can be determined according to the positions of the rpm packets in the source dependency tree and the target dependency tree. The rpm difference data is what changes in the destination operating system occurred to the rpm in the source operating system.
In the embodiment of the invention, only the first rpm packet which is depended by the service software is concerned about which changes occur in the target operating system, and whether other rpm packets have changes does not need to be concerned.
In step S23, if the modification of the first rpm package satisfies the reservation policy set by the system migration tool for the rpm package, the first rpm package is reserved. Thus, the second rpm packet, which is reserved during the system migration, in the first rpm packet can be determined. Assuming rpm3 is reserved, the remaining third rpm packets are rpm1 and rpm2. The rpm package list A4 is updated to obtain an rpm package list A5.
Further, since the second rpm package is reserved in the target operating system during system migration, it is not necessary to analyze compatibility of the first base library files included in the rpm package, but it is necessary to analyze the first base library files included in the third rpm package, and the base library files belonging to the third rpm package in the first base library files are used as the second base library files.
Therefore, the embodiment of the invention considers the retention strategy of the system migration tool aiming at the rpm package, removes the first basic library file which can be retained in the system migration process, and only analyzes the remaining second basic library file, thereby improving the accuracy of the compatibility analysis result.
Finally, for step 108, it is determined whether the target operating system has the second base library file and the first symbol information called for the second base library file, and an evaluation result of whether the service software is compatible with the target operating system is obtained according to the determination result.
In the embodiment of the invention, if the target operating system has the second base library file and the first symbol information called for the second base library file, the evaluation result can be that the service software is compatible with the target operating system; otherwise, the evaluation result is that the service software is not compatible with the target operating system.
In the embodiment of the present invention, it may be determined at least by the following manner whether the target operating system has the second base library file and the first symbol information called for the second base library file:
S81, obtaining difference comparison data of a target operating system relative to the source operating system on the basis that the difference granularity is symbol information; the types of differences include the same, add, remove, and alter;
S82, determining whether the target operating system removes and/or alters first symbol information called by the business software for the second basic library file relative to the source operating system according to the difference comparison data; if yes, determining that the service software is incompatible with the target operating system.
In step S81, the difference control data is generated in advance based on a software release package and a software debug package provided by authorities for the source operating system and the destination operating system. After determining the source operating system version and the destination operating system version that the client needs to migrate in place, difference comparison data of the destination operating system relative to the source operating system is obtained, wherein the difference granularity of the difference comparison data is the level of symbol information. The granularity of difference can be rpm package level, basic library file level and symbol information level from high layer to bottom layer. Because the service software needs to call the function interface in the running process, and the function interface belongs to the symbol information level, the compatibility analysis and evaluation are carried out only by using the basic library file, and the accuracy of the evaluation result is poor.
In order to obtain the difference comparison data of the target operating system on the symbol information with the difference granularity relative to the source operating system, the symbol information of the source operating system and the target operating system need to be acquired in advance respectively, and in the embodiment of the present invention, the symbol information of the operating system can be acquired at least through the following modes (S811-S814):
S811: a software release package and a software debug package which are released by authorities for the operating systems of the corresponding versions are obtained.
In this step, the software release package is a software package released by authorities for an operating system, and the software release package includes a plurality of rpm packages; the software debugging package is a software package of corresponding debugging information of the software release package, and the name of the software debugging package is generally provided with debuginfo words.
S812: and analyzing the basic library file provided by the operating system of the version from the software release package, and analyzing the software debugging file provided by the operating system of the version from the software debugging package.
For the linux system, the names of the basic library files analyzed by the software release package are generally provided with 'so.' words, the names of the software debugging files analyzed by the software debugging package are the same as those of the basic library files, the suffixes of the software debugging files are generally 'dubug', and the symbol information provided by the corresponding basic files in the software release package is recorded in the software debugging files.
S813: and taking the base library file and the software debugging file with the same file name as a pair to obtain a plurality of file pairs.
S814: and for each file pair, performing function matching by utilizing the base library file in the file pair and the software debugging file to determine symbol information in the base library file in the file pair.
Because the base library file of the software release package is a compiled binary file, the binary file is unreadable, and the text file is in the software debugging file, which is equivalent to source code and remark information before compiling. In the embodiment of the invention, a plurality of function symbols can be retrieved from the software debugging file of the file pair in a text retrieval mode, each function symbol is utilized to verify whether the function symbol exists in the basic library file of the file pair, if so, the function symbol is determined to be symbol information in the basic library file, and if not, the function symbol is determined to be not symbol information in the basic library file.
By the 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 the source operating system and the destination operating system. And then comparing the information obtained from the two operating systems, thereby obtaining difference comparison data. Wherein the types of differences in the difference control data may include the same, add, remove, and alter.
In one implementation, the difference comparison data includes at least a first difference comparison table with a difference granularity as a base library file and a second difference comparison table with a difference granularity as symbol information; the second difference comparison table is used for counting the differences of symbol information in the base library files which are both existing in the source operating system and the destination operating system and have the difference types which are changed;
The first difference comparison table records the difference of the target operating system relative to the basic library file of the source operating system, and includes a plurality of first difference items, each of which has a difference type, and the difference types may include the same, add, remove and change. For example, a certain first difference item includes a base library file A1 of the source operating system and a base library file A1 of the destination operating system, and the difference types of the base library file A1 are the same, which indicates that the base library file A1 exists in both the source operating system and the destination operating system; for another example, a certain first difference item includes a base library file A2 of the target operating system, and the difference type of the base library file A2 is increased, which indicates that the target operating system increases the base library file A2 relative to the source operating system; for another example, a certain first difference item includes a base library file A3 of the source operating system, where the difference type is removal, which indicates that the destination operating system has removed the base library file A3 relative to the source operating system; for another example, a certain first difference item includes a base library file A4 of the source operating system and a base library file A5 of the destination operating system, and the difference type is a change, which indicates that the destination operating system changes the base library file A4 in the source operating system to the base library file A5.
For the basic library files with the same, removed and added difference types in the first difference comparison table, the corresponding difference types of the symbol information in the basic library files are the same, removed and added, so that the second difference comparison table does not need to explain the symbol information in the basic library files with the same, removed and added difference types, and only needs to count the symbol information differences in the basic library files with the changed difference types. Therefore, the data size of the difference comparison data can be reduced by using the two difference comparison tables, and the evaluation speed of compatibility evaluation is improved.
In order to further reduce the data amount 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 modification, and statistics on symbol information with the same difference type are not needed. The second difference comparison table comprises a plurality of second difference items, and the second difference items can comprise identification of a basic library file in a source operating system, identification of a basic library file in a target operating system, difference type, symbol information in the source operating system and symbol information in the target operating system. For example, some second difference item includes an identifier B11 of the base library file in the source operating system, an identifier B21 of the base library file in the destination operating system, an increase in the difference type, no symbol information in the source operating system, and symbol information B2111 in the destination operating system.
Based on the first difference lookup table and the second difference lookup table, step S82 may specifically include:
Determining whether a third base library file with a removed difference type and/or a fourth base library file with a changed difference type exists in the second base library file according to the first difference comparison table;
If the third base library file exists, determining that the service software is incompatible with the target operating system;
If the fourth basic library file exists, determining whether the removed and/or changed second symbol information exists in the first symbol information called for the fourth basic library file according to the second difference comparison table, and if so, determining that the service software is incompatible with the target operating system.
And a first step of judging: if the difference type is the removed third basic library file, indicating that the symbol information in the third basic library file is removed, thus indicating that the third basic library file on which the business software depends and the first symbol information called for the third basic library file are not present, and the business software is incompatible with the target operating system; if there is no third base library file whose difference type is removed, it is necessary to determine the evaluation result of compatibility in combination with the determination result of the second step.
And step two, judging: if the difference type is the changed fourth basic library file, locating a second difference item in a second difference comparison table according to the identification of the fourth basic library file in the source operating system, wherein the second difference item can be at least one, then determining whether first symbol information called for the fourth basic library file exists in the second difference item, removing and/or changing the first symbol information, and if so, taking the first symbol information as the second symbol information, so that an evaluation result can be obtained that the service software is incompatible with the target operating system. If not, then the results of the compatibility assessment need to be determined in conjunction with the first step decision.
At least one step of judging results of the two steps is incompatible, and the evaluation result is incompatible; and if the two judging results are compatible, the evaluation result is compatible.
In the above embodiment, the system migration tool considers that a part of the base library files conforming to the retention policy in the source operating system are retained in the destination operating system in the migration process of the rpm package, if the part of the base library files relied on by the service software belong to the retained base library files, the compatibility analysis of the part of the base library files is not required, and only the compatibility evaluation of the rest of the base library files is required.
Further, when compatibility analysis is performed on the remaining basic library files, whether the business software can normally run is not only performed if the basic library files on which the business software depends exist in the target operating system, but also whether the symbol information in the basic library files is in the corresponding basic library files in the target operating system is called by the business software, so that an evaluation result of whether the business software is compatible with the target operating system is obtained more accurately by analyzing the difference of the symbol granularity.
Referring to fig. 6, an embodiment of the present invention provides a migration policy-based system migration compatibility evaluation apparatus, which includes:
The acquiring and analyzing unit 601 is configured to acquire a binary file related to the service software in the source operating system, and obtain a first base library file on which the service software depends and first symbol information called for the first base library file by analyzing the binary file;
A first determining unit 602, configured to determine a first rpm package to which the first base library file belongs;
A second determining unit 603, configured to determine, according to a retention policy set by the system migration tool on the rpm packets, a second rpm packet that is retained in the system migration process in the first rpm packet, and remove the second rpm packet from the first rpm packet, so as to obtain a remaining third rpm packet;
a third determining unit 604, configured to determine a second base library file belonging to the third rpm package in the first base library file;
And the evaluation determining unit 605 is configured to determine whether the target operating system has the second base library file and the first symbol information called for the second base library file, and obtain an evaluation result of whether the service software is compatible with the target operating system according to the determination result.
In one embodiment of the present invention, the acquiring and parsing unit, when executing the binary file related to the service software in the acquiring source operating system, specifically includes:
Traversing the process service running in the source operating system to obtain a binary file corresponding to each process service;
Screening out the binary files executed by the basic service of the source operating system in the binary files corresponding to each process service obtained through traversing to obtain a first binary file related to business software;
acquiring appointed service software input by a user, and traversing the appointed service software in the source operating system to obtain a second binary file corresponding to the appointed service software;
and merging the first binary file and the second binary file to obtain the binary file related to the business software in the source operating system.
In one embodiment of the present invention, when executing the reservation policy set for an rpm packet according to the system migration tool, the second determining unit determines a second rpm packet reserved in the system migration process in the first rpm packet, specifically includes:
generating a source dependency tree and a destination dependency tree which are in one-to-one correspondence with 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;
Determining rpm difference data of the destination operating system relative to the source operating system according to the positions of rpm packets in the source dependency tree and the destination dependency tree;
For each of the first rpm packets, performing: and determining whether the first rpm packet is changed by the target operating system according to the rpm difference data, if so, determining whether a change mode meets a reservation policy set by a system migration tool for the rpm packet, and if so, determining the first rpm packet as a reserved second rpm packet.
In one embodiment of the present invention, the retention policy set for an rpm packet includes at least one of:
If another rpm packet on which the rpm depends is missing in the destination operating system, the two rpm packets are reserved in the destination operating system during migration;
If the rpm packet is missing in the target operating system, reserving the rpm packet in the target operating system during migration;
The rpm package is split into a plurality of rpm packages in the target operating system, and the rpm packages are reserved in the target operating system during migration;
The rpm package is merged with other rpm packages in the destination operating system, and the rpm package and the other rpm packages are reserved in the destination operating system at the time of migration.
In one embodiment of the invention, the evaluation determination unit is specifically configured to:
Acquiring difference comparison data of a target operating system relative to the source operating system on the basis of the information of which the difference granularity is symbol; the types of differences include the same, add, remove, and alter;
Determining whether the target operating system removes and/or alters first symbol information called by the business software for the second basic library file relative to the source operating system according to the difference comparison data; if yes, determining that the service software is incompatible with the target operating system.
In one embodiment of the invention, the difference control data is generated in advance based on a software release package and a software debug package provided by authorities for the source operating system and the destination operating system.
It should be noted that: the migration policy-based system migration compatibility evaluation apparatus provided in the foregoing embodiment is only exemplified by the division of the foregoing functional modules, and in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the system migration compatibility evaluation device based on the migration policy provided in the foregoing embodiment and the system migration compatibility evaluation method embodiment based on the migration policy belong to the same concept, and detailed implementation processes of the system migration compatibility evaluation device and the system migration compatibility evaluation method embodiment based on the migration policy are detailed in the method embodiment, and are not described herein again.
An embodiment of the present application further provides a computer device, referring to fig. 7, where the computer device includes a processor and a memory, where at least one instruction, at least one section of program, a code set, or an instruction set is stored, and the at least one instruction, the at least one section of program, the code set, or the instruction set is loaded and executed by the processor to implement a migration policy based system migration compatibility evaluation method provided by the foregoing method embodiments.
Embodiments of the present application further provide a computer readable storage medium having at least one instruction, at least one program, a code set, or an instruction set stored thereon, where the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the migration policy-based system migration compatibility evaluation method provided by the foregoing method embodiments.
Embodiments of the present application also provide a computer program product comprising a computer program, which is read from a computer-readable storage medium by a processor of a computer device, the computer program being executed by the processor, causing the computer device to perform the migration policy-based system migration compatibility evaluation method according to any of the above embodiments.
For convenience of description, the above system or apparatus is described as being functionally divided into various modules or units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
Finally, it is further noted that relational terms such as first, second, third, fourth, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (11)

1. A migration policy-based system migration compatibility evaluation method, the method comprising:
Acquiring a binary file related to service software in a source operating system, and obtaining a first basic library file on which the service software depends and first symbol information called for the first basic library file by analyzing the binary file;
Determining a first rpm package to which the first base library file belongs;
Generating a source dependency tree and a destination dependency tree which are in one-to-one correspondence with 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; determining rpm difference data of the destination operating system relative to the source operating system according to the positions of rpm packets in the source dependency tree and the destination dependency tree; for each of the first rpm packets, performing: determining whether the first rpm packet is changed by the target operating system according to the rpm difference data, if so, determining whether a changing mode meets a reservation strategy set by a system migration tool on the rpm packet, and if so, determining the first rpm packet as a reserved second rpm packet;
removing the second rpm packet from the first rpm packet to obtain a remaining third rpm packet;
determining a second base library file belonging to the third rpm package in the first base library file;
Acquiring difference comparison data of a target operating system relative to the source operating system on the basis of the information of which the difference granularity is symbol; the types of differences include the same, add, remove, and alter; determining whether the target operating system removes and/or alters first symbol information called by the business software for the second basic library file relative to the source operating system according to the difference comparison data; if yes, determining that the service software is incompatible with the target operating system.
2. The method of claim 1, wherein the obtaining the binary file associated with the business software in the source operating system comprises:
Traversing the process service running in the source operating system to obtain a binary file corresponding to each process service;
Screening out the binary files executed by the basic service of the source operating system in the binary files corresponding to each process service obtained through traversing to obtain a first binary file related to business software;
acquiring appointed service software input by a user, and traversing the appointed service software in the source operating system to obtain a second binary file corresponding to the appointed service software;
and merging the first binary file and the second binary file to obtain the binary file related to the business software in the source operating system.
3. The method of claim 1, wherein the retention policy set for rpm packets comprises at least one of:
if another rpm packet on which the rpm packet depends is missing in the destination operating system, the two rpm packets are reserved in the destination operating system during migration;
If the rpm packet is missing in the target operating system, reserving the rpm packet in the target operating system during migration;
The rpm package is split into a plurality of rpm packages in the target operating system, and the rpm packages are reserved in the target operating system during migration;
The rpm package is merged with other rpm packages in the destination operating system, and the rpm package and the other rpm packages are reserved in the destination operating system at the time of migration.
4. The method of claim 1, wherein the difference control data is generated in advance based on a software release package and a software debug package provided by authorities for the source operating system and the destination operating system.
5. A migration policy-based system migration compatibility evaluation apparatus, the apparatus comprising:
the system comprises an acquisition and analysis unit, a service software and a service software, wherein the acquisition and analysis unit is used for acquiring a binary file related to the service software in a source operating system, and acquiring a first basic library file relied by the service software and first symbol information called for the first basic library file by analyzing the binary file;
A first determining unit, configured to determine a first rpm package to which the first base library file belongs;
The second determining unit is used for generating a source dependency tree and a destination dependency tree which are in one-to-one correspondence with 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; determining rpm difference data of the destination operating system relative to the source operating system according to the positions of rpm packets in the source dependency tree and the destination dependency tree; for each of the first rpm packets, performing: determining whether the first rpm packet is changed by the target operating system according to the rpm difference data, if so, determining whether a changing mode meets a reservation strategy set by a system migration tool on the rpm packet, and if so, determining the first rpm packet as a reserved second rpm packet; removing the second rpm packet from the first rpm packet to obtain a remaining third rpm packet;
a third determining unit, configured to determine a second base library file belonging to the third rpm package in the first base library file;
The evaluation determining unit is used for acquiring difference comparison data of the target operating system relative to the source operating system on the basis that the difference granularity is symbol information; the types of differences include the same, add, remove, and alter; determining whether the target operating system removes and/or alters first symbol information called by the business software for the second basic library file relative to the source operating system according to the difference comparison data; if yes, determining that the service software is incompatible with the target operating system.
6. The apparatus of claim 5, wherein the acquisition parsing unit, when executing the binary file related to the service software in the acquisition source operating system, specifically comprises:
Traversing the process service running in the source operating system to obtain a binary file corresponding to each process service;
Screening out the binary files executed by the basic service of the source operating system in the binary files corresponding to each process service obtained through traversing to obtain a first binary file related to business software;
acquiring appointed service software input by a user, and traversing the appointed service software in the source operating system to obtain a second binary file corresponding to the appointed service software;
and merging the first binary file and the second binary file to obtain the binary file related to the business software in the source operating system.
7. The apparatus of claim 5, wherein the retention policy set for rpm packets comprises at least one of:
if another rpm packet on which the rpm packet depends is missing in the destination operating system, the two rpm packets are reserved in the destination operating system during migration;
If the rpm packet is missing in the target operating system, reserving the rpm packet in the target operating system during migration;
The rpm package is split into a plurality of rpm packages in the target operating system, and the rpm packages are reserved in the target operating system during migration;
The rpm package is merged with other rpm packages in the destination operating system, and the rpm package and the other rpm packages are reserved in the destination operating system at the time of migration.
8. The apparatus of claim 5, wherein the difference contrast data is generated in advance based on a software release package and a software debug package provided by authorities for the source operating system and the destination operating system.
9. A computer device, characterized in that it comprises a memory for storing a computer program and a processor for executing the computer program stored on the memory for carrying out the steps of the method according to any of the preceding claims 1-4.
10. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-4.
11. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-4.
CN202410590741.3A 2024-05-13 2024-05-13 System migration compatibility evaluation method and device based on migration strategy Active CN118363658B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410590741.3A CN118363658B (en) 2024-05-13 2024-05-13 System migration compatibility evaluation method and device based on migration strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410590741.3A CN118363658B (en) 2024-05-13 2024-05-13 System migration compatibility evaluation method and device based on migration strategy

Publications (2)

Publication Number Publication Date
CN118363658A CN118363658A (en) 2024-07-19
CN118363658B true CN118363658B (en) 2024-10-01

Family

ID=91881817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410590741.3A Active CN118363658B (en) 2024-05-13 2024-05-13 System migration compatibility evaluation method and device based on migration strategy

Country Status (1)

Country Link
CN (1) CN118363658B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555876A (en) * 2024-01-11 2024-02-13 麒麟软件有限公司 Operating system migration evaluation method and device based on virtual file system
CN117608653A (en) * 2023-10-17 2024-02-27 超聚变数字技术有限公司 Operating system migration method and computing device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8429647B2 (en) * 2009-05-06 2013-04-23 Vmware, Inc. Virtual machine migration across network by publishing routes to the associated virtual networks via virtual router after the start of migration of the virtual machine
US10268471B2 (en) * 2015-03-24 2019-04-23 Huawei Technologies Co., Ltd. Method for upgrading terminal system, terminal, and system
US10255064B2 (en) * 2016-06-24 2019-04-09 Vmware, Inc. Upgrade analysis of a computer system
US10540175B2 (en) * 2018-03-05 2020-01-21 Appzero Software Corp. Up-level applications to a new OS
BR112022015480A2 (en) * 2020-02-28 2022-09-27 Hexaware Tech Limited SYSTEM AND METHOD FOR MIGRATION OF APPLICATION ENVIRONMENT
CN115794220A (en) * 2022-09-28 2023-03-14 统信软件技术有限公司 Software source migration method, device and system, computing device and readable storage medium
CN117873564A (en) * 2023-12-25 2024-04-12 深圳市力豪信息技术服务有限公司 Server architecture adjustment migration platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608653A (en) * 2023-10-17 2024-02-27 超聚变数字技术有限公司 Operating system migration method and computing device
CN117555876A (en) * 2024-01-11 2024-02-13 麒麟软件有限公司 Operating system migration evaluation method and device based on virtual file system

Also Published As

Publication number Publication date
CN118363658A (en) 2024-07-19

Similar Documents

Publication Publication Date Title
US9813450B1 (en) Metadata-based verification of artifact quality policy compliance
JP4891225B2 (en) Dependency graph parameter scoping
CN1760875B (en) Transparent migration of files among various types of storage volumes based on file access properties
JP4436036B2 (en) Information processing apparatus, trace processing method, program, and recording medium
US8479162B2 (en) Method and apparatus for locating memory leak in a program
US20030163799A1 (en) Iterative software development environment with prioritized build rules
US11431572B2 (en) Semantic detection and resolution of conflicts and redundancies in network function virtualization policies
CA2523279A1 (en) Method, system and article of manufacture for data preservation and automated electronic software distribution across an enterprise system
US11308066B1 (en) Optimized database partitioning
US20220398250A1 (en) Database optimization using record correlation and intermediate storage media
US20220374285A1 (en) Topology-based migration assessment
WO2023160327A1 (en) Container image management
CN118363658B (en) System migration compatibility evaluation method and device based on migration strategy
KR20210137772A (en) Apparatus and method for optimizing quantum computation
CN112749197B (en) Data fragment refreshing method, device, equipment and storage medium
US7233733B2 (en) Method and system for finding evolving regions in graphs without persistent node identity
CN110737438A (en) data processing method and device
CN113792026A (en) Deployment method and device of database script and computer readable storage medium
JP2005044011A (en) Software package management method
CN112905443A (en) Test case generation method, device and storage medium
CN118519682B (en) System migration compatibility evaluation method and device
US20030204525A1 (en) Application control method, and implementation device and processing program for the same
CN113821193B (en) Information generation method, device and storage medium
CN118519674B (en) System difference data acquisition method and device
US20240248691A1 (en) Detecting software code anomalies based on organizational information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant