Compatibility assessment method, device, equipment and storage medium
By establishing an operating system component database and evaluating the associated data of the application, the application compatibility evaluation problem between different Linux distributions is solved, and efficient business migration is achieved.
Patent Information
- Application Number
- CN202011611966.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2040-12-30
AI Technical Summary
The compatibility of applications is difficult to assess between different Linux distributions, resulting in inefficient business migration.
By establishing a corresponding component database for different operating systems, the associated data of the target application in different operating systems is obtained, and the compatibility of the application is evaluated based on these data.
It provides the results of the compatibility evaluation of applications across operating systems, helping users quickly determine whether the application is compatible, guide adaptation work, and improve migration efficiency.
Smart Images

Figure CN114691188B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer and Internet technology, and in particular to a compatibility evaluation method, device, equipment and storage medium. Background Art
[0002] Since the birth of the Linux operating system, there have been many distributions based on the Linux operating system (hereinafter referred to as "Linux distributions"). A Linux distribution refers to an operating system consisting of the Linux kernel, GNU tools and libraries, and a collection of software.
[0003] Usually, some organizations or manufacturers package the Linux kernel with various software and documents, and provide system installation interfaces and system configuration, setting and management tools, etc., to form a Linux distribution. More precisely, "Linux distribution" can also be called "operating system software package with Linux as the core". Since the development environment and business system created by developers based on a certain Linux distribution depends on the software package provided by the Linux distribution and the API (Application Programming Interface) / ABI (Application binary interface) provided by the software package, and since different Linux distributions have different package selection strategies, the range list, version and provided API / ABI of the basic software packages selected by different Linux distributions are different. Therefore, the migration of the same application between different Linux distributions may require a lot of transplantation and adaptation work.
[0004] However, in the related art, users cannot intuitively perceive the differences between different Linux distributions, making it difficult to evaluate whether an application is compatible between different Linux distributions, whether adaptation work is required, etc., resulting in inefficient business migration between different Linux distributions. Summary of the invention
[0005] The present application provides a compatibility assessment method, apparatus, device and storage medium, which can improve the migration efficiency of applications between different operating systems. The technical solution is as follows:
[0006] According to one aspect of an embodiment of the present application, a compatibility assessment method is provided, the method comprising:
[0007] Establishing a component database corresponding to the first operating system and a component database corresponding to the second operating system;
[0008] Acquire the associated data of the target application from the component database corresponding to the first operating system to obtain first associated data;
[0009] Acquire the associated data of the target application from a component database corresponding to the second operating system to obtain second associated data;
[0010] Based on the first association data and the second association data, the compatibility of the target application between the first operating system and the second operating system is evaluated.
[0011] By respectively obtaining the associated data corresponding to the application in different operating systems, and evaluating the compatibility of the application between different operating systems based on the obtained associated data, the compatibility evaluation results of the application across operating systems are provided to the user, so that the user can timely understand whether the application is compatible between different operating systems, and guide the user to timely and accurately carry out the adaptation of the application between different operating systems, thereby improving the migration efficiency of the application between different operating systems. In addition, the embodiment of the present application realizes the analysis, sorting and storage of the components of the operating system by establishing component databases corresponding to different operating systems. On the one hand, it provides the user with a list of components of the operating system, which is convenient for the user to carry out the selection of the operating system, and on the other hand, it is easy to identify different component data between different operating systems, and provide a reference for the user to perform data analysis, etc., thereby helping the user to conveniently carry out diversified work.
[0012] In a possible design, the evaluating the compatibility of the target application between the first operating system and the second operating system based on the first association data and the second association data includes:
[0013] comparing the first associated data and the second associated data;
[0014] In a case where the first association data and the second association data are consistent, determining that the target application is compatible between the first operating system and the second operating system;
[0015] In the case that the first association data and the second association data are inconsistent, it is determined that the target application is incompatible between the first operating system and the second operating system.
[0016] Through the above method, a specific method for evaluating the compatibility of an application is provided, thereby realizing a quick determination of whether an application is compatible.
[0017] In one possible design, after determining that the target application is compatible between the first operating system and the second operating system, the method further includes:
[0018] A first compatibility evaluation result is output, wherein the first compatibility evaluation result includes that the target application is compatible between the first operating system and the second operating system.
[0019] Through the above method, users can timely understand the compatibility of applications between different operating systems, so that users can promptly and accurately promote the migration of applications and other tasks.
[0020] In a possible design, the target application refers to an application that has been adapted to the first operating system and has not been adapted to the second operating system;
[0021] After determining that the target application is incompatible between the first operating system and the second operating system, the method further includes:
[0022] Acquire difference data between the first associated data and the second associated data;
[0023] Based on the difference data, modification guidance information is determined, where the modification guidance information is used to indicate a modification method for making the target application program compatible with the second operating system.
[0024] Through the above method, users are provided with modification suggestions on how to adapt applications to different operating systems, which speeds up the modification and adaptation efficiency of applications. The modification suggestions are based on specific analysis results, which enables targeted provision of modification suggestions and improves the accuracy of modification suggestions.
[0025] In a possible design, after determining the modification guidance information based on the difference data, the method further includes:
[0026] A second compatibility evaluation result is output, where the second compatibility evaluation result includes at least one of the following: the modification guidance information and the difference data.
[0027] Through the above method, more references can be provided for users to modify and adapt the application program, so that users can make targeted adjustments to the modification method according to their own preferences and actual difference data.
[0028] In one possible design, the associated data of the target application includes at least one of the following:
[0029] Dependency data refers to data related to dependency packages of the target application;
[0030] Interface data refers to data related to the interface of the target application;
[0031] Structure data refers to data related to files of the target application;
[0032] Compilation data refers to data related to the compilation parameters of the target application;
[0033] Custom configuration data refers to data related to the custom configuration of the operating system.
[0034] Through the above method, multiple aspects of data associated with the application are obtained, and the relevant data of the application is fully and comprehensively obtained, thereby providing multiple reference data for the compatibility evaluation of the application, so as to evaluate the compatibility of the application from multiple angles and improve the accuracy of the compatibility evaluation of the application across operating systems.
[0035] In one possible design, the dependency data includes at least one of the following:
[0036] Existence data, used to indicate whether the dependent package exists;
[0037] The version data is used to indicate the version of the dependent package if the dependent package exists.
[0038] Through the above method, it is possible to quickly determine whether an application is compatible between different operating systems based on the basic association information of the application.
[0039] In one possible design, when the interface of the target application includes an API, the interface data includes at least one of the following:
[0040] Programming data, used to instruct the target application to call function interfaces of other modules;
[0041] Program data, used to indicate functional characteristic parameters of the target application program;
[0042] System data, which indicates the default parameters of the operating system.
[0043] Through the above method, it is achieved to quickly and comprehensively obtain data related to the interface of the application program when the source code of the application program is input.
[0044] In one possible design, when the interface of the target application includes an ABI, the interface data includes at least one of the following:
[0045] Type data, used to indicate the relevant definition of the data type;
[0046] Agreement data, used to indicate the control function parameter passing method and return value passing method;
[0047] Call data, which indicates how the system call was made to the operating system;
[0048] Format data, which indicates the file format.
[0049] Through the above method, it is achieved to quickly and comprehensively obtain the data related to the interface of the application program when the binary of the application program is input.
[0050] In one possible design, the structural data includes at least one of the following:
[0051] Directory data, used to indicate the directory structure of the root file system;
[0052] Path data, used to indicate the file path;
[0053] Name data, used to indicate the file name;
[0054] Default configuration data, used to indicate the default configuration of the operating system.
[0055] Through the above method, it is achieved to provide a reference for the compatibility evaluation of the application from the perspective of file description, and enrich the considerations of the compatibility evaluation.
[0056] In one possible design, the compilation parameter includes at least one of the following:
[0057] System compilation data, used to indicate the compilation parameters of the operating system;
[0058] The program compilation data is used to indicate the compilation parameters of the target application program.
[0059] Through the above method, it is achieved to provide a reference for the compatibility evaluation of the application from the perspective of application compilation and operation, and further enrich the considerations of the compatibility evaluation.
[0060] In one possible design, the component database includes:
[0061] Static data, used to indicate the initial parameters of the operating system;
[0062] and / or,
[0063] Dynamic data, used to indicate service parameters when the operating system is in a running state.
[0064] Through the above methods, it is possible to analyze the components of the operating system from different angles.
[0065] In a possible design, the static data includes at least one of the following: data related to a software package that comes with the operating system, default parameters of the operating system, and compilation parameters of the operating system.
[0066] Through the above method, known information is fully utilized to perform component analysis of the operating system, making component analysis more convenient.
[0067] In one possible design, the dynamic data includes interface information provided by the operating system when it is running.
[0068] Through the above method, the parameter changes when the operating system is in operation are taken into account, and the factors affecting the components of the operating system are fully taken into account, so that the component analysis of the operating system is more complete.
[0069] According to one aspect of an embodiment of the present application, a compatibility assessment device is provided, the device comprising:
[0070] A database establishment module, used to establish a component database corresponding to the first operating system and a component database corresponding to the second operating system;
[0071] A first acquisition module, configured to acquire associated data of a target application from a component database corresponding to the first operating system to obtain first associated data;
[0072] A second acquisition module, configured to acquire the associated data of the target application from a component database corresponding to the second operating system to obtain second associated data;
[0073] A compatibility evaluation module is used to evaluate the compatibility of the target application between the first operating system and the second operating system based on the first association data and the second association data.
[0074] According to one aspect of an embodiment of the present application, a computer device is provided, the computer device comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-mentioned compatibility assessment method.
[0075] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned compatibility assessment method.
[0076] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned compatibility assessment method.
[0077] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:
[0078] By respectively obtaining the associated data corresponding to the application in different operating systems, and evaluating the compatibility of the application between different operating systems based on the obtained associated data, the compatibility evaluation results of the application across operating systems are provided to the user, so that the user can timely understand whether the application is compatible between different operating systems, and guide the user to timely and accurately carry out the adaptation of the application between different operating systems, thereby improving the migration efficiency of the application between different operating systems. In addition, the embodiment of the present application realizes the analysis, sorting and storage of the components of the operating system by establishing component databases corresponding to different operating systems. On the one hand, it provides the user with a list of components of the operating system, which is convenient for the user to carry out the selection of the operating system, and on the other hand, it is easy to identify different component data between different operating systems, and provide a reference for the user to perform data analysis, etc., thereby helping the user to conveniently carry out diversified work. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0080] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0081] Figure 2 It is a schematic diagram of an interface calling relationship provided by an embodiment of the present application;
[0082] Figure 3 is a flow chart of a compatibility assessment method provided by an embodiment of the present application;
[0083] Figure 4 It is a schematic diagram of associated data of an application provided by an embodiment of the present application;
[0084] Figure 5 is a schematic diagram of an application program cross-operating system compatibility evaluation provided by an embodiment of the present application;
[0085] Figure 6 is a block diagram of a compatibility assessment device provided by an embodiment of the present application;
[0086] Figure 7 is a block diagram of a compatibility assessment device provided by another embodiment of the present application;
[0087] Figure 8It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0088] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0089] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment can be implemented as a business migration system. The implementation environment can include: a computer device 10 and a computer device 20.
[0090] The computer device 10 is equipped with an operating system. Usually, only one operating system can be installed on a computer device, but this application does not limit this. Optionally, the operating system provides the main functions used by the business system, including providing system library function interfaces, system calls, command interfaces, services, header files, configuration files, sysfs and other interfaces, so as to be called by the development environment or business system. Optionally, the interface of a certain application can call other interfaces and can also be called by other interfaces, for example, Figure 2 As shown, interface 210 can call interface 220 and can also be called by interface 230.
[0091] Taking a computer device equipped with an operating system as an example, optionally, the computer device 10 includes a computer device 12 and a computer device 14, such as Figure 1 As shown, the computer device 12 and the computer device 14 are two different computer devices, wherein the computer device 12 is equipped with a first operating system, and the computer device 14 is equipped with a second operating system. The first operating system and the second operating system are two different operating systems, and optionally, the first operating system and the second operating system are the above-mentioned different Linux distribution versions.
[0092] Computer device 20 is used to evaluate the compatibility of the same application between different operating systems. For example, if a certain application has been adapted to the first operating system installed on computer device 12, but not to the second operating system installed on computer device 14, then when the application needs to be migrated from the first operating system to the second operating system, computer device 20 can evaluate whether the application is compatible with the second operating system, thereby providing relevant references for the migration and adaptation of the application. Optionally, computer device 20 can be the same computer device as computer device 10, or two different computer devices. For ease of description, Figure 1 The computer device 20 and the computer device 10 are only taken as two different computer devices for illustration. It should be understood that this does not constitute a limitation on the embodiments of the present application.
[0093] Optionally, the computer device (including the above-mentioned computer device 10 or computer device 20) can be a device such as a mobile phone, a tablet computer, a multimedia player, a PC (Personal Computer), etc., or a server, a server cluster consisting of multiple servers, a cloud computing service center, etc. Optionally, the computer device 10 and the computer device 20 communicate through a network, which can be a wired network or a wireless network.
[0094] In the compatibility assessment method provided in the embodiment of the present application, the execution subject of each step can be a computer device 20. In a possible design, the compatibility assessment method provided in the present application is mainly applied to business migration scenarios, but this does not constitute a limitation of the present application. After understanding the technical solution of the present application, those skilled in the art will easily think of applying the compatibility assessment method provided in the present application to other business scenarios, such as business customization scenarios, operating system software package upgrade scenarios, etc. It should be understood that these should all fall within the scope of protection of the present application.
[0095] Please refer to Figure 3 , which shows a flow chart of a compatibility evaluation method provided by an embodiment of the present application. The method may include the following steps (310-340).
[0096] Step 310: Establish a component database corresponding to the first operating system and a component database corresponding to the second operating system.
[0097] The first operating system and the second operating system are two different operating systems, for example, the first operating system and the second operating system are two different Linux distribution versions. In the embodiment of the present application, the computer device can analyze the components of the first operating system and the second operating system, and establish a component database based on the analysis results, so as to query relevant data from the component database in subsequent compatibility analysis and other processes.
[0098] The embodiment of the present application performs component analysis on the first operating system and the second operating system, respectively, and establishes component databases based on the analysis results, that is, establishes a component database corresponding to the first operating system and a component database corresponding to the second operating system. In a possible design, the component database includes static data and / or dynamic data, thereby realizing the analysis of the components of the operating system from different angles.
[0099] Static data is used to indicate the initial parameters of the operating system. Optionally, the static data is collected based on at least one of the following information: the source code package of the operating system, the binary package of the operating system, and the extended warehouse of the operating system. In this way, the known information can be fully utilized to perform component analysis of the operating system, making component analysis more convenient. Optionally, the static data includes at least one of the following data: data related to the software package that comes with the operating system (such as the software package list and software package version that comes with the operating system; software package dependencies and file directory information provided by the software package; software package library files, APIs, ABIs, header files; applications and system services provided by the software package, etc.), the default parameters of the operating system, and the compilation parameters of the operating system; dynamic data is used to indicate the service parameters when the operating system is in operation.
[0100] Dynamic data is used to indicate service parameters when the operating system is in operation. Optionally, dynamic data is collected when the operating system is running, so that the dynamic data is related to various parameters when the operating system is in operation, and parameter changes when the operating system is in operation can be taken into account, and factors affecting the components of the operating system can be fully considered, so that the component analysis of the operating system is more complete. Optionally, dynamic data includes interface information provided by the operating system when it is running (such as interface information provided by sys / proc, etc.).
[0101] In a possible design, after the above step 310, the following further includes: comparing the component database corresponding to the first operating system and the component database corresponding to the second operating system to obtain difference information; and outputting the difference information. After establishing component databases corresponding to different operating systems, the component databases corresponding to the different operating systems are compared to identify difference component data, i.e., difference information, and output the difference information for user reference, so that the user can intuitively and comprehensively grasp the differences between different operating systems.
[0102] Step 320: Acquire the associated data of the target application from the component database corresponding to the first operating system to obtain first associated data.
[0103] The component database corresponding to the first operating system contains various data. The computer device can query the data associated with the target application, i.e., the associated data of the target application, from the component database corresponding to the first operating system based on the source code or binary of the target application as input to obtain the first associated data. For an introduction to the associated data of the target application, please refer to the following embodiment, which will not be elaborated here.
[0104] Step 330: Acquire the associated data of the target application from the component database corresponding to the second operating system to obtain second associated data.
[0105] The component database corresponding to the second operating system contains various data. The computer device can query the data associated with the target application, i.e., the associated data of the target application, from the component database corresponding to the second operating system based on the source code or binary of the target application as input to obtain the second associated data. For an introduction to the associated data of the target application, please refer to the following embodiment, which will not be elaborated here.
[0106] Step 340 : Evaluate the compatibility of the target application between the first operating system and the second operating system based on the first association data and the second association data.
[0107] The computer device obtains the first associated data from the component database corresponding to the first operating system on the one hand, and obtains the second associated data from the component database corresponding to the second operating system on the other hand. After that, the computer device can evaluate the compatibility of the target application between the first operating system and the second operating system based on the first associated data and the second associated data. Optionally, if the target application has been adapted to the first operating system but not to the second operating system, the compatibility of the target application between the first operating system and the second operating system is expressed as whether the target application is compatible with the second operating system; if the target application has been adapted to the second operating system but not to the first operating system, the compatibility of the target application between the first operating system and the second operating system is expressed as whether the target application is compatible with the first operating system.
[0108] In a possible design, the above step 340 includes: comparing the first associated data with the second associated data; if the first associated data and the second associated data are consistent, determining that the target application is compatible between the first operating system and the second operating system; if the first associated data and the second associated data are inconsistent, determining that the target application is incompatible between the first operating system and the second operating system. By judging whether the target application is compatible between the first operating system and the second operating system based on the comparison result of the first associated data and the second associated data, a specific method for evaluating the compatibility of the target application is provided, and whether the target application is compatible is quickly judged.
[0109] The computer device compares the first associated data and the second associated data to determine whether the first associated data and the second associated data are consistent. The embodiment of the present application does not limit the method for determining whether the first associated data and the second associated data are consistent. Optionally, when the first associated data and the second associated data are exactly the same, it is determined that the first associated data and the second associated data are consistent; when the first associated data and the second associated data are not exactly the same, it is determined that the first associated data and the second associated data are inconsistent. Optionally, when the difference between the first associated data and the second associated data is less than or equal to a set threshold, it is determined that the first associated data and the second associated data are consistent; when the difference between the first associated data and the second associated data is greater than a set threshold, it is determined that the first associated data and the second associated data are inconsistent.
[0110] In a possible design, after determining that the target application is compatible between the first operating system and the second operating system, the process further includes: outputting a first compatibility evaluation result, wherein the first compatibility evaluation result includes that the target application is compatible between the first operating system and the second operating system. By outputting the first compatibility evaluation result in a timely manner, the user can promptly understand whether the target application is compatible between different operating systems, so that the user can promptly and accurately promote the migration of the target application.
[0111] In a possible design, the target application is an application that has been adapted to the first operating system and is not adapted to the second operating system, that is, the user needs to migrate the target application from the first operating system to the second operating system. Based on this, after determining that the target application is incompatible between the first operating system and the second operating system, the method further includes: obtaining difference data between the first associated data and the second associated data; and determining modification guidance information based on the difference data.
[0112] The modification guidance information is used to indicate the modification method for adapting the target application to the second operating system, such as modifying the calling method, revising the path, modifying the package dependency method, etc. The computer device determines the modification guidance information based on the specific data that differs between the first associated data and the second associated data, and provides the user with modification suggestions on how to adapt the target application to different operating systems, thereby accelerating the modification and adaptation efficiency of the target application. The modification suggestions are based on the specific analysis results, and the modification suggestions are provided in a targeted manner, thereby improving the accuracy of the modification suggestions. Optionally, after determining the modification guidance information based on the difference data, the above also includes: outputting the second compatibility evaluation result, and the second compatibility evaluation result includes at least one of the following: modification guidance information, difference data. By simultaneously outputting the specific difference data and the modification guidance information, more references can be provided to the user for the modification and adaptation of the target application, so that the user can make targeted adjustments to the modification method based on his or her own preferences and actual difference data.
[0113] In summary, the technical solution provided by the embodiment of the present application provides users with the compatibility evaluation results of applications across operating systems by respectively obtaining the associated data corresponding to the application in different operating systems, and evaluating the compatibility of the application between different operating systems based on the acquired associated data, so as to facilitate users to timely understand whether the application is compatible between different operating systems, guide users to timely and accurately carry out the adaptation of the application between different operating systems, and improve the migration efficiency of the application between different operating systems. In addition, the embodiment of the present application realizes the analysis, sorting and storage of the components of the operating system by establishing component databases corresponding to different operating systems. On the one hand, it provides users with a list of components of the operating system, which is convenient for users to carry out tasks such as selecting the operating system. On the other hand, it is easy to identify different component data between different operating systems, and provide references for users to perform data analysis, etc., thereby helping users to conveniently carry out diversified work.
[0114] Next, the associated data of the target application is introduced and explained.
[0115] In one possible design, Figure 4 As shown, the associated data of the target application includes at least one of the following data.
[0116] (1) Data dependent.
[0117] Dependency data refers to data related to the dependency package of the target application. When the source code of the target application is input, the dependency package refers to the package that the target application source code compilation must rely on; when the binary of the target application is input, the dependency package refers to the package that the target application binary must rely on to run. Optionally, the dependency data includes at least one of the following: existence data, version data. Among them, the existence data is used to indicate whether the dependency package exists; the version data is used to indicate the version of the dependency package when the dependency package exists. By determining whether the dependency package exists and the version of the dependency package, it is possible to quickly determine whether the target application is compatible between different operating systems based on the basic association information of the target application.
[0118] Taking the existence of dependent packages in the target application as an example, when the source code of the target application is input, if the dependent packages are not included in the components of the operating system, or the dependent packages are included in the components of the operating system and the version of the dependent packages is incorrect, the source code of the target application cannot be compiled into binary, and the target application is incompatible with the operating system; when the binary of the target application is input, if the dependent packages are not included in the components of the operating system, or the dependent packages are included in the components of the operating system and the version of the dependent packages is incorrect, the operating system fails to install the target application, and the target application is incompatible with the operating system.
[0119] (2) Interface data.
[0120] Interface data refers to data related to the interface of the target application.
[0121] When the source code of the target application is input, the interface of the target application includes an API, so the interface data includes at least one of the following: programming data, program data, and system data. Among them, the programming data is used to indicate the function interface of the target application to call other modules; the program data is used to indicate the functional characteristic parameters of the target application; and the system data is used to indicate the default parameters of the operating system. By obtaining the data related to the API, it is achieved to quickly and comprehensively obtain the interface-related data of the target application when the source code of the target application is input.
[0122] When the binary of the target application is input, the interface of the target application includes ABI, so the interface data includes at least one of the following: type data, convention data, call data, and format data. Among them, type data is used to indicate the relevant definition of the data type (such as the size, layout and alignment of the data type, etc.); convention data is used to indicate the control function parameter passing method and return value passing method; call data is used to indicate the method of making a system call to the operating system; format data is used to indicate the file format (such as binary format, program library, etc.). By obtaining the data related to the ABI, it is achieved to quickly and comprehensively obtain the interface-related data of the target application when the binary of the target application is input.
[0123] (3) Structural data.
[0124] Structural data refers to data related to the files of the target application, so that the structural data can be obtained from the file directory structure of the operating system. In the embodiment of the present application, the structural data corresponding to the target application in different operating systems need to be consistent. If they are not consistent, the target application is incompatible between different operating systems, which will cause the target application to fail to run. Optionally, the structural data includes at least one of the following: directory data, path data, name data, and default configuration data. Among them, the directory data is used to indicate the directory structure of the root file system; the path data is used to indicate the file path (such as the storage path of the installation file, the file path and environment variables that the target application depends on, etc.); the name data is used to indicate the file name (such as the name of the configuration file, application, library file, etc.); the default configuration data is used to indicate the default configuration of the operating system. By obtaining the structural data, it is achieved to provide a reference for the compatibility evaluation of the target application from the perspective of file description, and enrich the considerations for compatibility evaluation.
[0125] (4) Compile data.
[0126] Compilation data refers to data related to the compilation parameters of the target application. Optionally, the compilation parameters include at least one of the following: system compilation data and program compilation data. The system compilation data is used to indicate the compilation parameters of the operating system; the program compilation data is used to indicate the compilation parameters of the target application. By obtaining the compilation data, a reference is provided for the compatibility evaluation of the target application from the perspective of the compilation and operation of the target application, further enriching the considerations for the compatibility evaluation.
[0127] (5)Customized configuration data.
[0128] Custom configuration data refers to data related to the custom configuration of the operating system. Optionally, the configuration data of the operating system includes the above-mentioned default configuration data and custom configuration data. Among them, the default configuration data will not change during operation; while the custom configuration data may change during operation, and the user can dynamically configure and adjust the custom configuration data according to needs and operating conditions. Therefore, "default configuration data" can also be called "static data", and "custom configuration data" can be called "dynamic data".
[0129] Based on the associated data of the above target applications, such as Figure 5 As shown, taking the migration of the target application between different operating systems as an example, the computer device needs to obtain the above dependency data, interface data, structure data, compilation data and custom configuration data from the component databases corresponding to the different operating systems respectively, and then the computer device needs to determine whether these data are consistent in different operating systems to perform compatibility assessment. If they are consistent, the target application is compatible between different operating systems; if they are inconsistent, the target application is incompatible between different operating systems.
[0130] To sum up, the technical solution provided in the embodiment of the present application achieves full and comprehensive acquisition of application-related data by acquiring multiple aspects of data associated with the application, thereby providing multi-faceted reference data for the compatibility evaluation of the application, so as to evaluate the compatibility of the application from multiple angles and improve the accuracy of the compatibility evaluation of the application across operating systems.
[0131] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0132] Please refer to Figure 6 , which shows a block diagram of a compatibility assessment device provided by an embodiment of the present application. The device has the function of implementing the above-mentioned compatibility assessment method. The device 600 may include: a database establishment module 610, a first acquisition module 620, a second acquisition module 630 and a compatibility assessment module 640.
[0133] The database establishment module 610 is used to establish a component database corresponding to the first operating system and a component database corresponding to the second operating system.
[0134] The first acquisition module 620 is used to acquire the associated data of the target application from the component database corresponding to the first operating system to obtain first associated data.
[0135] The second acquisition module 630 is used to acquire the associated data of the target application from the component database corresponding to the second operating system to obtain second associated data.
[0136] The compatibility evaluation module 640 is used to evaluate the compatibility of the target application between the first operating system and the second operating system based on the first association data and the second association data.
[0137] In one possible design, the compatibility assessment module 640 is used to: compare the first association data and the second association data; when the first association data and the second association data are consistent, determine that the target application is compatible between the first operating system and the second operating system; when the first association data and the second association data are inconsistent, determine that the target application is incompatible between the first operating system and the second operating system.
[0138] In one possible design, Figure 7 As shown, the apparatus 600 further includes: a first output module 650, configured to output a first compatibility evaluation result, wherein the first compatibility evaluation result includes whether the target application is compatible between the first operating system and the second operating system.
[0139] In a possible design, the target application is an application that has been adapted to the first operating system and has not been adapted to the second operating system; Figure 7 As shown, the device also includes: a data acquisition module 660, used to obtain difference data between the first associated data and the second associated data; an information determination module 670, used to determine modification guidance information based on the difference data, and the modification guidance information is used to indicate a modification method to make the target application adapt to the second operating system.
[0140] In one possible design, Figure 7 As shown, the device 600 also includes: a second output module 680, which is used to output a second compatibility evaluation result, and the second compatibility evaluation result includes at least one of the following: the modification guidance information and the difference data.
[0141] In one possible design, the associated data of the target application includes at least one of the following: dependency data, which refers to data related to the dependency package of the target application; interface data, which refers to data related to the interface of the target application; structure data, which refers to data related to the file of the target application; compilation data, which refers to data related to the compilation parameters of the target application; custom configuration data, which refers to data related to the custom configuration of the operating system.
[0142] In one possible design, the dependency data includes at least one of the following: existence data, used to indicate whether the dependency package exists; version data, used to indicate the version of the dependency package if the dependency package exists.
[0143] In one possible design, when the interface of the target application includes an API, the interface data includes at least one of the following: programming data, used to indicate that the target application calls the function interface of other modules; program data, used to indicate the functional characteristic parameters of the target application; system data, used to indicate the default parameters of the operating system.
[0144] In one possible design, when the interface of the target application includes an ABI, the interface data includes at least one of the following: type data, used to indicate the relevant definition of the data type; convention data, used to indicate the control function parameter passing method and the return value passing method; call data, used to indicate the method of making a system call to the operating system; format data, used to indicate the file format.
[0145] In one possible design, the structural data includes at least one of the following: directory data, used to indicate the directory structure of the root file system; path data, used to indicate the file path; name data, used to indicate the file name; default configuration data, used to indicate the default configuration of the operating system.
[0146] In one possible design, the compilation parameters include at least one of the following: system compilation data, used to indicate the compilation parameters of the operating system; program compilation data, used to indicate the compilation parameters of the target application.
[0147] In one possible design, the component database includes: static data for indicating initial parameters of the operating system; and / or dynamic data for indicating service parameters when the operating system is in operation.
[0148] In a possible design, the static data includes at least one of the following: data related to a software package that comes with the operating system, default parameters of the operating system, and compilation parameters of the operating system.
[0149] In one possible design, the dynamic data includes interface information provided by the operating system when it is running.
[0150] In summary, the technical solution provided by the embodiment of the present application provides users with the compatibility evaluation results of applications across operating systems by respectively obtaining the associated data corresponding to the application in different operating systems, and evaluating the compatibility of the application between different operating systems based on the acquired associated data, so as to facilitate users to timely understand whether the application is compatible between different operating systems, guide users to timely and accurately carry out the adaptation of the application between different operating systems, and improve the migration efficiency of the application between different operating systems. In addition, the embodiment of the present application realizes the analysis, sorting and storage of the components of the operating system by establishing component databases corresponding to different operating systems. On the one hand, it provides users with a list of components of the operating system, which is convenient for users to carry out tasks such as selecting the operating system. On the other hand, it is easy to identify different component data between different operating systems, and provide references for users to perform data analysis, etc., thereby helping users to conveniently carry out diversified work.
[0151] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0152] Please refer to Figure 8 , which shows a block diagram of a computer device 800 provided in one embodiment of the present application. The computer device 800 may be an electronic device such as a mobile phone, a tablet computer, a multimedia player, a wearable device, a PC (Personal Computer), a language learning terminal, an intelligent teaching machine, or a server. The computer device is used to implement the compatibility evaluation method provided in the above embodiment. The computer device may be Figure 1 Computer device 20 in the illustrated implementation environment.
[0153] Typically, the computer device 800 includes a processor 801 and a memory 802 .
[0154] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0155] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is configured to be executed by one or more processors to implement the above-mentioned compatibility assessment method.
[0156] In some embodiments, the computer device 800 may also optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board.
[0157] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the computer device 800, and the computer device 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0158] In an exemplary embodiment, a computer-readable storage medium is further provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the compatibility evaluation method described above is implemented.
[0159] Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives) or an optical disk, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0160] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned compatibility assessment method.
[0161] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.
[0162] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A compatibility assessment method, characterized in that: The method comprises: Establishing a component database corresponding to the first operating system and a component database corresponding to the second operating system; Acquire the associated data of the target application from the component database corresponding to the first operating system to obtain first associated data; Acquire the associated data of the target application from a component database corresponding to the second operating system to obtain second associated data; Based on the first association data and the second association data, the compatibility of the target application between the first operating system and the second operating system is evaluated.
2. The method according to claim 1, characterized in that The evaluating the compatibility of the target application between the first operating system and the second operating system based on the first association data and the second association data includes: comparing the first associated data and the second associated data; In a case where the first association data and the second association data are consistent, determining that the target application is compatible between the first operating system and the second operating system; In the case that the first association data and the second association data are inconsistent, it is determined that the target application is incompatible between the first operating system and the second operating system.
3. The method according to claim 2, characterized in that After determining that the target application is compatible between the first operating system and the second operating system, the method further includes: A first compatibility evaluation result is output, wherein the first compatibility evaluation result includes that the target application is compatible between the first operating system and the second operating system.
4. The method according to claim 2, characterized in that: The target application refers to an application that has been adapted to the first operating system and has not been adapted to the second operating system; After determining that the target application is incompatible between the first operating system and the second operating system, the method further includes: Acquire difference data between the first associated data and the second associated data; Based on the difference data, modification guidance information is determined, where the modification guidance information is used to indicate a modification method for making the target application program compatible with the second operating system.
5. The method according to claim 4, characterized in that After determining the modification guidance information based on the difference data, the method further includes: A second compatibility evaluation result is output, where the second compatibility evaluation result includes at least one of the following: the modification guidance information and the difference data.
6. The method according to claim 1, characterized in that The associated data of the target application includes at least one of the following: Dependency data refers to data related to dependency packages of the target application; Interface data refers to data related to the interface of the target application; Structure data refers to data related to files of the target application; Compilation data refers to data related to the compilation parameters of the target application; Custom configuration data refers to data related to the custom configuration of the operating system.
7. The method according to claim 6, characterized in that The dependency data includes at least one of the following: Existence data, used to indicate whether the dependent package exists; The version data is used to indicate the version of the dependent package if the dependent package exists.
8. The method according to claim 6, characterized in that In the case where the interface of the target application includes an application program interface API, the interface data includes at least one of the following: Programming data, used to instruct the target application to call function interfaces of other modules; Program data, used to indicate functional characteristic parameters of the target application program; System data, which indicates the default parameters of the operating system.
9. The method according to claim 6, characterized in that In the case where the interface of the target application includes an application binary interface ABI, the interface data includes at least one of the following: Type data, used to indicate the relevant definition of the data type; Agreement data, used to indicate the control function parameter passing method and return value passing method; Call data, which indicates how the system call was made to the operating system; Format data, which indicates the file format.
10. The method according to claim 6, characterized in that The structural data includes at least one of the following: Directory data, used to indicate the directory structure of the root file system; Path data, used to indicate the file path; Name data, used to indicate the file name; Default configuration data, used to indicate the default configuration of the operating system.
11. The method according to claim 6, characterized in that The compilation parameters include at least one of the following: System compilation data, used to indicate the compilation parameters of the operating system; The program compilation data is used to indicate the compilation parameters of the target application program.
12. The method according to claim 1, characterized in that The ingredient database includes: Static data, used to indicate the initial parameters of the operating system; and / or, Dynamic data, used to indicate service parameters when the operating system is in a running state.
13. The method according to claim 12, characterized in that The static data includes at least one of the following: data related to the software package provided by the operating system, default parameters of the operating system, and compilation parameters of the operating system.
14. The method according to claim 12, characterized in that The dynamic data includes interface information provided by the operating system when it is running.
15. A compatibility assessment device, characterized in that: The device comprises: A database establishment module, used to establish a component database corresponding to the first operating system and a component database corresponding to the second operating system; A first acquisition module, configured to acquire associated data of a target application from a component database corresponding to the first operating system to obtain first associated data; A second acquisition module, configured to acquire the associated data of the target application from a component database corresponding to the second operating system to obtain second associated data; A compatibility evaluation module is used to evaluate the compatibility of the target application between the first operating system and the second operating system based on the first association data and the second association data.
16. The device according to claim 15, characterized in that The compatibility assessment module is used to: comparing the first associated data and the second associated data; In a case where the first association data and the second association data are consistent, determining that the target application is compatible between the first operating system and the second operating system; In the case that the first association data and the second association data are inconsistent, it is determined that the target application is incompatible between the first operating system and the second operating system.
17. The device according to claim 16, characterized in that The device also includes: The first output module is used to output a first compatibility evaluation result, where the first compatibility evaluation result includes whether the target application is compatible between the first operating system and the second operating system.
18. The device according to claim 16, characterized in that The target application refers to an application that has been adapted to the first operating system and is not adapted to the second operating system; the device further includes: A data acquisition module, used to acquire difference data between the first associated data and the second associated data; An information determination module is used to determine modification guidance information based on the difference data, wherein the modification guidance information is used to indicate a modification method for making the target application program compatible with the second operating system.
19. The device according to claim 18, characterized in that The device also includes: The second output module is used to output a second compatibility evaluation result, where the second compatibility evaluation result includes at least one of the following: the modification guidance information and the difference data.
20. The device according to claim 15, characterized in that The associated data of the target application includes at least one of the following: Dependency data refers to data related to dependency packages of the target application; Interface data refers to data related to the interface of the target application; Structure data refers to data related to files of the target application; Compilation data refers to data related to the compilation parameters of the target application; Custom configuration data refers to data related to the custom configuration of the operating system.
21. The device according to claim 20, characterized in that The dependency data includes at least one of the following: Existence data, used to indicate whether the dependent package exists; The version data is used to indicate the version of the dependent package if the dependent package exists.
22. The device according to claim 20, characterized in that In the case where the interface of the target application includes an application program interface API, the interface data includes at least one of the following: Programming data, used to instruct the target application to call function interfaces of other modules; Program data, used to indicate functional characteristic parameters of the target application program; System data, which indicates the default parameters of the operating system.
23. The device according to claim 20, characterized in that In the case where the interface of the target application includes an application binary interface ABI, the interface data includes at least one of the following: Type data, used to indicate the relevant definition of the data type; Agreement data, used to indicate the control function parameter passing method and return value passing method; Call data, which indicates how the system call was made to the operating system; Format data, which indicates the file format.
24. The device according to claim 20, characterized in that The structural data includes at least one of the following: Directory data, used to indicate the directory structure of the root file system; Path data, used to indicate the file path; Name data, used to indicate the file name; Default configuration data, used to indicate the default configuration of the operating system.
25. The device according to claim 20, characterized in that The compilation parameters include at least one of the following: System compilation data, used to indicate the compilation parameters of the operating system; The program compilation data is used to indicate the compilation parameters of the target application program.
26. The device according to claim 15, characterized in that The ingredient database includes: Static data, used to indicate the initial parameters of the operating system; and / or, Dynamic data, used to indicate service parameters when the operating system is in a running state.
27. The device according to claim 26, characterized in that The static data includes at least one of the following: data related to the software package provided by the operating system, default parameters of the operating system, and compilation parameters of the operating system.
28. The device according to claim 26, characterized in that The dynamic data includes interface information provided by the operating system when it is running.
29. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 14.
30. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Application compatibility evaluation method and device
CN110134498A
Database migration evaluation method and device, storage medium and computer equipment
CN111258989A