Application software compatibility evaluation method applied to operating system migration

By simulating the underlying system environment in which the application runs, this method solves the problems of insufficient visualization and language support in existing application software compatibility assessment tools. It enables compatibility assessment of multiple languages ​​and compression formats, reduces the risk of operating system migration, and ensures the stable operation of application software on the target system.

CN118535221APending Publication Date: 2024-08-23KYLIN CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410775831.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing application software compatibility assessment tools lack visual displays, cannot explain the reasons for incompatibility in detail, do not support scanning of software packages in specific languages ​​and compression formats, and do not support the assessment of uninstalled software packages, making it difficult for non-technical personnel to understand and implement migration with high risks.

Method used

By simulating the underlying system environment in which the application runs, installing dependencies and using container and virtualization technologies, scanning software packages for specific languages, generating JSON files, and displaying the compatibility assessment results on a visual interface, the system supports assessments in multiple languages ​​and compression formats.

Benefits of technology

It enables a visual representation of application software compatibility assessment, provides detailed migration suggestions, supports scanning in multiple languages ​​and compression formats, reduces the risk of operating system migration, and ensures the smooth operation of application software on the target system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535221A
    Figure CN118535221A
Patent Text Reader

Abstract

An application software compatibility evaluation method applied to operating system migration comprises the steps that S1, an application software compatibility evaluation tool is installed in a source operating system and used for conducting compatibility evaluation on application software migrated to a target control system; s2, scanning an installation path of a software package of a specific language in a source operating system or directly scanning the software package by using the application software compatibility evaluation tool; s3, acquiring software package information of a specific language by scanning the installation path, performing compatibility evaluation with the target operating system according to a corresponding language in the software package information, and generating a json file according to an obtained compatibility evaluation result; and S4, obtaining field information in the json file, and finally generating an application software compatibility evaluation report, inserting the application software compatibility evaluation report into the html file, and displaying the application software compatibility evaluation report on a visual interface. By means of the method, guidance is provided for application software migration of a user, and problems possibly occurring in application software deployment and use after an operating system is migrated are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software migration, and in particular to a method for evaluating application software compatibility applied to operating system migration. Background Art

[0002] The business systems of most companies / factories are built based on the CentOS operating system. The CentOS7 / 8 systems have been discontinued one after another. For the sake of data security and business security, the future development trend will definitely tend to migrate from CentOS to domestic operating systems.

[0003] Regarding migration, it is necessary to ensure that the business software can run correctly and smoothly on the target system after the system is successfully migrated. Using the application software compatibility assessment tool, you can evaluate the installed and deployed software and software packages on the source operating system before migration, give migration suggestions, reduce the risk of business system transformation and migration, and help users complete business system transformation.

[0004] In the prior art, application software compatibility assessment tools have the following shortcomings: (1) The application software compatibility assessment results lack visual display and are difficult for non-technical personnel to understand; (2) For application software that is not recommended for migration, the reasons for incompatibility are not explained in detail, and the correction function is not provided; (3) Detailed assessment of software packages for specific languages, such as c\c++\java\python, is not supported; (4) Scanning of compressed software packages is not supported, especially binary software that can be directly installed; (5) Scanning of non-installed software packages is not supported, especially software packages of types such as rpm and deb, is not supported. Summary of the invention

[0005] To solve the above problems, the purpose of the present invention is to provide a method and system for installing and running cross-version applications under Linux. Through containers and virtualization related technologies, the basic system environment required for application operation is simulated, and the dependencies required by the application are installed in the simulated system environment to ensure that the application can run normally.

[0006] A method for application software compatibility assessment applied to operating system migration, characterized by comprising the following steps: S1, installing an application software compatibility assessment tool in the source operating system to assess the compatibility of application software migrated to the target operating system; S2, using the application software compatibility assessment tool to scan the installation path of the software package in the specific language in the source operating system or directly scan the software package; S3, obtains the software package information of a specific language by scanning the installation path, and performs a compatibility assessment with the target operating system based on the corresponding language in the software package information, and generates a json file with the obtained compatibility assessment results; S4, obtains the field information in the json file, and finally generates an application software compatibility assessment report, inserts it into the html document, and displays it on the visual interface.

