Method and device for obtaining system difference data
By obtaining and comparing the basic library files and symbol information of the operating system, the problem of differential data acquisition in operating system migration is solved, and the accuracy of compatibility analysis and the compatibility of business software is improved.
Patent Information
- Application Number
- CN202410591062.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-05-13
AI Technical Summary
During the operating system migration process, how to effectively obtain system differential data to ensure compatibility between business software and the target operating system is an urgent problem.
By determining the version of the source operating system and the destination operating system, obtain the basic library files and symbol information provided by each version of the operating system, and compare them to obtain the differential data at the symbol information level for compatibility analysis.
Improve the accuracy of subsequent compatibility analysis, ensure compatibility between business software and the target operating system, and reduce time costs and workload.
Smart Images

Figure CN118519674B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for acquiring system difference data. Background Art
[0002] The migration of the operating system needs to ensure that the business software deployed in the target operating system after the migration is compatible with the business software deployed in the source operating system before the migration. The data difference between the source operating system and the target operating system is related to whether the business software is compatible with the target operating system, and how to obtain the system difference data has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The present invention provides a method and device for obtaining system difference data, which can solve the problems existing in the related technology. The technical solution is as follows:
[0004] In one aspect, a method for obtaining system difference data is provided, the method comprising:
[0005] Determine the versions of the source and target operating systems for system migration;
[0006] According to the versions of the source operating system and the target operating system, obtain the basic library files and symbol information in the basic library files provided by the corresponding versions of the operating system;
[0007] The basic library files and symbol information in the basic library files provided by the source operating system are compared with the basic library files and symbol information in the basic library files provided by the target operating system to obtain the difference data of the basic library files and symbol information in the basic library files of the target operating system relative to the source operating system.
[0008] In another aspect, a device for acquiring system difference data is provided, the device comprising:
[0009] A determination unit, used to determine the versions of the source operating system and the destination operating system corresponding to the system migration;
[0010] An acquisition unit, used for acquiring the basic library files and symbol information in the basic library files provided by the corresponding versions of the operating system according to the versions of the source operating system and the target operating system;
[0011] The comparison unit is used to compare the basic library files and symbol information in the basic library files provided by the source operating system with the basic library files and symbol information in the basic library files provided by the target operating system, and obtain the difference data of the basic library files and symbol information in the basic library files between the target operating system and the source operating system.
[0012] 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 method for obtaining system difference data as described above.
[0013] 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 method for obtaining the system difference data are implemented.
[0014] On the other hand, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the steps of the method for obtaining system difference data described above are implemented.
[0015] The technical solution provided by the present invention can at least bring the following beneficial effects:
[0016] After determining the versions of the two operating systems, it is possible to obtain the basic library files provided by the corresponding versions of the operating systems and the symbol information in the basic library files. When comparing the difference data between the two operating systems, the symbol information of the basic library files is compared. In other words, the difference data is at the symbol information level, which facilitates subsequent compatibility analysis and improves the accuracy of subsequent compatibility analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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.
[0018] Figure 1 is a flow chart of a method for obtaining system difference data provided by an embodiment of the present invention;
[0019] Figure 2 It is a structural diagram of a device for acquiring system difference data provided by an embodiment of the present invention;
[0020] Figure 3 It is a hardware architecture diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0021] 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.
[0022] Please refer to Figure 1 , an embodiment of the present invention provides a method for obtaining system difference data, the method comprising:
[0023] Step 100, determining the versions of the source operating system and the target operating system corresponding to the system migration;
[0024] Step 102, according to the versions of the source operating system and the target operating system, obtain the basic library files and symbol information in the basic library files provided by the corresponding versions of the operating system;
[0025] Step 104, compare the basic library files and symbol information in the basic library files provided by the source operating system with the basic library files and symbol information in the basic library files provided by the target operating system, and obtain difference data of the basic library files and symbol information in the basic library files of the target operating system relative to the source operating system.
[0026] In an embodiment of the present invention, after determining the versions of two operating systems, it is possible to obtain the basic library files provided by the corresponding versions of the operating systems and the symbol information in the basic library files. When comparing the difference data between the two operating systems, the symbol information of the basic library files is compared, that is, the difference data is at the symbol information level, thereby facilitating subsequent compatibility analysis and improving the accuracy of subsequent compatibility analysis.
[0027] Described below Figure 1 How the various steps are performed.
[0028] First, step 100 "determine the versions of the source operating system and the target operating system corresponding to the system migration" and step 102 "obtain the basic library files and symbol information in the basic library files provided by the corresponding versions of the operating system according to the versions of the source operating system and the target operating system" are explained simultaneously.
[0029] In the embodiment of the present invention, after the source operating system and the target operating system that need to be migrated are determined, the versions of the source operating system and the target operating system can be determined.
[0030] In an embodiment of the present invention, the purpose of obtaining system difference data is to prepare for system migration compatibility assessment, and the compatibility assessment is to evaluate whether the business software deployed in the source operating system before migration is compatible with the target operating system after migration. Since the business software needs to call function interfaces during runtime, and the function interfaces belong to the symbol information level, the system difference data cannot be compared only at the level of the basic library files, but needs to be compared at the symbol information level.
[0031] In the embodiment of the present invention, the method for obtaining the basic library files and the symbol information in the basic library files provided by the corresponding version software operating system is the same for the source operating system and the target operating system, and may specifically include:
[0032] S21: Obtain the official software release package and software debugging package for the corresponding version of the operating system;
[0033] For Linux operating systems, the official version number is usually in the form of XY, where X is the major version number and Y is the minor version number released in stages. Software debugging packages are usually managed in units of X, and the managed software warehouse stores software debugging packages containing all Y minor versions of the X major version.
[0034] Based on this, in the embodiment of the present invention, when obtaining a software release package, it is necessary to obtain a software release package corresponding to X major version + Y minor version, and when obtaining a software debugging package, it is necessary to obtain a software debugging package of X major version.
[0035] In the embodiment of the present invention, the software release package is obtained in the following manner:
[0036] S211: Obtain a system image CD file of a corresponding version of the operating system from the official website;
[0037] S212: Mounting the system image CD file in a prepared working environment; wherein the prepared working environment is generally a Linux environment;
[0038] S213: According to the target hardware architecture of the source operating system corresponding to the system migration, traverse the software packages in the system image CD file to filter out software release packages that meet the target hardware architecture;
[0039] When the user decides to migrate the system, the hardware architecture of the user's source operating system has been determined. Therefore, in order to ensure that the subsequent compatibility analysis can be more accurate, when traversing the software packages in the system image CD file, it is necessary to filter out the software release packages that can meet the target hardware architecture.
[0040] Among them, the version of the software release package that can meet the target hardware architecture includes a version corresponding to the target hardware architecture and a cross-platform noarch version.
[0041] S22: parsing the basic library files provided by the version of the operating system from the software release package, and parsing the software debugging files provided by the version of the operating system from the software debugging package;
[0042] In the embodiment of the present invention, when parsing the basic library file from the software release package, the following steps may be specifically included:
[0043] S221: creating a virtual root directory in the working environment, simulating the file system of the operating system, and decompressing the software release package to a designated virtual root directory;
[0044] S222: Traverse the system basic library list under the specified virtual root directory according to the file system hierarchy structure FHS to obtain the basic library files provided by the operating system of this version.
[0045] Since some rpm software packages in the basic warehouse of the Linux distribution software warehouse provide basic components rather than basic library files, the basic components provide the tools that come with the system, and the basic library files are the system call function interfaces that the upper-layer applications rely on, that is, the symbol information provided by the basic library files. Therefore, in the embodiment of the present invention, the system basic library list under the virtual root directory can be found according to FHS, which can greatly reduce the workload of collecting symbol information.
[0046] In the embodiment of the present invention, when obtaining a software debugging package, the software debugging package corresponding to the major version X of the operating system is first obtained. In order to obtain the software debugging package of the minor version Y, the method may specifically include: according to the basic library files in the software release package, determining from the software debugging package a software debugging sub-package corresponding to each basic library file one by one, the determined software debugging sub-package forming a new software debugging package; and executing the software debugging file provided by the operating system of the version parsed from the new software debugging package.
[0047] S23: taking the basic library file and the software debugging file with the same file name as a pair to obtain a plurality of file pairs;
[0048] The basic library file and the software debugging file with the same file name have different suffixes. The basic library file name usually has ".so.", and the software debugging file suffix is usually ".dubug". The software debugging file records the symbol information provided by the corresponding basic file in the software release package.
[0049] S24: For each file pair, function matching is performed 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.
[0050] The basic library file of the software release package is a compiled binary file, which is unreadable, while the software debugging file is a text file, which is equivalent to the source code and remark information before compilation. In an embodiment of the present invention, the open source tool abi-dump component can be used to retrieve multiple function symbols from the software debugging file of the file pair through 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.
[0051] In this way, the corresponding versions of the basic library files and the symbol information in the basic library files can be obtained for the source operating system and the target operating system respectively. Among them, the symbol information obtained by using the abi-dump component is generated in the form of a json string into a text file with a ".dump" suffix.
[0052] Then, for step 104, the basic library files and symbol information in the basic library files provided by the source operating system are compared with the basic library files and symbol information in the basic library files provided by the target operating system to obtain difference data of the basic library files and symbol information in the basic library files of the target operating system relative to the source operating system.
[0053] The data for the operating system are, from high to low, rpm software package - basic library file - symbol information, that is, symbol information is the lowest level information of the operating system, and the function interface called by the upper layer application belongs to symbol information. In the embodiment of the present invention, after obtaining the information at the symbol information level for each operating system, a comparison at the symbol information level is required to obtain the difference data at the symbol information level between the source operating system and the target operating system.
[0054] In the embodiment of the present invention, the difference data at least includes the difference comparison data of the rpm package, the difference comparison data of the basic library file, and the difference comparison data of the symbol information, and the difference type may include the same, added, removed and changed. The difference comparison data may be implemented by one file or multiple files.
[0055] In one implementation, the difference 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;
[0056] 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.
[0057] 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.
[0058] 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.
[0059] Furthermore, after obtaining the data difference between the target operating system and the source operating system for the basic library files and the symbol information in the basic library files, it can also include: using the data difference to determine whether the business software deployed in the source operating system before system migration is compatible with the target operating system after system migration.
[0060] Specifically, the binary files related to the business software are obtained, and the first basic library file that the business software depends on and the first symbol information called for the first basic library file are parsed from the binary files. Then, based on the data difference, it is determined whether the target operating system has the first basic library file that the business software depends on and the first symbol information called for the basic library file. If so, the evaluation result is 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.
[0061] More specifically, it is determined based on the first difference comparison table whether there is a second basic library file with a difference type of removal and a third basic library file with a difference type of change in the first basic library file. If the second basic library file exists, it is incompatible. If the third basic library file exists, it is further determined based on the second difference comparison table whether there is second symbol information that is removed and / or changed in the first symbol information called for the third basic library file. If so, it is incompatible.
[0062] In an embodiment of the present invention, by obtaining the data difference between the source operating system and the target operating system at the symbol information level, and then determining 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 based on the data difference, it is determined whether the business software deployed in the source operating system before the migration is compatible with the target operating system after the migration. Compared with the method of building a virtual environment identical to the target operating system and then simulating the operation of the business software in the virtual environment, this method is not only more accurate, but also less time-consuming.
[0063] In an embodiment of the present invention, when obtaining a software release package, a full image CD file of the operating system is obtained, and there is no need to set up a work environment. The obtained iso image CD file is stored separately and is separated from the symbol information acquisition process. This allows for more flexible arrangement of work manpower and avoids network stability problems caused by multiple downloads of software packages in the work process.
[0064] Please refer to Figure 2 , an embodiment of the present invention provides a device for obtaining system difference data, the device comprising:
[0065] The determining unit 201 is used to determine the versions of the source operating system and the target operating system corresponding to the system migration;
[0066] The acquisition unit 202 is used to acquire the basic library files and symbol information in the basic library files provided by the corresponding versions of the operating system according to the versions of the source operating system and the target operating system;
[0067] The comparison unit 203 is used to compare the basic library files and symbol information in the basic library files provided by the source operating system with the basic library files and symbol information in the basic library files provided by the target operating system, and obtain the difference data of the basic library files and symbol information in the basic library files of the target operating system relative to the source operating system.
[0068] In one embodiment of the present invention, the acquisition unit is specifically used to: acquire a software release package and a software debugging package officially released for a corresponding version of an operating system; parse out a basic library file provided by the version of the operating system from the software release package, and parse out a software debugging file provided by the version of the operating system from the software debugging package; take a basic library file and a software debugging file with the same file name as a pair to obtain multiple file pairs; 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.
[0069] In one embodiment of the present invention, when the acquisition unit executes the acquisition of the official software release package for the corresponding version of the operating system, the steps specifically include: acquiring the system image CD file of the corresponding version of the operating system from the official website; mounting the system image CD file in the prepared working environment; and traversing the software packages in the system image CD file according to the target hardware architecture of the source operating system corresponding to the system migration to screen out the software release package that meets the target hardware architecture;
[0070] When the acquisition unit parses the basic library files provided by the version of the operating system from the software release package, it specifically includes: creating a virtual root directory in the working environment, simulating the file system of the operating system, and decompressing the software release package to the specified virtual root directory; traversing the system basic library list under the specified virtual root directory according to the file system hierarchy FHS to obtain the basic library files provided by the version of the operating system.
[0071] In one embodiment of the present invention, the acquisition unit is also used to: determine, from the software debugging package, software debugging sub-packages corresponding to each basic library file one by one according to the basic library files in the software release package, and the determined software debugging sub-packages form a new software debugging package; and execute the software debugging files provided by the operating system of this version parsed from the new software debugging package.
[0072] In one embodiment of the present invention, when the acquisition unit performs the 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, it specifically includes: retrieving multiple function symbols from the software debugging file of the file pair using a text retrieval method; for each function symbol, using the function symbol to verify whether the function symbol exists in the basic library file of the file pair, if so, determining that the function symbol is the symbol information in the basic library file, if not, determining that the function symbol is not the symbol information in the basic library file.
[0073] In one embodiment of the present invention, the device may further include:
[0074] The evaluation and determination unit is used to use the data difference to determine whether the business software deployed in the source operating system before the system migration is compatible with the target operating system after the system migration.
[0075] It should be noted that the device for obtaining system difference data 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 is divided into different functional modules to complete all or part of the functions described above. In addition, the device for obtaining system difference data provided in the above embodiment and the method for obtaining system difference data are of the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0076] The embodiment of the present application also provides a computer device, please refer to Figure 3 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 method for obtaining system difference data provided in the above-mentioned method embodiments.
[0077] 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 method for obtaining system difference data provided in the above-mentioned method embodiments.
[0078] 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 method for obtaining system difference data described in any of the above embodiments.
[0079] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its 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.
[0080] 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.
[0081] 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.
[0082] 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 method for obtaining system difference data, characterized in that: include: Determine the versions of the source and target operating systems for system migration; The operating system is a Linux operating system; According to the versions of the source operating system and the target operating system, obtain the basic library files and symbol information in the basic library files provided by the corresponding versions of the operating system; Compare the basic library files and symbol information in the basic library files provided by the source operating system with the basic library files and symbol information in the basic library files provided by the target operating system to obtain difference data of the basic library files and symbol information in the basic library files between the target operating system and the source operating system; the difference types include same, added, removed and changed; The method of obtaining the basic library files and symbol information in the basic library files provided by the corresponding version of the operating system includes: obtaining a software release package and a software debugging package officially released for the corresponding version of the operating system; the version of the software release package is the corresponding minor version in the major version, and the version of the software debugging package is the major version; parsing the basic library files provided by the operating system of this version from the software release package, and parsing the software debugging files provided by the operating system of this version from the software debugging package; taking the basic library files and software debugging files with the same file names as a pair to obtain multiple file pairs; for each file pair, performing function matching using the basic library files and software debugging files in the file pair to determine the symbol information in the basic library files in the file pair; The method of performing 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 comprises: retrieving a plurality of function symbols from the software debugging file of the file pair using a text search method; for each function symbol, using the function symbol to verify whether the function symbol exists in the basic library file of the file pair, if so, determining that the function symbol is the symbol information in the basic library file, and if not, determining that the function symbol is not the symbol information in the basic library file; The difference data at least includes a first difference comparison table whose difference granularity is the basic library file and a second difference comparison table whose difference granularity is the symbol information; the second difference comparison table is a statistics 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 change.
2. The method according to claim 1, characterized in that The obtaining of the official software release package for the corresponding version of the operating system includes: Obtain the system image CD file of the corresponding version of the operating system from the official website; Mount the system image CD file in the prepared working environment; According to the target hardware architecture of the source operating system corresponding to the system migration, traverse the software packages in the system image CD file to filter out the software release packages that meet the target hardware architecture; The step of parsing the basic library files provided by the operating system of this version from the software release package includes: Create a virtual root directory in the working environment, simulate the file system of the operating system, and decompress the software release package to the specified virtual root directory; According to the file system hierarchy structure FHS, the system basic library list under the specified virtual root directory is traversed to obtain the basic library files provided by the operating system of this version.
3. The method according to claim 2, characterized in that Before parsing the software debugging file provided by the version of the operating system from the software debugging package, the method further includes: According to the basic library files in the software release package, software debugging sub-packages corresponding to each basic library file are determined from the software debugging package, and the determined software debugging sub-packages form a new software debugging package; and the software debugging files provided by the operating system of the version parsed are executed from the new software debugging package.
4. The method according to any one of claims 1 to 3, characterized in that: After obtaining the data difference between the target operating system and the source operating system with respect to the basic library file and the symbol information in the basic library file, the method further includes: The data difference is used to determine whether the business software deployed in the source operating system before system migration is compatible with the target operating system after system migration.
5. A device for acquiring system difference data, characterized in that: The device comprises: A determination unit, used to determine the versions of the source operating system and the destination operating system corresponding to the system migration; the operating system is a Linux operating system; An acquisition unit, used for acquiring the basic library files and symbol information in the basic library files provided by the corresponding versions of the operating system according to the versions of the source operating system and the target operating system; A comparison unit is used to compare the basic library files and symbol information in the basic library files provided by the source operating system with the basic library files and symbol information in the basic library files provided by the target operating system, and obtain difference data of the basic library files and symbol information in the basic library files of the target operating system relative to the source operating system; the difference types include same, added, removed and changed; The acquisition unit is specifically used to acquire a software release package and a software debugging package officially released for a corresponding version of an operating system; the version of the software release package is a corresponding minor version in a major version, and the version of the software debugging package is the major version; the basic library files provided by the operating system of the version are parsed from the software release package, and the software debugging files provided by the operating system of the version are parsed from the software debugging package; the basic library files and software debugging files with the same file names are taken as a pair to obtain a plurality of file pairs; for each file pair, the basic library files and software debugging files in the file pair are used to perform function matching to determine the symbol information in the basic library files in the file pair; When the acquisition unit uses the basic library file and the software debugging file in the file pair to perform function matching to determine the symbol information in the basic library file in the file pair, the method specifically includes: retrieving multiple function symbols from the software debugging file of the file pair by using a text search method; for each function symbol, using the function symbol to verify whether the function symbol exists in the basic library file of the file pair, if so, determining that the function symbol is the symbol information in the basic library file, and if not, determining that the function symbol is not the symbol information in the basic library file; The difference data at least includes a first difference comparison table whose difference granularity is the basic library file and a second difference comparison table whose difference granularity is the symbol information; the second difference comparison table is a statistics 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 change.
6. The device according to claim 5, characterized in that When the acquisition unit executes the acquisition of the official software release package for the corresponding version of the operating system, the acquisition unit specifically includes: acquiring the system image CD file of the corresponding version of the operating system from the official website; mounting the system image CD file in the prepared working environment; and traversing the software packages in the system image CD file according to the target hardware architecture of the source operating system corresponding to the system migration to screen out the software release package that meets the target hardware architecture; When the acquisition unit parses the basic library files provided by the version of the operating system from the software release package, it specifically includes: creating a virtual root directory in the working environment, simulating the file system of the operating system, and decompressing the software release package to the specified virtual root directory; traversing the system basic library list under the specified virtual root directory according to the file system hierarchy FHS to obtain the basic library files provided by the version of the operating system.
7. The device according to claim 6, characterized in that The acquisition unit is further used to: determine, from the software debugging package, software debugging sub-packages corresponding to each basic library file one by one according to the basic library files in the software release package, and the determined software debugging sub-packages form a new software debugging package; The software debugging file provided by the operating system of the version is parsed and executed from the new software debugging package.
8. The device according to any one of claims 5 to 7, characterized in that: The device also includes: The evaluation and determination unit is used to use the difference data to determine whether the business software deployed in the source operating system before the system migration is compatible with the target operating system after the system migration.
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.
Citation Information
Patent Citations
Differential line code coverage rate enhancement marking method, system and device and storage medium
CN112612716A
Cross-version function code migration method and device and medium
CN114860294A
Version repository compatibility determination method and device, computer equipment and storage medium
CN116775114A
Operation system migration method and computing device
CN117608653A
Rapid evaluation method for migration of application software of linux operating system
CN117909041A
