Application compatibility evaluation method and computing device
By differentially analyzing the dependency files of the target application in the first source operating system and the second source operating system, it determines its compatibility on the target operating system, and solves the problems of real-time compatibility evaluation and long database update cycle during the operating system migration process in the prior art, and achieves efficient and accurate compatibility evaluation.
Patent Information
- Application Number
- CN202410519481.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-04-28
AI Technical Summary
During the server's operating system migration process, the existing technology is difficult to meet the real-time performance of application compatibility evaluation, and the component database production cycle is long and cannot be updated quickly.
By obtaining the first dependency file of the target application in the first source operating system and the second dependency file of the second source operating system, performing a difference analysis, determining the compatibility of the target application in the target operating system based on the difference analysis results, and using the difference database to improve the real-timeness of the evaluation.
Real-time and accuracy of compatibility evaluation for migrated operating systems is achieved, reducing the time of differential analysis and improving evaluation efficiency.
Smart Images

Figure CN118409785B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of operating system technology, and in particular to an application compatibility evaluation method and computing device. Background Art
[0002] When migrating the server's operating system, in order not to affect the applications deployed on the existing network server, it is necessary to replace, adapt or migrate the first source operating system and the application software or business system installed on it. Compatibility assessment is a difficult problem that will inevitably be encountered during the above operating system migration process.
[0003] In the related art, an operating system component database is usually created with full images of a first source operating system and a target operating system. Then, the associated data of the target application is obtained from the component databases of the first source operating system and the target operating system, respectively. Finally, the compatibility of the application is evaluated based on the obtained associated data.
[0004] First, the component database of the source operating system and the component database of the target operating system are usually made based on the full image, and the number of image packages is huge; the difference analysis must also be performed on the two operating systems, so the database production cycle is very long. Therefore, if the database is remade or updated based on the actual system components, the cycle is long and cannot meet the real-time nature of compatibility assessment. Summary of the invention
[0005] The embodiment of the present application provides an application compatibility evaluation method and a computing device, which take into account both the real-time and accuracy of the application compatibility evaluation of the migration operating system.
[0006] In a first aspect, an embodiment of the present application provides an application compatibility assessment method, the method comprising: obtaining a first dependency file of a target application on a first source operating system; wherein the first source operating system is an operating system currently running on a source node; when the first component database does not include the first dependency file, obtaining a second dependency file of the target application from a second component database; wherein the first component database is created based on a second source operating system image; the second component database is created based on a target operating system image; the second source operating system is an operating system running on the source node before the first source operating system is upgraded; the target operating system is an operating system after the first source operating system is migrated; performing a difference analysis on the first dependency file and the second dependency file; and determining the compatibility of the target application on the target operating system based on the difference analysis results of the first dependency file and the second dependency file.
[0007] In this solution, a difference database is created by using the difference data between the source operating system image and the target operating system image components. The compatibility analysis strategy is determined based on whether the dependent file is in the second source operating system component database (second source operating system component database) of the source operating system image component. This can take into account both the real-time and accuracy of the compatibility assessment of the migrated operating system application.
[0008] In some embodiments, based on the difference analysis results between the first dependent file and the second dependent file, determining the compatibility of the target application in the target operating system includes: determining that the target application is compatible with the target operating system when there is no difference data between the first dependent file and the second dependent file.
[0009] In some embodiments, the method further includes: if there is difference data between the first dependent file and the second dependent file, determining that the target application is incompatible with the target operating system.
[0010] In this solution, when the first dependent file is not in the first source operating system component database, a difference analysis is directly performed on the corresponding dependent files in the first source operating system and the target operating system, thereby ensuring the accuracy of the compatibility evaluation.
[0011] In some embodiments, the method also includes: when the first component database includes the first dependent file, respectively obtaining the file identification of the first dependent file and the file identification of the second dependent file; determining whether the difference database includes the difference data of the first dependent file and the second dependent file based on the file identification of the first dependent file and the file identification of the second dependent file; wherein the difference database is created based on the first component database and the second component database; when the difference database does not include the difference data of the first dependent file and the second dependent file, determining that the target application is compatible with the target operating system.
[0012] In some embodiments, the method further includes: determining that the target application is incompatible with the target operating system when the difference database includes difference data of the first dependent file and the second dependent file.
[0013] In this solution, when the dependent file is in the first source operating system component database, the compatibility of the application is determined directly through the existing difference database based on whether the difference database includes difference data, which can improve the real-time performance of the compatibility evaluation.
[0014] In some embodiments, the method further includes: when there is difference data between the first dependent file and the second dependent file, recording the difference data, and generating a difference analysis report of the target application to the user based on the difference data.
[0015] In this solution, a difference analysis report of the target application is generated based on the difference data between the first dependent file and the second dependent file, which can quickly provide the user with the compatibility analysis result of the target application and improve the efficiency of the compatibility evaluation.
[0016] In some embodiments, the method further includes: if there is difference data between the first dependent file and the second dependent file, storing the first dependent file in the first component database, and storing the difference data record in the difference database.
[0017] In this solution, by updating the data in the first component database and the difference database, the real-time and effectiveness of the compatibility evaluation of subsequent target applications are improved.
[0018] In some embodiments, a difference database is created based on a first component database and a second component database, including: creating a difference database based on difference data between a second dependency file and a third dependency file; wherein the third dependency file is a dependency file of the target application in the second source operating system.
[0019] In this solution, by creating a difference database, when the component data of the first source operating system changes, there is no need to recreate or update the database with the component data of the first source operating system. At the same time, when the difference database includes the difference data of the first dependent file and the second dependent file, the difference data can be provided quickly, which reduces the time for difference analysis and improves the efficiency of compatibility assessment.
[0020] In some embodiments, the first dependent file and the second dependent file include dependent package data, configuration data, structural data, and interface data, and performing difference analysis on the first dependent file and the second dependent file includes: performing difference analysis based on the dependent package data, configuration data, structural data, and interface data.
[0021] In this solution, based on the difference analysis of dependent package data, configuration data, structure data and interface data in the associated data, the effectiveness of compatibility evaluation of source nodes and target host nodes is improved.
[0022] In a second aspect, an embodiment of the present application provides a computing device, including a memory and a processor; the memory and the processor are coupled; the memory is used to store a computer program; when the processor executes the above computer program, the application compatibility evaluation method involved in the above first aspect is implemented.
[0023] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions in the computer-readable storage medium are executed by a computing device, the computing device executes the application compatibility evaluation method involved in the first aspect above.
[0024] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computing device, enables the computing device to execute the application compatibility assessment method involved in the first aspect above.
[0025] It should be understood that the beneficial effects achieved by the technical solutions of the second to fourth aspects of the embodiments of the present application and the corresponding possible implementation methods can be referred to the above-mentioned technical effects of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a schematic diagram of a scenario of application compatibility evaluation provided by an embodiment of the present application;
[0027] Figure 2a is a schematic diagram of obtaining target application difference data when a first dependent file exists in a first component database provided by an embodiment of the present application;
[0028] Figure 2b is a schematic diagram of obtaining target application difference data when the first dependent file does not exist in the first component database provided by an embodiment of the present application;
[0029] Figure 3 is a schematic diagram of performing difference analysis using a compatible analysis module provided in an embodiment of the present application;
[0030] Figure 4 is a schematic diagram of generating a difference analysis report of a target application provided in an embodiment of the present application;
[0031] Figure 5 is a flow chart of a compatibility assessment method provided in an embodiment of the present application;
[0032] Figure 6 is a schematic diagram of a first embodiment of determining difference data provided by an embodiment of the present application;
[0033] Figure 7 is a schematic diagram of a second embodiment of determining difference data provided by an embodiment of the present application;
[0034] Figure 8 It is a schematic diagram of the structure of the computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0036] In order to facilitate understanding of the technical solution of the present application, the relevant terms involved in this article are explained below.
[0037] System migration refers to migrating the application or operating environment on the currently running operating system to another operating system. The currently used operating system is the first source operating system, and the operating system to be migrated is the target operating system.
[0038] The component database refers to the database created based on the source node operating system image or the target operating system image when the system migration is performed for compatibility assessment. The component database usually includes the data of the core components, system tools, application files, and configuration files of the above system images.
[0039] A system image refers to an installation package of a complete operating system installation file, usually in the form of a file. This file contains all the core components, system tools, application files, and configuration files of the operating system, and can be used to install the operating system on a new device or deploy the operating system in a virtual environment. In some embodiments, the format of the system image can be a disc image format such as .iso, .img, or .img.gz, or a compressed file format. This application does not limit the specific format of the system image.
[0040] The target application refers to the same application running on the first source operating system and the target operating system during the compatibility assessment.
[0041] Dependent files refer to core components, system tools, application files, and configuration files provided by the first source operating system and / or the target operating system and required by the target application during compilation and runtime.
[0042] Associated data refers to the dependent package data, interface data, structure data, compilation data, and configuration data related to the dependent files in the target application.
[0043] Migration tools refer to the tools used when migrating the operating system. For example, the system migration tool x2openEule provided by the openEuler (Euler operating system) open community, and the system migration tool X2Keyarch provided by KeyarchOS (Cloud Mountain Operating System).
[0044] When migrating the server's operating system, in order not to affect the applications deployed on the existing network server, it is necessary to replace, adapt or migrate the first source operating system and the application software or business system installed on it. Compatibility assessment is a difficult problem that will inevitably be encountered during the above operating system migration process.
[0045] In the related art, some compatibility evaluation methods, for example, when using x2openEule for system migration. Usually, an operating system component database is made with a second source operating system (the second source operating system can be the operating system before the first source operating system is upgraded, and the source operating system is the operating system currently running on the source node) and a full image of the target operating system. Then, the first dependency file of the target application is obtained from the component database of the second source operating system, and the second dependency file of the target application is obtained from the component database of the target operating system. Finally, based on the first dependency file and the second dependency file, the compatibility of the target application between the first operating system and the second operating system is evaluated.
[0046] In the above compatibility assessment method, the component database of the source operating system and the component database of the target operating system are usually made based on the full image, and the number of image packages is huge; and the difference analysis is also required for the two operating systems, so the database production cycle is very long. Therefore, if the database is remade or updated based on the components of the actual system, the cycle is long and cannot meet the real-time nature of the compatibility assessment.
[0047] In order to solve the problem that the component database production cycle is long and cannot meet the real-time performance of application compatibility evaluation during system migration, an embodiment of the present application provides an application compatibility evaluation method. In the application compatibility evaluation method, based on the source image and the target image, the component database of the second source operating system and the component database of the target operating system, as well as the difference database between the two are produced according to the original process; query and traverse the dependent files of the application in the first source operating system, and determine the compatibility analysis strategy according to whether the dependent files are in the component database of the second source operating system; specifically, there are two cases: when the dependent files are in the component database of the second source operating system, the corresponding dependent files in the component database of the second source operating system and the component database of the target operating system are used to query the difference database. If the above-mentioned dependent files cannot be found, there is no difference, indicating that the application is compatible; if there are differences, they are recorded and reported to the user. When the dependent files are not in the component database of the first source operating system, a difference analysis is performed for the corresponding dependent files in the first source operating system and the target operating system. If there is no difference between the two (the difference may include: interface deletion, interface parameter and return value type changes, constant value changes, etc.), it means that the application is compatible; otherwise, it means incompatibility, and the difference results are recorded and synchronized to the difference database, and reported to the user. Compared with the original application compatibility assessment that strongly relies on the pre-processed static database, this method adopts different processing strategies according to different situations of judging whether the application's dependent files are in the source system component database: if the dependent files are in the source system component database, the difference analysis results already in the static database are used; if the dependent files are not in the source system component database, the compatibility assessment is performed by dynamically analyzing the file differences in real time. This ensures the real-time and accuracy of the compatibility assessment.
[0048] In order to facilitate understanding of the technical solution of the present application, an application scenario of an embodiment of the present application is first introduced below.
[0049] For example, Figure 1 What is shown is a schematic diagram of a scenario of application compatibility evaluation provided by an embodiment of the present application. Figure 1 As shown, the first node 10 is connected to the source node 20, and the compatibility of the target application is evaluated by obtaining the first dependency file of the target application running on the current operating system (first source operating system) on the source node 20. The first dependency file includes dependency file data related to the compilation and running of the target application on the source node 110.
[0050] Specifically, the first node 10 has deployed thereon a first component database 110 created based on a second source operating system image (the second source operating system may be an operating system before the first source operating system is upgraded), a second component database 120 created based on a target operating system image; and a difference database 130 created based on difference data between a dependency file (third dependency file) of a target application in the first component database 110 and a dependency file (second dependency file) of the target application in the second component database 120.
[0051] The first component database 110 includes data of core components, system tools, application files and configuration files of the first source operating system image, and the second component database 120 includes data of core components, system tools, application files and configuration files of the target operating system image.
[0052] In some embodiments, the difference data in the difference database 130 may also include differences in core components, system tools, and application files between the first source operating system image and the target operating system image, such as differences in software packages and software package versions provided by the operating system, differences in software package dependencies and file directory information provided by the software packages, and differences in software package library files, application programming interface (API) files, application binary interface (ABI) files, and header files.
[0053] The specific differences may also include differences in configuration files between the two system images, for example, differences in default parameters and compilation parameters between the source operating system and the target operating system after the system images are deployed, and differences in service parameters in the running state.
[0054] Please continue reading Figure 1 The first node 10 also deploys compatibility assessment software 140 for performing application compatibility assessment. The compatibility assessment software 140 includes a dependency file query module 141, a compatibility analysis module 142, and an analysis result output module 143.
[0055] The dependency file query module 141 is used to analyze the target application running on the source node 20, obtain the first dependency file of the target application, and send a query instruction to the first component database 110 according to the first dependency file. The dependency file query module 141 is also used to obtain the second dependency file of the target application from the second component database 120 according to the above query result, or obtain the difference data of the target application from the difference database 130, and output the difference data to the analysis result output module 143. The above second dependency file includes dependency file data related to the compilation and operation of the target application in the target operating system image.
[0056] The compatibility analysis module 142 is used to perform compatibility analysis on the first dependent file and the second dependent file, and output the difference data between the first dependent file and the second dependent file to the analysis result output module 143 when the first dependent file and the second dependent file are inconsistent.
[0057] The analysis result output module 143 is used to receive the difference data input from the dependent file query module 141 or the compatible analysis module 142 and generate a difference analysis report for the target application.
[0058] By way of example and not limitation, the target application disclosed in the embodiments of the present application may be a Red Hat Package Manager (RPM), a Debian Package Manager (DPKG), or an Advanced Package Tool (APT). In other words, the embodiments of the present application do not limit the specific type of the target application.
[0059] For example, Figure 2a FIG. 4 is a schematic diagram showing how to obtain target application difference data when the first dependency file exists in the first component database. Figure 2a As shown, first, the dependent file query module 141 obtains the target application from the source operating system. In some implementations, the target application may be a compressed file, or the source code of the target application, or a binary file of the target application. In other words, the embodiment of the present application does not limit the specific format of the target application.
[0060] Secondly, the dependency file query module 141 uses the dependency file analysis tool to analyze the target application to obtain the first dependency file of the target application. As mentioned above, the first dependency file includes dependency package data, interface data, structure data, compilation data and configuration data related to the compilation and operation of the target application on the source node 110.
[0061] Among them, dependent package data refers to the package on which the target application compilation depends; interface data refers to data related to the target application interface; structural data refers to data used to represent the target application file structure; compilation data refers to data related to the target application compilation parameters; configuration data refers to configuration data of the operating system that supports the compilation and operation of the target application.
[0062] In some embodiments, the dependency file analysis tool may be codegraph (source code dependency visualization tool), gochk (static dependency analysis tool for Go files), Java class dependency, dependency, and duplicate class analysis tool (class dependency analyzer, CDA), and Dependencies (dll file dependency library detection tool), or a combination of multiple dependency file analysis tools. In other words, the embodiments of the present application do not limit the specific type of dependency file analysis tool.
[0063] Then, the dependency file query module 141 sends a query instruction to the first component database 110 according to the first dependency file of the target application. If the first component database 110 returns the query result of "the first dependency file is queried", the file identifier of the first dependency file is obtained from the first component database 110, and the file identifier of the second dependency file is obtained from the second component database.
[0064] Among them, the file identifier of the first dependent file is used to represent the dependent file related to the target application in the source operating system; the file identifier of the second dependent file is used to represent the dependent file related to the target application in the target operating system. The file identifier of the first dependent file and the file identifier of the second dependent file may include the name, version number, and time identifier of the dependent file, and may also include any identifier that can represent the first dependent file and the second dependent file. In other words, the embodiment of the present application does not limit the specific types of the file identifiers of the first dependent file and the second dependent file.
[0065] It is worth noting that if the first component database 110 returns a query result of "the first dependent file is not found", it can be known that the environment supporting the compilation and operation of the target application in the first source operating system has not changed.
[0066] In some implementations, the changes in the environment in which the target application is compiled and run include the upgrade and rollback of the operating system version, the upgrade and rollback of the core components, system tools, application files, and configuration files of the operating system, and the upgrade of the target application. In other words, the embodiments of the present application do not limit the specific changes in the environment in which the target application is compiled and run.
[0067] Finally, the dependent file query module 141 obtains the difference data of the target application from the difference database 130 based on the file identifier of the first dependent file and the file identifier of the second dependent file.
[0068] If the difference database 130 includes the difference data between the first dependent file and the second dependent file, the difference data between the first dependent file and the second dependent file is sent to the analysis result output module 143 .
[0069] If the difference database 130 does not include the difference data between the first dependent file and the second dependent file, it is determined that the running source application can run the target operating system compatibly.
[0070] As mentioned above, the difference data of the target application includes core component differences, system file differences, application file differences, and configuration file differences between the first source operating system image and the target operating system image.
[0071] For example, Figure 2b FIG. 4 is a schematic diagram showing how to obtain target application difference data when the first dependency file does not exist in the first component database. Figure 2b As shown, first, after the dependency file query module 141 obtains the first dependency file of the target application, it sends a query instruction to the first component database 110. If the first component database 110 returns the query result of "the first dependency file was not found", it can be known that the environment supporting the compilation and operation of the target application in the first source operating system has changed.
[0072] Then, the dependent file query module 141 sends a query instruction to the second component database 120 to obtain the second dependent file of the target application from the second component database 120 .
[0073] Finally, the dependency file query module 141 sends the first dependency file obtained by the dependency file analysis tool and the second dependency file obtained in the second component database 120 to the compatibility analysis module 142 .
[0074] For example, Figure 3 What is shown is a schematic diagram of using a compatible analysis module to perform difference analysis, such as Figure 3 As shown, first, the compatibility analysis module 142 receives the first dependent file and the second dependent file input from the dependency analysis module, and uses a compatibility analysis tool to perform compatibility analysis on the first dependent file and the second dependent file.
[0075] Secondly, the compatibility analysis tool performs difference analysis on the dependency package data, configuration data, structure data and interface data in the first dependency file and the second dependency file respectively to determine the difference data of core components, system tools, application files and configuration files between the first dependency file and the second dependency file.
[0076] In some embodiments, the above-mentioned dependent package data, configuration data, structural data and interface data include source code files and / or binary files, such as header files (.h format), source files (.h format, .xml format), and process files (.o format). In other words, the embodiments of the present application do not limit the specific formats of the dependent package data, configuration data, structural data and interface data.
[0077] Specifically, after the compatibility analysis tool performs difference analysis on the dependent package data, configuration data, structure data, and interface data, it usually generates a difference analysis result in the form of a list.
[0078] If there are differences in the difference analysis results, the compatibility analysis module 142 analyzes the difference analysis results to determine the difference data of specific core components, system tools, application files, and configuration files in the difference analysis results.
[0079] In the case where the first dependent file and the second dependent file are consistent, there is no difference in the difference analysis result, and it can be determined that the target application can be compatibly run on the target operating system.
[0080] In some embodiments, after performing a difference analysis on the first dependent file and the second dependent file, the compatibility analysis module 142 will also input the first dependent file into the first component database 110 and the difference data into the difference database 130 to update the data in the first component database 110 and the difference database 130.
[0081] By way of example and not limitation, the compatibility analysis tool disclosed in the embodiments of the present application may be an ABI compliance checker (ABICC), a Java-based ABI compliance checker (JAPI-compliance-checker), a binary compatibility checker (BCC), or a combination of multiple compatibility analysis tools for association data of different formats. In other words, the embodiments of the present application do not limit the specific type of the compatibility analysis tool.
[0082] For example, Figure 4 What is shown is a schematic diagram of generating a differential analysis report for a target application, such as Figure 4As shown, the analysis result output module 143 receives the difference data input from the dependency analysis module 141 or the compatibility analysis module 142 , generates a difference analysis report of the target application according to the difference data, and sends the difference analysis report to the user 30 .
[0083] Specifically, the analysis result output module 143 can preset a difference analysis report template and preset difference fields, and fill in the difference data of core components, system tools, application files and configuration files one by one. In some possible implementations, the compatibility analysis results generated by the compatibility analysis tool can also be directly sent to the customer 30.
[0084] By way of example and not limitation, the first node 10 and the source node 20 disclosed in the embodiment of the present application may be a server, or a terminal device such as a desktop or a laptop. When the first node 10 and the source node 20 are servers, they may be any one of a cabinet server, a tower server, a rack server, and a blade server. In other words, the embodiment of the present application does not specifically limit the category of the first node 10 and the source node 20.
[0085] Next, based on the above description, an application compatibility evaluation method provided by an embodiment of the present application is introduced. It can be understood that the method is proposed based on the above description, and part or all of the content of the method can be referred to the above description.
[0086] See also Figure 5 , Figure 5 FIG. 1 shows a method flow chart of the application compatibility evaluation method disclosed in the present application. Figure 5 As shown, the compatibility evaluation of the target application can be implemented through S510 to S530. It can be understood that when the compatibility evaluation of the target application is performed, it can be executed by the CPU of the first node 10, for example.
[0087] S510: Create a first component database, a second component database, and a difference database based on the second source operating system and the target operating system image.
[0088] As mentioned above, before performing the compatibility assessment of the target application, it is necessary to create the first component database 110 and the second component database 120 for the second source operating system image and the target operating system image, respectively.
[0089] It should be noted that the second source operating system is an operating system that runs on the source node and has not been upgraded; the first source operating system is an operating system that currently runs on the source node and has been upgraded; and the target operating system is the operating system to be migrated to the source node to run.
[0090] Specifically, first, the first node 10 obtains a first source operating system image and a target operating system image, wherein the first source operating system image is the operating system currently running on the source node; and the target operating system is the operating system running on the source node after the first source operating system is migrated.
[0091] Then, the first node 10 performs component analysis on the second source operating system image, determines the data (first component data) of the core components, system tools, application files, and configuration files of the second source operating system image, and creates a first component database 110 according to the first component data. The first component data 110 includes file identifiers of multiple core components, system tools, application files, and configuration files.
[0092] Next, the first node 10 performs component analysis on the target operating system image, determines the data (second component data) of the core components, system tools, application files, and configuration files of the target operating system image, and creates a second component database 110 based on the second component data. The second component data 110 includes file identifiers of multiple core components, system tools, application files, and configuration files.
[0093] Finally, the first node 10 performs a difference analysis on the first component data in the first component database 110 and the second component data in the second component database 120 , and creates a difference database 130 according to the difference data between the first component data and the second component data.
[0094] In some possible implementations, in order to reduce the data size in the difference database, the first node 10 may also obtain the dependency file (third dependency file) of the target application in the second source operating system and the dependency file (second dependency file) of the target application in the target operating system, and then establish the difference database 130 based on the difference data between the second dependency file and the third dependency file. In this way, the real-time performance of the compatibility evaluation of the target application can be improved.
[0095] As mentioned above, the first component data includes data of multiple core components, system tools, application files and configuration files in the source operating system image. The second component data includes data of multiple core components, system tools, application files and configuration files in the target operating system image.
[0096] Therefore, the first node 10 analyzes each core component, system tool, application file and configuration file for the first component data and the second component data to determine the specific differences between the core components, system tools, application files and configuration files.
[0097] It is worth noting that the first component database 110 , the second component database 120 and the difference database 130 are deployed on the first node 10 .
[0098] In some embodiments, when the first component database 110, the second component database 120, and the difference database 130 may include a large amount of component data or difference data. At this time, the first component database 110, the second component database 120, and the difference database 130 may also be deployed on a computing device cluster or on the cloud. It is understandable that when the first component database 110, the second component database 120, and the difference database 130 may only include a small amount of component data or difference data, only a single database may be deployed, and the first component data, the second component data, and the difference data may be distinguished in the single database. In other words, the embodiment of the present application does not impose any restrictions on the deployment method of the first component database 110, the second component database 120, and the difference database 130.
[0099] By creating the difference database 130, when the source operating system has a significant environmental change, in the subsequent compatibility evaluation, the compatibility analysis of the first source operating system image and the target operating system image is no longer required, which saves the time of difference analysis and improves the real-time performance of the compatibility evaluation.
[0100] S520: Obtain a first dependent file of the target application in the first source operating system.
[0101] The first node 10 evaluates the compatibility according to the condition of whether the target operating system supports the compilation and running of the target application.
[0102] As described above, firstly, the first node 10 queries and traverses the first dependent file of the target application in the first source operating system, and determines the compatibility analysis strategy according to whether the first dependent file is in the first component database.
[0103] 1) When the dependent file is in the component database of the second source operating system, the corresponding dependent files in the component database of the second source operating system and the component database of the target operating system are used to query the difference database. If the above dependent files are not found, there is no difference, indicating that the application is compatible; if there is a difference, it is recorded and reported to the user.
[0104] 2) When the dependent file is not in the first source operating system component database, a difference analysis is performed on the first dependent file and the second dependent file. If there is no difference between the two (the difference may include: interface deletion, interface parameter and return value type changes, constant value changes, etc.), it means that the application is compatible; otherwise, it means incompatibility, and the difference results are recorded and synchronized to the difference database, and reported to the user.
[0105] Specifically, when the dependent file is in the component database of the second source operating system, the determination content of the compatibility of the target application in the target operating system is as follows.
[0106] First, the first node 10 queries the first component database 110 according to the first dependent file to obtain the file identifier of the first dependent file (first file identifier); and queries the second component database 120 to obtain the file identifier of the second dependent file (second file identifier).
[0107] Then, the first node 10 queries the difference database 130 based on the first file identifier and the second file identifier.
[0108] Finally, according to the file identifier of the first dependent file and the file identifier of the second dependent file, it is determined whether the difference database includes the difference data of the first dependent file and the second dependent file, and processing is performed according to different situations.
[0109] In the case where the difference database includes difference data, it is determined that the target application is not compatible with the target operating system. Otherwise, it is determined that the first source operating system is compatible with the target operating system.
[0110] For example, Figure 6 FIG. 1 is a schematic diagram of a first embodiment for determining difference data. Figure 6 As shown on the left, the first component database 110 includes first component data A-v1.0.So, B-v1.0.jar, C-v1.0.So and D-v1.0.jar, and the second component database 120 includes second component data A-v1.0.So, B-v1.0.jar, C-v2.0.So and D-v2.0.jar.
[0111] First, the first node 10 queries the first component database 110 according to the first dependency file, and obtains the file identifiers A-v1.0.So, B-v1.0.jar, C-v1.0.So, and D-v1.0.jar of the first dependency file.
[0112] Then, the first node 10 queries the second component database 120 according to the first dependency file, and obtains the file identifiers A-v1.0.So, B-v1.0.jar, C-v2.0.So, and D-v2.0.jar of the second dependency file.
[0113] Secondly, the first node 10 determines the file identifiers C-v2.0.so and D-v2.0.jar of the difference data based on the first file identifier and the second file identifier, and queries the difference database 130 .
[0114] Finally, the first node 10 obtains the difference data represented by the files C-v2.0.so and D-v2.0.jar from the difference database 130 .
[0115] like Figure 6 As shown at the bottom, the difference data with the file identifier C-v1.0-v2.0.so includes a change type field for indicating the type of function change, such as adding a function, changing a function, and deleting a function; a function identification field for indicating the function identity information; a source function field for indicating the identity information of the associated function; a function change field for indicating the specific change of the target function; a risk level field for expressing the severity of the risk brought about by the function change; and a change impact field for indicating the specific impact brought about by the function change.
[0116] It is understandable that the difference data with the file identifier D-v1.0-v2.0.jar may also include a change type field, a function identifier field, a source function field, a function change field, a risk level, and a change impact field.
[0117] Figure 6 The embodiments shown are merely illustrative. For example, each field in the difference data is only a logical definition, and there may be another definition method in actual implementation. For example, multiple fields may be combined, or new fields may be added according to the specific content of the difference data. The specific type of the difference data is not limited in the various embodiments of the present application.
[0118] In this way, when the operating system of the source node has not changed, the compatibility analysis result of the target application can be quickly provided to the client 30 through the existing difference data in the difference database 130, thereby improving the efficiency of the compatibility evaluation.
[0119] S530: When the first component database does not include the first dependent file, obtain a second dependent file of the target application from the second component database.
[0120] If the first component data 110 does not include the first dependent file, it can be known that the difference database 130 does not include the difference data of the target application. Therefore, it is necessary to perform a difference analysis on the first dependent file and the second dependent file of the target application.
[0121] Specifically, when the dependent file is not in the component database of the second source operating system, the compatibility of the target application in the target operating system is determined as follows.
[0122] First, the first node 10 sends a query instruction to the second component database 120 according to the file identifier of the first dependent file obtained from the source node 20 to obtain the second dependent file of the target application.
[0123] Then, the first node 10 performs a difference analysis on the first dependent file and the second dependent file, and if there is difference data between the first dependent file and the second dependent file, it is determined that the first source operating system is incompatible with the target operating system. Otherwise, it is determined that the first source operating system is compatible with the target operating system.
[0124] As mentioned above, the difference data at this time includes the difference data of the core components, system tools, application files and configuration files between the first dependent file and the second dependent file.
[0125] For example, Figure 7 FIG. 1 is a schematic diagram of a second embodiment for determining difference data. Figure 7 As shown, first, the first node 10 obtains the data packet of the target application from the operating system of the source node 20 and parses it to determine the associated data A-v1.1.So, B-v1.1.jar, C-v1.0.So and D-v1.0.jar of the target application. Among them, the first component database 110 includes C-v1.0.So and D-v1.0.jar, but does not include the associated data A-v1.1.So and B-v1.1.jar. The second component database 120 includes A-v1.0.So, B-v1.0.jar, C-v1.0.So and D-v1.0.jar.
[0126] Next, the first node 10 obtains the second dependent files A-v1.0.So and B-v1.0.jar from the second database according to the file identifiers of A-v1.1.So and B-v1.1.jar.
[0127] Then the first node 10 uses a compatible analysis tool to perform a difference analysis on A-v1.1.So, B-v1.1.jar and A-v1.0.So B-v1.0.jar to determine the difference data A-v1.0-v1.1.so and B-v1.0-v1.1.jar between A-v1.1.So, A-v1.0.So and B-v1.0.jar, B-v1.1.jar.
[0128] Specifically, for association data in various formats, the first node 10 uses different compatible analysis tools to perform analysis.
[0129] Taking the associated data in .so format as an example, the first node 10 uses the ABI compliance detector to perform a difference analysis on A-v1.1.So and A-v1.0.So. The analysis instructions of the ABI compliance detector are as follows:
[0130] abi-dumper A-v1.0.So-o A-v1.0.So.dump-lver 1.0
[0131] abi-dumper A-v1.1.So-o A-v1.1.So.dump-lver 1.1
[0132] abi-compliance-checker-l NAME-oldA-v1.0.So.dump-new A-v1.1.So.dump
[0133] The ABI compliance detector performs a difference analysis on A-v1.1.So and A-v1.0.So according to the above instructions, and determines a difference report 1 between A-v1.1.So and A-v1.0.So. At the same time, the ABI compliance detector also provides a file path of the difference report 1 for query by the first node 10. The specific content of the difference report between A-v1.1.So and A-v1.0.So is shown in Table 1.
[0134] Table 1
[0135]
[0136] As shown in Table 1, A-v1.1.So has the following changes compared to A-v1.0.So:
[0137] 1) Added 55 new functions, including functions in the header file with the file identifier "callbacks.h"
[0138] Take ssh_set_callbacks(***, ***) as an example, where "***, ***" are function parameters, which will not be described in detail below;
[0139] 2) Removed 26 functions from the header file with the file identifier "libssh.h"
[0140] Take ssh_set_callbacks(***, ***) as an example;
[0141] 3) One function was modified and the risk level was changed to LV2. Taking the function ssh_options_copy(***, ***) in the header file with the file identifier "libssh.h" as an example, the function parameters were changed from "(***, ***)" to "(xxx, xxx)".
[0142] The specific description of the above changes is: "Parameters of the source function ssh_session type have been added to the middle position of the call stack."
[0143] The specific impact of the above changes is: "The layout of the parameter stack has changed, and applications may incorrectly initialize parameters higher in the stack."
[0144] Taking the associated data in .jar format as an example, the first node 10 uses a Java-based ABI compliance detector to perform a difference analysis on B-v1.1.jar and B-v1.0.jar.
[0145] It is understandable that the Java-based ABI compliance detector performs a difference analysis on B-v1.0.jar and B-v1.1.jar to determine a difference report 2 between B-v1.0.jar and B-v1.1.jar. At the same time, the Java-based ABI compliance detector also provides a file path of the difference report 2 for query by the first node 10. The specific content of the difference report between B-v1.0.jar and B-v1.1.jar is shown in Table 2.
[0146] Table 2
[0147]
[0148]
[0149] As shown in Table 2, B-v1.1.jar has the following changes compared to B-v1.0.jar:
[0150] 1) 86 new methods are added, with the new interface AbstractFuture in the class file with the file identifier "AbstractFuture.class" <v>.setFuture(ListenableFuture<?>future):Boolean as an example, where "ListenableFuture<?>future" is a parameter of the interface, which will not be described in detail below;
[0151] 2) Removed 4 functions, including the interface AbstractListeningExecutorService.newTaskFor(Callable <t>callable):
[0152] ListenableFutureTask <t>Take ssh_set_callbacks as an example;
[0153] 3) Five functions were modified and the risk level was changed to high risk. Taking the interface BaseEncoding.decodingStream(Reader reader):InputStream1 in the class file with the file identifier "BaseEncoding.class" as an example, the function parameter was changed from "(Reader reader)" to "(abstract)".
[0154] The specific description of the above change is: "Change the above method to an abstract method".
[0155] The specific impact of the above changes is: "The client program may be interrupted by an InstantiationError exception when trying to create an instance of the class of this method.".
[0156] Finally, the first node 10 parses the difference report 1 and the difference report 2 respectively to determine the difference data A-v1.0-v1.1.so between A-v1.1.So and A-v1.0.So, and the difference data B-v1.0-v1.1.jar between B-v1.0.jar and B-v1.1.jar.
[0157] As mentioned above, the difference data of the files identified as A-v1.0-v1.1.so and B-v1.0-v1.1.jar also includes a change type field, a function identification field, a source function field, a function change field, a risk level field, and a change impact field.
[0158] In this way, when the operating system of the source node changes significantly, the first dependency file of the target application is dynamically analyzed by utilizing the second component data in the second component database 110, and different processing strategies are adopted for the first dependency file of the target application according to different situations, thereby improving the efficiency of compatibility evaluation.
[0159] S540: Determine the compatibility of the target application in the target operating system based on the difference analysis between the first dependent file and the second dependent file.
[0160] The first node 10 determines a compatibility analysis strategy according to whether the dependent file is in the second source operating system component database. The compatibility analysis results obtained according to the above compatibility analysis strategy are as follows.
[0161] When the dependent file is in the component database of the second source operating system, it is determined whether the target application is compatible with the target operating system according to whether the difference database contains difference data.
[0162] If the difference database contains difference data, it is determined that the target application is incompatible with the target operating system.
[0163] If the difference database does not contain difference data, it is determined that the target application is compatible with the target operating system.
[0164] When the dependent file is not in the first source operating system component database, a difference analysis is performed on the first dependent file and the second dependent file.
[0165] If there is a difference between the first dependent file and the second dependent file, it is determined that the target application is incompatible with the target operating system.
[0166] If there is no difference between the first dependent file and the second dependent file, it is determined that the target application is compatible with the target operating system.
[0167] The first node 10 generates a difference analysis report of the target application based on the above compatibility analysis result. When the target application is incompatible with the target operating system, the difference analysis report includes the analysis result of "the target operating system is incompatible with the target application" and the file identifier of the difference data. When the target application is compatible with the target operating system, the difference analysis report includes the analysis result of "the target operating system is compatible with the target application".
[0168] Specifically, the first node 10 obtains the difference data C-v1.0-v2.0.so and D-v1.0-v2.0.jar in the difference database 130 through the first embodiment described in step S520. The first node 10 analyzes the first dependent file and the second dependent file of the target application through the second embodiment described in step S530, and obtains the difference data A-v1.0-v1.1.so and B-v1.0-v1.1.jar.
[0169] In some possible implementations, the first node 10 may also update the first component database 110 and the difference database 130 .
[0170] Specifically, the first node 10 inputs the difference data C-v1.0-v2.0.so and D-v1.0-v2.0.jar obtained in step S520 and / or the difference data A-v1.0-v1.1.so and B-v1.0-v1.1.jar obtained in step S530 into the difference database 130. At the same time, the first node 10 inputs the file identifiers of C-v1.0-v2.0.so and D-v1.0-v2.0.jar, and A-v1.0-v1.1.so and B-v1.0-v1.1.jar into the first database 110.
[0171] In this way, the compatibility of the target application is dynamically evaluated using the first dependency file and the second component file, and the first component database 110, the second component database 120 and the difference database 130 are incrementally updated, thereby improving the real-time and effectiveness of subsequent compatibility evaluations.
[0172] By way of example and not limitation, in the embodiment of the present application, the first node 10 may provide a public difference analysis report to the client 30 in the form of an application interface, or may store the report in the form of XML, EXCEL or a log file, and provide the client with a download path. The notification method provided by the first node 10 to the client 30 may be in the form of an in-site letter, text message, or email. In other words, the embodiment of the present application does not limit the difference analysis report and the notification method of the difference analysis report.
[0173] It is understandable that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In addition, in some possible implementations, each step in the above embodiment can be selectively executed according to actual conditions, and can be partially executed or fully executed, which is not limited here.
[0174] Compared with the prior art, the compatibility assessment method and computing device provided in the embodiment of the present application respectively create a first component database and a second component database through the source node and the target operating system image, and create a difference database based on the difference data between the first component database and the second component database. When the operating system of the source node has not changed, the difference analysis report of the target application is quickly generated based on the existing difference data obtained in the difference database. When the operating system of the source node changes, the difference analysis report of the target application is generated based on the first dependent file and the second dependent file. In this way, the difference analysis of the operating systems of the source node and the target host node is performed by combining dynamic and static databases, which improves the real-time and effectiveness of the source node and the target host node, and improves the efficiency of the compatibility assessment of the operating system migration.
[0175] The above is an introduction to a compatibility assessment method provided in an embodiment of the present application.
[0176] Next, a computing device provided by an embodiment of the present application is introduced in combination with the above content. For example, Figure 8 FIG. 1 is a schematic diagram of a structure of a computing device provided in an embodiment of the present application. Figure 8 As shown, an embodiment of the present application provides a computing device (first terminal) 80, including a processor 81 and a memory 82, wherein the processor 81 and the memory 82 are coupled; the memory 82 stores a computer program that can be executed on the processor 81, characterized in that the processor 81 implements the above-mentioned application compatibility evaluation method when executing the computer program.
[0177] In some embodiments, the above-mentioned application compatibility evaluation method can be implemented by software. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes computer instructions. When the computer program instructions are loaded and executed on a computing device, the process or steps of the application compatibility evaluation method involved in the embodiment of the present application are implemented.
[0178] In some embodiments, the software may be divided into a plurality of software modules, each of which is used to execute a corresponding step in the application compatibility assessment method.
[0179] The method steps in the embodiments of the present application can be implemented by a processor executing software instructions. The software instructions can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a mobile hard disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor.
[0180] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.< / t> < / t> < / v>
Claims
1. A method for evaluating application compatibility, characterized in that: The method comprises: Obtaining a first dependency file of a target application in a first source operating system; wherein the first source operating system is an operating system currently running on a source node; the first dependency file includes dependency file data related to the compilation and running of the target application in the first source operating system; Determine whether the first component data includes the first dependent file; the first component database is created based on a second source operating system image; the second source operating system is an operating system running on the source node before the first source operating system is upgraded; In the case where the first component database includes the first dependency file, the compatibility of the target application in the target operating system is determined based on the difference database; wherein the target operating system is the operating system after the first source operating system is migrated; the difference database is created based on the first component database and the second component database; the second component database is created based on the target operating system image; in the case where the first component database does not include the first dependency file, the second dependency file of the target application is obtained from the second component database; the second dependency file includes dependency file data related to the compilation and operation of the target application in the target operating system; Performing difference analysis on the first dependent file and the second dependent file; Based on the difference analysis result of the first dependent file and the second dependent file, the compatibility of the target application in the target operating system is determined.
2. The method according to claim 1, characterized in that Determining the compatibility of the target application on the target operating system based on a difference analysis result between the first dependent file and the second dependent file includes: In a case where there is no difference data between the first dependent file and the second dependent file, it is determined that the target application is compatible with the target operating system.
3. The method according to claim 2, characterized in that The method further comprises: In the case where there is difference data between the first dependent file and the second dependent file, it is determined that the target application is incompatible with the target operating system.
4. The method according to claim 1, characterized in that: In the case where the first component database includes the first dependent file, determining the compatibility of the target application on the target operating system based on the difference database includes: Respectively obtain a file identifier of the first dependent file and a file identifier of the second dependent file; Determining, according to the file identifier of the first dependent file and the file identifier of the second dependent file, whether the difference database includes difference data between the first dependent file and the second dependent file; In a case where the difference database does not include difference data between the first dependent file and the second dependent file, it is determined that the target application is compatible with the target operating system.
5. The method according to claim 4, characterized in that The method further comprises: In a case where the difference database includes difference data between the first dependent file and the second dependent file, it is determined that the target application is incompatible with the target operating system.
6. The method according to any one of claims 3 to 5, characterized in that: The method further comprises: In the case where there is difference data between the first dependent file and the second dependent file, the difference data is recorded, and a difference analysis report of the target application is generated for the user based on the difference data.
7. The method according to any one of claims 3 to 5, characterized in that: The method further comprises: In the case where there is difference data between the first dependent file and the second dependent file, the first dependent file is stored in the first component database, and the difference data record is stored in the difference database.
8. The method according to any one of claims 4-5, characterized in that: The difference database is created based on the first component database and the second component database, including: The difference database is created based on the difference data between the second dependency file and the third dependency file; wherein the third dependency file is a dependency file of the target application in the second source operating system.
9. The method according to any one of claims 1 to 5, characterized in that: The first dependent file and the second dependent file include dependent package data, configuration data, structure data and interface data; The performing difference analysis on the first dependent file and the second dependent file includes: A difference analysis is performed based on the dependency package data, configuration data, structure data, and interface data.
10. A computing device, characterized in that: The computing device includes a memory and a processor; Wherein, the memory is used to store program instructions; The processor is configured to execute the program instructions so that the computing device performs the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Compatibility evaluation method and device, equipment and storage medium
CN114691188A