[0007] Preferably, in step S3, the scanning of the installation path is divided into scanning of binary compressed packages that can be directly installed, and scanning of software packages that are not installed in the source operating system; The binary compressed package that can be directly installed is first decompressed before scanning.

[0008] Preferably, in step S3, the specific language includes four languages: C / C++, JAVA and Python; The software package is written in one or more of the four languages. If the software package is written in multiple languages, the compatibility of the languages ​​needs to be evaluated in turn.

[0009] Preferably, the compatibility assessment of the software package written in C / C++ language includes: S31, the application software compatibility assessment tool identifies all ELF executable files in the target application software according to the input installation path, and the ELF executable files depend on several dynamic libraries; S32, the ELF executable file is respectively subjected to package dependency compatibility evaluation and interface compatibility evaluation; the package dependency compatibility evaluation is to determine whether the dynamic library required for the target application software to run is a subset of the provides content of the rpm package in the target operating system warehouse, if so, the package dependency compatibility is satisfied, if not, the compatibility is not satisfied; the interface compatibility evaluation is to determine whether the external symbol interface required for the target application software to run can be provided by the dynamic library of the target operating system, if so, the interface compatibility is satisfied, if not, the compatibility is not satisfied; S33, merging package dependency compatibility and interface compatibility results as compatibility assessment results of the software package written in C / C++ language, and generating a json file.

[0010] Preferably, the compatibility assessment of the software package written in JAVA language includes: S3a, prepare the repositories of the source operating system and the target operating system respectively, for compatibility assessment by obtaining data support files; S3b, obtain the package dependency information of the software package, the called third-party interface and the called JDK interface; S3c, by querying the data support file, obtain the package dependency difference data, third-party interface difference data and JDK interface difference data between the target application software and the target operating system. If there is no difference, the package dependency compatibility and interface compatibility are met. If there is a difference, the compatibility is not met. S3d, merges the package dependency compatibility and interface compatibility results as the compatibility assessment results of the software package written in JAVA language, and generates a json file.

[0011] Preferably, the compatibility assessment of the software package written in Python language includes: S31, prepare Python environment information of the target operating system, wherein the environment includes the Python version and built-in library information of the target operating system; S3m, obtains py files from the installation path of the software package, and is used to analyze the Python version and all library information used to write the target application software; S3n, compare the library information of the target application software and the target operating system. If the libraries with information difference only involve the extended library or the custom library, the conclusion is incompatible. If there is no library with information difference, the conclusion is compatible. S3o obtains the compatibility result as the compatibility evaluation result of the software package written in Python language and generates a json file.

[0012] Preferably, in step S4, the field information is parsed using JavaScript / Python language.

[0013] Preferably, in step S4, the application software compatibility assessment report includes two items: system basic information and application software compatibility; The basic system information is used to view the information of the source operating system and the target operating system; The application software compatibility is used to view the results of the application software compatibility assessment and the package dependency analysis list, the analysis list of C / C++ and JAVA interfaces, and the Python difference library analysis list.

[0014] Beneficial effects of the present invention: (1) The present invention is applied to the migration of the CentOS system to the domestic server operating system. It has been applied on the Kylin server operating system and can also be transplanted to other Linux systems; (2) Supports displaying reports in HTML format; (3) Supports application software compatibility assessment of binary packages of zip, tgz, tar and tar.gz types; supports application software compatibility assessment of software installation paths; supports application software compatibility assessment of specified languages ​​(c / c++ / java / python); supports application software compatibility assessment of uninstalled software packages; supports application software compatibility assessment of both x86 and aarch64 architectures; (4) The present invention is written in Python and has high portability. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A step diagram of a compatibility assessment method for target application software before migrating from a source operating system to a target operating system. DETAILED DESCRIPTION

[0017] The technical scheme in the embodiment of the present invention is described clearly and completely below in conjunction with the accompanying drawings in the embodiment of the present invention. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.

[0018] Reference Figure 1 As shown, a method for evaluating application software compatibility applied to an operating system includes: Step S1, install an application software compatibility assessment tool in the source operating system to perform compatibility assessment on the application software migrated to the target operating system; wherein, the source operating system in the present invention takes centos7.9 as an example, and the target operating system is a domestic operating system.

[0019] Step S2, using the application software compatibility assessment tool to scan the installation path of the software package of a specific language in the source operating system or directly scan the software package. Wherein, the case of directly scanning the software package is to obtain the installation path after analyzing the path information such as the document list and configuration file of the software package through the application software compatibility tool.

[0020] In this embodiment, an application software compatibility assessment tool is used to scan the installation path of the software package in the source operating system, for example, scan the installation path of redis / usr / local / redis-5.0.41; scan the rpm software package in the source operating system, for example, scan glibc32-2.28-42.1.el8.x86_64.rpm; scan the binary compressed package in the source operating system, for example, scan mysql-bin.tar.gz.

[0021] Among them, for binary compressed packages that can be installed directly, they can be run directly after decompression without recompilation. Therefore, for such software packages, you need to decompress them first and then scan the installation path.

[0022] For software packages that are not installed in the source operating system, in CentOS systems, most of the software packages that are not installed are provided in the form of rpm. The rpm package mainly includes binary files, library files, configuration files, metadata, file lists, etc. Among them, metadata provides information about the software package itself, such as package name, version number, release number, summary, description, author, build date, dependencies, etc. The scan for the uninstalled software package is mainly to perform compatibility assessment by analyzing binary files, library files, metadata and related dependent packages.

[0023] Step S3, by scanning the installation path, obtain the software package information of the specific language, and perform a compatibility assessment based on the compatibility of the corresponding language in the software package information with the target operating system, and generate a json file with the obtained compatibility assessment results; the compatibility assessment is to analyze the package dependency compatibility, interface compatibility and library differences.

[0024] In this embodiment, the specific languages ​​include C / C++, JAVA and Python. Since the target application software may be composed of multiple languages, the application software compatibility assessment tool of the present invention only supports software written in the above four languages. The target application software can be written in one or more of them, and the target application software supports scanning. For target application software written in multiple languages, when performing path scanning on the software package, it can be known which languages ​​are written in, and the compatibility of the corresponding language writing parts is judged in turn. If all pass the compatibility test, the target application software is theoretically compatible with the target operating system, but as long as there is one incompatibility, the target application software is incompatible with the target operating system.

[0025] In one embodiment, the application software compatibility assessment is performed on the software package written in C\C++ language, specifically including: Step S31: the application software compatibility assessment tool identifies all ELF executable files according to the input installation path.

[0026] In this embodiment, the application software under the Linux operating system realizes its functions by running some ELF (Executable and Linkable Format) executable files. The operation of the ELF executable file mainly depends on one or more dynamic libraries (.so files), which contain the code and data required by the application software when running. When the operating system loads the ELF executable file, it will check and load these dependent dynamic libraries. If the necessary dynamic library cannot be found, or the version of the dynamic library does not match, the application software may not run normally. The dynamic library of the operating system is generally provided by other application software or system packages. The dynamic library part provided by the system package is a subset of the provides content of the rpm package in the system warehouse.

[0027] Step S32, performing package dependency compatibility evaluation and interface compatibility evaluation on the ELF file respectively.

[0028] Specifically, in terms of package dependency compatibility: if the dynamic libraries required to run the target application software are all subsets of the provides content of the rpm package in the target operating system warehouse, the target application software can run normally, that is, the target application software is compatible with the target operating system. If there is a dynamic library required to run the target application software that cannot be provided by the provides of the rpm package in the target operating system warehouse, the ELF executable file that requires this dynamic library cannot run normally, and the application software cannot run normally, that is, it is incompatible with the target operating system.

[0029] In terms of interface compatibility: Under the condition of satisfying the compatibility of dependent packages, if all external symbol interfaces required for the target application software to run can be provided by the dynamic library of the target operating system, the interface compatibility is met. Otherwise, the interface compatibility is not met (the process will exit abnormally when running to these interface calls).

[0030] S33, merging package dependency compatibility and interface compatibility results as compatibility assessment results of the software package written in C / C++ language, and generating a json file.

[0031] In another embodiment, the application software compatibility assessment is performed on the software package written in Java language, specifically including: Step S3a, obtaining data support files for compatibility assessment of the software package written in Java language. The acquisition of the data support files requires the preparation of the source operating system and the target operating system warehouses, specifically involving debuginfo packages, rpm packages and system configuration information.

[0032] Based on the prepared repository, you can obtain: (1) sourceos.json: source operating system jar package information and configuration information; (2) targetos.json: target operating system jar package information and configuration information; (3) jdk_api_data.json: JDK difference information; (4) sourceos-targetos.json: so library differences and configuration file difference information in the rpm package.

[0033] Step S3b, obtaining the dependency information of the target software, the called third-party interface, and the called JDK interface; Step S3c, by querying the data support file, obtain the package dependency difference data, third-party interface difference data and JDK interface difference data between the target application software and the target operating system. If there is no difference, the package dependency compatibility and interface compatibility are met. If there is a difference, the compatibility is not met.

[0034] Specifically, in terms of package dependency compatibility: all dependent classes of the JAVA writing part are analyzed through jdeps, which is a command line tool provided by the Java Development Kit (JDK) for analyzing the dependencies of JAVA classes or JAR files. Then query whether the target operating system has a corresponding rpm package in targetos.json. If it exists, the package dependency compatibility is met, otherwise it is not met.

[0035] In terms of interface compatibility analysis: interface compatibility is divided into JDK interface compatibility and third-party interface compatibility. Specifically, the compatibility analysis of JDK interface has the following steps: (1) Unzip the JAR package of the source operating system to obtain a JAVA binary file; the JAR (Java Archive) package is a format used by the JAVA platform to package multiple JAVA class files, related metadata, and resource files (such as text, images, etc.) into a single file. A JAR file is essentially a ZIP file, so any tool that can process ZIP files can be used to view or manipulate the contents of a JAR file. JAR files are mainly used for library distribution, Java Web application packaging, and Java module deployment.

[0036] (2) Analyze the JAVA binary file and obtain the JDK compiled version of the JAVA binary file; (3) Obtain the JDK interface called by the corresponding version in the source operating system JAR package; (4) Query whether the JDK interface has a corresponding interface with the target operating system in jdk_api_data.json. If there is a corresponding interface, the JDK interface is compatible, otherwise it is incompatible.

[0037] The compatibility assessment of third-party interfaces is as follows: (1) Decompress the source operating system JAR package to obtain the JAVA binary file; (2) Analyze the class files in the JAVA binary file and obtain the called third-party interface; (3) Check in sourceos-targetos.json whether there is a corresponding interface between the third-party interface and the target operating system. If there is a corresponding interface, the third-party interface is compatible; otherwise, it is incompatible.

[0038] The interface compatibility evaluation result is obtained when both the JDK interface and the third-party interface are compatible, otherwise they are incompatible.

[0039] Step S3d, merging the package dependency compatibility and interface compatibility dependency compatibility results as the compatibility evaluation results written in JAVA language, and generating a json file.

[0040] In another embodiment, the application software compatibility assessment is performed on the software package written in Python language, specifically including: Step S31, prepare the Python environment information of the target operating system, the environment information includes the Python version of the target operating system and the built-in library information; wherein, the built-in library information can use the pipdeptree tool to obtain all the packages installed in the current environment information and their dependency information. Python is divided into built-in libraries, extended libraries and custom libraries. The built-in library is the library that comes with the Python installation version, the extended library is a third-party library, that is, a library downloaded by an individual; the custom library is a library written by an individual.

[0041] Step S3m, obtaining the py file from the installation path of the software package, which is used to analyze the Python version and all library information used to write the target application software; Compare the Python versions in the source system and the target system. If the versions are inconsistent, a prompt will be given, but it will not affect the final compatibility assessment result. It mainly depends on whether there is a problem with the information database. As long as there is no problem with the information database and it is just a problem with the Python version, installing the same version environment of the original operating system on the target system will be compatible and will not affect the overall compatibility.

[0042] Step S3n, comparing the library information of the target application software and the target operating system, if the library with information difference only involves the extended library or the custom library, the conclusion is incompatibility, if there is no library with information difference, the conclusion is compatibility.

[0043] Step S3o, obtaining a compatibility result as a compatibility evaluation result of the software package written in Python language and generating a json file with the compatibility evaluation result.

[0044] Step S4, obtaining the field information in the json file, and finally generating an application software compatibility assessment report, inserting it into an html document and displaying it on a visual interface.

[0045] The collected field information is parsed using JavaScript / Python language and inserted into the HTML document. The present invention uses Python language.

[0046] The application software compatibility assessment report includes two items: system basic information and application software compatibility assessment. Among them, the system basic information includes the current system version, the target system version, the current host name and the current host IP. The current system version is the source operating system version. The application compatibility assessment includes the package name, the evaluation software installation path, the package dependency compatibility, the interface compatibility, the Python library compatibility, the package dependency analysis list, the interface analysis list (C / C++), the interface change analysis list (JAVA class) and the difference library analysis list (Python). Among them, the interface change analysis list JAVA class includes the interface change analysis list and the JDK interface change analysis list JAVA-third party.

[0047] The package dependency analysis list is a collection of multiple languages, and includes the binary file name, dependent package name, associated so file, and whether it is compatible.

[0048] The interface change analysis list (C / C++), interface change analysis list (JAVA class) and difference library analysis list (Python) are used to analyze the difference information of the target software when migrating from the source operating system to the target operating system.

[0049] The interface change analysis list (C / C++) includes: binary file name, dependent package name, so file, interface name, and whether it is a result. Data will only exist in this list if there is an interface change, otherwise there will be no data.

[0050] The interface change analysis list (JAVA class) includes: CentOS, KylinOS, package name, method name, and difference items. Data will only exist in this list when there is an interface change, otherwise there will be no data.

[0051] The library change analysis list (Python) includes third-party libraries - CentOS, third-party libraries - KylinOS, custom libraries - CentOs, custom libraries - KylinOs, and whether they are compatible. If there are library differences, there will be data under this list, otherwise there will be no data.

[0052] The beneficial effects of the present invention are: (1) Provide guidance for users’ application software migration to avoid problems that may arise in the deployment and use of application software after operating system migration.

[0053] (2) The application software compatibility assessment results are clearly and intuitively displayed in the form of HTML, which greatly improves readability. The compatibility assessment report can reflect the various scan items of the application software in detail, and provide migration suggestions for incompatible application software based on the scan conclusions. At the same time, the present invention can evaluate software packages written in C, C++, Java and Python, support scanning of installed software directories, binary software packages (especially RPM format), and directly installable binary compressed packages (formats include zip, tgz, tar, tar.gz), and provide a list of software dependency package compatibility and interface compatibility information.

[0054] (3) Before the formal migration of the operating system, the compatibility of the application software is evaluated. If the result of the application software compatibility evaluation is compatible, it means that the application software can be successfully deployed and installed on the target operating system after migration and can run correctly and smoothly in ideal cases. On the contrary, if it is not recommended to migrate the software, if the migration is forced without operating the target operating system, then the installation and deployment of the application software in the target operating system is likely to fail to deploy or run. If the problems prompted in the evaluation report are resolved in the target operating system before the application software is migrated, ideally, the application software can be installed and deployed normally and run smoothly after migration.

[0055] Although the present invention has been described using the above preferred embodiments, they are not intended to limit the scope of protection of the present invention. Any person skilled in the art may make various changes and modifications to the above embodiments without departing from the spirit and scope of the present invention. The scope of protection of the present invention shall be based on the definition of the claims.

Claims

1. A method for evaluating application software compatibility for operating system migration, characterized in that: The following steps are involved: S1, installing an application software compatibility assessment tool in the source operating system to assess the compatibility of application software migrated to the target operating system; S2, using the application software compatibility assessment tool to scan the installation path of the software package in the specific language in the source operating system or directly scan the software package; S3, obtains the software package information of a specific language by scanning the installation path, and performs a compatibility assessment with the target operating system based on the corresponding language in the software package information, and generates a json file with the obtained compatibility assessment results; S4, obtains the field information in the json file, and finally generates an application software compatibility assessment report, inserts it into the html document, and displays it on the visual interface.

2. The method for evaluating application software compatibility for operating system migration according to claim 1, characterized in that: In step S3, the scanning of the installation path is divided into scanning of binary compressed packages that can be directly installed and scanning of software packages that are not installed in the source operating system; The binary compressed package that can be directly installed is first decompressed before scanning.

3. The method for evaluating application software compatibility for operating system migration according to claim 1, characterized in that: In step S3, the specific languages ​​include four languages: C / C++, JAVA and Python; The software package is written in one or more of the four languages. If the software package is written in multiple languages, the compatibility of the languages ​​needs to be evaluated in turn.

4. The method for evaluating application software compatibility for operating system migration according to claim 3, characterized in that: Compatibility assessment of the software packages written in C / C++ language, including: S31, the application software compatibility assessment tool identifies all ELF executable files in the target application software according to the input installation path, and the ELF executable files depend on several dynamic libraries; S32, the ELF executable file is respectively subjected to package dependency compatibility evaluation and interface compatibility evaluation; the package dependency compatibility evaluation is to determine whether the dynamic library required for the target application software to run is a subset of the provides content of the rpm package in the target operating system warehouse, if so, the package dependency compatibility is satisfied, if not, the compatibility is not satisfied; the interface compatibility evaluation is to determine whether the external symbol interface required for the target application software to run can be provided by the dynamic library of the target operating system, if so, the interface compatibility is satisfied, if not, the compatibility is not satisfied; S33, merging package dependency compatibility and interface compatibility results as compatibility assessment results of the software package written in C / C++ language, and generating a json file.

5. The method for application software compatibility assessment for operating system migration according to claim 3, characterized in that: Compatibility assessment of the software packages written in JAVA language, including: S3a, prepare the repositories of the source operating system and the target operating system respectively, for compatibility assessment by obtaining data support files; S3b, obtain the package dependency information of the software package, the called third-party interface and the called JDK interface; S3c, by querying the data support file, obtain the package dependency difference data, third-party interface difference data and JDK interface difference data between the target application software and the target operating system. If there is no difference, the package dependency compatibility and interface compatibility are met. If there is a difference, the compatibility is not met. S3d, merges the package dependency compatibility and interface compatibility results as the compatibility assessment results of the software package written in JAVA language, and generates a json file.

6. The method for evaluating application software compatibility for operating system migration according to claim 3, characterized in that: Compatibility assessment of Python-written software packages, including: S31, prepare Python environment information of the target operating system, wherein the environment includes the Python version and built-in library information of the target operating system; S3m, obtains py files from the installation path of the software package, and is used to analyze the Python version and all library information used to write the target application software; S3n, compare the library information of the target application software and the target operating system. If the libraries with information difference only involve the extended library or the custom library, the conclusion is incompatible. If there is no library with information difference, the conclusion is compatible. S3o obtains the compatibility result as the compatibility evaluation result of the software package written in Python language and generates a json file.

7. The method for evaluating application software compatibility for operating system migration according to claim 1, characterized in that: In step S4, the field information is parsed using JavaScript / Python language.

8. The method for evaluating application software compatibility for operating system migration according to claim 1, characterized in that: In step S4, the application software compatibility evaluation report includes two items: system basic information and application software compatibility; The basic system information is used to view the information of the source operating system and the target operating system; The application software compatibility is used to view the results of the application software compatibility assessment and the package dependency analysis list, the analysis list of C / C++ and JAVA interfaces, and the Python difference library analysis list.

Citation Information

Cited By

  • A method for evaluating performance of a super constellation operating system

    CN123197753A